✓ PASS

any-llm 1.40.2

usage.cached-tokens · openai-responses

Back to results · Scenario

Requirements

IdLevelStatusEvidence
total-reconcilesMUSTSATISFIEDusage.total=1130 (primary); truth.usage.total=1130
cached-input-reportedSHOULDSATISFIEDusage.cached_input=1080 (primary); truth.usage.cached_input=1080

What the provider sent

Finish
stop
Raw finish
completed
Text
A hot pan helps mushrooms brown instead of sitting in their released moisture and turning soggy. Heat the pan first, then add the mushrooms in a single layer; if they crowd the pan, cook them in batches.
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": 1080,
  "input": 1083,
  "output": 47,
  "raw": {
    "input_tokens": 1083,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 1080
    },
    "output_tokens": 47,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 1130
  },
  "reasoning": 0,
  "total": 1130
}
Stream completed
null
Error
null
Wire excerpt
status: 200
content-type: application/json
body (json):
{
  "id": "resp_02fcfac96ab9fe8f006af116b7fc6487d29e840ec29b5c8d4c",
  "object": "response",
  "created_at": 1794184888,
  "status": "completed",
  "access_programs": null,
  "background": false,
  "billing": {
    "payer": "developer"
  },
  "completed_at": 1794184890,
  "error": null,
  "frequency_penalty": 0.0,
  "image": {
    "context_compression": "disabled"
  },
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": 64,
  "max_tool_calls": null,
  "model": "gpt-6-luna",
  "moderation": null,
  "output": [
    {
      "id": "msg_02fcfac96ab9fe8f006af116ba01b087d2b36fd7ef38a38091",
      "type": "message",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "annotations": [],
          "logprobs": [],
          "text": "A hot pan helps mushrooms brown instead of sitting in their released moisture and turning soggy. Heat the pan first, then add the mushrooms in a single layer; if they crowd the pan, cook them in batches."
        }
      ],
      "phase": "final_answer",
      "role": "assistant"
    }
  ],
  "parallel_tool_calls": true,
  "presence_penalty": 0.0,
  "previous_response_id": null,
  "prompt_cache_key": null,
  "prompt_cache_retention": "24h",
  "reasoning": {
    "context": "all_turns",
    "effort": "none",
    "mode": "standard",
    "summary": null
  },
  "safety_identifier": null,
  "service_tier": "default",
  "store": true,
  "temperature": 1.0,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "tool_choice": "auto",
  "tool_usage": {
    "image_gen": {
      "input_tokens": 0,
      "input_tokens_details": {
        "image_tokens": 0,
        "text_tokens": 0
      },
      "output_tokens": 0,
      "output_tokens_details": {
        "image_tokens": 0,
        "text_tokens": 0
      },
      "total_tokens": 0
    },
    "web_search": {
      "num_requests": 0
    }
  },
  "tools": [],
  "top_logprobs": 0,
  "top_p": 0.98,
  "truncation": "disabled",
  "usage": {
    "input_tokens": 1083,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 1080
    },
    "output_tokens": 47,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 1130
  },
  "user": null,
  "metadata": {}
}

What the library reported

Outcome
returned
Finish
{
  "raw": "completed",
  "source": "status",
  "surface": "primary",
  "value": "stop"
}
Text
Value
A hot pan helps mushrooms brown instead of sitting in their released moisture and turning soggy. Heat the pan first, then add the mushrooms in a single layer; if they crowd the pan, cook them in batches.
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": 1080,
  "input": 1083,
  "output": 47,
  "reasoning": 0,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "primary",
    "total": "primary"
  },
  "total": 1130
}
Stream
{
  "chunks_seen": null,
  "completed": null,
  "used": false
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 203.26563715934753,
  "error": null,
  "finish": {
    "raw": "completed",
    "source": "status",
    "surface": "primary",
    "value": "stop"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "any_llm.responses",
    "language": "python",
    "name": "any-llm",
    "version": "1.40.2"
  },
  "notes": [],
  "outcome": "returned",
  "stream": {
    "chunks_seen": null,
    "completed": null,
    "used": false
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "A hot pan helps mushrooms brown instead of sitting in their released moisture and turning soggy. Heat the pan first, then add the mushrooms in a single layer; if they crowd the pan, cook them in batches."
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 1080,
    "input": 1083,
    "output": 47,
    "reasoning": 0,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "primary",
      "total": "primary"
    },
    "total": 1130
  }
}

Fixture

recorded openai-responses/usage.cached-tokens

ProvenanceValue
Recorded at2026-11-09T00:41:27Z
Requested modelgpt-6-luna
Returned modelgpt-6-luna
CI runhttps://github.com/kartsan03/wiretruth/actions/runs/42541528626

Reproduce

wiretruth serve openai-responses/usage.cached-tokens

Plain-library snippet from the shim manifest.

any_llm.responses(model=model, provider='openai', api_base=WIRETRUTH_BASE_URL_OPENAI_RESPONSES, api_key=WIRETRUTH_API_KEY)

Upstream

No matching upstream report.

History

VersionGrade
1.40.2✓ PASS
1.38.0not covered
1.33.0not covered