diff --git a/tests/integration/README.md b/tests/integration/README.md index dcdf0e9fa96..f21e04f1ca5 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -2,7 +2,7 @@ These tests exercise a running gateway, PostgreSQL and Redis with an owned local upstream. CircleCI owns this suite. Tests are grouped by behavior, with no automatic test retries or fallback to paid provider calls -The `cost` group runs the scripted-shape cost matrix through the shared integration upstream, which serves the test-owned cost map over loopback through `LITELLM_MODEL_COST_MAP_URL`; cost goldens are checked into the integration suite and must not be copied into the E2E coverage registry. The upstream renders a scenario in the shape LiteLLM's own provider config resolves to for the deployment, so a provider LiteLLM already parses with one of the five rendered families is a cost-map entry plus a `cases.json` `providers` row with its deployment parameters; a provider whose config class is none of those families fails at collection until `scripted_shapes.py` gains a renderer +The `cost` group is driven by `cost_tracking_cases.json`, which contains the cost map, literal requests, literal provider responses and expected accounting values. Each case has a name, contract ID, cost-map model, optional deployment overrides, request body, tagged response and exact or recount expectations. Request bodies use `$MODEL` for the registered proxy model, while responses use `$REQUEST_ID` for the per-run scenario ID. To add a case, add a cost-map entry when the model is new, add the request body and exact provider response data, add hand-computed expected values and register the node ID in `contracts.json`. The upstream serves each stored response for any path under `/`, while the test-owned cost map is served over loopback through `LITELLM_MODEL_COST_MAP_URL` Use `tests/integration/run.py management`, `accounting`, `database`, `providers`, `extensions`, `sdk` or `cost` to run a selected group. Set `INTEGRATION_PROXY_URL`, `INTEGRATION_UPSTREAM_URL`, `INTEGRATION_MASTER_KEY` and `DATABASE_URL` to an isolated test deployment. The runner selects the new domain directories explicitly; the legacy OCI and sandbox selections remain separate diff --git a/tests/integration/_support/scripted_shapes.py b/tests/integration/_support/scripted_shapes.py deleted file mode 100644 index 61bfe7c24f1..00000000000 --- a/tests/integration/_support/scripted_shapes.py +++ /dev/null @@ -1,1364 +0,0 @@ -"""Scripted response shapes for the cost-calculation integration suite. - -This module owns the Scenario schema, the five renderers, one per LiteLLM -parser family, and the dispatcher. Because the usage is scripted, expected -spend is literal arithmetic on the test cost map's rates, with no dependency -on what a real provider would report. - -The upstream exposes: - -- ``POST /__scenarios`` register a Scenario JSON, returns its id -- ``DELETE /__scenarios/`` remove it -- ``POST //`` provider response; the remainder is whatever - path the provider client appends (``chat/completions``, ``responses``, - ``v1/messages``, ``models/:generateContent`` ...). Vertex appends - ``:generateContent`` / ``:streamGenerateContent`` to the scenario segment, - and Bedrock Converse targets ``model//converse`` / - ``converse-stream`` - -A request carrying ``"stream": true`` (or the ``:streamGenerateContent`` Gemini -verb) gets an SSE answer; ``stream_usage`` on the Scenario decides whether the -final stream chunk carries usage or the provider reports none. -""" - -from __future__ import annotations - -import json -import struct -import threading -import time -import zlib -from collections.abc import Mapping -from dataclasses import dataclass -from types import MappingProxyType -from typing import Final, Literal, TypeAlias, assert_never -from urllib.parse import unquote, urlsplit - -from pydantic import BaseModel, ConfigDict, TypeAdapter, model_validator - -Shape: TypeAlias = Literal[ - "openai_chat", - "openai_responses", - "anthropic_messages", - "gemini_generate", - "bedrock_converse", -] - - -@dataclass(frozen=True, slots=True) -class ShapeSpec: - usage: frozenset[str] - terminals: frozenset[str] - - -SHAPES: Final[Mapping[Shape, ShapeSpec]] = MappingProxyType( - { - "openai_chat": ShapeSpec( - usage=frozenset( - { - "cache_read_tokens", - "reasoning_tokens", - "audio_input_tokens", - "audio_output_tokens", - "web_search_calls", - } - ), - terminals=frozenset(), - ), - "openai_responses": ShapeSpec( - usage=frozenset( - { - "cache_read_tokens", - "reasoning_tokens", - "web_search_calls", - "file_search_calls", - } - ), - terminals=frozenset({"incomplete", "unvalidated"}), - ), - "anthropic_messages": ShapeSpec( - usage=frozenset( - { - "cache_read_tokens", - "web_search_calls", - "cache_write_5m_tokens", - "cache_write_1h_tokens", - } - ), - terminals=frozenset(), - ), - "gemini_generate": ShapeSpec( - usage=frozenset( - { - "cache_read_tokens", - "reasoning_tokens", - "audio_input_tokens", - "audio_output_tokens", - "image_input_tokens", - "video_input_tokens", - "web_search_calls", - "google_maps_calls", - } - ), - terminals=frozenset({"prompt_blocked"}), - ), - "bedrock_converse": ShapeSpec( - usage=frozenset( - { - "cache_read_tokens", - "cache_write_5m_tokens", - "cache_write_1h_tokens", - } - ), - terminals=frozenset(), - ), - } -) -StreamUsage: TypeAlias = Literal["final_chunk", "absent"] -ServiceTier: TypeAlias = Literal["flex", "priority"] -TerminalKind: TypeAlias = Literal["completed", "incomplete", "unvalidated", "prompt_blocked"] - -_BASE_USAGE_FIELDS: Final = frozenset({"fresh_input_tokens", "output_tokens"}) - - -class ScriptedToolCall(BaseModel): - """A single function call the scripted output emits instead of text. - ``arguments`` is the shape's JSON string (~250 chars), sliced into deltas - for streams.""" - - model_config = ConfigDict(frozen=True) - - name: str - arguments: str - - -class ScriptedUsage(BaseModel): - """Physical token counts the scripted response reports. ``fresh_input_tokens`` - is the uncached, never-written, non-audio input count; ``output_tokens`` is - the non-reasoning, non-audio output count. Renderers add the cached, written, - audio, and reasoning counts into the shape's total fields the way the real - provider does (inside prompt_tokens for OpenAI/Gemini, as uncached-only - input_tokens for Anthropic).""" - - model_config = ConfigDict(frozen=True) - - fresh_input_tokens: int = 0 - output_tokens: int = 0 - cache_read_tokens: int = 0 - cache_write_5m_tokens: int = 0 - cache_write_1h_tokens: int = 0 - reasoning_tokens: int = 0 - audio_input_tokens: int = 0 - audio_output_tokens: int = 0 - image_input_tokens: int = 0 - video_input_tokens: int = 0 - web_search_calls: int = 0 - google_maps_calls: int = 0 - file_search_calls: int = 0 - - -class ScriptedOutput(BaseModel): - model_config = ConfigDict(frozen=True) - - text: str - finish_reason: str = "stop" - # When set, emitted verbatim as the response's model field, letting a test - # prove the biller prices the provider-reported model. - response_model: str | None = None - # OpenAI-compatible providers can report a provider-computed cost; emitted as - # the top-level "cost" field on the together/fireworks response. - provider_cost: float | None = None - # When set, the response is a tool call only: no text content on any response. - tool_call: ScriptedToolCall | None = None - # Terminal shape: "unvalidated" makes the Responses terminal response fail - # pydantic validation so the proxy takes its model_construct dict path; - # "prompt_blocked" is a Gemini promptFeedback-only body. - terminal: TerminalKind = "completed" - - -class Scenario(BaseModel): - model_config = ConfigDict(frozen=True) - - scenario_id: str - shape: Shape - usage: ScriptedUsage - output: ScriptedOutput - # The bare provider-facing model name the renderer echoes when the request - # carries no model of its own (Vertex and Bedrock name the model in the URL - # path, not the body). - model: str - stream_usage: StreamUsage = "final_chunk" - service_tier: ServiceTier | None = None - # Anthropic fast mode and US inference geography; emitted on the anthropic - # usage object only (litellm reads them there), so they are response-side. - speed: Literal["fast"] | None = None - inference_geo: Literal["us"] | None = None - - @model_validator(mode="after") - def _check_terminal_supported(self) -> Scenario: - spec: Final = SHAPES[self.shape] - if ( - self.output.terminal != "completed" - and self.output.terminal not in spec.terminals - ): - raise ValueError( - f"shape {self.shape} cannot emit terminal={self.output.terminal}" - ) - unsupported: Final = frozenset( - field - for field in self.usage.model_fields_set - if getattr(self.usage, field) - and field not in (spec.usage | _BASE_USAGE_FIELDS) - ) - if unsupported: - raise ValueError( - f"shape {self.shape} cannot express usage fields {sorted(unsupported)}" - ) - if (self.speed or self.inference_geo) and self.shape != "anthropic_messages": - raise ValueError( - f"shape {self.shape} cannot emit speed/inference_geo (anthropic usage fields)" - ) - return self - - -class ScenarioRegistered(BaseModel): - scenario_id: str - - -class ScenarioDeleted(BaseModel): - deleted: bool - - -class HealthStatus(BaseModel): - status: str - - -@dataclass(frozen=True, slots=True) -class RenderedResponse: - status_code: int - content_type: str - body: bytes - - -def _jobj(*pairs: tuple[str, object]) -> Mapping[str, object]: - """A JSON object payload built in one shot and frozen.""" - return MappingProxyType(dict(pairs)) - - -def _jobj_opt(*pairs: tuple[str, object] | None) -> Mapping[str, object]: - """``_jobj`` where a ``None`` pair means the field is absent.""" - return MappingProxyType(dict(pair for pair in pairs if pair is not None)) - - -def _json_bytes(payload: Mapping[str, object]) -> bytes: - return json.dumps(payload, default=dict).encode("utf-8") - - -def _sse_frame(event_name: str | None, data: Mapping[str, object] | str) -> str: - head: Final = f"event: {event_name}\n" if event_name is not None else "" - payload: Final = data if isinstance(data, str) else json.dumps(data, default=dict) - return f"{head}data: {payload}\n\n" - - -def _sse(events: tuple[tuple[str | None, Mapping[str, object] | str], ...]) -> bytes: - return "".join(_sse_frame(event_name, data) for event_name, data in events).encode("utf-8") - - - # ---------- per-shape usage shapes ---------- - - -def _openai_usage(u: ScriptedUsage) -> Mapping[str, object]: - prompt_tokens: Final = u.fresh_input_tokens + u.cache_read_tokens + u.audio_input_tokens - completion_tokens: Final = u.output_tokens + u.reasoning_tokens + u.audio_output_tokens - prompt_details: Final = _jobj_opt( - ("cached_tokens", u.cache_read_tokens) if u.cache_read_tokens else None, - ("audio_tokens", u.audio_input_tokens) if u.audio_input_tokens else None, - ) - completion_details: Final = _jobj_opt( - ("reasoning_tokens", u.reasoning_tokens) if u.reasoning_tokens else None, - ("audio_tokens", u.audio_output_tokens) if u.audio_output_tokens else None, - ) - return _jobj_opt( - ("prompt_tokens", prompt_tokens), - ("completion_tokens", completion_tokens), - ("total_tokens", prompt_tokens + completion_tokens), - ("prompt_tokens_details", prompt_details) if prompt_details else None, - ("completion_tokens_details", completion_details) if completion_details else None, - ) - - -def _anthropic_usage(scenario: Scenario) -> Mapping[str, object]: - # Anthropic reports uncached-only input_tokens; cache reads and writes ride - # top-level fields, with the 5m/1h write split under cache_creation. - u: Final = scenario.usage - return _jobj_opt( - ("input_tokens", u.fresh_input_tokens), - ("output_tokens", u.output_tokens), - ("service_tier", scenario.service_tier) if scenario.service_tier else None, - ("speed", scenario.speed) if scenario.speed else None, - ("inference_geo", scenario.inference_geo) if scenario.inference_geo else None, - ("cache_read_input_tokens", u.cache_read_tokens) if u.cache_read_tokens else None, - ( - ("cache_creation_input_tokens", u.cache_write_5m_tokens + u.cache_write_1h_tokens) - if u.cache_write_5m_tokens or u.cache_write_1h_tokens - else None - ), - ( - ( - "cache_creation", - _jobj( - ("ephemeral_5m_input_tokens", u.cache_write_5m_tokens), - ("ephemeral_1h_input_tokens", u.cache_write_1h_tokens), - ), - ) - if u.cache_write_5m_tokens or u.cache_write_1h_tokens - else None - ), - ( - ("server_tool_use", _jobj(("web_search_requests", u.web_search_calls))) - if u.web_search_calls - else None - ), - ) - - -def _gemini_usage(scenario: Scenario) -> Mapping[str, object]: - # Real generateContent accounting: promptTokenCount carries the cached count - # inside it (TEXT modality is the cached-inclusive text count so litellm's - # implicit-caching subtraction lands on the fresh figure), candidatesTokenCount - # excludes thoughts, thoughtsTokenCount reports them separately, and - # totalTokenCount sums all three. Image/video input ride promptTokensDetails. - u: Final = scenario.usage - prompt_tokens: Final = ( - u.fresh_input_tokens + u.cache_read_tokens + u.audio_input_tokens - + u.image_input_tokens + u.video_input_tokens - ) - candidates: Final = u.output_tokens + u.audio_output_tokens - return _jobj_opt( - ("promptTokenCount", prompt_tokens), - ("candidatesTokenCount", candidates), - ("thoughtsTokenCount", u.reasoning_tokens) if u.reasoning_tokens else None, - ("totalTokenCount", prompt_tokens + candidates + u.reasoning_tokens), - ("cachedContentTokenCount", u.cache_read_tokens) if u.cache_read_tokens else None, - ( - "promptTokensDetails", - ( - _jobj(("modality", "TEXT"), ("tokenCount", u.fresh_input_tokens + u.cache_read_tokens)), - *( - (_jobj(("modality", "AUDIO"), ("tokenCount", u.audio_input_tokens)),) - if u.audio_input_tokens - else () - ), - *( - (_jobj(("modality", "IMAGE"), ("tokenCount", u.image_input_tokens)),) - if u.image_input_tokens - else () - ), - *( - (_jobj(("modality", "VIDEO"), ("tokenCount", u.video_input_tokens)),) - if u.video_input_tokens - else () - ), - ), - ), - ( - ( - "candidatesTokensDetails", - ( - _jobj(("modality", "TEXT"), ("tokenCount", u.output_tokens)), - _jobj(("modality", "AUDIO"), ("tokenCount", u.audio_output_tokens)), - ), - ) - if u.audio_output_tokens - else None - ), - ( - ( - "trafficType", - {"flex": "ON_DEMAND_FLEX", "priority": "ON_DEMAND_PRIORITY"}[ - scenario.service_tier - ], - ) - if scenario.service_tier - else None - ), - ) - - -def _gemini_grounding_metadata(scenario: Scenario) -> Mapping[str, object] | None: - """groundingMetadata for the search/Maps flags. Maps items carry maps - chunks and googleMapsWidgetContextToken so litellm bills them as Maps - queries, not web search.""" - u: Final = scenario.usage - if not u.web_search_calls and not u.google_maps_calls: - return None - if u.google_maps_calls: - return _jobj( - ( - "webSearchQueries", - tuple(f"maps query {i}" for i in range(u.google_maps_calls)), - ), - ( - "groundingChunks", - tuple( - _jobj(("maps", _jobj(("uri", f"https://maps.google.com/?cid={i}")))) - for i in range(u.google_maps_calls) - ), - ), - ("googleMapsWidgetContextToken", f"token_{scenario.scenario_id}"), - ) - return _jobj( - ("webSearchQueries", tuple(f"query {i}" for i in range(u.web_search_calls))), - ) - - -def _responses_usage(u: ScriptedUsage) -> Mapping[str, object]: - input_tokens: Final = u.fresh_input_tokens + u.cache_read_tokens + u.audio_input_tokens - output_tokens: Final = u.output_tokens + u.reasoning_tokens + u.audio_output_tokens - input_details: Final = _jobj_opt( - ("cached_tokens", u.cache_read_tokens) if u.cache_read_tokens else None, - ) - return _jobj_opt( - ("input_tokens", input_tokens), - ("output_tokens", output_tokens), - ("total_tokens", input_tokens + output_tokens), - ("input_tokens_details", input_details) if input_details else None, - ( - ("output_tokens_details", _jobj(("reasoning_tokens", u.reasoning_tokens))) - if u.reasoning_tokens - else None - ), - ) - - - # ---------- per-shape responses ---------- - - -def _split_arguments(arguments: str) -> tuple[str, ...]: - """Slice a tool-call arguments JSON string into 2-3 streamed deltas.""" - third: Final = max(1, len(arguments) // 3) - return tuple( - slice_ - for slice_ in (arguments[:third], arguments[third : 2 * third], arguments[2 * third :]) - if slice_ - ) - - -def _openai_message(scenario: Scenario) -> Mapping[str, object]: - tool_call: Final = scenario.output.tool_call - return _jobj_opt( - ("role", "assistant"), - ("content", None if tool_call is not None else scenario.output.text), - ( - ( - "tool_calls", - ( - _jobj( - ("id", f"call_{scenario.scenario_id}"), - ("type", "function"), - ( - "function", - _jobj(("name", tool_call.name), ("arguments", tool_call.arguments)), - ), - ), - ), - ) - if tool_call is not None - else None - ), - ( - ( - "annotations", - tuple( - _jobj( - ("type", "url_citation"), - ( - "url_citation", - _jobj( - ("url", "https://scripted.example/source"), - ("title", "scripted source"), - ("start_index", 0), - ("end_index", 1), - ), - ), - ) - for _ in range(scenario.usage.web_search_calls) - ), - ) - if scenario.usage.web_search_calls - else None - ), - ) - - -def _openai_chat_body(scenario: Scenario, requested_model: str) -> Mapping[str, object]: - return _jobj_opt( - ("id", f"chatcmpl-{scenario.scenario_id}"), - ("object", "chat.completion"), - ("created", int(time.time())), - ("model", scenario.output.response_model or requested_model), - ( - "choices", - ( - _jobj( - ("index", 0), - ("message", _openai_message(scenario)), - ( - "finish_reason", - "tool_calls" - if scenario.output.tool_call is not None - else scenario.output.finish_reason, - ), - ), - ), - ), - ("usage", _openai_usage(scenario.usage)), - ("service_tier", scenario.service_tier) if scenario.service_tier is not None else None, - ("cost", scenario.output.provider_cost) if scenario.output.provider_cost is not None else None, - ) - - -def _openai_chunk( - scenario: Scenario, - requested_model: str, - choices: tuple[Mapping[str, object], ...] = (), - usage: Mapping[str, object] | None = None, -) -> Mapping[str, object]: - return _jobj_opt( - ("id", f"chatcmpl-{scenario.scenario_id}"), - ("object", "chat.completion.chunk"), - ("created", int(time.time())), - ("model", scenario.output.response_model or requested_model), - ("choices", choices), - ("usage", usage), - ) - - -def _openai_chat_sse(scenario: Scenario, requested_model: str) -> bytes: - tool_call: Final = scenario.output.tool_call - delta: Final = _jobj_opt( - ("role", "assistant"), - ("content", scenario.output.text), - ( - ("annotations", _openai_message(scenario)["annotations"]) - if scenario.usage.web_search_calls - else None - ), - ) - body_deltas: Final[tuple[Mapping[str, object], ...]] = ( - ( - _jobj( - ("role", "assistant"), - ( - "tool_calls", - ( - _jobj( - ("index", 0), - ("id", f"call_{scenario.scenario_id}"), - ("type", "function"), - ( - "function", - _jobj(("name", tool_call.name), ("arguments", "")), - ), - ), - ), - ), - ), - *( - _jobj( - ( - "tool_calls", - ( - _jobj( - ("index", 0), - ("function", _jobj(("arguments", arguments_slice))), - ), - ), - ) - ) - for arguments_slice in _split_arguments(tool_call.arguments) - ), - ) - if tool_call is not None - else (delta,) - ) - return _sse( - ( - ( - None, - _openai_chunk( - scenario, - requested_model, - choices=(_jobj(("index", 0), ("delta", _jobj(("role", "assistant"))), ("finish_reason", None)),), - ), - ), - *( - ( - None, - _openai_chunk( - scenario, - requested_model, - choices=(_jobj(("index", 0), ("delta", body_delta), ("finish_reason", None)),), - ), - ) - for body_delta in body_deltas - ), - ( - None, - _openai_chunk( - scenario, - requested_model, - choices=( - _jobj( - ("index", 0), - ("delta", _jobj()), - ( - "finish_reason", - "tool_calls" - if tool_call is not None - else scenario.output.finish_reason, - ), - ), - ), - ), - ), - *( - ((None, _openai_chunk(scenario, requested_model, usage=_openai_usage(scenario.usage))),) - if scenario.stream_usage == "final_chunk" - else () - ), - (None, "[DONE]"), - ) - ) - - -def _anthropic_content(scenario: Scenario) -> tuple[Mapping[str, object], ...]: - tool_call: Final = scenario.output.tool_call - if tool_call is not None: - return ( - _jobj( - ("type", "tool_use"), - ("id", f"toolu_{scenario.scenario_id}"), - ("name", tool_call.name), - ("input", json.loads(tool_call.arguments)), - ), - ) - return (_jobj(("type", "text"), ("text", scenario.output.text)),) - - -def _anthropic_stop_reason(scenario: Scenario) -> str: - if scenario.output.tool_call is not None: - return "tool_use" - return "end_turn" if scenario.output.finish_reason == "stop" else scenario.output.finish_reason - - -def _anthropic_body(scenario: Scenario, requested_model: str) -> Mapping[str, object]: - return _jobj( - ("id", f"msg_{scenario.scenario_id}"), - ("type", "message"), - ("role", "assistant"), - ("model", scenario.output.response_model or requested_model), - ("content", _anthropic_content(scenario)), - ("stop_reason", _anthropic_stop_reason(scenario)), - ("usage", _anthropic_usage(scenario)), - ) - - -def _anthropic_sse(scenario: Scenario, requested_model: str) -> bytes: - emit_usage: Final = scenario.stream_usage == "final_chunk" - input_usage: Final = _jobj( - *( - (key, value) - for key, value in _anthropic_usage(scenario).items() - if key != "output_tokens" - ) - ) - message_start: Final = _jobj( - ("type", "message_start"), - ( - "message", - _jobj_opt( - ("id", f"msg_{scenario.scenario_id}"), - ("type", "message"), - ("role", "assistant"), - ("model", scenario.output.response_model or requested_model), - ("content", ()), - ("stop_reason", None), - ("usage", input_usage) if emit_usage else None, - ), - ), - ) - message_delta: Final = _jobj_opt( - ("type", "message_delta"), - ( - "delta", - _jobj(("stop_reason", _anthropic_stop_reason(scenario))), - ), - ( - ("usage", _jobj(("output_tokens", scenario.usage.output_tokens))) - if emit_usage - else None - ), - ) - return _sse( - ( - ("message_start", message_start), - ( - "content_block_start", - _jobj( - ("type", "content_block_start"), - ("index", 0), - ( - "content_block", - _jobj( - ("type", "tool_use"), - ("id", f"toolu_{scenario.scenario_id}"), - ("name", scenario.output.tool_call.name), - ("input", _jobj()), - ) - if scenario.output.tool_call is not None - else _jobj(("type", "text"), ("text", "")), - ), - ), - ), - *( - tuple( - ( - "content_block_delta", - _jobj( - ("type", "content_block_delta"), - ("index", 0), - ( - "delta", - _jobj(("type", "input_json_delta"), ("partial_json", arguments_slice)), - ), - ), - ) - for arguments_slice in _split_arguments(scenario.output.tool_call.arguments) - ) - if scenario.output.tool_call is not None - else ( - ( - "content_block_delta", - _jobj( - ("type", "content_block_delta"), - ("index", 0), - ("delta", _jobj(("type", "text_delta"), ("text", scenario.output.text))), - ), - ), - ) - ), - ("content_block_stop", _jobj(("type", "content_block_stop"), ("index", 0))), - ("message_delta", message_delta), - ("message_stop", _jobj(("type", "message_stop"))), - ) - ) - - -def _gemini_prompt_blocked_body(scenario: Scenario, requested_model: str) -> Mapping[str, object]: - return _jobj( - ( - "promptFeedback", - _jobj( - ("blockReason", "SAFETY"), - ( - "safetyRatings", - ( - _jobj( - ("category", "HARM_CATEGORY_HARASSMENT"), - ("probability", "HIGH"), - ("blocked", True), - ), - ), - ), - ), - ), - ("usageMetadata", _gemini_usage(scenario)), - ("modelVersion", scenario.output.response_model or requested_model), - ) - - -def _gemini_parts(scenario: Scenario) -> tuple[Mapping[str, object], ...]: - tool_call: Final = scenario.output.tool_call - if tool_call is not None: - return ( - _jobj( - ( - "functionCall", - _jobj( - ("name", tool_call.name), - ("args", json.loads(tool_call.arguments)), - ), - ) - ), - ) - return (_jobj(("text", scenario.output.text)),) - - -def _gemini_body(scenario: Scenario, requested_model: str) -> Mapping[str, object]: - if scenario.output.terminal == "prompt_blocked": - return _gemini_prompt_blocked_body(scenario, requested_model) - return _jobj( - ( - "candidates", - ( - _jobj_opt( - ( - "content", - _jobj( - ("parts", _gemini_parts(scenario)), - ("role", "model"), - ), - ), - ( - "finishReason", - "STOP" if scenario.output.finish_reason == "stop" else scenario.output.finish_reason.upper(), - ), - ("index", 0), - ( - ("groundingMetadata", _gemini_grounding_metadata(scenario)) - if _gemini_grounding_metadata(scenario) is not None - else None - ), - ), - ), - ), - ("usageMetadata", _gemini_usage(scenario)), - ("modelVersion", scenario.output.response_model or requested_model), - ) - - -def _gemini_sse(scenario: Scenario, requested_model: str) -> bytes: - emit_usage: Final = scenario.stream_usage == "final_chunk" - first: Final = _jobj( - *((key, value) for key, value in _gemini_body(scenario, requested_model).items() if key != "usageMetadata") - ) - return _sse( - ( - (None, first), - *( - ( - ( - None, - _jobj( - ("candidates", ()), - ("usageMetadata", _gemini_usage(scenario)), - ("modelVersion", scenario.output.response_model or requested_model), - ), - ), - ) - if emit_usage - else () - ), - ) - ) - - -def _responses_output(scenario: Scenario) -> tuple[Mapping[str, object], ...]: - tool_call: Final = scenario.output.tool_call - return ( - *( - ( - _jobj(("type", "scripted_future_item"), ("id", f"fut_{scenario.scenario_id}"), ("status", "completed")), - ) - if scenario.output.terminal == "unvalidated" - else () - ), - *( - _jobj(("type", "web_search_call"), ("id", f"ws_{i}"), ("status", "completed")) - for i in range(scenario.usage.web_search_calls) - ), - *( - _jobj( - ("type", "file_search_call"), - ("id", f"fs_{i}"), - ("status", "completed"), - ("queries", (f"query {i}",)), - ("results", ()), - ) - for i in range(scenario.usage.file_search_calls) - ), - _jobj( - ("type", "function_call"), - ("id", f"fc_{scenario.scenario_id}"), - ("call_id", f"call_{scenario.scenario_id}"), - ("name", tool_call.name), - ("arguments", tool_call.arguments), - ("status", "completed"), - ) - if tool_call is not None - else _jobj( - ("type", "message"), - ("id", f"msg_{scenario.scenario_id}"), - ("status", "completed"), - ("role", "assistant"), - ( - "content", - ( - _jobj( - ("type", "output_text"), - ("text", scenario.output.text), - ("annotations", ()), - ), - ), - ), - ), - ) - - -def _responses_body(scenario: Scenario, requested_model: str) -> Mapping[str, object]: - incomplete: Final = scenario.output.terminal == "incomplete" - return _jobj_opt( - ("id", f"resp_{scenario.scenario_id}"), - ("object", "response"), - ( - "created_at", - "not-a-number" if scenario.output.terminal == "unvalidated" else int(time.time()), - ), - ("status", "incomplete" if incomplete else "completed"), - ( - ("incomplete_details", _jobj(("reason", "max_output_tokens"))) - if incomplete - else None - ), - ("model", scenario.output.response_model or requested_model), - ("output", _responses_output(scenario)), - ("usage", _responses_usage(scenario.usage)), - ) - - -def _responses_sse(scenario: Scenario, requested_model: str) -> bytes: - tool_call: Final = scenario.output.tool_call - terminal: Final = ( - _jobj(*((key, value) for key, value in _responses_body(scenario, requested_model).items() if key != "usage")) - if scenario.stream_usage == "absent" - else _responses_body(scenario, requested_model) - ) - created: Final = _jobj( - *((key, value) for key, value in terminal.items() if key not in ("status", "usage")), - ("status", "in_progress"), - ("usage", None), - ) - terminal_event: Final = ( - "response.incomplete" if scenario.output.terminal == "incomplete" else "response.completed" - ) - output_index: Final = ( - scenario.usage.web_search_calls - + scenario.usage.file_search_calls - + (1 if scenario.output.terminal == "unvalidated" else 0) - ) - file_search_events: Final[tuple[tuple[str, Mapping[str, object]], ...]] = tuple( - event - for i in range(scenario.usage.file_search_calls) - for event in ( - ( - "response.output_item.added", - _jobj( - ("type", "response.output_item.added"), - ("output_index", i), - ( - "item", - _jobj( - ("type", "file_search_call"), - ("id", f"fs_{i}"), - ("status", "in_progress"), - ("queries", ()), - ), - ), - ), - ), - ( - "response.output_item.done", - _jobj( - ("type", "response.output_item.done"), - ("output_index", i), - ( - "item", - _jobj( - ("type", "file_search_call"), - ("id", f"fs_{i}"), - ("status", "completed"), - ("queries", (f"query {i}",)), - ("results", ()), - ), - ), - ), - ), - ) - ) - call_events: Final[tuple[tuple[str, Mapping[str, object]], ...]] = ( - ( - ( - "response.output_item.added", - _jobj( - ("type", "response.output_item.added"), - ("output_index", output_index), - ( - "item", - _jobj( - ("type", "function_call"), - ("id", f"fc_{scenario.scenario_id}"), - ("call_id", f"call_{scenario.scenario_id}"), - ("name", tool_call.name), - ("arguments", ""), - ("status", "in_progress"), - ), - ), - ), - ), - *( - ( - "response.function_call_arguments.delta", - _jobj( - ("type", "response.function_call_arguments.delta"), - ("item_id", f"fc_{scenario.scenario_id}"), - ("output_index", output_index), - ("delta", arguments_slice), - ), - ) - for arguments_slice in _split_arguments(tool_call.arguments) - ), - ( - "response.function_call_arguments.done", - _jobj( - ("type", "response.function_call_arguments.done"), - ("item_id", f"fc_{scenario.scenario_id}"), - ("output_index", output_index), - ("arguments", tool_call.arguments), - ), - ), - ) - if tool_call is not None - else ( - ( - "response.output_text.delta", - _jobj( - ("type", "response.output_text.delta"), - ("item_id", f"msg_{scenario.scenario_id}"), - ("output_index", output_index), - ("content_index", 0), - ("delta", scenario.output.text), - ), - ), - ) - ) - middle_events: Final[tuple[tuple[str, Mapping[str, object]], ...]] = ( - *file_search_events, - *call_events, - ) - return _sse( - ( - ("response.created", _jobj(("type", "response.created"), ("response", created))), - *middle_events, - (terminal_event, _jobj(("type", terminal_event), ("response", terminal))), - ) - ) - - -def _bedrock_usage(u: ScriptedUsage) -> Mapping[str, object]: - # Converse reports uncached input in inputTokens and rides cache reads and - # writes on top-level fields; totalTokens covers every input kind + output. - cache_writes: Final = u.cache_write_5m_tokens + u.cache_write_1h_tokens - return _jobj_opt( - ("inputTokens", u.fresh_input_tokens), - ("outputTokens", u.output_tokens), - ( - "totalTokens", - u.fresh_input_tokens + u.cache_read_tokens + cache_writes + u.output_tokens, - ), - ("cacheReadInputTokens", u.cache_read_tokens) if u.cache_read_tokens else None, - ("cacheWriteInputTokens", cache_writes) if cache_writes else None, - ( - ( - "cacheDetails", - tuple( - _jobj(("inputTokens", count), ("ttl", ttl)) - for count, ttl in ( - (u.cache_write_5m_tokens, "5m"), - (u.cache_write_1h_tokens, "1h"), - ) - if count - ), - ) - if cache_writes - else None - ), - ) - - -def _bedrock_stop_reason(scenario: Scenario) -> str: - if scenario.output.tool_call is not None: - return "tool_use" - return "end_turn" if scenario.output.finish_reason == "stop" else scenario.output.finish_reason - - -def _bedrock_content(scenario: Scenario) -> tuple[Mapping[str, object], ...]: - tool_call: Final = scenario.output.tool_call - if tool_call is not None: - return ( - _jobj( - ( - "toolUse", - _jobj( - ("toolUseId", f"tooluse_{scenario.scenario_id}"), - ("name", tool_call.name), - ("input", json.loads(tool_call.arguments)), - ), - ), - ), - ) - return (_jobj(("text", scenario.output.text)),) - - -def _bedrock_body(scenario: Scenario) -> Mapping[str, object]: - return _jobj_opt( - ( - "output", - _jobj( - ( - "message", - _jobj( - ("role", "assistant"), - ("content", _bedrock_content(scenario)), - ), - ), - ), - ), - ("stopReason", _bedrock_stop_reason(scenario)), - ("usage", _bedrock_usage(scenario.usage)), - ("metrics", _jobj(("latencyMs", 42))), - ( - ("serviceTier", _jobj(("type", scenario.service_tier))) - if scenario.service_tier - else None - ), - ) - - -def _aws_str_header(name: str, value: str) -> bytes: - """One eventstream header: 1-byte name len + name + type-7 marker + value.""" - name_b: Final = name.encode() - value_b: Final = value.encode() - return ( - struct.pack("!B", len(name_b)) - + name_b - + struct.pack("!B", 7) - + struct.pack("!H", len(value_b)) - + value_b - ) - - -def _aws_event_frame(event_type: str, payload: Mapping[str, object]) -> bytes: - """One application/vnd.amazon.eventstream frame: prelude + prelude CRC32 + - headers + JSON payload + message CRC32, matching botocore EventStreamBuffer.""" - payload_bytes: Final = json.dumps(payload, default=dict, separators=(",", ":")).encode() - headers_bytes: Final = ( - _aws_str_header(":event-type", event_type) - + _aws_str_header(":content-type", "application/json") - + _aws_str_header(":message-type", "event") - ) - total_length: Final = 12 + len(headers_bytes) + len(payload_bytes) + 4 - prelude: Final = struct.pack("!II", total_length, len(headers_bytes)) - prelude_crc: Final = struct.pack("!I", zlib.crc32(prelude) & 0xFFFFFFFF) - message: Final = prelude + prelude_crc + headers_bytes + payload_bytes - return message + struct.pack("!I", zlib.crc32(message) & 0xFFFFFFFF) - - -def _bedrock_eventstream(scenario: Scenario) -> bytes: - tool_call: Final = scenario.output.tool_call - block_start: Final[tuple[bytes, ...]] = ( - ( - _aws_event_frame( - "contentBlockStart", - _jobj( - ( - "start", - _jobj( - ( - "toolUse", - _jobj( - ("toolUseId", f"tooluse_{scenario.scenario_id}"), - ("name", tool_call.name), - ), - ), - ), - ), - ("contentBlockIndex", 0), - ), - ), - ) - if tool_call is not None - else () - ) - deltas: Final[tuple[bytes, ...]] = ( - tuple( - _aws_event_frame( - "contentBlockDelta", - _jobj( - ("delta", _jobj(("toolUse", _jobj(("input", arguments_slice))))), - ("contentBlockIndex", 0), - ), - ) - for arguments_slice in _split_arguments(tool_call.arguments) - ) - if tool_call is not None - else ( - _aws_event_frame( - "contentBlockDelta", - _jobj( - ("delta", _jobj(("text", scenario.output.text))), - ("contentBlockIndex", 0), - ), - ), - ) - ) - return b"".join( - ( - _aws_event_frame("messageStart", _jobj(("role", "assistant"))), - *block_start, - *deltas, - _aws_event_frame("contentBlockStop", _jobj(("contentBlockIndex", 0))), - _aws_event_frame("messageStop", _jobj(("stopReason", _bedrock_stop_reason(scenario)))), - *( - ( - _aws_event_frame( - "metadata", - _jobj_opt( - ("usage", _bedrock_usage(scenario.usage)), - ("metrics", _jobj(("latencyMs", 42))), - ( - ("serviceTier", _jobj(("type", scenario.service_tier))) - if scenario.service_tier - else None - ), - ), - ), - ) - if scenario.stream_usage == "final_chunk" - else () - ), - ) - ) - - -def _render( - scenario: Scenario, *, stream: bool, requested_model: str, path_tail: str -) -> RenderedResponse: - # Azure bridges gpt-5.4+ chat requests carrying function tools onto the - # Responses API, which lands on the same shape at openai/responses. - if scenario.shape == "openai_chat" and path_tail.endswith("openai/responses"): - if stream: - return RenderedResponse( - 200, "text/event-stream", _responses_sse(scenario, requested_model) - ) - return RenderedResponse( - 200, "application/json", _json_bytes(_responses_body(scenario, requested_model)) - ) - shape: Final = scenario.shape - match shape: - case "bedrock_converse": - if stream: - return RenderedResponse( - 200, "application/vnd.amazon.eventstream", _bedrock_eventstream(scenario) - ) - return RenderedResponse(200, "application/json", _json_bytes(_bedrock_body(scenario))) - case "gemini_generate": - if stream: - return RenderedResponse(200, "text/event-stream", _gemini_sse(scenario, requested_model)) - return RenderedResponse(200, "application/json", _json_bytes(_gemini_body(scenario, requested_model))) - case "anthropic_messages": - if stream: - return RenderedResponse(200, "text/event-stream", _anthropic_sse(scenario, requested_model)) - return RenderedResponse(200, "application/json", _json_bytes(_anthropic_body(scenario, requested_model))) - case "openai_responses": - if stream: - return RenderedResponse(200, "text/event-stream", _responses_sse(scenario, requested_model)) - return RenderedResponse(200, "application/json", _json_bytes(_responses_body(scenario, requested_model))) - case "openai_chat": - if stream: - return RenderedResponse(200, "text/event-stream", _openai_chat_sse(scenario, requested_model)) - return RenderedResponse(200, "application/json", _json_bytes(_openai_chat_body(scenario, requested_model))) - case _: - assert_never(shape) - - -# ---------- registry + request routing ---------- - - -class ScenarioStore: - def __init__(self) -> None: - self._lock: Final = threading.Lock() - self._scenarios: dict[str, Scenario] = {} # mutable-ok: server state, guarded by _lock - - def put(self, scenario: Scenario) -> None: - with self._lock: - self._scenarios[scenario.scenario_id] = scenario - - def drop(self, scenario_id: str) -> bool: - with self._lock: - return self._scenarios.pop(scenario_id, None) is not None - - def get(self, scenario_id: str) -> Scenario | None: - with self._lock: - return self._scenarios.get(scenario_id) - - -_REQUEST_BODY: Final = TypeAdapter(dict[str, object]) - - -def _request_body(body: bytes) -> Mapping[str, object]: - try: - return _REQUEST_BODY.validate_json(body) - except ValueError: - return MappingProxyType({}) - - -def _request_wants_stream(endpoint: str | None, path_tail: str, body: bytes) -> bool: - if endpoint == "streamGenerateContent" or ":streamGenerateContent" in path_tail: - return True - if path_tail.endswith("converse-stream"): - return True - if not body: - return False - return _request_body(body).get("stream") is True - - -def _request_model(body: bytes, path_tail: str, scenario: Scenario) -> str: - model: Final = _request_body(body).get("model") - if isinstance(model, str): - return model - # Bedrock Converse names the model in the path: model//converse[-stream]. - if path_tail.startswith("model/"): - path_model: Final = path_tail.split("/", 2)[1] if path_tail.count("/") >= 2 else "" - if path_model: - return unquote(path_model) - # Vertex names it in the URL too, but the path may carry only the endpoint; - # fall back to the scenario's declared model. - return scenario.model - - -def render(store: ScenarioStore, method: str, raw_path: str, body: bytes) -> RenderedResponse: - path: Final = urlsplit(raw_path).path - segments: Final = tuple(segment for segment in path.split("/") if segment) - if len(segments) < 1 or method != "POST": - return RenderedResponse( - 404, "application/json", _json_bytes(_jobj(("error", f"no route for {method} {path}"))) - ) - scenario_segment: Final = segments[0] - scenario_id, endpoint = ( - scenario_segment.split(":", 1) - if ":" in scenario_segment - else (scenario_segment, None) - ) - found: Final = store.get(scenario_id) - if found is None: - return RenderedResponse( - 404, "application/json", _json_bytes(_jobj(("error", f"unknown scenario {scenario_id}"))) - ) - tail: Final = "/".join(segments[1:]) - return _render( - found, - stream=_request_wants_stream(endpoint, tail, body), - requested_model=_request_model(body, tail, found), - path_tail=tail, - ) diff --git a/tests/integration/_support/upstream.py b/tests/integration/_support/upstream.py index 5374d420b6a..1ad02b6a3f2 100644 --- a/tests/integration/_support/upstream.py +++ b/tests/integration/_support/upstream.py @@ -2,32 +2,34 @@ from __future__ import annotations import argparse from collections import deque +from collections.abc import Mapping import json from dataclasses import dataclass, field import os from pathlib import Path from queue import SimpleQueue +import struct from typing import Final, cast +import zlib import httpx import uvicorn -from pydantic import JsonValue, TypeAdapter, ValidationError +from pydantic import BaseModel, JsonValue, TypeAdapter, ValidationError from starlette.applications import Starlette from starlette.requests import Request from starlette.responses import JSONResponse, Response from starlette.routing import Route from _fake_openai_endpoint_server import chat_completions, completions, embeddings, health, moderations -from integration._support.scripted_shapes import ( - RenderedResponse, - Scenario, - ScenarioDeleted, - ScenarioRegistered, - ScenarioStore, - render, +from integration.cost_calculation.cost_tracking_case import ( + EventStreamResponse, + JsonResponse, + SseResponse, + StoredResponse, ) JSON_OBJECT: Final = TypeAdapter(dict[str, JsonValue]) +CASES_FILE: Final = Path(__file__).resolve().parents[1] / "cost_calculation" / "cost_tracking_cases.json" INTERNAL_FIELDS: Final = frozenset( { "litellm_params", @@ -56,6 +58,53 @@ class Observation: body: dict[str, JsonValue] +class _ScenarioRegistration(BaseModel): + scenario_id: str + response: StoredResponse + + +def _aws_str_header(name: str, value: str) -> bytes: + name_bytes: Final = name.encode() + value_bytes: Final = value.encode() + return ( + struct.pack("!B", len(name_bytes)) + + name_bytes + + struct.pack("!B", 7) + + struct.pack("!H", len(value_bytes)) + + value_bytes + ) + + +def _aws_event_frame(event_type: str, payload: Mapping[str, JsonValue], scenario_id: str) -> bytes: + payload_bytes: Final = json.dumps(payload, separators=(",", ":")).replace( + "$REQUEST_ID", scenario_id + ).encode() + headers_bytes: Final = ( + _aws_str_header(":event-type", event_type) + + _aws_str_header(":content-type", "application/json") + + _aws_str_header(":message-type", "event") + ) + total_length: Final = 12 + len(headers_bytes) + len(payload_bytes) + 4 + prelude: Final = struct.pack("!II", total_length, len(headers_bytes)) + prelude_crc: Final = struct.pack("!I", zlib.crc32(prelude) & 0xFFFFFFFF) + message: Final = prelude + prelude_crc + headers_bytes + payload_bytes + return message + struct.pack("!I", zlib.crc32(message) & 0xFFFFFFFF) + + +class ScenarioStore: + def __init__(self) -> None: + self._scenarios: dict[str, StoredResponse] = {} + + def put(self, scenario_id: str, response: StoredResponse) -> None: + self._scenarios[scenario_id] = response + + def drop(self, scenario_id: str) -> bool: + return self._scenarios.pop(scenario_id, None) is not None + + def get(self, scenario_id: str) -> StoredResponse | None: + return self._scenarios.get(scenario_id) + + @dataclass(frozen=True, slots=True) class Provider: observations: SimpleQueue[Observation] = field(default_factory=SimpleQueue) @@ -91,7 +140,7 @@ class Provider: return await chat_completions(request) async def script(self, request: Request) -> Response: - name: Final = request.path_params["model"] + name: Final = cast(str, request.path_params["model"]) if request.method in {"DELETE", "GET"} and name not in self.scripts: return JSONResponse({"error": "Script not found"}, status_code=404) if request.method == "GET": @@ -118,71 +167,60 @@ class Provider: async def register_scenario(self, request: Request) -> Response: try: - scenario: Final = Scenario.model_validate_json(await request.body()) + registration: Final = _ScenarioRegistration.model_validate_json(await request.body()) except ValidationError as exc: - return self._render( - RenderedResponse(400, "application/json", json.dumps({"error": str(exc)}).encode("utf-8")) - ) - self.scenario_store.put(scenario) - return self._render( - RenderedResponse( - 200, - "application/json", - json.dumps({"scenario_id": scenario.scenario_id}).encode("utf-8"), - ) - ) + return JSONResponse({"error": str(exc)}, status_code=400) + self.scenario_store.put(registration.scenario_id, registration.response) + return JSONResponse({"scenario_id": registration.scenario_id}) async def delete_scenario(self, request: Request) -> Response: scenario_id: Final = cast(str, request.path_params["scenario_id"]) deleted: Final = self.scenario_store.drop(scenario_id) - return self._render( - RenderedResponse( - 200 if deleted else 404, - "application/json", - json.dumps({"deleted": deleted}).encode("utf-8"), - ) - ) + return JSONResponse({"deleted": deleted}, status_code=200 if deleted else 404) async def cost_map(self, _request: Request) -> Response: - return self._render( - RenderedResponse( - 200, - "application/json", - (Path(__file__).resolve().parents[1] / "cost_calculation" / "cost_map.json").read_bytes(), - ) - ) + cases_file: Final = JSON_OBJECT.validate_json(CASES_FILE.read_bytes()) + return JSONResponse(cases_file["cost_map"]) async def oauth_token(self, _request: Request) -> Response: - return self._render( - RenderedResponse( - 200, - "application/json", - json.dumps( - { - "access_token": "scripted-token", - "token_type": "Bearer", - "expires_in": 3600, - } - ).encode("utf-8"), - ) + return JSONResponse( + { + "access_token": "scripted-token", + "token_type": "Bearer", + "expires_in": 3600, + } ) async def scripted(self, request: Request) -> Response: - rendered: Final = render( - self.scenario_store, - request.method, - request.url.path, - await request.body(), - ) - return self._render(rendered) + segments: Final = tuple(segment for segment in cast(str, request.path_params["path"]).split("/") if segment) + if not segments: + return JSONResponse({"error": "Unknown scenario"}, status_code=404) + scenario_id: Final = segments[0].split(":", 1)[0] + response: Final = self.scenario_store.get(scenario_id) + if response is None: + return JSONResponse({"error": "Unknown scenario"}, status_code=404) + return self._response(response, scenario_id) @staticmethod - def _render(rendered: RenderedResponse) -> Response: - return Response( - content=rendered.body, - status_code=rendered.status_code, - media_type=rendered.content_type, - ) + def _response(response: StoredResponse, scenario_id: str) -> Response: + match response: + case JsonResponse(): + return Response( + content=json.dumps(response.body, separators=(",", ":")).replace( + "$REQUEST_ID", scenario_id + ).encode(), + media_type=response.content_type, + ) + case SseResponse(): + stream_body: Final = ("\n\n".join(response.frames) + "\n\n").replace( + "$REQUEST_ID", scenario_id + ) + return Response(content=stream_body.encode(), media_type=response.content_type) + case EventStreamResponse(): + event_body: Final = b"".join( + _aws_event_frame(event.event_type, event.payload, scenario_id) for event in response.events + ) + return Response(content=event_body, media_type=response.content_type) def app(self) -> Starlette: return Starlette( @@ -198,7 +236,7 @@ class Provider: Route("/v1/completions", completions, methods=["POST"]), Route("/v1/embeddings", embeddings, methods=["POST"]), Route("/v1/moderations", moderations, methods=["POST"]), - Route("/{scenario_id}/{tail:path}", self.scripted, methods=["POST"]), + Route("/{path:path}", self.scripted, methods=["POST"]), ] ) @@ -215,17 +253,16 @@ class ScenarioHandle: return f"{self.control_url}/{self.scenario_id}" -def register_scenario(scenario: Scenario) -> ScenarioHandle: - response: Final = httpx.post( +def register_scenario(scenario_id: str, response: StoredResponse) -> ScenarioHandle: + http_response: Final = httpx.post( f"{CONTROL_URL}/__scenarios", - json=scenario.model_dump(mode="json"), + json={"scenario_id": scenario_id, "response": response.model_dump(mode="json")}, trust_env=False, timeout=15, ) - response.raise_for_status() - result: Final = ScenarioRegistered.model_validate_json(response.content) + http_response.raise_for_status() return ScenarioHandle( - scenario_id=result.scenario_id, + scenario_id=scenario_id, control_url=CONTROL_URL, ) @@ -237,7 +274,6 @@ def delete_scenario(handle: ScenarioHandle) -> None: timeout=15, ) response.raise_for_status() - ScenarioDeleted.model_validate_json(response.content) def main() -> None: diff --git a/tests/integration/contracts.json b/tests/integration/contracts.json index 932ebad9fe1..8ac59516747 100644 --- a/tests/integration/contracts.json +++ b/tests/integration/contracts.json @@ -217,1093 +217,1093 @@ "tests/integration/sdk/test_http2_wire.py::test_sync_handler_negotiates_http2_only_when_enabled": [ "other.sdk_wire.http2.sync_handler_negotiates_h2_only_when_enabled" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-cache_write_5m]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-cache_write_5m]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-cache_write_1h]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-cache_write_1h]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[anthropic.claude-sonnet-5-v1:0-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-audio_output]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-audio_output]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-web_search_low]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-web_search_low]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-web_search_high]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-web_search_high]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.4-mini-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.4-mini-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-audio_output]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-audio_output]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-web_search_low]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-web_search_low]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-web_search_high]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-web_search_high]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[azure-gpt-5.6-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[azure-gpt-5.6-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-cache_write_5m]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-cache_write_5m]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-cache_write_1h]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-cache_write_1h]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-anthropic_us_inference]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-anthropic_us_inference]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-haiku-4-5-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-haiku-4-5-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-cache_write_5m]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-cache_write_5m]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-cache_write_1h]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-cache_write_1h]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-tiered_input_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-tiered_input_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-tiered_cache_read_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-tiered_cache_read_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-tiered_cache_write_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-tiered_cache_write_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-anthropic_fast_mode]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-anthropic_fast_mode]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-anthropic_us_inference]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-anthropic_us_inference]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-opus-5-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-opus-5-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-cache_write_5m]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-cache_write_5m]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-cache_write_1h]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-cache_write_1h]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-tiered_input_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-tiered_input_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-tiered_cache_read_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-tiered_cache_read_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-tiered_cache_write_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-tiered_cache_write_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-anthropic_us_inference]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-anthropic_us_inference]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[claude-sonnet-5-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_input_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_input_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-kimi-k3-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-image_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-tiered_input_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-tiered_input_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-tiered_cache_read_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-tiered_cache_read_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-google_maps_grounding]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-google_maps_grounding]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-fallback_video_tokens_at_input_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-fallback_video_tokens_at_input_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.1-pro-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.1-pro-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-audio_output]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-audio_output]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-video_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-video_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-web_search_per_prompt]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-web_search_per_prompt]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-google_maps_grounding]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-google_maps_grounding]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-fallback_reasoning_at_output_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-fallback_reasoning_at_output_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-fallback_image_tokens_at_input_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-fallback_image_tokens_at_input_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-3.8-flash-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-3.8-flash-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-image_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-video_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-video_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-tiered_input_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-tiered_input_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-tiered_cache_read_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-tiered_cache_read_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-google_maps_grounding]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-google_maps_grounding]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.1-pro-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.1-pro-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-audio_output]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-audio_output]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-image_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-video_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-video_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-web_search_per_prompt]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-web_search_per_prompt]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-google_maps_grounding]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-google_maps_grounding]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_prompt_blocked]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_prompt_blocked]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gemini-gemini-3.8-flash-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-web_search_low]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-web_search_low]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-web_search_high]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-web_search_high]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-file_search]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-file_search]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_incomplete]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_incomplete]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_no_usage_incomplete]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_no_usage_incomplete]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_unvalidated]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_unvalidated]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_no_usage_unvalidated]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_no_usage_unvalidated]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.3-codex-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.3-codex-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-audio_output]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-audio_output]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-web_search_low]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-web_search_low]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-web_search_high]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-web_search_high]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.4-mini-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.4-mini-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-web_search_low]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-web_search_low]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-web_search_high]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-web_search_high]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-file_search]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-file_search]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_incomplete]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_incomplete]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_no_usage_incomplete]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_no_usage_incomplete]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_unvalidated]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_unvalidated]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_no_usage_unvalidated]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_no_usage_unvalidated]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.5-pro-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.5-pro-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-audio_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-audio_input]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-audio_output]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-audio_output]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-reasoning]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-reasoning]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-web_search_medium]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-web_search_medium]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-web_search_low]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-web_search_low]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-web_search_high]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-web_search_high]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[gpt-5.6-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gpt-5.6-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-fallback_cache_read_at_input_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-fallback_cache_read_at_input_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-fallback_cache_write_at_input_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-fallback_cache_write_at_input_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[meta.llama4-maverick-17b-instruct-v1:0-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[meta.llama4-maverick-17b-instruct-v1:0-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-moonshotai-Kimi-K3-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-moonshotai-Kimi-K3-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[together_ai-zai-org-GLM-5.3-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[together_ai-zai-org-GLM-5.3-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-input_text]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-cache_read]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-cache_read]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-cache_write_5m]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-cache_write_5m]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-cache_write_1h]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-cache_write_1h]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-tiered_input_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-tiered_input_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-tiered_cache_read_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-tiered_cache_read_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-tiered_cache_write_above_200k]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-tiered_cache_write_above_200k]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-service_tier_flex]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-service_tier_flex]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-service_tier_priority]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-service_tier_priority]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream_no_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream_no_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream_no_usage_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream_no_usage_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream_no_usage_image_input]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream_no_usage_image_input]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream_response_model_override]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream_response_model_override]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream_tool_call]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream_tool_call]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ], - "tests/integration/cost_calculation/test_token_pricing.py::test_scripted_usage_bills_at_map_rates[us.anthropic.claude-opus-5-v1:0-stream_full_usage]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[us.anthropic.claude-opus-5-v1:0-stream_full_usage]": [ "quota_management.spend_tracking.scripted_wire.logs_cost" ] }, diff --git a/tests/integration/cost_calculation/cases.json b/tests/integration/cost_calculation/cases.json deleted file mode 100644 index 478aa069f1e..00000000000 --- a/tests/integration/cost_calculation/cases.json +++ /dev/null @@ -1,2958 +0,0 @@ -{ - "providers": [ - { - "litellm_provider": "openai", - "mode": "chat", - "model_prefix": "openai", - "litellm_params": {} - }, - { - "litellm_provider": "openai", - "mode": "responses", - "model_prefix": "openai/responses", - "litellm_params": {} - }, - { - "litellm_provider": "anthropic", - "mode": "chat", - "model_prefix": "anthropic", - "litellm_params": {} - }, - { - "litellm_provider": "gemini", - "mode": "chat", - "model_prefix": null, - "litellm_params": {} - }, - { - "litellm_provider": "together_ai", - "mode": "chat", - "model_prefix": null, - "litellm_params": {} - }, - { - "litellm_provider": "fireworks_ai", - "mode": "chat", - "model_prefix": null, - "litellm_params": {} - }, - { - "litellm_provider": "azure", - "mode": "chat", - "model_prefix": null, - "litellm_params": { - "api_version": "2025-04-01-preview" - } - }, - { - "litellm_provider": "bedrock_converse", - "mode": "chat", - "model_prefix": "bedrock/converse", - "litellm_params": { - "aws_access_key_id": "AKIASCRIPTEDPROVIDER", - "aws_secret_access_key": "scripted-secret", - "aws_region_name": "us-east-1" - } - }, - { - "litellm_provider": "vertex_ai-language-models", - "mode": "chat", - "model_prefix": "vertex_ai", - "litellm_params": { - "vertex_project": "cc-scripted-project", - "vertex_location": "us-central1" - } - } - ], - "deployments": [ - { - "map_key": "azure/gpt-5.4-mini", - "litellm_model": "azure/cc-pinned-deployment", - "base_model": "azure/gpt-5.4-mini" - } - ], - "cases": [ - { - "name": "input_text", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "owns": [ - "input_cost_per_token", - "output_cost_per_token" - ], - "fallback_for": [], - "expected": { - "gpt-5.6": { - "spend": 0.008988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0017976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0092448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0195, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0117, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0039, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00084124, - "input_cost": 0.0004416, - "output_cost": 0.00039964, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.008624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.002156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.0090552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.00224224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.002134, - "input_cost": 0.001104, - "output_cost": 0.00103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.0031392, - "input_cost": 0.001656, - "output_cost": 0.0014832, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "cache_read", - "family": "pricing", - "usage": { - "fresh_input_tokens": 640, - "cache_read_tokens": 12288, - "output_tokens": 380 - }, - "owns": [ - "cache_read_input_token_cost" - ], - "fallback_for": [], - "expected": { - "gpt-5.6": { - "spend": 0.0085904, - "input_cost": 0.0032704, - "output_cost": 0.00532, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gpt-5.4-mini": { - "spend": 0.00171808, - "input_cost": 0.00065408, - "output_cost": 0.001064, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "azure/gpt-5.6": { - "spend": 0.00883584, - "input_cost": 0.00336384, - "output_cost": 0.005472, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "azure/gpt-5.4-mini": { - "spend": 0.001767168, - "input_cost": 0.000672768, - "output_cost": 0.0010944, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gpt-5.3-codex": { - "spend": 0.0073632, - "input_cost": 0.0028032, - "output_cost": 0.00456, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gpt-5.5-pro": { - "spend": 0.073632, - "input_cost": 0.028032, - "output_cost": 0.0456, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "claude-opus-5": { - "spend": 0.018844, - "input_cost": 0.009344, - "output_cost": 0.0095, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "claude-sonnet-5": { - "spend": 0.0113064, - "input_cost": 0.0056064, - "output_cost": 0.0057, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "claude-haiku-4-5": { - "spend": 0.0037688, - "input_cost": 0.0018688, - "output_cost": 0.0019, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.0207284, - "input_cost": 0.0102784, - "output_cost": 0.01045, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01243704, - "input_cost": 0.00616704, - "output_cost": 0.00627, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.0082976, - "input_cost": 0.0037376, - "output_cost": 0.00456, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.0020744, - "input_cost": 0.0009344, - "output_cost": 0.00114, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gemini-3.1-pro": { - "spend": 0.00871248, - "input_cost": 0.00392448, - "output_cost": 0.004788, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "gemini-3.8-flash": { - "spend": 0.002157376, - "input_cost": 0.000971776, - "output_cost": 0.0011856, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.00207128, - "input_cost": 0.00112128, - "output_cost": 0.00095, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.00304992, - "input_cost": 0.00168192, - "output_cost": 0.001368, - "prompt_tokens": 12928, - "completion_tokens": 380 - } - } - }, - { - "name": "cache_write_5m", - "family": "pricing", - "usage": { - "fresh_input_tokens": 512, - "cache_write_5m_tokens": 9216, - "output_tokens": 350 - }, - "owns": [ - "cache_creation_input_token_cost" - ], - "fallback_for": [], - "expected": { - "claude-opus-5": { - "spend": 0.06891, - "input_cost": 0.06016, - "output_cost": 0.00875, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "claude-sonnet-5": { - "spend": 0.041346, - "input_cost": 0.036096, - "output_cost": 0.00525, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "claude-haiku-4-5": { - "spend": 0.013782, - "input_cost": 0.012032, - "output_cost": 0.00175, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.075801, - "input_cost": 0.066176, - "output_cost": 0.009625, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.0454806, - "input_cost": 0.0397056, - "output_cost": 0.005775, - "prompt_tokens": 9728, - "completion_tokens": 350 - } - } - }, - { - "name": "cache_write_1h", - "family": "pricing", - "usage": { - "fresh_input_tokens": 512, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 7168, - "output_tokens": 350 - }, - "owns": [ - "cache_creation_input_token_cost_above_1hr" - ], - "fallback_for": [], - "expected": { - "claude-opus-5": { - "spend": 0.09579, - "input_cost": 0.08704, - "output_cost": 0.00875, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "claude-sonnet-5": { - "spend": 0.057474, - "input_cost": 0.052224, - "output_cost": 0.00525, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "claude-haiku-4-5": { - "spend": 0.019158, - "input_cost": 0.017408, - "output_cost": 0.00175, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.105369, - "input_cost": 0.095744, - "output_cost": 0.009625, - "prompt_tokens": 9728, - "completion_tokens": 350 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.0632214, - "input_cost": 0.0574464, - "output_cost": 0.005775, - "prompt_tokens": 9728, - "completion_tokens": 350 - } - } - }, - { - "name": "audio_input", - "family": "pricing", - "usage": { - "fresh_input_tokens": 96, - "audio_input_tokens": 1450, - "output_tokens": 210 - }, - "owns": [ - "input_cost_per_audio_token" - ], - "fallback_for": [], - "audio_input": true, - "expected": { - "gpt-5.6": { - "spend": 0.061108, - "input_cost": 0.058168, - "output_cost": 0.00294, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "gpt-5.4-mini": { - "spend": 0.0151216, - "input_cost": 0.0145336, - "output_cost": 0.000588, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "azure/gpt-5.6": { - "spend": 0.0626468, - "input_cost": 0.0596228, - "output_cost": 0.003024, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "azure/gpt-5.4-mini": { - "spend": 0.01586436, - "input_cost": 0.01525956, - "output_cost": 0.0006048, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.006482, - "input_cost": 0.003962, - "output_cost": 0.00252, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.002128, - "input_cost": 0.001498, - "output_cost": 0.00063, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "gemini-3.1-pro": { - "spend": 0.0067626, - "input_cost": 0.0041166, - "output_cost": 0.002646, - "prompt_tokens": 1546, - "completion_tokens": 210 - }, - "gemini-3.8-flash": { - "spend": 0.00221312, - "input_cost": 0.00155792, - "output_cost": 0.0006552, - "prompt_tokens": 1546, - "completion_tokens": 210 - } - } - }, - { - "name": "audio_output", - "family": "pricing", - "usage": { - "fresh_input_tokens": 220, - "output_tokens": 180, - "audio_output_tokens": 1120 - }, - "owns": [ - "output_cost_per_audio_token" - ], - "fallback_for": [], - "audio_output": true, - "expected": { - "gpt-5.6": { - "spend": 0.092505, - "input_cost": 0.000385, - "output_cost": 0.09212, - "prompt_tokens": 220, - "completion_tokens": 1300 - }, - "gpt-5.4-mini": { - "spend": 0.022981, - "input_cost": 7.7e-05, - "output_cost": 0.022904, - "prompt_tokens": 220, - "completion_tokens": 1300 - }, - "azure/gpt-5.6": { - "spend": 0.094828, - "input_cost": 0.000396, - "output_cost": 0.094432, - "prompt_tokens": 220, - "completion_tokens": 1300 - }, - "azure/gpt-5.4-mini": { - "spend": 0.0241176, - "input_cost": 7.92e-05, - "output_cost": 0.0240384, - "prompt_tokens": 220, - "completion_tokens": 1300 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.00737, - "input_cost": 0.00011, - "output_cost": 0.00726, - "prompt_tokens": 220, - "completion_tokens": 1300 - }, - "gemini-3.8-flash": { - "spend": 0.0076648, - "input_cost": 0.0001144, - "output_cost": 0.0075504, - "prompt_tokens": 220, - "completion_tokens": 1300 - } - } - }, - { - "name": "image_input", - "family": "pricing", - "usage": { - "fresh_input_tokens": 310, - "image_input_tokens": 1806, - "output_tokens": 240 - }, - "owns": [ - "input_cost_per_image_token" - ], - "fallback_for": [], - "image_input": true, - "expected": { - "gemini/gemini-3.1-pro": { - "spend": 0.0074732, - "input_cost": 0.0045932, - "output_cost": 0.00288, - "prompt_tokens": 2116, - "completion_tokens": 240 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.0018683, - "input_cost": 0.0011483, - "output_cost": 0.00072, - "prompt_tokens": 2116, - "completion_tokens": 240 - }, - "gemini-3.1-pro": { - "spend": 0.0078288, - "input_cost": 0.0048048, - "output_cost": 0.003024, - "prompt_tokens": 2116, - "completion_tokens": 240 - } - } - }, - { - "name": "video_input", - "family": "pricing", - "usage": { - "fresh_input_tokens": 140, - "video_input_tokens": 7920, - "output_tokens": 300 - }, - "owns": [ - "input_cost_per_video_token" - ], - "fallback_for": [], - "video_input": true, - "expected": { - "gemini/gemini-3.1-pro": { - "spend": 0.022888, - "input_cost": 0.019288, - "output_cost": 0.0036, - "prompt_tokens": 8060, - "completion_tokens": 300 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.005722, - "input_cost": 0.004822, - "output_cost": 0.0009, - "prompt_tokens": 8060, - "completion_tokens": 300 - }, - "gemini-3.8-flash": { - "spend": 0.0059192, - "input_cost": 0.0049832, - "output_cost": 0.000936, - "prompt_tokens": 8060, - "completion_tokens": 300 - } - } - }, - { - "name": "reasoning", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1240, - "output_tokens": 560, - "reasoning_tokens": 3480 - }, - "owns": [ - "output_cost_per_reasoning_token" - ], - "fallback_for": [], - "reasoning": true, - "expected": { - "gpt-5.6": { - "spend": 0.06569, - "input_cost": 0.00217, - "output_cost": 0.06352, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "gpt-5.4-mini": { - "spend": 0.013138, - "input_cost": 0.000434, - "output_cost": 0.012704, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "azure/gpt-5.6": { - "spend": 0.067716, - "input_cost": 0.002232, - "output_cost": 0.065484, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "azure/gpt-5.4-mini": { - "spend": 0.0135432, - "input_cost": 0.0004464, - "output_cost": 0.0130968, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "gpt-5.3-codex": { - "spend": 0.05382, - "input_cost": 0.00186, - "output_cost": 0.05196, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "gpt-5.5-pro": { - "spend": 0.5382, - "input_cost": 0.0186, - "output_cost": 0.5196, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.05444, - "input_cost": 0.00248, - "output_cost": 0.05196, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.01448, - "input_cost": 0.00062, - "output_cost": 0.01386, - "prompt_tokens": 1240, - "completion_tokens": 4040 - }, - "gemini-3.1-pro": { - "spend": 0.05664, - "input_cost": 0.002604, - "output_cost": 0.054036, - "prompt_tokens": 1240, - "completion_tokens": 4040 - } - } - }, - { - "name": "tiered_input_above_200k", - "family": "pricing", - "usage": { - "fresh_input_tokens": 204800, - "output_tokens": 620 - }, - "owns": [ - "input_cost_per_token_above_200k_tokens", - "output_cost_per_token_above_200k_tokens" - ], - "fallback_for": [], - "expected": { - "claude-opus-5": { - "spend": 2.07125, - "input_cost": 2.048, - "output_cost": 0.02325, - "prompt_tokens": 204800, - "completion_tokens": 620 - }, - "claude-sonnet-5": { - "spend": 1.24275, - "input_cost": 1.2288, - "output_cost": 0.01395, - "prompt_tokens": 204800, - "completion_tokens": 620 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 2.278375, - "input_cost": 2.2528, - "output_cost": 0.025575, - "prompt_tokens": 204800, - "completion_tokens": 620 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.83036, - "input_cost": 0.8192, - "output_cost": 0.01116, - "prompt_tokens": 204800, - "completion_tokens": 620 - }, - "gemini-3.1-pro": { - "spend": 0.871878, - "input_cost": 0.86016, - "output_cost": 0.011718, - "prompt_tokens": 204800, - "completion_tokens": 620 - } - } - }, - { - "name": "tiered_cache_read_above_200k", - "family": "pricing", - "usage": { - "fresh_input_tokens": 4096, - "cache_read_tokens": 201728, - "output_tokens": 480 - }, - "owns": [ - "cache_read_input_token_cost_above_200k_tokens" - ], - "fallback_for": [], - "expected": { - "claude-opus-5": { - "spend": 0.260688, - "input_cost": 0.242688, - "output_cost": 0.018, - "prompt_tokens": 205824, - "completion_tokens": 480 - }, - "claude-sonnet-5": { - "spend": 0.1564128, - "input_cost": 0.1456128, - "output_cost": 0.0108, - "prompt_tokens": 205824, - "completion_tokens": 480 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.2867568, - "input_cost": 0.2669568, - "output_cost": 0.0198, - "prompt_tokens": 205824, - "completion_tokens": 480 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.1057152, - "input_cost": 0.0970752, - "output_cost": 0.00864, - "prompt_tokens": 205824, - "completion_tokens": 480 - }, - "gemini-3.1-pro": { - "spend": 0.11100096, - "input_cost": 0.10192896, - "output_cost": 0.009072, - "prompt_tokens": 205824, - "completion_tokens": 480 - } - } - }, - { - "name": "tiered_cache_write_above_200k", - "family": "pricing", - "usage": { - "fresh_input_tokens": 4096, - "cache_write_5m_tokens": 200704, - "output_tokens": 480 - }, - "owns": [ - "cache_creation_input_token_cost_above_200k_tokens" - ], - "fallback_for": [], - "expected": { - "claude-opus-5": { - "spend": 2.56776, - "input_cost": 2.54976, - "output_cost": 0.018, - "prompt_tokens": 204800, - "completion_tokens": 480 - }, - "claude-sonnet-5": { - "spend": 1.540656, - "input_cost": 1.529856, - "output_cost": 0.0108, - "prompt_tokens": 204800, - "completion_tokens": 480 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 2.824536, - "input_cost": 2.804736, - "output_cost": 0.0198, - "prompt_tokens": 204800, - "completion_tokens": 480 - } - } - }, - { - "name": "service_tier_flex", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "owns": [ - "input_cost_per_token_flex", - "output_cost_per_token_flex" - ], - "fallback_for": [], - "service_tier": "flex", - "expected": { - "gpt-5.6": { - "spend": 0.004494, - "input_cost": 0.00161, - "output_cost": 0.002884, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0008988, - "input_cost": 0.000322, - "output_cost": 0.0005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0046224, - "input_cost": 0.001656, - "output_cost": 0.0029664, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00092448, - "input_cost": 0.0003312, - "output_cost": 0.00059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.003852, - "input_cost": 0.00138, - "output_cost": 0.002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.03852, - "input_cost": 0.0138, - "output_cost": 0.02472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.010725, - "input_cost": 0.00506, - "output_cost": 0.005665, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.006435, - "input_cost": 0.003036, - "output_cost": 0.003399, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.004312, - "input_cost": 0.00184, - "output_cost": 0.002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.001078, - "input_cost": 0.00046, - "output_cost": 0.000618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.0045276, - "input_cost": 0.001932, - "output_cost": 0.0025956, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.00112112, - "input_cost": 0.0004784, - "output_cost": 0.00064272, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "service_tier_priority", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "owns": [ - "input_cost_per_token_priority", - "output_cost_per_token_priority" - ], - "fallback_for": [], - "service_tier": "priority", - "expected": { - "gpt-5.6": { - "spend": 0.017976, - "input_cost": 0.00644, - "output_cost": 0.011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0035952, - "input_cost": 0.001288, - "output_cost": 0.0023072, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0184896, - "input_cost": 0.006624, - "output_cost": 0.0118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00369792, - "input_cost": 0.0013248, - "output_cost": 0.00237312, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.015408, - "input_cost": 0.00552, - "output_cost": 0.009888, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.15408, - "input_cost": 0.0552, - "output_cost": 0.09888, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.024375, - "input_cost": 0.0115, - "output_cost": 0.012875, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.014625, - "input_cost": 0.0069, - "output_cost": 0.007725, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.004875, - "input_cost": 0.0023, - "output_cost": 0.002575, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.0268125, - "input_cost": 0.01265, - "output_cost": 0.0141625, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.0160875, - "input_cost": 0.00759, - "output_cost": 0.0084975, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.01078, - "input_cost": 0.0046, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.002695, - "input_cost": 0.00115, - "output_cost": 0.001545, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.011319, - "input_cost": 0.00483, - "output_cost": 0.006489, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.0028028, - "input_cost": 0.001196, - "output_cost": 0.0016068, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "anthropic_fast_mode", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "owns": [ - "provider_specific_entry.fast" - ], - "fallback_for": [], - "speed": "fast", - "expected": { - "claude-opus-5": { - "spend": 0.117, - "input_cost": 0.0552, - "output_cost": 0.0618, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "anthropic_us_inference", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "owns": [ - "provider_specific_entry.us" - ], - "fallback_for": [], - "inference_geo": "us", - "expected": { - "claude-opus-5": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.00429, - "input_cost": 0.002024, - "output_cost": 0.002266, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "web_search_medium", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "web_search_calls": 3 - }, - "owns": [ - "search_context_cost_per_query.search_context_size_medium", - "web_search_billing_unit" - ], - "fallback_for": [], - "web_search": "medium", - "expected": { - "gpt-5.6": { - "spend": 0.021488, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0142976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0217448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.01434896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.045204, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.11454, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0495, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0417, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0339, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.113624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.1140552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "web_search_low", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "web_search_calls": 1 - }, - "owns": [ - "search_context_cost_per_query.search_context_size_low" - ], - "fallback_for": [], - "web_search": "low", - "expected": { - "gpt-5.6": { - "spend": 0.018988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0117976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0192448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.01184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.017704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.08704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "web_search_high", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "web_search_calls": 1 - }, - "owns": [ - "search_context_cost_per_query.search_context_size_high" - ], - "fallback_for": [], - "web_search": "high", - "expected": { - "gpt-5.6": { - "spend": 0.023988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0167976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0242448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.01684896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.022704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.09204, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "web_search_per_prompt", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "web_search_calls": 3 - }, - "owns": [ - "search_context_cost_per_query.search_context_size_medium", - "web_search_billing_unit" - ], - "fallback_for": [], - "web_search": "medium", - "expected": { - "gemini/gemini-3.8-flash": { - "spend": 0.037156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.03724224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "google_maps_grounding", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "google_maps_calls": 1 - }, - "owns": [ - "google_maps_grounding_cost_per_query" - ], - "fallback_for": [], - "google_maps": true, - "expected": { - "gemini/gemini-3.1-pro": { - "spend": 0.033624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.027156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.0340552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.02724224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "file_search", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "file_search_calls": 1 - }, - "owns": [ - "file_search_cost_per_1k_calls" - ], - "fallback_for": [], - "file_search": true, - "expected": { - "gpt-5.3-codex": { - "spend": 0.010204, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07954, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "fallback_cache_read_at_input_rate", - "family": "pricing", - "usage": { - "fresh_input_tokens": 640, - "cache_read_tokens": 12288, - "output_tokens": 380 - }, - "owns": [], - "fallback_for": [ - "cache_read_input_token_cost" - ], - "expected": { - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00347132, - "input_cost": 0.00310272, - "output_cost": 0.0003686, - "prompt_tokens": 12928, - "completion_tokens": 380 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.0021672, - "input_cost": 0.0019392, - "output_cost": 0.000228, - "prompt_tokens": 12928, - "completion_tokens": 380 - } - } - }, - { - "name": "fallback_cache_write_at_input_rate", - "family": "pricing", - "usage": { - "fresh_input_tokens": 512, - "cache_write_5m_tokens": 9216, - "output_tokens": 350 - }, - "owns": [], - "fallback_for": [ - "cache_creation_input_token_cost" - ], - "expected": { - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00267422, - "input_cost": 0.00233472, - "output_cost": 0.0003395, - "prompt_tokens": 9728, - "completion_tokens": 350 - } - } - }, - { - "name": "fallback_reasoning_at_output_rate", - "family": "pricing", - "usage": { - "fresh_input_tokens": 1240, - "output_tokens": 560, - "reasoning_tokens": 3480 - }, - "owns": [], - "fallback_for": [ - "output_cost_per_reasoning_token" - ], - "reasoning": true, - "expected": { - "gemini-3.8-flash": { - "spend": 0.0132496, - "input_cost": 0.0006448, - "output_cost": 0.0126048, - "prompt_tokens": 1240, - "completion_tokens": 4040 - } - } - }, - { - "name": "fallback_image_tokens_at_input_rate", - "family": "pricing", - "usage": { - "fresh_input_tokens": 310, - "image_input_tokens": 1806, - "output_tokens": 240 - }, - "owns": [], - "fallback_for": [ - "input_cost_per_image_token" - ], - "image_input": true, - "expected": { - "gemini-3.8-flash": { - "spend": 0.00184912, - "input_cost": 0.00110032, - "output_cost": 0.0007488, - "prompt_tokens": 2116, - "completion_tokens": 240 - } - } - }, - { - "name": "fallback_video_tokens_at_input_rate", - "family": "pricing", - "usage": { - "fresh_input_tokens": 140, - "video_input_tokens": 7920, - "output_tokens": 300 - }, - "owns": [], - "fallback_for": [ - "input_cost_per_video_token" - ], - "video_input": true, - "expected": { - "gemini-3.1-pro": { - "spend": 0.020706, - "input_cost": 0.016926, - "output_cost": 0.00378, - "prompt_tokens": 8060, - "completion_tokens": 300 - } - } - }, - { - "name": "stream", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "expected": { - "gpt-5.6": { - "spend": 0.008988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0017976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0092448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0195, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0117, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0039, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00084124, - "input_cost": 0.0004416, - "output_cost": 0.00039964, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.008624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.002156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.0090552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.00224224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.002134, - "input_cost": 0.001104, - "output_cost": 0.00103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.0031392, - "input_cost": 0.001656, - "output_cost": 0.0014832, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "stream_no_usage", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "stream_usage": "absent", - "exact_spend": false, - "models": [ - "gpt-5.6", - "gpt-5.4-mini", - "azure/gpt-5.6", - "azure/gpt-5.4-mini", - "gpt-5.3-codex", - "gpt-5.5-pro", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "us.anthropic.claude-opus-5-v1:0", - "anthropic.claude-sonnet-5-v1:0", - "meta.llama4-maverick-17b-instruct-v1:0", - "gemini/gemini-3.1-pro", - "gemini/gemini-3.8-flash", - "gemini-3.1-pro", - "gemini-3.8-flash", - "together_ai/moonshotai/Kimi-K3", - "together_ai/zai-org/GLM-5.3", - "fireworks_ai/accounts/fireworks/models/kimi-k3", - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", - "fireworks_ai/accounts/fireworks/models/qwen3p8-max" - ] - }, - { - "name": "stream_no_usage_tool_call", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "stream_usage": "absent", - "tool_call": true, - "exact_spend": false, - "models": [ - "gpt-5.6", - "gpt-5.4-mini", - "azure/gpt-5.6", - "azure/gpt-5.4-mini", - "gpt-5.3-codex", - "gpt-5.5-pro", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "us.anthropic.claude-opus-5-v1:0", - "anthropic.claude-sonnet-5-v1:0", - "meta.llama4-maverick-17b-instruct-v1:0", - "gemini/gemini-3.1-pro", - "gemini/gemini-3.8-flash", - "gemini-3.1-pro", - "gemini-3.8-flash", - "together_ai/moonshotai/Kimi-K3", - "together_ai/zai-org/GLM-5.3", - "fireworks_ai/accounts/fireworks/models/kimi-k3", - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", - "fireworks_ai/accounts/fireworks/models/qwen3p8-max" - ] - }, - { - "name": "stream_no_usage_image_input", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "stream_usage": "absent", - "image_input": true, - "exact_spend": false, - "models": [ - "gpt-5.6", - "gpt-5.4-mini", - "azure/gpt-5.6", - "azure/gpt-5.4-mini", - "gpt-5.3-codex", - "gpt-5.5-pro", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "us.anthropic.claude-opus-5-v1:0", - "anthropic.claude-sonnet-5-v1:0", - "meta.llama4-maverick-17b-instruct-v1:0", - "gemini/gemini-3.1-pro", - "gemini/gemini-3.8-flash", - "gemini-3.1-pro", - "gemini-3.8-flash", - "together_ai/moonshotai/Kimi-K3", - "together_ai/zai-org/GLM-5.3", - "fireworks_ai/accounts/fireworks/models/kimi-k3", - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", - "fireworks_ai/accounts/fireworks/models/qwen3p8-max" - ] - }, - { - "name": "stream_incomplete", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "terminal": "incomplete", - "expected": { - "gpt-5.3-codex": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "stream_no_usage_incomplete", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "stream_usage": "absent", - "terminal": "incomplete", - "exact_spend": false, - "models": [ - "gpt-5.3-codex", - "gpt-5.5-pro" - ] - }, - { - "name": "stream_unvalidated", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "terminal": "unvalidated", - "expected": { - "gpt-5.3-codex": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "stream_no_usage_unvalidated", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "stream_usage": "absent", - "terminal": "unvalidated", - "exact_spend": false, - "models": [ - "gpt-5.3-codex", - "gpt-5.5-pro" - ] - }, - { - "name": "prompt_blocked", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840 - }, - "terminal": "prompt_blocked", - "expected": { - "gemini/gemini-3.1-pro": { - "spend": 0.00368, - "input_cost": 0.00368, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.00092, - "input_cost": 0.00092, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - }, - "gemini-3.1-pro": { - "spend": 0.003864, - "input_cost": 0.003864, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - }, - "gemini-3.8-flash": { - "spend": 0.0009568, - "input_cost": 0.0009568, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - } - } - }, - { - "name": "stream_prompt_blocked", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840 - }, - "stream": true, - "terminal": "prompt_blocked", - "expected": { - "gemini/gemini-3.1-pro": { - "spend": 0.00368, - "input_cost": 0.00368, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.00092, - "input_cost": 0.00092, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - }, - "gemini-3.1-pro": { - "spend": 0.003864, - "input_cost": 0.003864, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - }, - "gemini-3.8-flash": { - "spend": 0.0009568, - "input_cost": 0.0009568, - "output_cost": 0.0, - "prompt_tokens": 1840, - "completion_tokens": 0 - } - } - }, - { - "name": "response_model_override", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "response_model_override": true, - "expected": { - "gpt-5.6": { - "spend": 0.0017976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.008988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0117, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0039, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0195, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00084124, - "input_cost": 0.0004416, - "output_cost": 0.00039964, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.002156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.008624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.00224224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.0090552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.0031392, - "input_cost": 0.001656, - "output_cost": 0.0014832, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.002134, - "input_cost": 0.001104, - "output_cost": 0.00103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "stream_response_model_override", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "response_model_override": true, - "stream": true, - "expected": { - "gpt-5.6": { - "spend": 0.0017976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.008988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0117, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0039, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0195, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00084124, - "input_cost": 0.0004416, - "output_cost": 0.00039964, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.002156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.008624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.00224224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.0090552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.0031392, - "input_cost": 0.001656, - "output_cost": 0.0014832, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.002134, - "input_cost": 0.001104, - "output_cost": 0.00103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "tool_call", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "tool_call": true, - "expected": { - "gpt-5.6": { - "spend": 0.008988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0017976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0092448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0195, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0117, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0039, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00084124, - "input_cost": 0.0004416, - "output_cost": 0.00039964, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.008624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.002156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.0090552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.00224224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.002134, - "input_cost": 0.001104, - "output_cost": 0.00103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.0031392, - "input_cost": 0.001656, - "output_cost": 0.0014832, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "stream_tool_call", - "family": "transport", - "usage": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "stream": true, - "tool_call": true, - "expected": { - "gpt-5.6": { - "spend": 0.008988, - "input_cost": 0.00322, - "output_cost": 0.005768, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.4-mini": { - "spend": 0.0017976, - "input_cost": 0.000644, - "output_cost": 0.0011536, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.6": { - "spend": 0.0092448, - "input_cost": 0.003312, - "output_cost": 0.0059328, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "azure/gpt-5.4-mini": { - "spend": 0.00184896, - "input_cost": 0.0006624, - "output_cost": 0.00118656, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.3-codex": { - "spend": 0.007704, - "input_cost": 0.00276, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gpt-5.5-pro": { - "spend": 0.07704, - "input_cost": 0.0276, - "output_cost": 0.04944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-opus-5": { - "spend": 0.0195, - "input_cost": 0.0092, - "output_cost": 0.0103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0117, - "input_cost": 0.00552, - "output_cost": 0.00618, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0039, - "input_cost": 0.00184, - "output_cost": 0.00206, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.02145, - "input_cost": 0.01012, - "output_cost": 0.01133, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.01287, - "input_cost": 0.006072, - "output_cost": 0.006798, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00084124, - "input_cost": 0.0004416, - "output_cost": 0.00039964, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.008624, - "input_cost": 0.00368, - "output_cost": 0.004944, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.002156, - "input_cost": 0.00092, - "output_cost": 0.001236, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.1-pro": { - "spend": 0.0090552, - "input_cost": 0.003864, - "output_cost": 0.0051912, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "gemini-3.8-flash": { - "spend": 0.00224224, - "input_cost": 0.0009568, - "output_cost": 0.00128544, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.002134, - "input_cost": 0.001104, - "output_cost": 0.00103, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.0031392, - "input_cost": 0.001656, - "output_cost": 0.0014832, - "prompt_tokens": 1840, - "completion_tokens": 412 - } - } - }, - { - "name": "stream_full_usage", - "family": "transport", - "usage": {}, - "stream": true, - "usage_by_model": { - "gpt-5.6": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330, - "audio_output_tokens": 280 - }, - "gpt-5.4-mini": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330, - "audio_output_tokens": 280 - }, - "azure/gpt-5.6": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330, - "audio_output_tokens": 280 - }, - "azure/gpt-5.4-mini": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330, - "audio_output_tokens": 280 - }, - "gpt-5.3-codex": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900 - }, - "gpt-5.5-pro": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900 - }, - "claude-opus-5": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 1024 - }, - "claude-sonnet-5": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 1024 - }, - "claude-haiku-4-5": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 1024 - }, - "us.anthropic.claude-opus-5-v1:0": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 1024 - }, - "anthropic.claude-sonnet-5-v1:0": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 1024 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "cache_write_5m_tokens": 2048, - "cache_write_1h_tokens": 1024 - }, - "gemini/gemini-3.1-pro": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330 - }, - "gemini/gemini-3.8-flash": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330, - "audio_output_tokens": 280 - }, - "gemini-3.1-pro": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330 - }, - "gemini-3.8-flash": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144, - "reasoning_tokens": 900, - "audio_input_tokens": 330, - "audio_output_tokens": 280 - }, - "together_ai/moonshotai/Kimi-K3": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "fresh_input_tokens": 1840, - "output_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "fresh_input_tokens": 1840, - "output_tokens": 412, - "cache_read_tokens": 6144 - } - }, - "expected": { - "gpt-5.6": { - "spend": 0.0600632, - "input_cost": 0.0174952, - "output_cost": 0.042568, - "prompt_tokens": 8314, - "completion_tokens": 1592 - }, - "gpt-5.4-mini": { - "spend": 0.01379264, - "input_cost": 0.00415904, - "output_cost": 0.0096336, - "prompt_tokens": 8314, - "completion_tokens": 1592 - }, - "azure/gpt-5.6": { - "spend": 0.06169072, - "input_cost": 0.01794792, - "output_cost": 0.0437428, - "prompt_tokens": 8314, - "completion_tokens": 1592 - }, - "azure/gpt-5.4-mini": { - "spend": 0.014385144, - "input_cost": 0.004348584, - "output_cost": 0.01003656, - "prompt_tokens": 8314, - "completion_tokens": 1592 - }, - "gpt-5.3-codex": { - "spend": 0.0203256, - "input_cost": 0.0036816, - "output_cost": 0.016644, - "prompt_tokens": 7984, - "completion_tokens": 1312 - }, - "gpt-5.5-pro": { - "spend": 0.203256, - "input_cost": 0.036816, - "output_cost": 0.16644, - "prompt_tokens": 7984, - "completion_tokens": 1312 - }, - "claude-opus-5": { - "spend": 0.045612, - "input_cost": 0.035312, - "output_cost": 0.0103, - "prompt_tokens": 11056, - "completion_tokens": 412 - }, - "claude-sonnet-5": { - "spend": 0.0273672, - "input_cost": 0.0211872, - "output_cost": 0.00618, - "prompt_tokens": 11056, - "completion_tokens": 412 - }, - "claude-haiku-4-5": { - "spend": 0.0091224, - "input_cost": 0.0070624, - "output_cost": 0.00206, - "prompt_tokens": 11056, - "completion_tokens": 412 - }, - "us.anthropic.claude-opus-5-v1:0": { - "spend": 0.0501732, - "input_cost": 0.0388432, - "output_cost": 0.01133, - "prompt_tokens": 11056, - "completion_tokens": 412 - }, - "anthropic.claude-sonnet-5-v1:0": { - "spend": 0.03010392, - "input_cost": 0.02330592, - "output_cost": 0.006798, - "prompt_tokens": 11056, - "completion_tokens": 412 - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "spend": 0.00305308, - "input_cost": 0.00265344, - "output_cost": 0.00039964, - "prompt_tokens": 11056, - "completion_tokens": 412 - }, - "gemini/gemini-3.1-pro": { - "spend": 0.0224108, - "input_cost": 0.0057668, - "output_cost": 0.016644, - "prompt_tokens": 8314, - "completion_tokens": 1312 - }, - "gemini/gemini-3.8-flash": { - "spend": 0.0076232, - "input_cost": 0.0015572, - "output_cost": 0.006066, - "prompt_tokens": 8314, - "completion_tokens": 1592 - }, - "gemini-3.1-pro": { - "spend": 0.02338644, - "input_cost": 0.00604524, - "output_cost": 0.0173412, - "prompt_tokens": 8314, - "completion_tokens": 1312 - }, - "gemini-3.8-flash": { - "spend": 0.007460128, - "input_cost": 0.001619488, - "output_cost": 0.00584064, - "prompt_tokens": 8314, - "completion_tokens": 1592 - }, - "together_ai/moonshotai/Kimi-K3": { - "spend": 0.0035374, - "input_cost": 0.002116, - "output_cost": 0.0014214, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "together_ai/zai-org/GLM-5.3": { - "spend": 0.0019184, - "input_cost": 0.001012, - "output_cost": 0.0009064, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "spend": 0.00250264, - "input_cost": 0.00147264, - "output_cost": 0.00103, - "prompt_tokens": 7984, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "spend": 0.0005232, - "input_cost": 0.000276, - "output_cost": 0.0002472, - "prompt_tokens": 1840, - "completion_tokens": 412 - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "spend": 0.00369216, - "input_cost": 0.00220896, - "output_cost": 0.0014832, - "prompt_tokens": 7984, - "completion_tokens": 412 - } - } - } - ] -} diff --git a/tests/integration/cost_calculation/conftest.py b/tests/integration/cost_calculation/conftest.py index 9229bb47817..f1b8901d626 100644 --- a/tests/integration/cost_calculation/conftest.py +++ b/tests/integration/cost_calculation/conftest.py @@ -14,7 +14,7 @@ from pydantic import BaseModel, ConfigDict from integration._support.client import JSON_OBJECT, Scenario, eventually, object_value, string_value from integration._support.database import read_rows from integration._support.upstream import delete_scenario, register_scenario -from integration.cost_calculation.cost_matrix import Case, FrontierModel +from integration.cost_calculation.cost_tracking_case import CostTrackingTestCase class CostBreakdown(BaseModel): @@ -118,25 +118,23 @@ def _vertex_service_account_json(url: str) -> str: def register_scenario_deployment( scenario: Scenario, - model: FrontierModel, - case: Case, + case: CostTrackingTestCase, marker: str, + key: str, ) -> str: control_url: Final = os.environ["INTEGRATION_UPSTREAM_URL"].rstrip("/") - sidecar_scenario: Final = case.scenario( - scenario_id=f"sc-{marker}", model=model, text=f"scripted answer {marker}" - ) - handle: Final = register_scenario(sidecar_scenario) + run_marker: Final = sha256(key.encode()).hexdigest()[:12] + handle: Final = register_scenario(f"sc-{marker}-{run_marker}", case.response) scenario.cleanups.callback(delete_scenario, handle) - model_name: Final = f"{model.model_name}-{marker}" + model_name: Final = f"cost-{marker}-{run_marker}" parameters: Final = { - "model": model.litellm_model, - "api_key": model.api_key, + "model": case.litellm_model, + "api_key": case.api_key, "api_base": handle.api_base(), - **model.litellm_params, + **case.litellm_params, **( {"vertex_credentials": _vertex_service_account_json(control_url)} - if model.llm_provider == "vertex_ai" + if case.rates.litellm_provider == "vertex_ai-language-models" else {} ), } @@ -145,7 +143,11 @@ def register_scenario_deployment( JSON_OBJECT.validate_python({ "model_name": model_name, "litellm_params": parameters, - "model_info": {"base_model": model.base_model}, + "model_info": ( + {"base_model": case.base_model} + if case.base_model is not None + else {} + ), }), ) identity: Final = string_value(object_value(created["model_info"])["id"]) diff --git a/tests/integration/cost_calculation/cost_map.json b/tests/integration/cost_calculation/cost_map.json deleted file mode 100644 index 117e9b33636..00000000000 --- a/tests/integration/cost_calculation/cost_map.json +++ /dev/null @@ -1,411 +0,0 @@ -{ - "gpt-5.6": { - "cache_read_input_token_cost": 1.75e-07, - "input_cost_per_audio_token": 4e-05, - "input_cost_per_token": 1.75e-06, - "input_cost_per_token_flex": 8.75e-07, - "input_cost_per_token_priority": 3.5e-06, - "litellm_provider": "openai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_audio_token": 8e-05, - "output_cost_per_reasoning_token": 1.6e-05, - "output_cost_per_token": 1.4e-05, - "output_cost_per_token_flex": 7e-06, - "output_cost_per_token_priority": 2.8e-05, - "search_context_cost_per_query": { - "search_context_size_low": 0.01, - "search_context_size_medium": 0.0125, - "search_context_size_high": 0.015 - }, - "supports_function_calling": true - }, - "gpt-5.4-mini": { - "cache_read_input_token_cost": 3.5e-08, - "input_cost_per_audio_token": 1e-05, - "input_cost_per_token": 3.5e-07, - "input_cost_per_token_flex": 1.75e-07, - "input_cost_per_token_priority": 7e-07, - "litellm_provider": "openai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_audio_token": 2e-05, - "output_cost_per_reasoning_token": 3.2e-06, - "output_cost_per_token": 2.8e-06, - "output_cost_per_token_flex": 1.4e-06, - "output_cost_per_token_priority": 5.6e-06, - "search_context_cost_per_query": { - "search_context_size_low": 0.01, - "search_context_size_medium": 0.0125, - "search_context_size_high": 0.015 - }, - "supports_function_calling": true - }, - "azure/gpt-5.6": { - "cache_read_input_token_cost": 1.8e-07, - "input_cost_per_audio_token": 4.1e-05, - "input_cost_per_token": 1.8e-06, - "input_cost_per_token_flex": 9e-07, - "input_cost_per_token_priority": 3.6e-06, - "litellm_provider": "azure", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_audio_token": 8.2e-05, - "output_cost_per_reasoning_token": 1.65e-05, - "output_cost_per_token": 1.44e-05, - "output_cost_per_token_flex": 7.2e-06, - "output_cost_per_token_priority": 2.88e-05, - "search_context_cost_per_query": { - "search_context_size_low": 0.01, - "search_context_size_medium": 0.0125, - "search_context_size_high": 0.015 - }, - "supports_function_calling": true - }, - "azure/gpt-5.4-mini": { - "cache_read_input_token_cost": 3.6e-08, - "input_cost_per_audio_token": 1.05e-05, - "input_cost_per_token": 3.6e-07, - "input_cost_per_token_flex": 1.8e-07, - "input_cost_per_token_priority": 7.2e-07, - "litellm_provider": "azure", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_audio_token": 2.1e-05, - "output_cost_per_reasoning_token": 3.3e-06, - "output_cost_per_token": 2.88e-06, - "output_cost_per_token_flex": 1.44e-06, - "output_cost_per_token_priority": 5.76e-06, - "search_context_cost_per_query": { - "search_context_size_low": 0.01, - "search_context_size_medium": 0.0125, - "search_context_size_high": 0.015 - }, - "supports_function_calling": true - }, - "gpt-5.3-codex": { - "cache_read_input_token_cost": 1.5e-07, - "file_search_cost_per_1k_calls": 0.0025, - "input_cost_per_token": 1.5e-06, - "input_cost_per_token_flex": 7.5e-07, - "input_cost_per_token_priority": 3e-06, - "litellm_provider": "openai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "responses", - "output_cost_per_reasoning_token": 1.3e-05, - "output_cost_per_token": 1.2e-05, - "output_cost_per_token_flex": 6e-06, - "output_cost_per_token_priority": 2.4e-05, - "search_context_cost_per_query": { - "search_context_size_low": 0.01, - "search_context_size_medium": 0.0125, - "search_context_size_high": 0.015 - }, - "supports_function_calling": true - }, - "gpt-5.5-pro": { - "cache_read_input_token_cost": 1.5e-06, - "file_search_cost_per_1k_calls": 0.0025, - "input_cost_per_token": 1.5e-05, - "input_cost_per_token_flex": 7.5e-06, - "input_cost_per_token_priority": 3e-05, - "litellm_provider": "openai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "responses", - "output_cost_per_reasoning_token": 0.00013, - "output_cost_per_token": 0.00012, - "output_cost_per_token_flex": 6e-05, - "output_cost_per_token_priority": 0.00024, - "search_context_cost_per_query": { - "search_context_size_low": 0.01, - "search_context_size_medium": 0.0125, - "search_context_size_high": 0.015 - }, - "supports_function_calling": true - }, - "claude-opus-5": { - "cache_creation_input_token_cost": 6.25e-06, - "cache_creation_input_token_cost_above_1hr": 1e-05, - "cache_creation_input_token_cost_above_200k_tokens": 1.25e-05, - "cache_read_input_token_cost": 5e-07, - "cache_read_input_token_cost_above_200k_tokens": 1e-06, - "input_cost_per_token": 5e-06, - "input_cost_per_token_above_200k_tokens": 1e-05, - "input_cost_per_token_priority": 6.25e-06, - "litellm_provider": "anthropic", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 2.5e-05, - "output_cost_per_token_above_200k_tokens": 3.75e-05, - "output_cost_per_token_priority": 3.125e-05, - "provider_specific_entry": { - "fast": 6.0, - "us": 1.1 - }, - "search_context_cost_per_query": { - "search_context_size_medium": 0.01 - }, - "supports_function_calling": true - }, - "claude-sonnet-5": { - "cache_creation_input_token_cost": 3.75e-06, - "cache_creation_input_token_cost_above_1hr": 6e-06, - "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06, - "cache_read_input_token_cost": 3e-07, - "cache_read_input_token_cost_above_200k_tokens": 6e-07, - "input_cost_per_token": 3e-06, - "input_cost_per_token_above_200k_tokens": 6e-06, - "input_cost_per_token_priority": 3.75e-06, - "litellm_provider": "anthropic", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 1.5e-05, - "output_cost_per_token_above_200k_tokens": 2.25e-05, - "output_cost_per_token_priority": 1.875e-05, - "provider_specific_entry": { - "us": 1.1 - }, - "search_context_cost_per_query": { - "search_context_size_medium": 0.01 - }, - "supports_function_calling": true - }, - "claude-haiku-4-5": { - "cache_creation_input_token_cost": 1.25e-06, - "cache_creation_input_token_cost_above_1hr": 2e-06, - "cache_read_input_token_cost": 1e-07, - "input_cost_per_token": 1e-06, - "input_cost_per_token_priority": 1.25e-06, - "litellm_provider": "anthropic", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 5e-06, - "output_cost_per_token_priority": 6.25e-06, - "provider_specific_entry": { - "us": 1.1 - }, - "search_context_cost_per_query": { - "search_context_size_medium": 0.01 - }, - "supports_function_calling": true - }, - "us.anthropic.claude-opus-5-v1:0": { - "cache_creation_input_token_cost": 6.875e-06, - "cache_creation_input_token_cost_above_1hr": 1.1e-05, - "cache_creation_input_token_cost_above_200k_tokens": 1.375e-05, - "cache_read_input_token_cost": 5.5e-07, - "cache_read_input_token_cost_above_200k_tokens": 1.1e-06, - "input_cost_per_token": 5.5e-06, - "input_cost_per_token_above_200k_tokens": 1.1e-05, - "input_cost_per_token_flex": 2.75e-06, - "input_cost_per_token_priority": 6.875e-06, - "litellm_provider": "bedrock_converse", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 2.75e-05, - "output_cost_per_token_above_200k_tokens": 4.125e-05, - "output_cost_per_token_flex": 1.375e-05, - "output_cost_per_token_priority": 3.4375e-05, - "supports_function_calling": true - }, - "anthropic.claude-sonnet-5-v1:0": { - "cache_creation_input_token_cost": 4.125e-06, - "cache_creation_input_token_cost_above_1hr": 6.6e-06, - "cache_read_input_token_cost": 3.3e-07, - "input_cost_per_token": 3.3e-06, - "input_cost_per_token_flex": 1.65e-06, - "input_cost_per_token_priority": 4.125e-06, - "litellm_provider": "bedrock_converse", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 1.65e-05, - "output_cost_per_token_flex": 8.25e-06, - "output_cost_per_token_priority": 2.0625e-05, - "supports_function_calling": true - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "input_cost_per_token": 2.4e-07, - "litellm_provider": "bedrock_converse", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 9.7e-07, - "supports_function_calling": true - }, - "gemini/gemini-3.1-pro": { - "cache_read_input_token_cost": 2e-07, - "cache_read_input_token_cost_above_200k_tokens": 4e-07, - "google_maps_grounding_cost_per_query": 0.025, - "input_cost_per_audio_token": 2.6e-06, - "input_cost_per_image_token": 2.2e-06, - "input_cost_per_token": 2e-06, - "input_cost_per_token_above_200k_tokens": 4e-06, - "input_cost_per_token_flex": 1e-06, - "input_cost_per_token_priority": 2.5e-06, - "input_cost_per_video_token": 2.4e-06, - "litellm_provider": "gemini", - "max_input_tokens": 1048576, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_reasoning_token": 1.3e-05, - "output_cost_per_token": 1.2e-05, - "output_cost_per_token_above_200k_tokens": 1.8e-05, - "output_cost_per_token_flex": 6e-06, - "output_cost_per_token_priority": 1.5e-05, - "search_context_cost_per_query": { - "search_context_size_medium": 0.035 - }, - "supports_function_calling": true, - "web_search_billing_unit": "per_query" - }, - "gemini/gemini-3.8-flash": { - "cache_read_input_token_cost": 5e-08, - "google_maps_grounding_cost_per_query": 0.025, - "input_cost_per_audio_token": 1e-06, - "input_cost_per_image_token": 5.5e-07, - "input_cost_per_token": 5e-07, - "input_cost_per_token_flex": 2.5e-07, - "input_cost_per_token_priority": 6.25e-07, - "input_cost_per_video_token": 6e-07, - "litellm_provider": "gemini", - "max_input_tokens": 1048576, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_audio_token": 6e-06, - "output_cost_per_reasoning_token": 3.5e-06, - "output_cost_per_token": 3e-06, - "output_cost_per_token_flex": 1.5e-06, - "output_cost_per_token_priority": 3.75e-06, - "search_context_cost_per_query": { - "search_context_size_medium": 0.035 - }, - "supports_function_calling": true, - "web_search_billing_unit": "per_prompt" - }, - "gemini-3.1-pro": { - "cache_read_input_token_cost": 2.1e-07, - "cache_read_input_token_cost_above_200k_tokens": 4.2e-07, - "google_maps_grounding_cost_per_query": 0.025, - "input_cost_per_audio_token": 2.7e-06, - "input_cost_per_image_token": 2.3e-06, - "input_cost_per_token": 2.1e-06, - "input_cost_per_token_above_200k_tokens": 4.2e-06, - "input_cost_per_token_flex": 1.05e-06, - "input_cost_per_token_priority": 2.625e-06, - "litellm_provider": "vertex_ai-language-models", - "max_input_tokens": 1048576, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_reasoning_token": 1.35e-05, - "output_cost_per_token": 1.26e-05, - "output_cost_per_token_above_200k_tokens": 1.89e-05, - "output_cost_per_token_flex": 6.3e-06, - "output_cost_per_token_priority": 1.575e-05, - "search_context_cost_per_query": { - "search_context_size_medium": 0.035 - }, - "supports_function_calling": true, - "web_search_billing_unit": "per_query" - }, - "gemini-3.8-flash": { - "cache_read_input_token_cost": 5.2e-08, - "google_maps_grounding_cost_per_query": 0.025, - "input_cost_per_audio_token": 1.04e-06, - "input_cost_per_token": 5.2e-07, - "input_cost_per_token_flex": 2.6e-07, - "input_cost_per_token_priority": 6.5e-07, - "input_cost_per_video_token": 6.2e-07, - "litellm_provider": "vertex_ai-language-models", - "max_input_tokens": 1048576, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_audio_token": 6.24e-06, - "output_cost_per_token": 3.12e-06, - "output_cost_per_token_flex": 1.56e-06, - "output_cost_per_token_priority": 3.9e-06, - "search_context_cost_per_query": { - "search_context_size_medium": 0.035 - }, - "supports_function_calling": true, - "web_search_billing_unit": "per_prompt" - }, - "together_ai/moonshotai/Kimi-K3": { - "input_cost_per_token": 1.15e-06, - "litellm_provider": "together_ai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 3.45e-06, - "supports_function_calling": true - }, - "together_ai/zai-org/GLM-5.3": { - "input_cost_per_token": 5.5e-07, - "litellm_provider": "together_ai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 2.2e-06, - "supports_function_calling": true - }, - "fireworks_ai/accounts/fireworks/models/kimi-k3": { - "cache_read_input_token_cost": 6e-08, - "input_cost_per_token": 6e-07, - "litellm_provider": "fireworks_ai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 2.5e-06, - "supports_function_calling": true - }, - "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { - "input_cost_per_token": 1.5e-07, - "litellm_provider": "fireworks_ai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 6e-07, - "supports_function_calling": true - }, - "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { - "cache_read_input_token_cost": 9e-08, - "input_cost_per_token": 9e-07, - "litellm_provider": "fireworks_ai", - "max_input_tokens": 400000, - "max_output_tokens": 65536, - "max_tokens": 65536, - "mode": "chat", - "output_cost_per_token": 3.6e-06, - "supports_function_calling": true - } -} diff --git a/tests/integration/cost_calculation/cost_matrix.py b/tests/integration/cost_calculation/cost_matrix.py deleted file mode 100644 index b261deb68b2..00000000000 --- a/tests/integration/cost_calculation/cost_matrix.py +++ /dev/null @@ -1,658 +0,0 @@ -"""The cost-calculation matrix: the model set derived from the test cost map, -the request/response cases from ``cases.json``, and the loaders both use. - -Two data files drive the suite; nothing in Python lists models or cases: -- ``tests/integration/cost_calculation/cost_map.json`` is the proxy's ENTIRE model cost map - (LITELLM_MODEL_COST_MAP_URL); every entry becomes a deployment under test. -- ``tests/integration/cost_calculation/cases.json`` is the case list plus the reviewed - goldens: each exact-spend case carries an ``expected`` cell per map key it - runs against, each recount case carries its ``models`` list, so matrix - membership and expected values are literal data read side by side. -""" - -from __future__ import annotations - -import base64 -import io -import json -import math -import random -import struct -import wave -import zlib -from collections.abc import Mapping -from dataclasses import dataclass -from pathlib import Path -from types import MappingProxyType -from typing import Final, Literal - -from litellm import get_llm_provider -from litellm.llms.anthropic.chat.transformation import AnthropicConfig -from litellm.llms.azure.chat.gpt_transformation import AzureOpenAIConfig -from litellm.llms.bedrock.chat.converse_transformation import AmazonConverseConfig -from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig -from litellm.llms.openai.responses.transformation import OpenAIResponsesAPIConfig -from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import VertexGeminiConfig -from litellm.types.utils import LlmProviders -from litellm.utils import ProviderConfigManager -from pydantic import BaseModel, ConfigDict, Field, TypeAdapter -from integration._support.scripted_shapes import ( - Scenario, - Shape, - ScriptedOutput, - ScriptedToolCall, - ScriptedUsage, -) - -COST_MAP_PATH: Final = Path(__file__).resolve().parent / "cost_map.json" -CASES_PATH: Final = Path(__file__).resolve().parent / "cases.json" - -class SearchContextCostPerQuery(BaseModel): - model_config = ConfigDict(frozen=True) - - search_context_size_low: float | None = None - search_context_size_medium: float | None = None - search_context_size_high: float | None = None - - -class ProviderSpecificEntry(BaseModel): - """Provider-specific key rates, keyed by the named suffix litellm looks up - (``fast`` for Anthropic fast mode, ``us`` for US inference geography).""" - - model_config = ConfigDict(frozen=True) - - fast: float | None = None - us: float | None = None - - -class CostMapEntry(BaseModel): - """The pricing fields of a cost-map entry the matrix reads. Shaped like a - ``model_prices_and_context_window.json`` entry; the file is test-owned so - undeclared keys are forbidden rather than ignored.""" - - model_config = ConfigDict(frozen=True, extra="forbid") - - litellm_provider: str - mode: str - max_tokens: int | None = None - max_input_tokens: int | None = None - max_output_tokens: int | None = None - supports_function_calling: bool | None = None - input_cost_per_token: float | None = None - output_cost_per_token: float | None = None - cache_read_input_token_cost: float | None = None - cache_creation_input_token_cost: float | None = None - cache_creation_input_token_cost_above_1hr: float | None = None - cache_read_input_token_cost_above_200k_tokens: float | None = None - cache_creation_input_token_cost_above_200k_tokens: float | None = None - output_cost_per_reasoning_token: float | None = None - input_cost_per_audio_token: float | None = None - output_cost_per_audio_token: float | None = None - input_cost_per_image_token: float | None = None - input_cost_per_video_token: float | None = None - input_cost_per_token_above_200k_tokens: float | None = None - output_cost_per_token_above_200k_tokens: float | None = None - input_cost_per_token_flex: float | None = None - output_cost_per_token_flex: float | None = None - input_cost_per_token_priority: float | None = None - output_cost_per_token_priority: float | None = None - search_context_cost_per_query: SearchContextCostPerQuery | None = None - web_search_billing_unit: str | None = None - google_maps_grounding_cost_per_query: float | None = None - file_search_cost_per_1k_calls: float | None = None - provider_specific_entry: ProviderSpecificEntry | None = None - - -_METADATA_FIELDS: Final = frozenset( - { - "litellm_provider", - "mode", - "max_tokens", - "max_input_tokens", - "max_output_tokens", - "supports_function_calling", - } -) -_CONTAINER_FIELDS: Final = frozenset({"search_context_cost_per_query", "provider_specific_entry"}) - - -def _submodel_rate_keys( - field: str, sub: SearchContextCostPerQuery | ProviderSpecificEntry | None -) -> tuple[str, ...]: - if sub is None: - return () - return tuple( - f"{field}.{name}" - for name in type(sub).model_fields - if getattr(sub, name) is not None - ) - - -def _entry_rate_keys(entry: CostMapEntry) -> frozenset[str]: - """Every cost key an entry carries, with container subfields expanded to - dotted names (``search_context_cost_per_query.search_context_size_low``). - ``web_search_billing_unit`` counts as a rate key whenever present, - for both ``per_query`` and ``per_prompt`` values.""" - plain: Final = frozenset( - name - for name in CostMapEntry.model_fields - if name not in _METADATA_FIELDS - and name not in _CONTAINER_FIELDS - and getattr(entry, name) is not None - ) - return ( - plain - | frozenset( - _submodel_rate_keys("search_context_cost_per_query", entry.search_context_cost_per_query) - ) - | frozenset(_submodel_rate_keys("provider_specific_entry", entry.provider_specific_entry)) - ) - - -def _entry_has_rate_key(entry: CostMapEntry, rate_key: str) -> bool: - outer, _, inner = rate_key.partition(".") - if outer == "search_context_cost_per_query": - return f"{outer}.{inner}" in _submodel_rate_keys(outer, entry.search_context_cost_per_query) - if outer == "provider_specific_entry": - return f"{outer}.{inner}" in _submodel_rate_keys(outer, entry.provider_specific_entry) - value: Final[object] = getattr(entry, outer, None) - return value is not None - - -SERVICE_TIER_REQUEST_SHAPES: Final = frozenset( - {"openai_chat", "openai_responses", "bedrock_converse"} -) - - -COST_MAP_ADAPTER: Final = TypeAdapter(dict[str, CostMapEntry]) -COST_MAP: Final[Mapping[str, CostMapEntry]] = MappingProxyType( - COST_MAP_ADAPTER.validate_python(json.loads(COST_MAP_PATH.read_text())) -) - -TIER_THRESHOLD_TOKENS: Final = 200_000 - - -class DeploymentSpec(BaseModel): - """A deployment-level fact from cases.json: when a map key needs a - registered deployment name that is not its provider model (or a - model_info.base_model pin), the matrix uses these instead of the defaults.""" - - model_config = ConfigDict(frozen=True) - - map_key: str - litellm_model: str | None = None - base_model: str | None = None - - -class ExpectedCell(BaseModel): - model_config = ConfigDict(frozen=True) - - spend: float - input_cost: float - output_cost: float - prompt_tokens: int - completion_tokens: int - - -class Case(BaseModel): - """One request/response shape from cases.json. - - ``family`` splits the matrix: ``pricing`` cases own cost keys (``owns``, - dotted subfield names allowed) or declare which keys they deliberately - leave absent (``fallback_for``) so every cost key in the map has exactly - one owning case; ``transport`` cases exercise counting/transport only and - run wherever they list membership. An exact-spend case names its models - implicitly by carrying one ``expected`` golden per map key; a recount - case (``exact_spend=False``) names them in ``models`` instead. The - feature flags drive request realism in ``_chat_body``.""" - - model_config = ConfigDict(frozen=True) - - name: str - family: Literal["pricing", "transport"] - usage: ScriptedUsage - usage_by_model: Mapping[str, ScriptedUsage] = Field(default_factory=lambda: MappingProxyType({})) - stream: bool = False - stream_usage: Literal["final_chunk", "absent"] = "final_chunk" - service_tier: Literal["flex", "priority"] | None = None - speed: Literal["fast"] | None = None - inference_geo: Literal["us"] | None = None - response_model_override: bool = False - exact_spend: bool = True - tool_call: bool = False - image_input: bool = False - audio_input: bool = False - audio_output: bool = False - video_input: bool = False - reasoning: bool = False - web_search: Literal["low", "medium", "high"] | None = None - google_maps: bool = False - file_search: bool = False - terminal: Literal["completed", "incomplete", "unvalidated", "prompt_blocked"] = "completed" - owns: tuple[str, ...] = () - fallback_for: tuple[str, ...] = () - expected: Mapping[str, ExpectedCell] = Field(default_factory=lambda: MappingProxyType({})) - models: tuple[str, ...] = () - - def applies_to(self, model: FrontierModel) -> bool: - if self.exact_spend: - return model.map_key in self.expected - return model.map_key in self.models - - def expected_for(self, model: FrontierModel) -> ExpectedCell: - return self.expected[model.map_key] - - def usage_for(self, map_key: str) -> ScriptedUsage: - return self.usage_by_model.get(map_key, self.usage) - - def scenario(self, scenario_id: str, model: FrontierModel, text: str) -> Scenario: - return Scenario( - scenario_id=scenario_id, - shape=model.shape, - usage=self.usage_for(model.map_key), - model=model.provider_model, - output=ScriptedOutput( - text=text, - response_model=model.override_model if self.response_model_override else None, - tool_call=ScriptedToolCall(name="get_weather", arguments=TOOL_CALL_ARGUMENTS) - if self.tool_call - else None, - terminal=self.terminal, - ), - stream_usage=self.stream_usage, - service_tier=self.service_tier, - speed=self.speed, - inference_geo=self.inference_geo, - ) - - -class _ProviderWiringRow(BaseModel): - model_config = ConfigDict(frozen=True) - - litellm_provider: str - mode: str - model_prefix: str | None - litellm_params: Mapping[str, str] - - -class _CasesFile(BaseModel): - model_config = ConfigDict(frozen=True) - - providers: tuple[_ProviderWiringRow, ...] = () - deployments: tuple[DeploymentSpec, ...] = () - cases: tuple[Case, ...] = () - - -CASES_FILE: Final = _CasesFile.model_validate(json.loads(CASES_PATH.read_text())) -CASES: Final[tuple[Case, ...]] = CASES_FILE.cases -_DEPLOYMENTS: Final[Mapping[str, DeploymentSpec]] = MappingProxyType( - {spec.map_key: spec for spec in CASES_FILE.deployments} -) - - -@dataclass(frozen=True, slots=True) -class _DeploymentDefaults: - """How a (litellm_provider, mode) pair maps to deployment defaults.""" - - model_prefix: str | None - litellm_params: Mapping[str, str] - - -def _deployment_defaults( - rows: tuple[_ProviderWiringRow, ...], -) -> Mapping[tuple[str, str], _DeploymentDefaults]: - return MappingProxyType( - { - (row.litellm_provider, row.mode): _DeploymentDefaults( - row.model_prefix, - MappingProxyType(dict(row.litellm_params)), - ) - for row in rows - } - ) - - -_DEPLOYMENT_DEFAULTS: Final[Mapping[tuple[str, str], _DeploymentDefaults]] = _deployment_defaults( - CASES_FILE.providers -) - - -@dataclass(frozen=True, slots=True) -class FrontierModel: - """One deployment under test, derived from a cost-map entry: the model_name - the suite registers, the provider-prefixed litellm model string, the - response shape the scripted upstream speaks, and the sibling map model the - response_model override case reports.""" - - model_name: str - litellm_model: str - shape: Shape - llm_provider: str - map_key: str - override_model: str | None = None - override_map_key: str | None = None - # Registered as model_info.base_model; when set, the provider-reported - # model loses to it and every case bills at this deployment's own rates. - base_model: str | None = None - litellm_params: Mapping[str, str] = MappingProxyType({}) - - @property - def rates(self) -> CostMapEntry: - return COST_MAP[self.map_key] - - @property - def override_rates(self) -> CostMapEntry: - # bedrock_converse responses carry no model field, so a reported-model - # override can never repoint pricing there, same as a base_model pin. - if ( - self.base_model is not None - or self.shape == "bedrock_converse" - or self.override_map_key is None - ): - return self.rates - return COST_MAP[self.override_map_key] - - @property - def provider_model(self) -> str: - """The bare provider-facing model name: litellm_model minus the provider - prefix and any routing segment (converse/, responses/).""" - return _provider_model(self.litellm_model) - - @property - def provider(self) -> str: - return self.rates.litellm_provider - - @property - def api_key(self) -> str: - # The scripted upstream ignores auth; a fixed bogus key proves the suite - # spends zero real provider calls. - return "sk-scripted-provider" - - -def _provider_model(litellm_model: str) -> str: - tail: Final = litellm_model.split("/")[1:] - return "/".join(tail[1:] if tail and tail[0] in ("converse", "responses") else tail) - - -def _litellm_model_for(map_key: str, defaults: _DeploymentDefaults) -> str: - if defaults.model_prefix is None: - return map_key - if map_key.startswith(f"{defaults.model_prefix}/"): - return map_key - return f"{defaults.model_prefix}/{map_key}" - - -def _resolve(litellm_model: str, mode: str) -> tuple[str, Shape]: - model, provider, _, _ = get_llm_provider(model=litellm_model) - llm_provider: Final = LlmProviders(provider) - if mode == "responses": - responses_config: Final = ProviderConfigManager.get_provider_responses_api_config( - model=model, - provider=llm_provider, - ) - if isinstance(responses_config, OpenAIResponsesAPIConfig): - return provider, "openai_responses" - raise ValueError(f"no scripted renderer for {type(responses_config).__name__} ({litellm_model})") - config: Final = ProviderConfigManager.get_provider_chat_config(model=model, provider=llm_provider) - if isinstance(config, AmazonConverseConfig): - return provider, "bedrock_converse" - if isinstance(config, VertexGeminiConfig): - return provider, "gemini_generate" - if isinstance(config, AnthropicConfig): - return provider, "anthropic_messages" - if isinstance(config, (AzureOpenAIConfig, OpenAIGPTConfig)): - return provider, "openai_chat" - raise ValueError(f"no scripted renderer for {type(config).__name__} ({litellm_model})") - - -def _frontier() -> tuple[FrontierModel, ...]: - groups: Final[Mapping[tuple[str, str], tuple[str, ...]]] = MappingProxyType( - { - pair: tuple(sorted(k for k, e in COST_MAP.items() if (e.litellm_provider, e.mode) == pair)) - for pair in {(e.litellm_provider, e.mode) for e in COST_MAP.values()} - } - ) - models: list[FrontierModel] = [] # mutable-ok: accumulated once at import into a tuple - for map_key in sorted(COST_MAP): - entry = COST_MAP[map_key] - pair = (entry.litellm_provider, entry.mode) - defaults = _DEPLOYMENT_DEFAULTS.get(pair) - if defaults is None: - continue - siblings = groups[pair] - override_key = ( - siblings[(siblings.index(map_key) + 1) % len(siblings)] if len(siblings) > 1 else None - ) - override_litellm = ( - _litellm_model_for(override_key, defaults) if override_key is not None else None - ) - deployment = _DEPLOYMENTS.get(map_key) - litellm_model = ( - deployment.litellm_model - if deployment is not None and deployment.litellm_model is not None - else _litellm_model_for(map_key, defaults) - ) - llm_provider, shape = _resolve(litellm_model, entry.mode) - models.append( - FrontierModel( - model_name=f"cc-{map_key.replace('/', '-').replace(':', '-').replace('.', '-').lower()}", - litellm_model=litellm_model, - shape=shape, - llm_provider=llm_provider, - map_key=map_key, - override_model=( - _provider_model(override_litellm) - if override_litellm is not None - else None - ), - override_map_key=override_key, - base_model=deployment.base_model if deployment is not None else None, - litellm_params=defaults.litellm_params, - ) - ) - return tuple(models) - - -FRONTIER_MODELS: Final[tuple[FrontierModel, ...]] = _frontier() - -TOOL_CALL_ARGUMENTS: Final = json.dumps({ - "city": "Berlin", - "days": 7, - "units": "metric", - "notes": "filler " * 30, -}) - - -def cases_for(model: FrontierModel) -> tuple[Case, ...]: - return tuple(case for case in CASES if case.applies_to(model)) - - -def recount_cost( - model: FrontierModel, case: Case, prompt_tokens: int, completion_tokens: int -) -> float: - """What the proxy's own token recount should cost at the case's rates, - without pinning the tokenizer's exact counts.""" - rates: Final = model.override_rates if case.response_model_override else model.rates - return prompt_tokens * (rates.input_cost_per_token or 0.0) + completion_tokens * ( - rates.output_cost_per_token or 0.0 - ) - - -def _png_chunk(tag: bytes, payload: bytes) -> bytes: - return struct.pack(">I", len(payload)) + tag + payload + struct.pack(">I", zlib.crc32(tag + payload)) - - -def audio_input_data_url() -> str: - """A deterministic 0.5 s 16-bit PCM WAV (8 kHz, 220 Hz sine) as a data - URL, small enough to stay a fixture but real audio to the provider.""" - frames: Final = b"".join( - struct.pack(" str: - """A deterministic mp4-looking blob (ftyp box plus a fixed mdat payload) - as a data URL; only the media type and bytes matter to the response.""" - ftyp: Final = struct.pack(">I4s4sI4s4s", 24, b"ftyp", b"isom", 0x200, b"isom", b"iso6") - mdat_payload: Final = bytes((i * 7 + 13) % 256 for i in range(4096)) - mdat: Final = struct.pack(">I4s", 8 + len(mdat_payload), b"mdat") + mdat_payload - return "data:video/mp4;base64," + base64.b64encode(ftyp + mdat).decode() - - -def image_input_data_url() -> str: - """A deterministic 256x256 RGB noise PNG as a data URL; noise compresses - poorly on purpose so the base64 payload stays well above 100 KB and would - blow up the prompt recount if the URL were ever tokenized as text.""" - rng: Final = random.Random(0) - side: Final = 256 - raw: Final = b"".join( - b"\x00" + rng.randbytes(side * 3) for _ in range(side) - ) - png: Final = ( - b"\x89PNG\r\n\x1a\n" - + _png_chunk(b"IHDR", struct.pack(">IIBBBBB", side, side, 8, 2, 0, 0, 0)) - + _png_chunk(b"IDAT", zlib.compress(raw)) - + _png_chunk(b"IEND", b"") - ) - return "data:image/png;base64," + base64.b64encode(png).decode() - - -IMAGE_INPUT_DATA_URL: Final = image_input_data_url() -AUDIO_INPUT_DATA_URL: Final = audio_input_data_url() -VIDEO_INPUT_DATA_URL: Final = video_input_data_url() - - -def matrix_data_errors() -> tuple[str, ...]: - """Consistency findings for the data files, as human-readable strings. - - Called at collection time by the integration suite, so a map key named by a case - but absent from cost_map.json fails the suite's collection loudly. - """ - unknown_deployments: Final = sorted( - spec.map_key for spec in CASES_FILE.deployments if spec.map_key not in COST_MAP - ) - unknown_case_models: Final = sorted( - { - map_key - for case in CASES - for map_key in (*case.expected, *case.models) - if map_key not in COST_MAP - } - ) - misshapen_cases: Final = sorted( - case.name - for case in CASES - if case.exact_spend == bool(case.models) or case.exact_spend != bool(case.expected) - ) - all_pairs: Final = frozenset( - (map_key, key) - for map_key, entry in COST_MAP.items() - for key in _entry_rate_keys(entry) - ) - owned_pairs: Final = tuple( - (map_key, key) - for case in CASES - if case.family == "pricing" - for map_key in case.expected - for key in case.owns - if map_key in COST_MAP and _entry_has_rate_key(COST_MAP[map_key], key) - ) - unowned_pairs: Final = sorted( - f"{map_key}:{key}" for map_key, key in all_pairs - frozenset(owned_pairs) - ) - duplicate_pairs: Final = sorted( - f"{map_key}:{key}" - for map_key, key in set(owned_pairs) - if owned_pairs.count((map_key, key)) > 1 - ) - owns_without_holder: Final = sorted( - f"{case.name}:{key}" - for case in CASES - for key in case.owns - if not any( - map_key in COST_MAP and _entry_has_rate_key(COST_MAP[map_key], key) - for map_key in case.expected - ) - ) - fallback_violations: Final = sorted( - f"{case.name}:{map_key}:{key}" - for case in CASES - for key in case.fallback_for - for map_key in (*case.expected, *case.models) - if map_key in COST_MAP and _entry_has_rate_key(COST_MAP[map_key], key) - ) - family_violations: Final = sorted( - case.name - for case in CASES - if (case.family == "transport") != (not case.owns and not case.fallback_for) - ) - missing_provider_rows: Final = sorted( - f"cost_map entry {map_key} has no providers row for " - f"(litellm_provider={entry.litellm_provider}, mode={entry.mode}); " - f"add a providers row in cases.json" - for map_key, entry in COST_MAP.items() - if (entry.litellm_provider, entry.mode) not in _DEPLOYMENT_DEFAULTS - ) - input_rates: Final = tuple(entry.input_cost_per_token for entry in COST_MAP.values()) - findings: Final = ( - ( - f"deployments entries name map keys absent from cost_map.json: {unknown_deployments}" - if unknown_deployments - else None - ), - ( - f"case expected/models name map keys absent from cost_map.json: {unknown_case_models}" - if unknown_case_models - else None - ), - ( - f"cases must carry expected xor models (exact_spend matches the field): {misshapen_cases}" - if misshapen_cases - else None - ), - ( - "two cost_map entries share input_cost_per_token; the suite relies on " - "distinct rates so a wrong-model bill can never coincidentally match" - if len(input_rates) != len(set(input_rates)) - else None - ), - ( - f"(model, rate key) pairs with no owning case: {unowned_pairs}" - if unowned_pairs - else None - ), - ( - f"(model, rate key) pairs owned by more than one case: {duplicate_pairs}" - if duplicate_pairs - else None - ), - ( - f"owns keys absent on all of the case's expected models: {owns_without_holder}" - if owns_without_holder - else None - ), - ( - f"fallback_for keys a case's models actually carry: {fallback_violations}" - if fallback_violations - else None - ), - ( - f"cases with owns/fallback_for inconsistent with family: {family_violations}" - if family_violations - else None - ), - ( - f"cost_map entries without providers rows: {missing_provider_rows}" - if missing_provider_rows - else None - ), - ) - return tuple(finding for finding in findings if finding is not None) diff --git a/tests/integration/cost_calculation/cost_tracking_case.py b/tests/integration/cost_calculation/cost_tracking_case.py new file mode 100644 index 00000000000..6af95f995ff --- /dev/null +++ b/tests/integration/cost_calculation/cost_tracking_case.py @@ -0,0 +1,253 @@ +from __future__ import annotations + +from collections.abc import Mapping +from pathlib import Path +from types import MappingProxyType +from typing import Annotated, Final, Literal, TypeAlias + +from pydantic import BaseModel, ConfigDict, Field, JsonValue + +CASES_PATH: Final = Path(__file__).resolve().parent / "cost_tracking_cases.json" + + +class SearchContextCostPerQuery(BaseModel): + model_config = ConfigDict(frozen=True) + + search_context_size_low: float | None = None + search_context_size_medium: float | None = None + search_context_size_high: float | None = None + + +class ProviderSpecificEntry(BaseModel): + model_config = ConfigDict(frozen=True) + + fast: float | None = None + us: float | None = None + + +class CostMapEntry(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + litellm_provider: str + mode: str + max_tokens: int | None = None + max_input_tokens: int | None = None + max_output_tokens: int | None = None + supports_function_calling: bool | None = None + input_cost_per_token: float | None = None + output_cost_per_token: float | None = None + cache_read_input_token_cost: float | None = None + cache_creation_input_token_cost: float | None = None + cache_creation_input_token_cost_above_1hr: float | None = None + cache_read_input_token_cost_above_200k_tokens: float | None = None + cache_creation_input_token_cost_above_200k_tokens: float | None = None + output_cost_per_reasoning_token: float | None = None + input_cost_per_audio_token: float | None = None + output_cost_per_audio_token: float | None = None + input_cost_per_image_token: float | None = None + input_cost_per_video_token: float | None = None + input_cost_per_token_above_200k_tokens: float | None = None + output_cost_per_token_above_200k_tokens: float | None = None + input_cost_per_token_flex: float | None = None + output_cost_per_token_flex: float | None = None + input_cost_per_token_priority: float | None = None + output_cost_per_token_priority: float | None = None + search_context_cost_per_query: SearchContextCostPerQuery | None = None + web_search_billing_unit: str | None = None + google_maps_grounding_cost_per_query: float | None = None + file_search_cost_per_1k_calls: float | None = None + provider_specific_entry: ProviderSpecificEntry | None = None + + +class Deployment(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + model: str | None = None + base_model: str | None = None + + +class JsonResponse(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + content_type: Literal["application/json"] + body: dict[str, JsonValue] + + +class SseResponse(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + content_type: Literal["text/event-stream"] + frames: tuple[str, ...] + + +class EventStreamEvent(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + event_type: str + payload: dict[str, JsonValue] + + +class EventStreamResponse(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + content_type: Literal["application/vnd.amazon.eventstream"] + events: tuple[EventStreamEvent, ...] + + +StoredResponse: TypeAlias = Annotated[ + JsonResponse | SseResponse | EventStreamResponse, + Field(discriminator="content_type"), +] + + +class ExactExpected(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + spend: float + input_cost: float + output_cost: float + prompt_tokens: int + completion_tokens: int + + +class RecountRates(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + input_cost_per_token: float + output_cost_per_token: float + + +class RecountExpected(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + recount: RecountRates + + +Expected: TypeAlias = ExactExpected | RecountExpected + + +class CostTrackingTestCase(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + name: str + covers: str + model: str + deployment: Deployment | None = None + request: dict[str, JsonValue] + response: StoredResponse + expected: Expected + + @property + def rates(self) -> CostMapEntry: + return COST_MAP[self.model] + + @property + def litellm_model(self) -> str: + provider: Final = self.rates.litellm_provider + prefix: Final = ( + "openai" + if provider == "openai" and self.rates.mode == "chat" + else "openai/responses" + if provider == "openai" + else _PROVIDER_PREFIXES.get(provider) + ) + if prefix is None: + raise ValueError(f"unsupported cost-map provider {provider} for {self.model}") + return self.deployment.model if self.deployment and self.deployment.model is not None else ( + self.model if prefix == "" else f"{prefix}/{self.model}" + ) + + @property + def litellm_params(self) -> Mapping[str, str]: + return _LITELLM_PARAMS[self.rates.litellm_provider] + + @property + def api_key(self) -> str: + return "sk-scripted-provider" + + @property + def base_model(self) -> str | None: + return self.deployment.base_model if self.deployment else None + + +class _CasesFile(BaseModel): + model_config = ConfigDict(frozen=True, extra="forbid") + + cost_map: dict[str, CostMapEntry] + cases: tuple[CostTrackingTestCase, ...] + + +_PROVIDER_PREFIXES: Final[Mapping[str, str]] = MappingProxyType( + { + "anthropic": "anthropic", + "bedrock_converse": "bedrock/converse", + "vertex_ai-language-models": "vertex_ai", + "gemini": "", + "together_ai": "", + "fireworks_ai": "", + "azure": "", + } +) +_LITELLM_PARAMS: Final[Mapping[str, Mapping[str, str]]] = MappingProxyType( + { + "anthropic": MappingProxyType({}), + "bedrock_converse": MappingProxyType( + { + "aws_access_key_id": "AKIASCRIPTEDPROVIDER", + "aws_secret_access_key": "scripted-secret", + "aws_region_name": "us-east-1", + } + ), + "vertex_ai-language-models": MappingProxyType( + {"vertex_project": "cc-scripted-project", "vertex_location": "us-central1"} + ), + "gemini": MappingProxyType({}), + "together_ai": MappingProxyType({}), + "fireworks_ai": MappingProxyType({}), + "azure": MappingProxyType({"api_version": "2025-04-01-preview"}), + "openai": MappingProxyType({}), + } +) + +_LOADED: Final = _CasesFile.model_validate_json(CASES_PATH.read_bytes()) +COST_MAP: Final[Mapping[str, CostMapEntry]] = MappingProxyType(dict(_LOADED.cost_map)) +CASES: Final[tuple[CostTrackingTestCase, ...]] = _LOADED.cases +_LITELLM_MODELS: Final = tuple(case.litellm_model for case in CASES) + + +def data_errors() -> tuple[str, ...]: + case_models: Final = frozenset(case.model for case in CASES) + unknown_models: Final = sorted(case.model for case in CASES if case.model not in COST_MAP) + missing_cases: Final = sorted(model for model in COST_MAP if model not in case_models) + duplicate_names: Final = sorted( + name for name in {case.name for case in CASES} if sum(case.name == name for case in CASES) > 1 + ) + input_rates: Final = tuple( + (entry.input_cost_per_token, model) for model, entry in COST_MAP.items() + ) + shared_input_rates: Final = sorted( + f"{rate}: {tuple(model for value, model in input_rates if value == rate)}" + for rate in {value for value, _ in input_rates if value is not None} + if sum(value == rate for value, _ in input_rates) > 1 + ) + recount_mismatches: Final = sorted( + case.name + for case in CASES + if isinstance(case.expected, RecountExpected) + and case.model in COST_MAP + and ( + case.expected.recount.input_cost_per_token != (COST_MAP[case.model].input_cost_per_token or 0.0) + or case.expected.recount.output_cost_per_token != (COST_MAP[case.model].output_cost_per_token or 0.0) + ) + ) + return tuple( + message + for message in ( + f"case models absent from cost_map: {unknown_models}" if unknown_models else None, + f"cost-map entries without cases: {missing_cases}" if missing_cases else None, + f"duplicate case names: {duplicate_names}" if duplicate_names else None, + f"cost-map entries share input_cost_per_token: {shared_input_rates}" if shared_input_rates else None, + f"recount rates differ from cost-map rates: {recount_mismatches}" if recount_mismatches else None, + ) + if message is not None + ) diff --git a/tests/integration/cost_calculation/cost_tracking_cases.json b/tests/integration/cost_calculation/cost_tracking_cases.json new file mode 100644 index 00000000000..3627774816f --- /dev/null +++ b/tests/integration/cost_calculation/cost_tracking_cases.json @@ -0,0 +1,25658 @@ +{ + "cost_map": { + "gpt-5.6": { + "cache_read_input_token_cost": 1.75e-07, + "input_cost_per_audio_token": 4e-05, + "input_cost_per_token": 1.75e-06, + "input_cost_per_token_flex": 8.75e-07, + "input_cost_per_token_priority": 3.5e-06, + "litellm_provider": "openai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_audio_token": 8e-05, + "output_cost_per_reasoning_token": 1.6e-05, + "output_cost_per_token": 1.4e-05, + "output_cost_per_token_flex": 7e-06, + "output_cost_per_token_priority": 2.8e-05, + "search_context_cost_per_query": { + "search_context_size_low": 0.01, + "search_context_size_medium": 0.0125, + "search_context_size_high": 0.015 + }, + "supports_function_calling": true + }, + "gpt-5.4-mini": { + "cache_read_input_token_cost": 3.5e-08, + "input_cost_per_audio_token": 1e-05, + "input_cost_per_token": 3.5e-07, + "input_cost_per_token_flex": 1.75e-07, + "input_cost_per_token_priority": 7e-07, + "litellm_provider": "openai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_audio_token": 2e-05, + "output_cost_per_reasoning_token": 3.2e-06, + "output_cost_per_token": 2.8e-06, + "output_cost_per_token_flex": 1.4e-06, + "output_cost_per_token_priority": 5.6e-06, + "search_context_cost_per_query": { + "search_context_size_low": 0.01, + "search_context_size_medium": 0.0125, + "search_context_size_high": 0.015 + }, + "supports_function_calling": true + }, + "azure/gpt-5.6": { + "cache_read_input_token_cost": 1.8e-07, + "input_cost_per_audio_token": 4.1e-05, + "input_cost_per_token": 1.8e-06, + "input_cost_per_token_flex": 9e-07, + "input_cost_per_token_priority": 3.6e-06, + "litellm_provider": "azure", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_audio_token": 8.2e-05, + "output_cost_per_reasoning_token": 1.65e-05, + "output_cost_per_token": 1.44e-05, + "output_cost_per_token_flex": 7.2e-06, + "output_cost_per_token_priority": 2.88e-05, + "search_context_cost_per_query": { + "search_context_size_low": 0.01, + "search_context_size_medium": 0.0125, + "search_context_size_high": 0.015 + }, + "supports_function_calling": true + }, + "azure/gpt-5.4-mini": { + "cache_read_input_token_cost": 3.6e-08, + "input_cost_per_audio_token": 1.05e-05, + "input_cost_per_token": 3.6e-07, + "input_cost_per_token_flex": 1.8e-07, + "input_cost_per_token_priority": 7.2e-07, + "litellm_provider": "azure", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_audio_token": 2.1e-05, + "output_cost_per_reasoning_token": 3.3e-06, + "output_cost_per_token": 2.88e-06, + "output_cost_per_token_flex": 1.44e-06, + "output_cost_per_token_priority": 5.76e-06, + "search_context_cost_per_query": { + "search_context_size_low": 0.01, + "search_context_size_medium": 0.0125, + "search_context_size_high": 0.015 + }, + "supports_function_calling": true + }, + "gpt-5.3-codex": { + "cache_read_input_token_cost": 1.5e-07, + "file_search_cost_per_1k_calls": 0.0025, + "input_cost_per_token": 1.5e-06, + "input_cost_per_token_flex": 7.5e-07, + "input_cost_per_token_priority": 3e-06, + "litellm_provider": "openai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "responses", + "output_cost_per_reasoning_token": 1.3e-05, + "output_cost_per_token": 1.2e-05, + "output_cost_per_token_flex": 6e-06, + "output_cost_per_token_priority": 2.4e-05, + "search_context_cost_per_query": { + "search_context_size_low": 0.01, + "search_context_size_medium": 0.0125, + "search_context_size_high": 0.015 + }, + "supports_function_calling": true + }, + "gpt-5.5-pro": { + "cache_read_input_token_cost": 1.5e-06, + "file_search_cost_per_1k_calls": 0.0025, + "input_cost_per_token": 1.5e-05, + "input_cost_per_token_flex": 7.5e-06, + "input_cost_per_token_priority": 3e-05, + "litellm_provider": "openai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "responses", + "output_cost_per_reasoning_token": 0.00013, + "output_cost_per_token": 0.00012, + "output_cost_per_token_flex": 6e-05, + "output_cost_per_token_priority": 0.00024, + "search_context_cost_per_query": { + "search_context_size_low": 0.01, + "search_context_size_medium": 0.0125, + "search_context_size_high": 0.015 + }, + "supports_function_calling": true + }, + "claude-opus-5": { + "cache_creation_input_token_cost": 6.25e-06, + "cache_creation_input_token_cost_above_1hr": 1e-05, + "cache_creation_input_token_cost_above_200k_tokens": 1.25e-05, + "cache_read_input_token_cost": 5e-07, + "cache_read_input_token_cost_above_200k_tokens": 1e-06, + "input_cost_per_token": 5e-06, + "input_cost_per_token_above_200k_tokens": 1e-05, + "input_cost_per_token_priority": 6.25e-06, + "litellm_provider": "anthropic", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 2.5e-05, + "output_cost_per_token_above_200k_tokens": 3.75e-05, + "output_cost_per_token_priority": 3.125e-05, + "provider_specific_entry": { + "fast": 6.0, + "us": 1.1 + }, + "search_context_cost_per_query": { + "search_context_size_medium": 0.01 + }, + "supports_function_calling": true + }, + "claude-sonnet-5": { + "cache_creation_input_token_cost": 3.75e-06, + "cache_creation_input_token_cost_above_1hr": 6e-06, + "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06, + "cache_read_input_token_cost": 3e-07, + "cache_read_input_token_cost_above_200k_tokens": 6e-07, + "input_cost_per_token": 3e-06, + "input_cost_per_token_above_200k_tokens": 6e-06, + "input_cost_per_token_priority": 3.75e-06, + "litellm_provider": "anthropic", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 1.5e-05, + "output_cost_per_token_above_200k_tokens": 2.25e-05, + "output_cost_per_token_priority": 1.875e-05, + "provider_specific_entry": { + "us": 1.1 + }, + "search_context_cost_per_query": { + "search_context_size_medium": 0.01 + }, + "supports_function_calling": true + }, + "claude-haiku-4-5": { + "cache_creation_input_token_cost": 1.25e-06, + "cache_creation_input_token_cost_above_1hr": 2e-06, + "cache_read_input_token_cost": 1e-07, + "input_cost_per_token": 1e-06, + "input_cost_per_token_priority": 1.25e-06, + "litellm_provider": "anthropic", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 5e-06, + "output_cost_per_token_priority": 6.25e-06, + "provider_specific_entry": { + "us": 1.1 + }, + "search_context_cost_per_query": { + "search_context_size_medium": 0.01 + }, + "supports_function_calling": true + }, + "us.anthropic.claude-opus-5-v1:0": { + "cache_creation_input_token_cost": 6.875e-06, + "cache_creation_input_token_cost_above_1hr": 1.1e-05, + "cache_creation_input_token_cost_above_200k_tokens": 1.375e-05, + "cache_read_input_token_cost": 5.5e-07, + "cache_read_input_token_cost_above_200k_tokens": 1.1e-06, + "input_cost_per_token": 5.5e-06, + "input_cost_per_token_above_200k_tokens": 1.1e-05, + "input_cost_per_token_flex": 2.75e-06, + "input_cost_per_token_priority": 6.875e-06, + "litellm_provider": "bedrock_converse", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 2.75e-05, + "output_cost_per_token_above_200k_tokens": 4.125e-05, + "output_cost_per_token_flex": 1.375e-05, + "output_cost_per_token_priority": 3.4375e-05, + "supports_function_calling": true + }, + "anthropic.claude-sonnet-5-v1:0": { + "cache_creation_input_token_cost": 4.125e-06, + "cache_creation_input_token_cost_above_1hr": 6.6e-06, + "cache_read_input_token_cost": 3.3e-07, + "input_cost_per_token": 3.3e-06, + "input_cost_per_token_flex": 1.65e-06, + "input_cost_per_token_priority": 4.125e-06, + "litellm_provider": "bedrock_converse", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 1.65e-05, + "output_cost_per_token_flex": 8.25e-06, + "output_cost_per_token_priority": 2.0625e-05, + "supports_function_calling": true + }, + "meta.llama4-maverick-17b-instruct-v1:0": { + "input_cost_per_token": 2.4e-07, + "litellm_provider": "bedrock_converse", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 9.7e-07, + "supports_function_calling": true + }, + "gemini/gemini-3.1-pro": { + "cache_read_input_token_cost": 2e-07, + "cache_read_input_token_cost_above_200k_tokens": 4e-07, + "google_maps_grounding_cost_per_query": 0.025, + "input_cost_per_audio_token": 2.6e-06, + "input_cost_per_image_token": 2.2e-06, + "input_cost_per_token": 2e-06, + "input_cost_per_token_above_200k_tokens": 4e-06, + "input_cost_per_token_flex": 1e-06, + "input_cost_per_token_priority": 2.5e-06, + "input_cost_per_video_token": 2.4e-06, + "litellm_provider": "gemini", + "max_input_tokens": 1048576, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_reasoning_token": 1.3e-05, + "output_cost_per_token": 1.2e-05, + "output_cost_per_token_above_200k_tokens": 1.8e-05, + "output_cost_per_token_flex": 6e-06, + "output_cost_per_token_priority": 1.5e-05, + "search_context_cost_per_query": { + "search_context_size_medium": 0.035 + }, + "supports_function_calling": true, + "web_search_billing_unit": "per_query" + }, + "gemini/gemini-3.8-flash": { + "cache_read_input_token_cost": 5e-08, + "google_maps_grounding_cost_per_query": 0.025, + "input_cost_per_audio_token": 1e-06, + "input_cost_per_image_token": 5.5e-07, + "input_cost_per_token": 5e-07, + "input_cost_per_token_flex": 2.5e-07, + "input_cost_per_token_priority": 6.25e-07, + "input_cost_per_video_token": 6e-07, + "litellm_provider": "gemini", + "max_input_tokens": 1048576, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_audio_token": 6e-06, + "output_cost_per_reasoning_token": 3.5e-06, + "output_cost_per_token": 3e-06, + "output_cost_per_token_flex": 1.5e-06, + "output_cost_per_token_priority": 3.75e-06, + "search_context_cost_per_query": { + "search_context_size_medium": 0.035 + }, + "supports_function_calling": true, + "web_search_billing_unit": "per_prompt" + }, + "gemini-3.1-pro": { + "cache_read_input_token_cost": 2.1e-07, + "cache_read_input_token_cost_above_200k_tokens": 4.2e-07, + "google_maps_grounding_cost_per_query": 0.025, + "input_cost_per_audio_token": 2.7e-06, + "input_cost_per_image_token": 2.3e-06, + "input_cost_per_token": 2.1e-06, + "input_cost_per_token_above_200k_tokens": 4.2e-06, + "input_cost_per_token_flex": 1.05e-06, + "input_cost_per_token_priority": 2.625e-06, + "litellm_provider": "vertex_ai-language-models", + "max_input_tokens": 1048576, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_reasoning_token": 1.35e-05, + "output_cost_per_token": 1.26e-05, + "output_cost_per_token_above_200k_tokens": 1.89e-05, + "output_cost_per_token_flex": 6.3e-06, + "output_cost_per_token_priority": 1.575e-05, + "search_context_cost_per_query": { + "search_context_size_medium": 0.035 + }, + "supports_function_calling": true, + "web_search_billing_unit": "per_query" + }, + "gemini-3.8-flash": { + "cache_read_input_token_cost": 5.2e-08, + "google_maps_grounding_cost_per_query": 0.025, + "input_cost_per_audio_token": 1.04e-06, + "input_cost_per_token": 5.2e-07, + "input_cost_per_token_flex": 2.6e-07, + "input_cost_per_token_priority": 6.5e-07, + "input_cost_per_video_token": 6.2e-07, + "litellm_provider": "vertex_ai-language-models", + "max_input_tokens": 1048576, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_audio_token": 6.24e-06, + "output_cost_per_token": 3.12e-06, + "output_cost_per_token_flex": 1.56e-06, + "output_cost_per_token_priority": 3.9e-06, + "search_context_cost_per_query": { + "search_context_size_medium": 0.035 + }, + "supports_function_calling": true, + "web_search_billing_unit": "per_prompt" + }, + "together_ai/moonshotai/Kimi-K3": { + "input_cost_per_token": 1.15e-06, + "litellm_provider": "together_ai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 3.45e-06, + "supports_function_calling": true + }, + "together_ai/zai-org/GLM-5.3": { + "input_cost_per_token": 5.5e-07, + "litellm_provider": "together_ai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 2.2e-06, + "supports_function_calling": true + }, + "fireworks_ai/accounts/fireworks/models/kimi-k3": { + "cache_read_input_token_cost": 6e-08, + "input_cost_per_token": 6e-07, + "litellm_provider": "fireworks_ai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 2.5e-06, + "supports_function_calling": true + }, + "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": { + "input_cost_per_token": 1.5e-07, + "litellm_provider": "fireworks_ai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 6e-07, + "supports_function_calling": true + }, + "fireworks_ai/accounts/fireworks/models/qwen3p8-max": { + "cache_read_input_token_cost": 9e-08, + "input_cost_per_token": 9e-07, + "litellm_provider": "fireworks_ai", + "max_input_tokens": 400000, + "max_output_tokens": 65536, + "max_tokens": 65536, + "mode": "chat", + "output_cost_per_token": 3.6e-06, + "supports_function_calling": true + } + }, + "cases": [ + { + "name": "anthropic.claude-sonnet-5-v1:0-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9aad4de0556c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 9aad4de0556c" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "708bfb28f35a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 708bfb28f35a" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 640, + "outputTokens": 380, + "totalTokens": 13308, + "cacheReadInputTokens": 12288 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.01243704, + "input_cost": 0.00616704, + "output_cost": 0.00627, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-cache_write_5m", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "08c49d1b837c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 08c49d1b837c" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 512, + "outputTokens": 350, + "totalTokens": 10078, + "cacheWriteInputTokens": 9216, + "cacheDetails": [ + { + "inputTokens": 9216, + "ttl": "5m" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.0454806, + "input_cost": 0.0397056, + "output_cost": 0.005775, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-cache_write_1h", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b96166d8affb summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer b96166d8affb" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 512, + "outputTokens": 350, + "totalTokens": 10078, + "cacheWriteInputTokens": 9216, + "cacheDetails": [ + { + "inputTokens": 2048, + "ttl": "5m" + }, + { + "inputTokens": 7168, + "ttl": "1h" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.0632214, + "input_cost": 0.0574464, + "output_cost": 0.005775, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "41dbeb5496b2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 41dbeb5496b2" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + }, + "serviceTier": { + "type": "flex" + } + } + }, + "expected": { + "spend": 0.006435, + "input_cost": 0.003036, + "output_cost": 0.003399, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f6c242da055f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer f6c242da055f" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + }, + "serviceTier": { + "type": "priority" + } + } + }, + "expected": { + "spend": 0.0160875, + "input_cost": 0.00759, + "output_cost": 0.0084975, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a9257967d38a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer a9257967d38a" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ca62b8bbf5b6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer ca62b8bbf5b6" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.3e-06, + "output_cost_per_token": 1.65e-05 + } + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6f00980cd47c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockStart", + "payload": { + "start": { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler fil" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ler filler filler filler filler filler filler filler filler filler filler filler filler fi" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ller filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "tool_use" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.3e-06, + "output_cost_per_token": 1.65e-05 + } + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2a972e053197 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2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gLfihsZE5nQZLcedY4Apm3dhEOyMUpdzNNyViCP6ykfFn35Ss3JDUS7lfZV47bpxeatoe2dNzU5TGxY9GoVYvhKXmP0WjgOpwv91XPF/x1ty0JRgNGVMwnwxk4PpSpDgGRu/k4jMev9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 2a972e053197" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.3e-06, + "output_cost_per_token": 1.65e-05 + } + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c300c8153393 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer c300c8153393" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4c599e93dfba summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 4c599e93dfba" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c40237f9541a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather", + "input": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ] + } + }, + "stopReason": "tool_use", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1727b8128120 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockStart", + "payload": { + "start": { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler fil" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ler filler filler filler filler filler filler filler filler filler filler filler filler fi" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ller filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "tool_use" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "anthropic.claude-sonnet-5-v1:0-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "anthropic.claude-sonnet-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "649a7735f7cb summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 649a7735f7cb" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 11468, + "cacheReadInputTokens": 6144, + "cacheWriteInputTokens": 3072, + "cacheDetails": [ + { + "inputTokens": 2048, + "ttl": "5m" + }, + { + "inputTokens": 1024, + "ttl": "1h" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.03010392, + "input_cost": 0.02330592, + "output_cost": 0.006798, + "prompt_tokens": 11056, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "28b0c4ce80d6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788217, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 28b0c4ce80d6" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "33fdcb306184 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788218, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 33fdcb306184" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.001767168, + "input_cost": 0.000672768, + "output_cost": 0.0010944, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "azure-gpt-5.4-mini-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "28a136ca9579 summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eLkwuWSwTKZUk/x59GEERgQl4AWb5hPER6kbjVd1t2LLUQdIu0X/RM9M81oTa6t9E5mPtD/UP/SQFEw2fFI0bqSHEJrgqZi27LqouNi1pKlkmJSH0GvUTXgxpBFP8WPS27KflYt8U2ujV/dJp0TjRbNL71NPY1d3b47nqOPIh+jUCOQrwER0ZjB8JJW0plCxoLtou5i2VK/cnKSNOHZUWLw9VB0T/OPdv7yToj+Hi20nX5tPT0SDR09Hm00nX4tuP4STob+8490T/VQcvD5UWTh0pI/cnlSvmLdouaC6ULG0pCSWMHx0Z8BE5CjUCIfo48rnq2+PV3dPY+9Rs0jjRadH90ujVFNpi36fltuxY9FP8aQReDPUT9BolIVkmaSo2Laouuy5mLbgqxCapIY0bnxQTDSQFD/0P9WPtRObq34TaPNYz03/RLtFB0rLUbdhV3UbjEeqE8Wb5eAGBCUERfRj/HpUkEylZLEwu3i4LLtkrWCikI+EdORfgDw8IAADx9yDwx+gf4lzcqNcn1PXRItG00afT7dZr2wHhg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f/aI/poGfA7vFbocqyKTJ04rvy3SLoEuzSzEKXwlFiC8GZ0S8QrxAtz67fJh63PkV9482UjVmtJF0VbRytKX1afZ294M5QvsovOX+60DqAtKE1kaniDsJRgqAy2XLsgulC0FKy0nKyIlHEcVyA3fBcv9x/UQ7uPmdOD32pPWbNOY0SbRGtJr1AnY19yy4mvp0fCr+LwAyAiRENwXcR4eJLcoGiwtLuAuLS4aLLcoHiRxHtwXkRDICLwAq/jR8GvpsuLX3AnYa9Qa0ibRmNFs05PW99p04OPmEO7H9cv93wXIDUcVJRwrIi0nBSuULcguly4DLRgq7CWeIFkaShOoC60Dl/ui8wvsDOXb3qfZl9XK0lbRRdGa0kjVPNlX3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788220, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 28a136ca9579" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1546, + "completion_tokens": 210, + "total_tokens": 1756, + "prompt_tokens_details": { + "audio_tokens": 1450 + } + } + } + }, + "expected": { + "spend": 0.01586436, + "input_cost": 0.01525956, + "output_cost": 0.0006048, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "azure-gpt-5.4-mini-audio_output", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2bebbaa4e254 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "modalities": [ + "text", + "audio" + ], + "audio": { + "voice": "alloy", + "format": "pcm16" + }, + "allowed_openai_params": [ + "modalities", + "audio" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788222, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 2bebbaa4e254" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 220, + "completion_tokens": 1300, + "total_tokens": 1520, + "completion_tokens_details": { + "audio_tokens": 1120 + } + } + } + }, + "expected": { + "spend": 0.0241176, + "input_cost": 7.92e-05, + "output_cost": 0.0240384, + "prompt_tokens": 220, + "completion_tokens": 1300 + } + }, + { + "name": "azure-gpt-5.4-mini-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6af41b14ef04 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788222, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 6af41b14ef04" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1240, + "completion_tokens": 4040, + "total_tokens": 5280, + "completion_tokens_details": { + "reasoning_tokens": 3480 + } + } + } + }, + "expected": { + "spend": 0.0135432, + "input_cost": 0.0004464, + "output_cost": 0.0130968, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "azure-gpt-5.4-mini-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "60a03b8b6237 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788225, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 60a03b8b6237" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "flex" + } + }, + "expected": { + "spend": 0.00092448, + "input_cost": 0.0003312, + "output_cost": 0.00059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3922bd062f4a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788226, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 3922bd062f4a" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "priority" + } + }, + "expected": { + "spend": 0.00369792, + "input_cost": 0.0013248, + "output_cost": 0.00237312, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "26430574f63b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "medium" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788211, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 26430574f63b", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.01434896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-web_search_low", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5792eab53e4c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "low" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788213, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 5792eab53e4c", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.01184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-web_search_high", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7a7fc7488611 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "high" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788215, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 7a7fc7488611", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.01684896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "35a730eefc00 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 35a730eefc00\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"cc-pinned-deployment\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "969d5ff8918e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788216, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788216, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 969d5ff8918e\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788216, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.6e-07, + "output_cost_per_token": 2.88e-06 + } + } + }, + { + "name": "azure-gpt-5.4-mini-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "db6294a8264b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.6e-07, + "output_cost_per_token": 2.88e-06 + } + } + }, + { + "name": "azure-gpt-5.4-mini-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "524f8c567f64 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4Rcyl4YhifPspUXLdXZMIvPo9zAhTSlQFEi8m83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EsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788220, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788220, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 524f8c567f64\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788220, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.6e-07, + "output_cost_per_token": 2.88e-06 + } + } + }, + { + "name": "azure-gpt-5.4-mini-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "109128998398 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788221, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 109128998398" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e5bffdbd65e2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer e5bffdbd65e2\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "75003151c7de summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788223, + "model": "cc-pinned-deployment", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e3e7c45697d3 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788225, \"model\": \"cc-pinned-deployment\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.4-mini-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.4-mini", + "deployment": { + "model": "azure/cc-pinned-deployment", + "base_model": "azure/gpt-5.4-mini" + }, + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "906fb0b08ba9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 906fb0b08ba9\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"cc-pinned-deployment\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"cc-pinned-deployment\", \"choices\": [], \"usage\": {\"prompt_tokens\": 8314, \"completion_tokens\": 1592, \"total_tokens\": 9906, \"prompt_tokens_details\": {\"cached_tokens\": 6144, \"audio_tokens\": 330}, \"completion_tokens_details\": {\"reasoning_tokens\": 900, \"audio_tokens\": 280}}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.014385144, + "input_cost": 0.004348584, + "output_cost": 0.01003656, + "prompt_tokens": 8314, + "completion_tokens": 1592 + } + }, + { + "name": "azure-gpt-5.6-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7dc90bf2ab07 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788212, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 7dc90bf2ab07" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0092448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c84b90d4fd99 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788214, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer c84b90d4fd99" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.00883584, + "input_cost": 0.00336384, + "output_cost": 0.005472, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "azure-gpt-5.6-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1744b6a5bab3 summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eLkwuWSwTKZUk/x59GEERgQl4AWb5hPER6kbjVd1t2LLUQdIu0X/RM9M81oTa6t9E5mPtD/UP/SQFEw2fFI0bqSHEJrgqZi27LqouNi1pKlkmJSH0GvUTXgxpBFP8WPS27KflYt8U2ujV/dJp0TjRbNL71NPY1d3b47nqOPIh+jUCOQrwER0ZjB8JJW0plCxoLtou5i2VK/cnKSNOHZUWLw9VB0T/OPdv7yToj+Hi20nX5tPT0SDR09Hm00nX4tuP4STob+8490T/VQcvD5UWTh0pI/cnlSvmLdouaC6ULG0pCSWMHx0Z8BE5CjUCIfo48rnq2+PV3dPY+9Rs0jjRadH90ujVFNpi36fltuxY9FP8aQReDPUT9BolIVkmaSo2Laouuy5mLbgqxCapIY0bnxQTDSQFD/0P9WPtRObq34TaPNYz03/RLtFB0rLUbdhV3UbjEeqE8Wb5eAGBCUERfRj/HpUkEylZLEwu3i4LLtkrWCikI+EdORfgDw8IAADx9yDwx+gf4lzcqNcn1PXRItG00afT7dZr2wHhg+e/7n/2iP6aBnwO7xW6HKs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vy3SLoEuzSzEKXwlFiC8GZ0S8QrxAtz67fJh63PkV9482UjVmtJF0VbRytKX1afZ294M5QvsovOX+60DqAtKE1kaniDsJRgqAy2XLsgulC0FKy0nKyIlHEcVyA3fBcv9x/UQ7uPmdOD32pPWbNOY0SbRGtJr1AnY19yy4mvp0fCr+LwAyAiRENwXcR4eJLcoGiwtLuAuLS4aLLcoHiRxHtwXkRDICLwAq/jR8GvpsuLX3AnYa9Qa0ibRmNFs05PW99p04OPmEO7H9cv93wXIDUcVJRwrIi0nBSuULcguly4DLRgq7CWeIFkaShOoC60Dl/ui8wvsDOXb3qfZl9XK0lbRRdGa0kjVPNlX3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788215, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 1744b6a5bab3" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1546, + "completion_tokens": 210, + "total_tokens": 1756, + "prompt_tokens_details": { + "audio_tokens": 1450 + } + } + } + }, + "expected": { + "spend": 0.0626468, + "input_cost": 0.0596228, + "output_cost": 0.003024, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "azure-gpt-5.6-audio_output", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "dfb52830c629 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "modalities": [ + "text", + "audio" + ], + "audio": { + "voice": "alloy", + "format": "pcm16" + }, + "allowed_openai_params": [ + "modalities", + "audio" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788217, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer dfb52830c629" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 220, + "completion_tokens": 1300, + "total_tokens": 1520, + "completion_tokens_details": { + "audio_tokens": 1120 + } + } + } + }, + "expected": { + "spend": 0.094828, + "input_cost": 0.000396, + "output_cost": 0.094432, + "prompt_tokens": 220, + "completion_tokens": 1300 + } + }, + { + "name": "azure-gpt-5.6-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5c6865969ae9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788218, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 5c6865969ae9" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1240, + "completion_tokens": 4040, + "total_tokens": 5280, + "completion_tokens_details": { + "reasoning_tokens": 3480 + } + } + } + }, + "expected": { + "spend": 0.067716, + "input_cost": 0.002232, + "output_cost": 0.065484, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "azure-gpt-5.6-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b67dcd189cdd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788221, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer b67dcd189cdd" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "flex" + } + }, + "expected": { + "spend": 0.0046224, + "input_cost": 0.001656, + "output_cost": 0.0029664, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "01c77d1ef23d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788222, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 01c77d1ef23d" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "priority" + } + }, + "expected": { + "spend": 0.0184896, + "input_cost": 0.006624, + "output_cost": 0.0118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d4efeea706ac summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "medium" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788222, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer d4efeea706ac", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0217448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-web_search_low", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "73458bfd2358 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "low" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788225, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 73458bfd2358", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0192448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-web_search_high", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0aebd59315f2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "high" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788226, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 0aebd59315f2", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0242448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9df3f46fd138 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 9df3f46fd138\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788211, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0092448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b54d5959e61f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788213, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788213, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer b54d5959e61f\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788213, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.8e-06, + "output_cost_per_token": 1.44e-05 + } + } + }, + { + "name": "azure-gpt-5.6-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "23eb3226fc23 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788215, \"model\": \"gpt-5.6\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_item.added\ndata: {\"type\": \"response.output_item.added\", \"output_index\": 0, \"item\": {\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"\", \"status\": \"in_progress\"}}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.function_call_arguments.done\ndata: {\"type\": \"response.function_call_arguments.done\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788215, \"status\": \"completed\", \"model\": \"gpt-5.6\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.8e-06, + "output_cost_per_token": 1.44e-05 + } + } + }, + { + "name": "azure-gpt-5.6-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "fb83549ab4c5 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2c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IqNo2mBQBaVitoQ4y7KzqHnrBWSxLIyznP3v/VNlzgF7qcPaQiDYhyGAgLfihsZE5nQZLcedY4Apm3dhEOyMUpdzNNyViCP6ykfFn35Ss3JDUS7lfZV47bpxeatoe2dNzU5TGxY9GoVYvhKXmP0WjgOpwv91XPF/x1ty0JRgNGVMwnwxk4PpSpDgGRu/k4jMev9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer fb83549ab4c5\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788215, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.8e-06, + "output_cost_per_token": 1.44e-05 + } + } + }, + { + "name": "azure-gpt-5.6-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "74e949a94e0f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788216, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 74e949a94e0f" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "af89dddadd12 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer af89dddadd12\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788218, \"model\": \"gpt-5.4-mini\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.00184896, + "input_cost": 0.0006624, + "output_cost": 0.00118656, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "30d4deb9b74f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788220, + "status": "completed", + "model": "gpt-5.6", + "output": [ + { + "type": "function_call", + "id": "fc_$REQUEST_ID", + "call_id": "call_$REQUEST_ID", + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0092448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ef44a3525238 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788221, \"model\": \"gpt-5.6\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_item.added\ndata: {\"type\": \"response.output_item.added\", \"output_index\": 0, \"item\": {\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"\", \"status\": \"in_progress\"}}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.function_call_arguments.done\ndata: {\"type\": \"response.function_call_arguments.done\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788221, \"status\": \"completed\", \"model\": \"gpt-5.6\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.0092448, + "input_cost": 0.003312, + "output_cost": 0.0059328, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "azure-gpt-5.6-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "azure/gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e440709770ad summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer e440709770ad\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788221, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 8314, \"completion_tokens\": 1592, \"total_tokens\": 9906, \"prompt_tokens_details\": {\"cached_tokens\": 6144, \"audio_tokens\": 330}, \"completion_tokens_details\": {\"reasoning_tokens\": 900, \"audio_tokens\": 280}}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.06169072, + "input_cost": 0.01794792, + "output_cost": 0.0437428, + "prompt_tokens": 8314, + "completion_tokens": 1592 + } + }, + { + "name": "claude-haiku-4-5-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "83d8e1f3f711 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer 83d8e1f3f711" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0039, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e56cd6ddbc3b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer e56cd6ddbc3b" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 640, + "output_tokens": 380, + "cache_read_input_tokens": 12288 + } + } + }, + "expected": { + "spend": 0.0037688, + "input_cost": 0.0018688, + "output_cost": 0.0019, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "claude-haiku-4-5-cache_write_5m", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "aead4d429a63 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer aead4d429a63" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 512, + "output_tokens": 350, + "cache_creation_input_tokens": 9216, + "cache_creation": { + "ephemeral_5m_input_tokens": 9216, + "ephemeral_1h_input_tokens": 0 + } + } + } + }, + "expected": { + "spend": 0.013782, + "input_cost": 0.012032, + "output_cost": 0.00175, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "claude-haiku-4-5-cache_write_1h", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8defd838f26f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer 8defd838f26f" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 512, + "output_tokens": 350, + "cache_creation_input_tokens": 9216, + "cache_creation": { + "ephemeral_5m_input_tokens": 2048, + "ephemeral_1h_input_tokens": 7168 + } + } + } + }, + "expected": { + "spend": 0.019158, + "input_cost": 0.017408, + "output_cost": 0.00175, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "claude-haiku-4-5-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f7dcd0281161 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer f7dcd0281161" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "service_tier": "priority" + } + } + }, + "expected": { + "spend": 0.004875, + "input_cost": 0.0023, + "output_cost": 0.002575, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-anthropic_us_inference", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1c0a1a2e155f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer 1c0a1a2e155f" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "inference_geo": "us" + } + } + }, + "expected": { + "spend": 0.00429, + "input_cost": 0.002024, + "output_cost": 0.002266, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "540998778abd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "web_search_20250305", + "name": "web_search", + "max_uses": 5 + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer 540998778abd" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "server_tool_use": { + "web_search_requests": 3 + } + } + } + }, + "expected": { + "spend": 0.0339, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8feb52d222c0 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 8feb52d222c0\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0039, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ac21e9843010 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer ac21e9843010\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1e-06, + "output_cost_per_token": 5e-06 + } + } + }, + { + "name": "claude-haiku-4-5-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "596ca026b176 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"toolu_$REQUEST_ID\", \"name\": \"get_weather\", \"input\": {}}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1e-06, + "output_cost_per_token": 5e-06 + } + } + }, + { + "name": "claude-haiku-4-5-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "89c83ea0f121 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4R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qRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 89c83ea0f121\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1e-06, + "output_cost_per_token": 5e-06 + } + } + }, + { + "name": "claude-haiku-4-5-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d5df85778fb1 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer d5df85778fb1" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0195, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2f3ca8c25a81 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 2f3ca8c25a81\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0195, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "74403961022c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "tool_use", + "id": "toolu_$REQUEST_ID", + "name": "get_weather", + "input": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + ], + "stop_reason": "tool_use", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0039, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5a30a53bb4d6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"toolu_$REQUEST_ID\", \"name\": \"get_weather\", \"input\": {}}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0039, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-haiku-4-5-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-haiku-4-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f89827fda6c5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840, \"cache_read_input_tokens\": 6144, \"cache_creation_input_tokens\": 3072, \"cache_creation\": {\"ephemeral_5m_input_tokens\": 2048, \"ephemeral_1h_input_tokens\": 1024}}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer f89827fda6c5\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0091224, + "input_cost": 0.0070624, + "output_cost": 0.00206, + "prompt_tokens": 11056, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d4916e93889c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer d4916e93889c" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0195, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b83799f51ed7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer b83799f51ed7" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 640, + "output_tokens": 380, + "cache_read_input_tokens": 12288 + } + } + }, + "expected": { + "spend": 0.018844, + "input_cost": 0.009344, + "output_cost": 0.0095, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "claude-opus-5-cache_write_5m", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5cfdc176130a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer 5cfdc176130a" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 512, + "output_tokens": 350, + "cache_creation_input_tokens": 9216, + "cache_creation": { + "ephemeral_5m_input_tokens": 9216, + "ephemeral_1h_input_tokens": 0 + } + } + } + }, + "expected": { + "spend": 0.06891, + "input_cost": 0.06016, + "output_cost": 0.00875, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "claude-opus-5-cache_write_1h", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6f9107c3b3ff summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer 6f9107c3b3ff" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 512, + "output_tokens": 350, + "cache_creation_input_tokens": 9216, + "cache_creation": { + "ephemeral_5m_input_tokens": 2048, + "ephemeral_1h_input_tokens": 7168 + } + } + } + }, + "expected": { + "spend": 0.09579, + "input_cost": 0.08704, + "output_cost": 0.00875, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "claude-opus-5-tiered_input_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f7bec63ac6ff summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer f7bec63ac6ff" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 204800, + "output_tokens": 620 + } + } + }, + "expected": { + "spend": 2.07125, + "input_cost": 2.048, + "output_cost": 0.02325, + "prompt_tokens": 204800, + "completion_tokens": 620 + } + }, + { + "name": "claude-opus-5-tiered_cache_read_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "58ab3f8e01f6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer 58ab3f8e01f6" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 4096, + "output_tokens": 480, + "cache_read_input_tokens": 201728 + } + } + }, + "expected": { + "spend": 0.260688, + "input_cost": 0.242688, + "output_cost": 0.018, + "prompt_tokens": 205824, + "completion_tokens": 480 + } + }, + { + "name": "claude-opus-5-tiered_cache_write_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1a923968b132 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer 1a923968b132" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 4096, + "output_tokens": 480, + "cache_creation_input_tokens": 200704, + "cache_creation": { + "ephemeral_5m_input_tokens": 200704, + "ephemeral_1h_input_tokens": 0 + } + } + } + }, + "expected": { + "spend": 2.56776, + "input_cost": 2.54976, + "output_cost": 0.018, + "prompt_tokens": 204800, + "completion_tokens": 480 + } + }, + { + "name": "claude-opus-5-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "928b583c6a13 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer 928b583c6a13" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "service_tier": "priority" + } + } + }, + "expected": { + "spend": 0.024375, + "input_cost": 0.0115, + "output_cost": 0.012875, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-anthropic_fast_mode", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "dd7504ab4a95 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer dd7504ab4a95" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "speed": "fast" + } + } + }, + "expected": { + "spend": 0.117, + "input_cost": 0.0552, + "output_cost": 0.0618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-anthropic_us_inference", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7dcf31884733 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer 7dcf31884733" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "inference_geo": "us" + } + } + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e63cb0e28801 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "web_search_20250305", + "name": "web_search", + "max_uses": 5 + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "scripted answer e63cb0e28801" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "server_tool_use": { + "web_search_requests": 3 + } + } + } + }, + "expected": { + "spend": 0.0495, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1fcb7b21debc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 1fcb7b21debc\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0195, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e5bff69088af summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer e5bff69088af\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5e-06, + "output_cost_per_token": 2.5e-05 + } + } + }, + { + "name": "claude-opus-5-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b6ef7189d74f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"toolu_$REQUEST_ID\", \"name\": \"get_weather\", \"input\": {}}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5e-06, + "output_cost_per_token": 2.5e-05 + } + } + }, + { + "name": "claude-opus-5-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9901e704cc69 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87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yQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 9901e704cc69\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5e-06, + "output_cost_per_token": 2.5e-05 + } + } + }, + { + "name": "claude-opus-5-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "14075d9902ec summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer 14075d9902ec" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0117, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "aa3357727723 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer aa3357727723\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0117, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8e5f37db0dfc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "tool_use", + "id": "toolu_$REQUEST_ID", + "name": "get_weather", + "input": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + ], + "stop_reason": "tool_use", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0195, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7cfe98295218 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"toolu_$REQUEST_ID\", \"name\": \"get_weather\", \"input\": {}}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0195, + "input_cost": 0.0092, + "output_cost": 0.0103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-opus-5-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-opus-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0bacb827a61a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-opus-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840, \"cache_read_input_tokens\": 6144, \"cache_creation_input_tokens\": 3072, \"cache_creation\": {\"ephemeral_5m_input_tokens\": 2048, \"ephemeral_1h_input_tokens\": 1024}}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 0bacb827a61a\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.045612, + "input_cost": 0.035312, + "output_cost": 0.0103, + "prompt_tokens": 11056, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e672859760ae summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer e672859760ae" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0117, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "68925ddd50c0 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer 68925ddd50c0" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 640, + "output_tokens": 380, + "cache_read_input_tokens": 12288 + } + } + }, + "expected": { + "spend": 0.0113064, + "input_cost": 0.0056064, + "output_cost": 0.0057, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "claude-sonnet-5-cache_write_5m", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "212f38c1ea0d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer 212f38c1ea0d" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 512, + "output_tokens": 350, + "cache_creation_input_tokens": 9216, + "cache_creation": { + "ephemeral_5m_input_tokens": 9216, + "ephemeral_1h_input_tokens": 0 + } + } + } + }, + "expected": { + "spend": 0.041346, + "input_cost": 0.036096, + "output_cost": 0.00525, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "claude-sonnet-5-cache_write_1h", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "638e0a865af7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer 638e0a865af7" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 512, + "output_tokens": 350, + "cache_creation_input_tokens": 9216, + "cache_creation": { + "ephemeral_5m_input_tokens": 2048, + "ephemeral_1h_input_tokens": 7168 + } + } + } + }, + "expected": { + "spend": 0.057474, + "input_cost": 0.052224, + "output_cost": 0.00525, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "claude-sonnet-5-tiered_input_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5ccef99d1220 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer 5ccef99d1220" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 204800, + "output_tokens": 620 + } + } + }, + "expected": { + "spend": 1.24275, + "input_cost": 1.2288, + "output_cost": 0.01395, + "prompt_tokens": 204800, + "completion_tokens": 620 + } + }, + { + "name": "claude-sonnet-5-tiered_cache_read_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "aaa479b1e950 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer aaa479b1e950" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 4096, + "output_tokens": 480, + "cache_read_input_tokens": 201728 + } + } + }, + "expected": { + "spend": 0.1564128, + "input_cost": 0.1456128, + "output_cost": 0.0108, + "prompt_tokens": 205824, + "completion_tokens": 480 + } + }, + { + "name": "claude-sonnet-5-tiered_cache_write_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f3c0e1d4dedd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer f3c0e1d4dedd" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 4096, + "output_tokens": 480, + "cache_creation_input_tokens": 200704, + "cache_creation": { + "ephemeral_5m_input_tokens": 200704, + "ephemeral_1h_input_tokens": 0 + } + } + } + }, + "expected": { + "spend": 1.540656, + "input_cost": 1.529856, + "output_cost": 0.0108, + "prompt_tokens": 204800, + "completion_tokens": 480 + } + }, + { + "name": "claude-sonnet-5-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9863908ec91f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer 9863908ec91f" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "service_tier": "priority" + } + } + }, + "expected": { + "spend": 0.014625, + "input_cost": 0.0069, + "output_cost": 0.007725, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-anthropic_us_inference", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "bb37086ce8e6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer bb37086ce8e6" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "inference_geo": "us" + } + } + }, + "expected": { + "spend": 0.01287, + "input_cost": 0.006072, + "output_cost": 0.006798, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ddcbec1b7eb2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "web_search_20250305", + "name": "web_search", + "max_uses": 5 + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "text", + "text": "scripted answer ddcbec1b7eb2" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "server_tool_use": { + "web_search_requests": 3 + } + } + } + }, + "expected": { + "spend": 0.0417, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ca259a6916f2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer ca259a6916f2\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0117, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b14b060d38cc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer b14b060d38cc\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 1.5e-05 + } + } + }, + { + "name": "claude-sonnet-5-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "23d6e2f6eb94 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"toolu_$REQUEST_ID\", \"name\": \"get_weather\", \"input\": {}}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 1.5e-05 + } + } + }, + { + "name": "claude-sonnet-5-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f803710311e5 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFt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Cij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer f803710311e5\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3e-06, + "output_cost_per_token": 1.5e-05 + } + } + }, + { + "name": "claude-sonnet-5-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "04c8cd550f99 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-haiku-4-5", + "content": [ + { + "type": "text", + "text": "scripted answer 04c8cd550f99" + } + ], + "stop_reason": "end_turn", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0039, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3ca6439c3e0d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-haiku-4-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 3ca6439c3e0d\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0039, + "input_cost": 0.00184, + "output_cost": 0.00206, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e32fe8463152 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "msg_$REQUEST_ID", + "type": "message", + "role": "assistant", + "model": "claude-sonnet-5", + "content": [ + { + "type": "tool_use", + "id": "toolu_$REQUEST_ID", + "name": "get_weather", + "input": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + ], + "stop_reason": "tool_use", + "usage": { + "input_tokens": 1840, + "output_tokens": 412 + } + } + }, + "expected": { + "spend": 0.0117, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "11512728994f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"toolu_$REQUEST_ID\", \"name\": \"get_weather\", \"input\": {}}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0117, + "input_cost": 0.00552, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "claude-sonnet-5-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "claude-sonnet-5", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "543a97cebc29 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_$REQUEST_ID\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"claude-sonnet-5\", \"content\": [], \"stop_reason\": null, \"usage\": {\"input_tokens\": 1840, \"cache_read_input_tokens\": 6144, \"cache_creation_input_tokens\": 3072, \"cache_creation\": {\"ephemeral_5m_input_tokens\": 2048, \"ephemeral_1h_input_tokens\": 1024}}}}", + "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}", + "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"scripted answer 543a97cebc29\"}}", + "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}", + "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\"}, \"usage\": {\"output_tokens\": 412}}", + "event: message_stop\ndata: {\"type\": \"message_stop\"}" + ] + }, + "expected": { + "spend": 0.0273672, + "input_cost": 0.0211872, + "output_cost": 0.00618, + "prompt_tokens": 11056, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "10dc41a37bf4 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788233, + "model": "accounts/fireworks/models/deepseek-v4p1-flash", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 10dc41a37bf4" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_input_rate", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ee35d47aaab5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788234, + "model": "accounts/fireworks/models/deepseek-v4p1-flash", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer ee35d47aaab5" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.0021672, + "input_cost": 0.0019392, + "output_cost": 0.000228, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f77cb314f5aa summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer f77cb314f5aa\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c5fac079eac8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer c5fac079eac8\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-07, + "output_cost_per_token": 6e-07 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "eea156c013c8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-07, + "output_cost_per_token": 6e-07 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "124287c4bcaa summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4Rcyl4YhifPspUXLdXZMIvPo9zAhTSlQFEi8m83sw5KxL0rWBzS9c4XAIAOaz3py4dTb7d9QaqDMLk0J87/15PZKvEaC6/hZ62sCtuFTywatjViHrBXTgOO5IJsiyYuzmaeQJKHmr11gnixR2rO7lqNEGs3shT+xK/lDUucFkigvA+a5C+itk/VV+1gDxc420UHpKhj31j0YnCZSFJebGz2/XSTyT6XfZhG4XNwZGIeUGCPKt0DX9lpB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] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788240, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788240, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 124287c4bcaa\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788240, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-07, + "output_cost_per_token": 6e-07 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4f7445b95bbd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788242, + "model": "accounts/fireworks/models/kimi-k3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 4f7445b95bbd" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.002134, + "input_cost": 0.001104, + "output_cost": 0.00103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8e888a093f6c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788245, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788245, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 8e888a093f6c\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788245, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788245, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.002134, + "input_cost": 0.001104, + "output_cost": 0.00103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ef4a0046af51 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788246, + "model": "accounts/fireworks/models/deepseek-v4p1-flash", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5ae7b84f3854 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788248, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "19d356ecf08f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788251, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788251, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 19d356ecf08f\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788251, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788251, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a9341cd5b3ec summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788229, + "model": "accounts/fireworks/models/kimi-k3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer a9341cd5b3ec" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.002134, + "input_cost": 0.001104, + "output_cost": 0.00103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f80f2a5e5bec summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788229, + "model": "accounts/fireworks/models/kimi-k3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer f80f2a5e5bec" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.00207128, + "input_cost": 0.00112128, + "output_cost": 0.00095, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a764db4a4844 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer a764db4a4844\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.002134, + "input_cost": 0.001104, + "output_cost": 0.00103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f168dea08a8c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788232, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788232, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer f168dea08a8c\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788232, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 6e-07, + "output_cost_per_token": 2.5e-06 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5f4b9e007f6c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788235, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788235, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788235, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788235, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788235, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788235, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 6e-07, + "output_cost_per_token": 2.5e-06 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c5d6768437a1 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwo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6cOv3bKMqoCpyoNo+gpCZcSVgB8hdzlfMfPl67dL9/IqNo2mBQBaVitoQ4y7KzqHnrBWSxLIyznP3v/VNlzgF7qcPaQiDYhyGAgLfihsZE5nQZLcedY4Apm3dhEOyMUpdzNNyViCP6ykfFn35Ss3JDUS7lfZV47bpxeatoe2dNzU5TGxY9GoVYvhKXmP0WjgOpwv91XPF/x1ty0JRgNGVMwnwxk4PpSpDgGRu/k4jMev9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer c5d6768437a1\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788236, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 6e-07, + "output_cost_per_token": 2.5e-06 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e88240789ba9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788236, + "model": "accounts/fireworks/models/qwen3p8-max", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer e88240789ba9" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0031392, + "input_cost": 0.001656, + "output_cost": 0.0014832, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "454606d6e5ae summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788239, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788239, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 454606d6e5ae\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788239, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788239, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0031392, + "input_cost": 0.001656, + "output_cost": 0.0014832, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6655aac8edcd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788240, + "model": "accounts/fireworks/models/kimi-k3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.002134, + "input_cost": 0.001104, + "output_cost": 0.00103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "cbcf2fb047bb summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788242, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.002134, + "input_cost": 0.001104, + "output_cost": 0.00103, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-kimi-k3-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/kimi-k3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d540b1082db1 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788244, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788244, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer d540b1082db1\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788244, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788244, \"model\": \"accounts/fireworks/models/kimi-k3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 7984, \"completion_tokens\": 412, \"total_tokens\": 8396, \"prompt_tokens_details\": {\"cached_tokens\": 6144}}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.00250264, + "input_cost": 0.00147264, + "output_cost": 0.00103, + "prompt_tokens": 7984, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "037102bc4f02 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788246, + "model": "accounts/fireworks/models/qwen3p8-max", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 037102bc4f02" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0031392, + "input_cost": 0.001656, + "output_cost": 0.0014832, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "246ab713a447 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788248, + "model": "accounts/fireworks/models/qwen3p8-max", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 246ab713a447" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.00304992, + "input_cost": 0.00168192, + "output_cost": 0.001368, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7fa6702c872d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788250, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788250, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 7fa6702c872d\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788250, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788250, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0031392, + "input_cost": 0.001656, + "output_cost": 0.0014832, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a52571ae25d8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788228, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788228, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer a52571ae25d8\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788228, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 9e-07, + "output_cost_per_token": 3.6e-06 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d621057b8000 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788229, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788229, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788229, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788229, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788229, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788229, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 9e-07, + "output_cost_per_token": 3.6e-06 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e5bcee3da31d summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QN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GVMwnwxk4PpSpDgGRu/k4jMev9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer e5bcee3da31d\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788231, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 9e-07, + "output_cost_per_token": 3.6e-06 + } + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "eeadd4cae922 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788233, + "model": "accounts/fireworks/models/deepseek-v4p1-flash", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer eeadd4cae922" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8ed9cad57fc4 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788234, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788234, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 8ed9cad57fc4\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788234, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788234, \"model\": \"accounts/fireworks/models/deepseek-v4p1-flash\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0005232, + "input_cost": 0.000276, + "output_cost": 0.0002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "96d301af3055 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788236, + "model": "accounts/fireworks/models/qwen3p8-max", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0031392, + "input_cost": 0.001656, + "output_cost": 0.0014832, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "389fe82a3e30 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788238, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0031392, + "input_cost": 0.001656, + "output_cost": 0.0014832, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "fireworks_ai-accounts-fireworks-models-qwen3p8-max-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "fireworks_ai/accounts/fireworks/models/qwen3p8-max", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d3a53c5889e6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788241, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788241, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer d3a53c5889e6\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788241, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788241, \"model\": \"accounts/fireworks/models/qwen3p8-max\", \"choices\": [], \"usage\": {\"prompt_tokens\": 7984, \"completion_tokens\": 412, \"total_tokens\": 8396, \"prompt_tokens_details\": {\"cached_tokens\": 6144}}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.00369216, + "input_cost": 0.00220896, + "output_cost": 0.0014832, + "prompt_tokens": 7984, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5fdf6b7dd9b9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 5fdf6b7dd9b9" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0090552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "bb9b95a5e878 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer bb9b95a5e878" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 12928, + "candidatesTokenCount": 380, + "totalTokenCount": 13308, + "cachedContentTokenCount": 12288, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 12928 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.00871248, + "input_cost": 0.00392448, + "output_cost": 0.004788, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gemini-3.1-pro-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "eccb8318be2d summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZ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/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer eccb8318be2d" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1546, + "candidatesTokenCount": 210, + "totalTokenCount": 1756, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 96 + }, + { + "modality": "AUDIO", + "tokenCount": 1450 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0067626, + "input_cost": 0.0041166, + "output_cost": 0.002646, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "gemini-3.1-pro-image_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f50f723a74f1 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/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qtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer f50f723a74f1" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 2116, + "candidatesTokenCount": 240, + "totalTokenCount": 2356, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 310 + }, + { + "modality": "IMAGE", + "tokenCount": 1806 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0078288, + "input_cost": 0.0048048, + "output_cost": 0.003024, + "prompt_tokens": 2116, + "completion_tokens": 240 + } + }, + { + "name": "gemini-3.1-pro-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a09586282605 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer a09586282605" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1240, + "candidatesTokenCount": 560, + "thoughtsTokenCount": 3480, + "totalTokenCount": 5280, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1240 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.05664, + "input_cost": 0.002604, + "output_cost": 0.054036, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gemini-3.1-pro-tiered_input_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7972fad2f18c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 7972fad2f18c" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 204800, + "candidatesTokenCount": 620, + "totalTokenCount": 205420, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 204800 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.871878, + "input_cost": 0.86016, + "output_cost": 0.011718, + "prompt_tokens": 204800, + "completion_tokens": 620 + } + }, + { + "name": "gemini-3.1-pro-tiered_cache_read_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c6ae4eac7c46 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer c6ae4eac7c46" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 205824, + "candidatesTokenCount": 480, + "totalTokenCount": 206304, + "cachedContentTokenCount": 201728, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 205824 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.11100096, + "input_cost": 0.10192896, + "output_cost": 0.009072, + "prompt_tokens": 205824, + "completion_tokens": 480 + } + }, + { + "name": "gemini-3.1-pro-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "afc20048852d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer afc20048852d" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_FLEX" + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0045276, + "input_cost": 0.001932, + "output_cost": 0.0025956, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c45311f260f5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer c45311f260f5" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_PRIORITY" + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.011319, + "input_cost": 0.00483, + "output_cost": 0.006489, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "73631ea17d2b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleSearch": {} + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 73631ea17d2b" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "query 0", + "query 1", + "query 2" + ] + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.1140552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-google_maps_grounding", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5c6ab7918d5a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleMaps": {} + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 5c6ab7918d5a" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "maps query 0" + ], + "groundingChunks": [ + { + "maps": { + "uri": "https://maps.google.com/?cid=0" + } + } + ], + "googleMapsWidgetContextToken": "token_$REQUEST_ID" + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0340552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-fallback_video_tokens_at_input_rate", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5fc254e9189f summarize the attached material in one line and name the city weather" + }, + { + "type": "file", + "file": { + "file_data": "data:video/mp4;base64,AAAAGGZ0eXBpc29tAAACAGlzb21pc282AAACCG1kYXQNFBsiKTA3PkVMU1phaG92fYSLkpmgp661vMPK0djf5u30+wIJEBceJSwzOkFIT1ZdZGtyeYCHjpWco6qxuL/GzdTb4unw9/4FDBMaISgvNj1ES1JZYGdudXyDipGYn6attLvCydDX3uXs8/oBCA8WHSQrMjlAR05VXGNqcXh/ho2Um6KpsLe+xczT2uHo7/b9BAsSGSAnLjU8Q0pRWF9mbXR7gomQl56lrLO6wcjP1t3k6/L5AAcOFRwjKjE4P0ZNVFtiaXB3foWMk5qhqK+2vcTL0tng5+71/AMKERgfJi00O0JJUFdeZWxzeoGIj5adpKuyucDHztXc4+rx+P8GDRQbIikwNz5FTFNaYWhvdn2Ei5KZoKeutbzDytHY3+bt9PsCCRAXHiUsMzpBSE9WXWRrcnmAh46VnKOqsbi/xs3U2+Lp8Pf+BQwTGiEoLzY9REtSWWBnbnV8g4qRmJ+mrbS7wsnQ197l7PP6AQgPFh0kKzI5QEdOVVxjanF4f4aNlJuiqbC3vsXM09rh6O/2/QQLEhkgJy41PENKUVhfZm10e4KJkJeepayzusHIz9bd5Ovy+QAHDhUcIyoxOD9GTVRbYmlwd36FjJOaoaivtr3Ey9LZ4Ofu9fwDChEYHyYtNDtCSVBXXmVsc3qBiI+WnaSrsrnAx87V3OPq8fj/Bg==", + "format": "mp4" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 5fc254e9189f" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 8060, + "candidatesTokenCount": 300, + "totalTokenCount": 8360, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 140 + }, + { + "modality": "VIDEO", + "tokenCount": 7920 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.020706, + "input_cost": 0.016926, + "output_cost": 0.00378, + "prompt_tokens": 8060, + "completion_tokens": 300 + } + }, + { + "name": "gemini-3.1-pro-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "52b6a80ff038 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 52b6a80ff038\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.0090552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4985d6423ec4 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 4985d6423ec4\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2.1e-06, + "output_cost_per_token": 1.26e-05 + } + } + }, + { + "name": "gemini-3.1-pro-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "11bca0892f81 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2.1e-06, + "output_cost_per_token": 1.26e-05 + } + } + }, + { + "name": "gemini-3.1-pro-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4c92224d4b84 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP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I0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 4c92224d4b84\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2.1e-06, + "output_cost_per_token": 1.26e-05 + } + } + }, + { + "name": "gemini-3.1-pro-prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6c159519a099 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "promptFeedback": { + "blockReason": "SAFETY", + "safetyRatings": [ + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "HIGH", + "blocked": true + } + ] + }, + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 0, + "totalTokenCount": 1840, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.003864, + "input_cost": 0.003864, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-3.1-pro-stream_prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7df769816861 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"promptFeedback\": {\"blockReason\": \"SAFETY\", \"safetyRatings\": [{\"category\": \"HARM_CATEGORY_HARASSMENT\", \"probability\": \"HIGH\", \"blocked\": true}]}, \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 0, \"totalTokenCount\": 1840, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.003864, + "input_cost": 0.003864, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-3.1-pro-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "956e05125691 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 956e05125691" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00224224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2048ef936293 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 2048ef936293\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.00224224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2a68816dc8ea summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "functionCall": { + "name": "get_weather", + "args": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0090552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7ba6668f10df summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.0090552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.1-pro-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "54e6d8c321ef summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 54e6d8c321ef\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 8314, \"candidatesTokenCount\": 412, \"thoughtsTokenCount\": 900, \"totalTokenCount\": 9626, \"cachedContentTokenCount\": 6144, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 7984}, {\"modality\": \"AUDIO\", \"tokenCount\": 330}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.02338644, + "input_cost": 0.00604524, + "output_cost": 0.0173412, + "prompt_tokens": 8314, + "completion_tokens": 1312 + } + }, + { + "name": "gemini-3.8-flash-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e7c21c357fb0 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer e7c21c357fb0" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00224224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c58ea8fe6a99 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer c58ea8fe6a99" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 12928, + "candidatesTokenCount": 380, + "totalTokenCount": 13308, + "cachedContentTokenCount": 12288, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 12928 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.002157376, + "input_cost": 0.000971776, + "output_cost": 0.0011856, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gemini-3.8-flash-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3e33892c4f9f summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eLkwuWSwTKZUk/x59GEERgQl4AWb5hPER6kbjVd1t2LLUQdIu0X/RM9M81oTa6t9E5mPtD/UP/SQFEw2fFI0bqSHEJrgqZi27LqouNi1pKlkmJSH0GvUTXgxpBFP8WPS27KflYt8U2ujV/dJp0TjRbNL71NPY1d3b47nqOPIh+jUCOQrwER0ZjB8JJW0plCxoLtou5i2VK/cnKSNOHZUWLw9VB0T/OPdv7yToj+Hi20nX5tPT0SDR09Hm00nX4tuP4STob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RZOHSkj9yeVK+Yt2i5oLpQsbSkJJYwfHRnwETkKNQIh+jjyuerb49Xd09j71GzSONFp0f3S6NUU2mLfp+W27Fj0U/xpBF4M9RP0GiUhWSZpKjYtqi67LmYtuCrEJqkhjRufFBMNJAUP/Q/1Y+1E5urfhNo81jPTf9Eu0UHSstRt2FXdRuMR6oTxZvl4AYEJQRF9GP8elSQTKVksTC7eLgsu2StYKKQj4R05F+APDwgAAPH3IPDH6B/iXNyo1yfU9dEi0bTRp9Pt1mvbAeGD57/uf/aI/poGfA7vFbocqyKTJ04rvy3SLoEuzSzEKXwlFiC8GZ0S8QrxAtz67fJh63PkV9482UjVmtJF0VbRytKX1afZ294M5QvsovOX+60DqAtKE1kaniDsJRgqAy2XLsgulC0FKy0nKyIlHEcVyA3fBcv9x/UQ7uPmdOD32pPWbNOY0SbRGtJr1AnY19yy4mvp0fCr+LwAyAiRENwXcR4eJLcoGiwtLuAuLS4aLLcoHiRxHtwXkRDICLwAq/jR8GvpsuLX3AnYa9Qa0ibRmNFs05PW99p04OPmEO7H9cv93wXIDUcVJRwrIi0nBSuULcguly4DLRgq7CWeIFkaShOoC60Dl/ui8wvsDOXb3qfZl9XK0lbRRdGa0kjVPNlX3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 3e33892c4f9f" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1546, + "candidatesTokenCount": 210, + "totalTokenCount": 1756, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 96 + }, + { + "modality": "AUDIO", + "tokenCount": 1450 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00221312, + "input_cost": 0.00155792, + "output_cost": 0.0006552, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "gemini-3.8-flash-audio_output", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "30bf1c0de6fe summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "modalities": [ + "text", + "audio" + ], + "audio": { + "voice": "alloy", + "format": "pcm16" + }, + "allowed_openai_params": [ + "modalities", + "audio" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 30bf1c0de6fe" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 220, + "candidatesTokenCount": 1300, + "totalTokenCount": 1520, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 220 + } + ], + "candidatesTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 180 + }, + { + "modality": "AUDIO", + "tokenCount": 1120 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0076648, + "input_cost": 0.0001144, + "output_cost": 0.0075504, + "prompt_tokens": 220, + "completion_tokens": 1300 + } + }, + { + "name": "gemini-3.8-flash-video_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5f5da5957185 summarize the attached material in one line and name the city weather" + }, + { + "type": "file", + "file": { + "file_data": "data:video/mp4;base64,AAAAGGZ0eXBpc29tAAACAGlzb21pc282AAACCG1kYXQNFBsiKTA3PkVMU1phaG92fYSLkpmgp661vMPK0djf5u30+wIJEBceJSwzOkFIT1ZdZGtyeYCHjpWco6qxuL/GzdTb4unw9/4FDBMaISgvNj1ES1JZYGdudXyDipGYn6attLvCydDX3uXs8/oBCA8WHSQrMjlAR05VXGNqcXh/ho2Um6KpsLe+xczT2uHo7/b9BAsSGSAnLjU8Q0pRWF9mbXR7gomQl56lrLO6wcjP1t3k6/L5AAcOFRwjKjE4P0ZNVFtiaXB3foWMk5qhqK+2vcTL0tng5+71/AMKERgfJi00O0JJUFdeZWxzeoGIj5adpKuyucDHztXc4+rx+P8GDRQbIikwNz5FTFNaYWhvdn2Ei5KZoKeutbzDytHY3+bt9PsCCRAXHiUsMzpBSE9WXWRrcnmAh46VnKOqsbi/xs3U2+Lp8Pf+BQwTGiEoLzY9REtSWWBnbnV8g4qRmJ+mrbS7wsnQ197l7PP6AQgPFh0kKzI5QEdOVVxjanF4f4aNlJuiqbC3vsXM09rh6O/2/QQLEhkgJy41PENKUVhfZm10e4KJkJeepayzusHIz9bd5Ovy+QAHDhUcIyoxOD9GTVRbYmlwd36FjJOaoaivtr3Ey9LZ4Ofu9fwDChEYHyYtNDtCSVBXXmVsc3qBiI+WnaSrsrnAx87V3OPq8fj/Bg==", + "format": "mp4" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 5f5da5957185" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 8060, + "candidatesTokenCount": 300, + "totalTokenCount": 8360, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 140 + }, + { + "modality": "VIDEO", + "tokenCount": 7920 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0059192, + "input_cost": 0.0049832, + "output_cost": 0.000936, + "prompt_tokens": 8060, + "completion_tokens": 300 + } + }, + { + "name": "gemini-3.8-flash-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0009f5ac891e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 0009f5ac891e" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_FLEX" + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00112112, + "input_cost": 0.0004784, + "output_cost": 0.00064272, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "057d8b15b597 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 057d8b15b597" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_PRIORITY" + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0028028, + "input_cost": 0.001196, + "output_cost": 0.0016068, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-web_search_per_prompt", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c409248006ff summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleSearch": {} + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer c409248006ff" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "query 0", + "query 1", + "query 2" + ] + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.03724224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-google_maps_grounding", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "cdcfe11184ca summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleMaps": {} + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer cdcfe11184ca" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "maps query 0" + ], + "groundingChunks": [ + { + "maps": { + "uri": "https://maps.google.com/?cid=0" + } + } + ], + "googleMapsWidgetContextToken": "token_$REQUEST_ID" + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.02724224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-fallback_reasoning_at_output_rate", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f92946792f44 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer f92946792f44" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1240, + "candidatesTokenCount": 560, + "thoughtsTokenCount": 3480, + "totalTokenCount": 5280, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1240 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0132496, + "input_cost": 0.0006448, + "output_cost": 0.0126048, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gemini-3.8-flash-fallback_image_tokens_at_input_rate", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "59106006ecc4 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qm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ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 59106006ecc4" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 2116, + "candidatesTokenCount": 240, + "totalTokenCount": 2356, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 310 + }, + { + "modality": "IMAGE", + "tokenCount": 1806 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00184912, + "input_cost": 0.00110032, + "output_cost": 0.0007488, + "prompt_tokens": 2116, + "completion_tokens": 240 + } + }, + { + "name": "gemini-3.8-flash-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "02cc764f4300 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 02cc764f4300\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.00224224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "60f7b65abfa3 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 60f7b65abfa3\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.2e-07, + "output_cost_per_token": 3.12e-06 + } + } + }, + { + "name": "gemini-3.8-flash-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "18632b64dd03 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.2e-07, + "output_cost_per_token": 3.12e-06 + } + } + }, + { + "name": "gemini-3.8-flash-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a3126f19100d summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx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9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer a3126f19100d\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.2e-07, + "output_cost_per_token": 3.12e-06 + } + } + }, + { + "name": "gemini-3.8-flash-prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "899380691bc7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "promptFeedback": { + "blockReason": "SAFETY", + "safetyRatings": [ + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "HIGH", + "blocked": true + } + ] + }, + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 0, + "totalTokenCount": 1840, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0009568, + "input_cost": 0.0009568, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-3.8-flash-stream_prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4c9331e5da39 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"promptFeedback\": {\"blockReason\": \"SAFETY\", \"safetyRatings\": [{\"category\": \"HARM_CATEGORY_HARASSMENT\", \"probability\": \"HIGH\", \"blocked\": true}]}, \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 0, \"totalTokenCount\": 1840, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.0009568, + "input_cost": 0.0009568, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-3.8-flash-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4972a11cd52d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 4972a11cd52d" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0090552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0908445fc9e7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 0908445fc9e7\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.0090552, + "input_cost": 0.003864, + "output_cost": 0.0051912, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "151d9709f7f7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "functionCall": { + "name": "get_weather", + "args": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00224224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9253170bf979 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.00224224, + "input_cost": 0.0009568, + "output_cost": 0.00128544, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-3.8-flash-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e31c97cab9cc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer e31c97cab9cc\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 8314, \"candidatesTokenCount\": 692, \"thoughtsTokenCount\": 900, \"totalTokenCount\": 9906, \"cachedContentTokenCount\": 6144, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 7984}, {\"modality\": \"AUDIO\", \"tokenCount\": 330}], \"candidatesTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 412}, {\"modality\": \"AUDIO\", \"tokenCount\": 280}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.007460128, + "input_cost": 0.001619488, + "output_cost": 0.00584064, + "prompt_tokens": 8314, + "completion_tokens": 1592 + } + }, + { + "name": "gemini-gemini-3.1-pro-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "15e6a9747fd2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 15e6a9747fd2" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.008624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "722017e8e394 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 722017e8e394" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 12928, + "candidatesTokenCount": 380, + "totalTokenCount": 13308, + "cachedContentTokenCount": 12288, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 12928 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0082976, + "input_cost": 0.0037376, + "output_cost": 0.00456, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gemini-gemini-3.1-pro-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f03ad3a1bb53 summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eLkwuWSwTKZUk/x59GEERgQl4AWb5hPER6kbjVd1t2LLUQdIu0X/RM9M81oTa6t9E5mPtD/UP/SQFEw2fFI0bqSHEJrgqZi27LqouNi1pKlkmJSH0GvUTXgxpBFP8WPS27KflYt8U2ujV/dJp0TjRbNL71NPY1d3b47nqOPIh+jUCOQrwER0ZjB8JJW0plCxoLtou5i2VK/cnKSNOHZUWLw9VB0T/OPdv7yToj+Hi20nX5tPT0SDR09Hm00nX4tuP4STob+8490T/VQcvD5UWTh0pI/cnlSvmLdouaC6ULG0pCSWMHx0Z8BE5CjUCIfo48rnq2+PV3dPY+9Rs0jjRadH90ujVFNpi36fltuxY9FP8aQReDPUT9BolIVkmaSo2Laouuy5mLbgqxCapIY0bnxQTDSQFD/0P9WPtRObq34TaPNYz03/RLtFB0rLUbdhV3UbjEeqE8Wb5eAGBCUERfRj/HpUkEylZLEwu3i4LLtkrWCikI+EdORfgDw8IAADx9yDwx+gf4lzcqNcn1PXRItG00afT7dZr2wHhg+e/7n/2iP6aBnwO7xW6HKsikydOK78t0i6BLs0sxCl8JRYgvBmdEvEK8QLc+u3yYetz5FfePNlI1ZrSRdFW0crSl9Wn2dveDOUL7KLzl/utA6gLShNZGp4g7CUYKgMtly7ILpQtBSstJysiJRxHFcgN3wXL/cf1EO7j5nTg99qT1mzTmNEm0RrSa9QJ2NfcsuJr6dHwq/i8AMgIkRDcF3EeHiS3KBosLS7gLi0uGiy3KB4kcR7cF5EQyAi8AKv40fBr6bLi19wJ2GvUGtIm0ZjRbNOT1vfadODj5hDux/XL/d8FyA1HFSUcKyItJwUrlC3ILpcuAy0YKuwlniBZGkoTqAutA5f7ovML7Azl296n2ZfVytJW0UXRmt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X3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer f03ad3a1bb53" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1546, + "candidatesTokenCount": 210, + "totalTokenCount": 1756, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 96 + }, + { + "modality": "AUDIO", + "tokenCount": 1450 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.006482, + "input_cost": 0.003962, + "output_cost": 0.00252, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "gemini-gemini-3.1-pro-image_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0c05c06c97fa summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2d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PF/x1ty0JRgNGVMwnwxk4PpSpDgGRu/k4jMev9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 0c05c06c97fa" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 2116, + "candidatesTokenCount": 240, + "totalTokenCount": 2356, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 310 + }, + { + "modality": "IMAGE", + "tokenCount": 1806 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.0074732, + "input_cost": 0.0045932, + "output_cost": 0.00288, + "prompt_tokens": 2116, + "completion_tokens": 240 + } + }, + { + "name": "gemini-gemini-3.1-pro-video_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7c49c7c888f4 summarize the attached material in one line and name the city weather" + }, + { + "type": "file", + "file": { + "file_data": "data:video/mp4;base64,AAAAGGZ0eXBpc29tAAACAGlzb21pc282AAACCG1kYXQNFBsiKTA3PkVMU1phaG92fYSLkpmgp661vMPK0djf5u30+wIJEBceJSwzOkFIT1ZdZGtyeYCHjpWco6qxuL/GzdTb4unw9/4FDBMaISgvNj1ES1JZYGdudXyDipGYn6attLvCydDX3uXs8/oBCA8WHSQrMjlAR05VXGNqcXh/ho2Um6KpsLe+xczT2uHo7/b9BAsSGSAnLjU8Q0pRWF9mbXR7gomQl56lrLO6wcjP1t3k6/L5AAcOFRwjKjE4P0ZNVFtiaXB3foWMk5qhqK+2vcTL0tng5+71/AMKERgfJi00O0JJUFdeZWxzeoGIj5adpKuyucDHztXc4+rx+P8GDRQbIikwNz5FTFNaYWhvdn2Ei5KZoKeutbzDytHY3+bt9PsCCRAXHiUsMzpBSE9WXWRrcnmAh46VnKOqsbi/xs3U2+Lp8Pf+BQwTGiEoLzY9REtSWWBnbnV8g4qRmJ+mrbS7wsnQ197l7PP6AQgPFh0kKzI5QEdOVVxjanF4f4aNlJuiqbC3vsXM09rh6O/2/QQLEhkgJy41PENKUVhfZm10e4KJkJeepayzusHIz9bd5Ovy+QAHDhUcIyoxOD9GTVRbYmlwd36FjJOaoaivtr3Ey9LZ4Ofu9fwDChEYHyYtNDtCSVBXXmVsc3qBiI+WnaSrsrnAx87V3OPq8fj/Bg==", + "format": "mp4" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 7c49c7c888f4" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 8060, + "candidatesTokenCount": 300, + "totalTokenCount": 8360, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 140 + }, + { + "modality": "VIDEO", + "tokenCount": 7920 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.022888, + "input_cost": 0.019288, + "output_cost": 0.0036, + "prompt_tokens": 8060, + "completion_tokens": 300 + } + }, + { + "name": "gemini-gemini-3.1-pro-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "000113942d5d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 000113942d5d" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1240, + "candidatesTokenCount": 560, + "thoughtsTokenCount": 3480, + "totalTokenCount": 5280, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1240 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.05444, + "input_cost": 0.00248, + "output_cost": 0.05196, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gemini-gemini-3.1-pro-tiered_input_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1dc16abc4658 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 1dc16abc4658" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 204800, + "candidatesTokenCount": 620, + "totalTokenCount": 205420, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 204800 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.83036, + "input_cost": 0.8192, + "output_cost": 0.01116, + "prompt_tokens": 204800, + "completion_tokens": 620 + } + }, + { + "name": "gemini-gemini-3.1-pro-tiered_cache_read_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e0ceec272f4b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer e0ceec272f4b" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 205824, + "candidatesTokenCount": 480, + "totalTokenCount": 206304, + "cachedContentTokenCount": 201728, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 205824 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.1057152, + "input_cost": 0.0970752, + "output_cost": 0.00864, + "prompt_tokens": 205824, + "completion_tokens": 480 + } + }, + { + "name": "gemini-gemini-3.1-pro-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "888d93f4c060 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 888d93f4c060" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_FLEX" + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.004312, + "input_cost": 0.00184, + "output_cost": 0.002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "68dfafa41eed summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 68dfafa41eed" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_PRIORITY" + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.01078, + "input_cost": 0.0046, + "output_cost": 0.00618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3d8a4ab5a9b2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleSearch": {} + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 3d8a4ab5a9b2" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "query 0", + "query 1", + "query 2" + ] + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.113624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-google_maps_grounding", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "982de823fd3b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleMaps": {} + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 982de823fd3b" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "maps query 0" + ], + "groundingChunks": [ + { + "maps": { + "uri": "https://maps.google.com/?cid=0" + } + } + ], + "googleMapsWidgetContextToken": "token_$REQUEST_ID" + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.033624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "93682132cbf8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 93682132cbf8\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.008624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "661f87e3dcf5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 661f87e3dcf5\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9fc58c44c867 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5aced106bb93 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneM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it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 5aced106bb93\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gemini-gemini-3.1-pro-prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0b401759be94 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "promptFeedback": { + "blockReason": "SAFETY", + "safetyRatings": [ + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "HIGH", + "blocked": true + } + ] + }, + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 0, + "totalTokenCount": 1840, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.00368, + "input_cost": 0.00368, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "46376a43606c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"promptFeedback\": {\"blockReason\": \"SAFETY\", \"safetyRatings\": [{\"category\": \"HARM_CATEGORY_HARASSMENT\", \"probability\": \"HIGH\", \"blocked\": true}]}, \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 0, \"totalTokenCount\": 1840, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.00368, + "input_cost": 0.00368, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-gemini-3.1-pro-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "da151058cfb9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer da151058cfb9" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.002156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d2aaa2ca1279 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer d2aaa2ca1279\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.002156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4fe80308a236 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "functionCall": { + "name": "get_weather", + "args": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.008624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f0ddadf59ebc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.008624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.1-pro-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.1-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "47de5dc94825 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 47de5dc94825\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 8314, \"candidatesTokenCount\": 412, \"thoughtsTokenCount\": 900, \"totalTokenCount\": 9626, \"cachedContentTokenCount\": 6144, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 7984}, {\"modality\": \"AUDIO\", \"tokenCount\": 330}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.0224108, + "input_cost": 0.0057668, + "output_cost": 0.016644, + "prompt_tokens": 8314, + "completion_tokens": 1312 + } + }, + { + "name": "gemini-gemini-3.8-flash-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3944829b75e5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 3944829b75e5" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.002156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "24a568396212 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 24a568396212" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 12928, + "candidatesTokenCount": 380, + "totalTokenCount": 13308, + "cachedContentTokenCount": 12288, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 12928 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0020744, + "input_cost": 0.0009344, + "output_cost": 0.00114, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gemini-gemini-3.8-flash-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "99e65f16c4b4 summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eL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RGBCXgBZvmE8RHqRuNV3W3YstRB0i7Rf9Ez0zzWhNrq30TmY+0P9Q/9JAUTDZ8UjRupIcQmuCpmLbsuqi42LWkqWSYlIfQa9RNeDGkEU/xY9Lbsp+Vi3xTa6NX90mnRONFs0vvU09jV3dvjueo48iH6NQI5CvARHRmMHwklbSmULGgu2i7mLZUr9ycpI04dlRYvD1UHRP8492/vJOiP4eLbSdfm09PRINHT0ebTSdfi24/hJOhv7zj3RP9VBy8PlRZOHSkj9yeVK+Yt2i5oLpQsbSkJJYwfHRnwETkKNQIh+jjyuerb49Xd09j71GzSONFp0f3S6NUU2mLfp+W27Fj0U/xpBF4M9RP0GiUhWSZpKjYtqi67LmYtuCrEJqkhjRufFBMNJAUP/Q/1Y+1E5urfhNo81jPTf9Eu0UHSstRt2FXdRuMR6oTxZvl4AYEJQRF9GP8elSQTKVksTC7eLgsu2StYKKQj4R05F+APDwgAAPH3IPDH6B/iXNyo1yfU9dEi0bTRp9Pt1mvbAeGD57/uf/aI/poGfA7vFbocqyKTJ04rvy3SLoEuzSzEKXwlFiC8GZ0S8QrxAtz67fJh63PkV9482UjVmtJF0VbRytKX1afZ294M5QvsovOX+60DqAtKE1kaniDsJRgqAy2XLsgulC0FKy0nKyIlHEcVyA3fBcv9x/UQ7uPmdOD32pPWbNOY0SbRGtJr1AnY19yy4mvp0fCr+LwAyAiRENwXcR4eJLcoGiwtLuAuLS4aLLcoHiRxHtwXkRDICLwAq/jR8GvpsuLX3AnYa9Qa0ibRmNFs05PW99p04OPmEO7H9cv93wXIDUcVJRwrIi0nBSuULcguly4DLRgq7CWeIFkaShOoC60Dl/ui8wvsDOXb3qfZl9XK0lbRRdGa0kjVPNlX3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 99e65f16c4b4" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1546, + "candidatesTokenCount": 210, + "totalTokenCount": 1756, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 96 + }, + { + "modality": "AUDIO", + "tokenCount": 1450 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.002128, + "input_cost": 0.001498, + "output_cost": 0.00063, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "gemini-gemini-3.8-flash-audio_output", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6fc6e4823e02 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "modalities": [ + "text", + "audio" + ], + "audio": { + "voice": "alloy", + "format": "pcm16" + }, + "allowed_openai_params": [ + "modalities", + "audio" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 6fc6e4823e02" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 220, + "candidatesTokenCount": 1300, + "totalTokenCount": 1520, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 220 + } + ], + "candidatesTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 180 + }, + { + "modality": "AUDIO", + "tokenCount": 1120 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00737, + "input_cost": 0.00011, + "output_cost": 0.00726, + "prompt_tokens": 220, + "completion_tokens": 1300 + } + }, + { + "name": "gemini-gemini-3.8-flash-image_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ca377dd90846 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4Rcyl4YhifPspUXLd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C6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer ca377dd90846" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 2116, + "candidatesTokenCount": 240, + "totalTokenCount": 2356, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 310 + }, + { + "modality": "IMAGE", + "tokenCount": 1806 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.0018683, + "input_cost": 0.0011483, + "output_cost": 0.00072, + "prompt_tokens": 2116, + "completion_tokens": 240 + } + }, + { + "name": "gemini-gemini-3.8-flash-video_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "030071a5c80f summarize the attached material in one line and name the city weather" + }, + { + "type": "file", + "file": { + "file_data": "data:video/mp4;base64,AAAAGGZ0eXBpc29tAAACAGlzb21pc282AAACCG1kYXQNFBsiKTA3PkVMU1phaG92fYSLkpmgp661vMPK0djf5u30+wIJEBceJSwzOkFIT1ZdZGtyeYCHjpWco6qxuL/GzdTb4unw9/4FDBMaISgvNj1ES1JZYGdudXyDipGYn6attLvCydDX3uXs8/oBCA8WHSQrMjlAR05VXGNqcXh/ho2Um6KpsLe+xczT2uHo7/b9BAsSGSAnLjU8Q0pRWF9mbXR7gomQl56lrLO6wcjP1t3k6/L5AAcOFRwjKjE4P0ZNVFtiaXB3foWMk5qhqK+2vcTL0tng5+71/AMKERgfJi00O0JJUFdeZWxzeoGIj5adpKuyucDHztXc4+rx+P8GDRQbIikwNz5FTFNaYWhvdn2Ei5KZoKeutbzDytHY3+bt9PsCCRAXHiUsMzpBSE9WXWRrcnmAh46VnKOqsbi/xs3U2+Lp8Pf+BQwTGiEoLzY9REtSWWBnbnV8g4qRmJ+mrbS7wsnQ197l7PP6AQgPFh0kKzI5QEdOVVxjanF4f4aNlJuiqbC3vsXM09rh6O/2/QQLEhkgJy41PENKUVhfZm10e4KJkJeepayzusHIz9bd5Ovy+QAHDhUcIyoxOD9GTVRbYmlwd36FjJOaoaivtr3Ey9LZ4Ofu9fwDChEYHyYtNDtCSVBXXmVsc3qBiI+WnaSrsrnAx87V3OPq8fj/Bg==", + "format": "mp4" + } + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 030071a5c80f" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 8060, + "candidatesTokenCount": 300, + "totalTokenCount": 8360, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 140 + }, + { + "modality": "VIDEO", + "tokenCount": 7920 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.005722, + "input_cost": 0.004822, + "output_cost": 0.0009, + "prompt_tokens": 8060, + "completion_tokens": 300 + } + }, + { + "name": "gemini-gemini-3.8-flash-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "518ba3ee4c33 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 518ba3ee4c33" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1240, + "candidatesTokenCount": 560, + "thoughtsTokenCount": 3480, + "totalTokenCount": 5280, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1240 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.01448, + "input_cost": 0.00062, + "output_cost": 0.01386, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gemini-gemini-3.8-flash-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ed5fc114b878 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer ed5fc114b878" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_FLEX" + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.001078, + "input_cost": 0.00046, + "output_cost": 0.000618, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c8b02e840d2c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer c8b02e840d2c" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ], + "trafficType": "ON_DEMAND_PRIORITY" + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.002695, + "input_cost": 0.00115, + "output_cost": 0.001545, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-web_search_per_prompt", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4c0023a5b762 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleSearch": {} + } + ], + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 4c0023a5b762" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "query 0", + "query 1", + "query 2" + ] + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.037156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-google_maps_grounding", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b8da7a958abf summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "googleMaps": {} + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer b8da7a958abf" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "groundingMetadata": { + "webSearchQueries": [ + "maps query 0" + ], + "groundingChunks": [ + { + "maps": { + "uri": "https://maps.google.com/?cid=0" + } + } + ], + "googleMapsWidgetContextToken": "token_$REQUEST_ID" + } + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.027156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "eacbb9f405ad summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer eacbb9f405ad\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.002156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "837d58c93751 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 837d58c93751\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5e-07, + "output_cost_per_token": 3e-06 + } + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5d097120da02 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5e-07, + "output_cost_per_token": 3e-06 + } + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5fca57bc9ae9 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAA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GGqlelK0sh1MrRizk4drf0prMW3Q264J3IVJTZ3tx1ULpBi8CnnmrwBeYvfkI5rZJ2W6cOv3bKMqoCpyoNo+gpCZcSVgB8hdzlfMfPl67dL9/IqNo2mBQBaVitoQ4y7KzqHnrBWSxLIyznP3v/VNlzgF7qcPaQiDYhyGAgLfihsZE5nQZLcedY4Apm3dhEOyMUpdzNNyViCP6ykfFn35Ss3JDUS7lfZV47bpxeatoe2dNzU5TGxY9GoVYvhKXmP0WjgOpwv91XPF/x1ty0JRgNGVMwnwxk4PpSpDgGRu/k4jMev9x1vlc3EdAIz+WBCWU23SZoIT3WfyVNpXi7azEQkSB7e1K+fS25uGiNScc4/Nn8BVsUqtwtGhM5nncB7tH0F/k0ngZeGmqEGNJw01v2UYpLQoxwqhCz7/X5it8liVJMxk2kQ3iCGYnwDwfHcl7gLJGiAqrjLBOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 5fca57bc9ae9\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5e-07, + "output_cost_per_token": 3e-06 + } + } + }, + { + "name": "gemini-gemini-3.8-flash-prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7dc69adaf49c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "promptFeedback": { + "blockReason": "SAFETY", + "safetyRatings": [ + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "HIGH", + "blocked": true + } + ] + }, + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 0, + "totalTokenCount": 1840, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.00092, + "input_cost": 0.00092, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_prompt_blocked", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "23065669b96e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"promptFeedback\": {\"blockReason\": \"SAFETY\", \"safetyRatings\": [{\"category\": \"HARM_CATEGORY_HARASSMENT\", \"probability\": \"HIGH\", \"blocked\": true}]}, \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 0, \"totalTokenCount\": 1840, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.00092, + "input_cost": 0.00092, + "output_cost": 0.0, + "prompt_tokens": 1840, + "completion_tokens": 0 + } + }, + { + "name": "gemini-gemini-3.8-flash-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "290ca0555ee8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "scripted answer 290ca0555ee8" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.1-pro" + } + }, + "expected": { + "spend": 0.008624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ec61060b88e9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer ec61060b88e9\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.1-pro\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.1-pro\"}" + ] + }, + "expected": { + "spend": 0.008624, + "input_cost": 0.00368, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "670f41936a6d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "candidates": [ + { + "content": { + "parts": [ + { + "functionCall": { + "name": "get_weather", + "args": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 1840, + "candidatesTokenCount": 412, + "totalTokenCount": 2252, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 1840 + } + ] + }, + "modelVersion": "gemini-3.8-flash" + } + }, + "expected": { + "spend": 0.002156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8cdfceec775e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"get_weather\", \"args\": {\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}}}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 1840, \"candidatesTokenCount\": 412, \"totalTokenCount\": 2252, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 1840}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.002156, + "input_cost": 0.00092, + "output_cost": 0.001236, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gemini-gemini-3.8-flash-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gemini/gemini-3.8-flash", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0b11ac8b4a63 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"scripted answer 0b11ac8b4a63\"}], \"role\": \"model\"}, \"finishReason\": \"STOP\", \"index\": 0}], \"modelVersion\": \"gemini-3.8-flash\"}", + "data: {\"candidates\": [], \"usageMetadata\": {\"promptTokenCount\": 8314, \"candidatesTokenCount\": 692, \"thoughtsTokenCount\": 900, \"totalTokenCount\": 9906, \"cachedContentTokenCount\": 6144, \"promptTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 7984}, {\"modality\": \"AUDIO\", \"tokenCount\": 330}], \"candidatesTokensDetails\": [{\"modality\": \"TEXT\", \"tokenCount\": 412}, {\"modality\": \"AUDIO\", \"tokenCount\": 280}]}, \"modelVersion\": \"gemini-3.8-flash\"}" + ] + }, + "expected": { + "spend": 0.0076232, + "input_cost": 0.0015572, + "output_cost": 0.006066, + "prompt_tokens": 8314, + "completion_tokens": 1592 + } + }, + { + "name": "gpt-5.3-codex-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0bb211ce54ec summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788253, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 0bb211ce54ec", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "a1f465df7d59 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788253, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer a1f465df7d59", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 12928, + "output_tokens": 380, + "total_tokens": 13308, + "input_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.0073632, + "input_cost": 0.0028032, + "output_cost": 0.00456, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gpt-5.3-codex-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d47bef2ddfda summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788254, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer d47bef2ddfda", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1240, + "output_tokens": 4040, + "total_tokens": 5280, + "output_tokens_details": { + "reasoning_tokens": 3480 + } + } + } + }, + "expected": { + "spend": 0.05382, + "input_cost": 0.00186, + "output_cost": 0.05196, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gpt-5.3-codex-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c6c8dc8b11ca summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788255, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer c6c8dc8b11ca", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.003852, + "input_cost": 0.00138, + "output_cost": 0.002472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "807b82ab682a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788256, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 807b82ab682a", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.015408, + "input_cost": 0.00552, + "output_cost": 0.009888, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7c4724f24131 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "medium" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788256, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "web_search_call", + "id": "ws_0", + "status": "completed" + }, + { + "type": "web_search_call", + "id": "ws_1", + "status": "completed" + }, + { + "type": "web_search_call", + "id": "ws_2", + "status": "completed" + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 7c4724f24131", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.045204, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-web_search_low", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "dfd08d79f164 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "low" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788257, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "web_search_call", + "id": "ws_0", + "status": "completed" + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer dfd08d79f164", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.017704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-web_search_high", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "401e61950557 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "high" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788253, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "web_search_call", + "id": "ws_0", + "status": "completed" + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 401e61950557", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.022704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-file_search", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8ebc31c05806 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "file_search", + "vector_store_ids": [ + "vs_cost_calc_fixture" + ] + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788253, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "file_search_call", + "id": "fs_0", + "status": "completed", + "queries": [ + "query 0" + ], + "results": [] + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 8ebc31c05806", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.010204, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "75b82927ffe4 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788254, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 75b82927ffe4\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 75b82927ffe4\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788254, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 75b82927ffe4\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "430855aa14e3 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 430855aa14e3\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 430855aa14e3\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 430855aa14e3\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gpt-5.3-codex-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5e8dac751b8d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_item.added\ndata: {\"type\": \"response.output_item.added\", \"output_index\": 0, \"item\": {\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"\", \"status\": \"in_progress\"}}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.function_call_arguments.done\ndata: {\"type\": \"response.function_call_arguments.done\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gpt-5.3-codex-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0245ffd5ae0f summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197M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+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788256, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 0245ffd5ae0f\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 0245ffd5ae0f\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788256, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 0245ffd5ae0f\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gpt-5.3-codex-stream_incomplete", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "15523b94e3fe summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 15523b94e3fe\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 15523b94e3fe\"}", + "event: response.incomplete\ndata: {\"type\": \"response.incomplete\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"status\": \"incomplete\", \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 15523b94e3fe\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream_no_usage_incomplete", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6dcd71cdfaa5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 6dcd71cdfaa5\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 6dcd71cdfaa5\"}", + "event: response.incomplete\ndata: {\"type\": \"response.incomplete\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788255, \"status\": \"incomplete\", \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 6dcd71cdfaa5\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gpt-5.3-codex-stream_unvalidated", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2de88869bcff summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 2de88869bcff\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 1, \"content_index\": 0, \"delta\": \"scripted answer 2de88869bcff\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 2de88869bcff\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream_no_usage_unvalidated", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "da22f5aa5869 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer da22f5aa5869\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 1, \"content_index\": 0, \"delta\": \"scripted answer da22f5aa5869\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer da22f5aa5869\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-06, + "output_cost_per_token": 1.2e-05 + } + } + }, + { + "name": "gpt-5.3-codex-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5210d175a94f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788258, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 5210d175a94f", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b7edc51cdfbe summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788258, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer b7edc51cdfbe\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer b7edc51cdfbe\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788258, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer b7edc51cdfbe\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "6bf8aad8967c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788257, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "function_call", + "id": "fc_$REQUEST_ID", + "call_id": "call_$REQUEST_ID", + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "01f141cd9d3b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788258, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_item.added\ndata: {\"type\": \"response.output_item.added\", \"output_index\": 0, \"item\": {\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"\", \"status\": \"in_progress\"}}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.function_call_arguments.done\ndata: {\"type\": \"response.function_call_arguments.done\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788258, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.3-codex-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.3-codex", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8ef8970518fd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788258, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 8ef8970518fd\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 8ef8970518fd\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788258, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 8ef8970518fd\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 7984, \"output_tokens\": 1312, \"total_tokens\": 9296, \"input_tokens_details\": {\"cached_tokens\": 6144}, \"output_tokens_details\": {\"reasoning_tokens\": 900}}}}" + ] + }, + "expected": { + "spend": 0.0203256, + "input_cost": 0.0036816, + "output_cost": 0.016644, + "prompt_tokens": 7984, + "completion_tokens": 1312 + } + }, + { + "name": "gpt-5.4-mini-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1157fc293d72 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788259, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 1157fc293d72" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0017976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "918d015fad34 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788260, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 918d015fad34" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.00171808, + "input_cost": 0.00065408, + "output_cost": 0.001064, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gpt-5.4-mini-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "b1238d45e42d summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eLkwuWSwTKZUk/x59GEERgQl4AWb5hPER6kbjVd1t2LLUQdIu0X/RM9M81oTa6t9E5mPtD/UP/SQFEw2fFI0bqSHEJrgqZi27LqouNi1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RNeDGkEU/xY9Lbsp+Vi3xTa6NX90mnRONFs0vvU09jV3dvjueo48iH6NQI5CvARHRmMHwklbSmULGgu2i7mLZUr9ycpI04dlRYvD1UHRP8492/vJOiP4eLbSdfm09PRINHT0ebTSdfi24/hJOhv7zj3RP9VBy8PlRZOHSkj9yeVK+Yt2i5oLpQsbSkJJYwfHRnwETkKNQIh+jjyuerb49Xd09j71GzSONFp0f3S6NUU2mLfp+W27Fj0U/xpBF4M9RP0GiUhWSZpKjYtqi67LmYtuCrEJqkhjRufFBMNJAUP/Q/1Y+1E5urfhNo81jPTf9Eu0UHSstRt2FXdRuMR6oTxZvl4AYEJQRF9GP8elSQTKVksTC7eLgsu2StYKKQj4R05F+APDwgAAPH3IPDH6B/iXNyo1yfU9dEi0bTRp9Pt1mvbAeGD57/uf/aI/poGfA7vFbocqyKTJ04rvy3SLoEuzSzEKXwlFiC8GZ0S8QrxAtz67fJh63PkV9482UjVmtJF0VbRytKX1afZ294M5QvsovOX+60DqAtKE1kaniDsJRgqAy2XLsgulC0FKy0nKyIlHEcVyA3fBcv9x/UQ7uPmdOD32pPWbNOY0SbRGtJr1AnY19yy4mvp0fCr+LwAyAiRENwXcR4eJLcoGiwtLuAuLS4aLLcoHiRxHtwXkRDICLwAq/jR8GvpsuLX3AnYa9Qa0ibRmNFs05PW99p04OPmEO7H9cv93wXIDUcVJRwrIi0nBSuULcguly4DLRgq7CWeIFkaShOoC60Dl/ui8wvsDOXb3qfZl9XK0lbRRdGa0kjVPNlX3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788261, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer b1238d45e42d" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1546, + "completion_tokens": 210, + "total_tokens": 1756, + "prompt_tokens_details": { + "audio_tokens": 1450 + } + } + } + }, + "expected": { + "spend": 0.0151216, + "input_cost": 0.0145336, + "output_cost": 0.000588, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "gpt-5.4-mini-audio_output", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "09073c011cb2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "modalities": [ + "text", + "audio" + ], + "audio": { + "voice": "alloy", + "format": "pcm16" + }, + "allowed_openai_params": [ + "modalities", + "audio" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788257, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 09073c011cb2" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 220, + "completion_tokens": 1300, + "total_tokens": 1520, + "completion_tokens_details": { + "audio_tokens": 1120 + } + } + } + }, + "expected": { + "spend": 0.022981, + "input_cost": 7.7e-05, + "output_cost": 0.022904, + "prompt_tokens": 220, + "completion_tokens": 1300 + } + }, + { + "name": "gpt-5.4-mini-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "cfc4c1747119 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788258, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer cfc4c1747119" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1240, + "completion_tokens": 4040, + "total_tokens": 5280, + "completion_tokens_details": { + "reasoning_tokens": 3480 + } + } + } + }, + "expected": { + "spend": 0.013138, + "input_cost": 0.000434, + "output_cost": 0.012704, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gpt-5.4-mini-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9bb4305a36a5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788259, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 9bb4305a36a5" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "flex" + } + }, + "expected": { + "spend": 0.0008988, + "input_cost": 0.000322, + "output_cost": 0.0005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4ebd6b6e27b7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788260, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 4ebd6b6e27b7" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "priority" + } + }, + "expected": { + "spend": 0.0035952, + "input_cost": 0.001288, + "output_cost": 0.0023072, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "222c74ef3df5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "medium" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788261, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 222c74ef3df5", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0142976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-web_search_low", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "75b4bbcdb164 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "low" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788258, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 75b4bbcdb164", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0117976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-web_search_high", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f2ded281685d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "high" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788259, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer f2ded281685d", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0167976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "85a0f6230523 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788260, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788260, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 85a0f6230523\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788260, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788260, \"model\": \"gpt-5.4-mini\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0017976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8e85cbc8b78c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 8e85cbc8b78c\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.5e-07, + "output_cost_per_token": 2.8e-06 + } + } + }, + { + "name": "gpt-5.4-mini-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "24414e14870e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.5e-07, + "output_cost_per_token": 2.8e-06 + } + } + }, + { + "name": "gpt-5.4-mini-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ddb683a1724a summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4Rcyl4YhifPspUXLdXZMIvPo9zAhTSlQFEi8m83sw5KxL0rWBzS9c4XAIAOaz3py4dTb7d9QaqDMLk0J87/15PZKvEaC6/hZ62sCtuFTywatjViHrBXTgOO5IJsiyYuzmaeQJKHmr11gnixR2rO7lqNEGs3shT+xK/lDUucFkigvA+a5C+itk/VV+1gDxc420UHpKhj31j0YnCZSFJebGz2/XSTyT6XfZhG4XNwZGIeUGCPKt0DX9lpB0RNN0yiP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stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer ddb683a1724a\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 3.5e-07, + "output_cost_per_token": 2.8e-06 + } + } + }, + { + "name": "gpt-5.4-mini-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "dbcf34530ce5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788258, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer dbcf34530ce5" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.008988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ec3873b5f576 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788259, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788259, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer ec3873b5f576\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788259, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788259, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.008988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "454b9573dcf5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788260, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0017976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c3e8188e02bf summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788261, \"model\": \"gpt-5.4-mini\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0017976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.4-mini-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.4-mini", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3efb75339951 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 3efb75339951\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788258, \"model\": \"gpt-5.4-mini\", \"choices\": [], \"usage\": {\"prompt_tokens\": 8314, \"completion_tokens\": 1592, \"total_tokens\": 9906, \"prompt_tokens_details\": {\"cached_tokens\": 6144, \"audio_tokens\": 330}, \"completion_tokens_details\": {\"reasoning_tokens\": 900, \"audio_tokens\": 280}}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.01379264, + "input_cost": 0.00415904, + "output_cost": 0.0096336, + "prompt_tokens": 8314, + "completion_tokens": 1592 + } + }, + { + "name": "gpt-5.5-pro-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "eef4c5fe3dab summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788259, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer eef4c5fe3dab", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f6fd81220aad summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788260, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer f6fd81220aad", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 12928, + "output_tokens": 380, + "total_tokens": 13308, + "input_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.073632, + "input_cost": 0.028032, + "output_cost": 0.0456, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gpt-5.5-pro-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "09757dcdc501 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788260, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 09757dcdc501", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1240, + "output_tokens": 4040, + "total_tokens": 5280, + "output_tokens_details": { + "reasoning_tokens": 3480 + } + } + } + }, + "expected": { + "spend": 0.5382, + "input_cost": 0.0186, + "output_cost": 0.5196, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gpt-5.5-pro-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e21acaffe79b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788258, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer e21acaffe79b", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.03852, + "input_cost": 0.0138, + "output_cost": 0.02472, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7fee6f8e184f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788259, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 7fee6f8e184f", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.15408, + "input_cost": 0.0552, + "output_cost": 0.09888, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d04d4797f3d0 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "medium" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788260, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "web_search_call", + "id": "ws_0", + "status": "completed" + }, + { + "type": "web_search_call", + "id": "ws_1", + "status": "completed" + }, + { + "type": "web_search_call", + "id": "ws_2", + "status": "completed" + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer d04d4797f3d0", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.11454, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-web_search_low", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3ce53f3d07ab summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "low" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788261, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "web_search_call", + "id": "ws_0", + "status": "completed" + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 3ce53f3d07ab", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.08704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-web_search_high", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d084299afdbf summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "high" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788259, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "web_search_call", + "id": "ws_0", + "status": "completed" + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer d084299afdbf", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.09204, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-file_search", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0720f466abdc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "file_search", + "vector_store_ids": [ + "vs_cost_calc_fixture" + ] + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788260, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "file_search_call", + "id": "fs_0", + "status": "completed", + "queries": [ + "query 0" + ], + "results": [] + }, + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer 0720f466abdc", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.07954, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1130d4d6e2dc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788260, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 1130d4d6e2dc\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 1130d4d6e2dc\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788260, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 1130d4d6e2dc\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "62836f5d3fa3 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 62836f5d3fa3\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 62836f5d3fa3\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 62836f5d3fa3\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-05, + "output_cost_per_token": 0.00012 + } + } + }, + { + "name": "gpt-5.5-pro-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "12478a1a276d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788260, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_item.added\ndata: {\"type\": \"response.output_item.added\", \"output_index\": 0, \"item\": {\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"\", \"status\": \"in_progress\"}}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.function_call_arguments.done\ndata: {\"type\": \"response.function_call_arguments.done\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788260, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-05, + "output_cost_per_token": 0.00012 + } + } + }, + { + "name": "gpt-5.5-pro-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "be189bbbfebe summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4Rcyl4YhifPspUXLdXZMIvPo9zAhTSlQFEi8m83sw5KxL0rWBzS9c4XAIAOaz3py4dTb7d9QaqDMLk0J87/15PZKvEaC6/hZ62sCtuFTywatjViHrBXTgOO5IJsiyYuzmaeQJKHmr11gnixR2rO7lqNEGs3shT+xK/lDUucFkigvA+a5C+itk/VV+1gDxc420UHpKhj31j0YnCZSFJebGz2/XSTyT6XfZ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5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer be189bbbfebe\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer be189bbbfebe\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer be189bbbfebe\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-05, + "output_cost_per_token": 0.00012 + } + } + }, + { + "name": "gpt-5.5-pro-stream_incomplete", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "cad50498b33a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer cad50498b33a\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer cad50498b33a\"}", + "event: response.incomplete\ndata: {\"type\": \"response.incomplete\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"status\": \"incomplete\", \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer cad50498b33a\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream_no_usage_incomplete", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2f6f49c3d0f2 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788262, \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 2f6f49c3d0f2\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 2f6f49c3d0f2\"}", + "event: response.incomplete\ndata: {\"type\": \"response.incomplete\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788262, \"status\": \"incomplete\", \"incomplete_details\": {\"reason\": \"max_output_tokens\"}, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 2f6f49c3d0f2\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-05, + "output_cost_per_token": 0.00012 + } + } + }, + { + "name": "gpt-5.5-pro-stream_unvalidated", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "9da2a01340b8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 9da2a01340b8\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 1, \"content_index\": 0, \"delta\": \"scripted answer 9da2a01340b8\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 9da2a01340b8\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream_no_usage_unvalidated", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d162da290b52 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer d162da290b52\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 1, \"content_index\": 0, \"delta\": \"scripted answer d162da290b52\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": \"not-a-number\", \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"scripted_future_item\", \"id\": \"fut_$REQUEST_ID\", \"status\": \"completed\"}, {\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer d162da290b52\", \"annotations\": []}]}]}}" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.5e-05, + "output_cost_per_token": 0.00012 + } + } + }, + { + "name": "gpt-5.5-pro-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d307e0210e1e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788262, + "status": "completed", + "model": "gpt-5.3-codex", + "output": [ + { + "type": "message", + "id": "msg_$REQUEST_ID", + "status": "completed", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "scripted answer d307e0210e1e", + "annotations": [] + } + ] + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "897338ee89fc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 897338ee89fc\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer 897338ee89fc\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788261, \"status\": \"completed\", \"model\": \"gpt-5.3-codex\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer 897338ee89fc\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.007704, + "input_cost": 0.00276, + "output_cost": 0.004944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "17d97c0f8b6e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "resp_$REQUEST_ID", + "object": "response", + "created_at": 1789788262, + "status": "completed", + "model": "gpt-5.5-pro", + "output": [ + { + "type": "function_call", + "id": "fc_$REQUEST_ID", + "call_id": "call_$REQUEST_ID", + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}", + "status": "completed" + } + ], + "usage": { + "input_tokens": 1840, + "output_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "369677236d4b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788263, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_item.added\ndata: {\"type\": \"response.output_item.added\", \"output_index\": 0, \"item\": {\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"\", \"status\": \"in_progress\"}}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}", + "event: response.function_call_arguments.delta\ndata: {\"type\": \"response.function_call_arguments.delta\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"delta\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.function_call_arguments.done\ndata: {\"type\": \"response.function_call_arguments.done\", \"item_id\": \"fc_$REQUEST_ID\", \"output_index\": 0, \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788263, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"function_call\", \"id\": \"fc_$REQUEST_ID\", \"call_id\": \"call_$REQUEST_ID\", \"name\": \"get_weather\", \"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\", \"status\": \"completed\"}], \"usage\": {\"input_tokens\": 1840, \"output_tokens\": 412, \"total_tokens\": 2252}}}" + ] + }, + "expected": { + "spend": 0.07704, + "input_cost": 0.0276, + "output_cost": 0.04944, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.5-pro-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.5-pro", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c9d9cd92af28 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "event: response.created\ndata: {\"type\": \"response.created\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788262, \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer c9d9cd92af28\", \"annotations\": []}]}], \"status\": \"in_progress\", \"usage\": null}}", + "event: response.output_text.delta\ndata: {\"type\": \"response.output_text.delta\", \"item_id\": \"msg_$REQUEST_ID\", \"output_index\": 0, \"content_index\": 0, \"delta\": \"scripted answer c9d9cd92af28\"}", + "event: response.completed\ndata: {\"type\": \"response.completed\", \"response\": {\"id\": \"resp_$REQUEST_ID\", \"object\": \"response\", \"created_at\": 1789788262, \"status\": \"completed\", \"model\": \"gpt-5.5-pro\", \"output\": [{\"type\": \"message\", \"id\": \"msg_$REQUEST_ID\", \"status\": \"completed\", \"role\": \"assistant\", \"content\": [{\"type\": \"output_text\", \"text\": \"scripted answer c9d9cd92af28\", \"annotations\": []}]}], \"usage\": {\"input_tokens\": 7984, \"output_tokens\": 1312, \"total_tokens\": 9296, \"input_tokens_details\": {\"cached_tokens\": 6144}, \"output_tokens_details\": {\"reasoning_tokens\": 900}}}}" + ] + }, + "expected": { + "spend": 0.203256, + "input_cost": 0.036816, + "output_cost": 0.16644, + "prompt_tokens": 7984, + "completion_tokens": 1312 + } + }, + { + "name": "gpt-5.6-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ed318a18ec07 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788262, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer ed318a18ec07" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.008988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2d376f5f39a0 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788263, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 2d376f5f39a0" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12928, + "completion_tokens": 380, + "total_tokens": 13308, + "prompt_tokens_details": { + "cached_tokens": 12288 + } + } + } + }, + "expected": { + "spend": 0.0085904, + "input_cost": 0.0032704, + "output_cost": 0.00532, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "gpt-5.6-audio_input", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1eed63f65da0 summarize the attached material in one line and name the city weather" + }, + { + "type": "input_audio", + "input_audio": { + "data": "UklGRmQGAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YUAGAAAAAA8I4A85F+EdpCNYKNkrCy7eLkwuWSwTKZUk/x59GEERgQl4AWb5hPER6kbjVd1t2LLUQdIu0X/RM9M81oTa6t9E5mPtD/UP/SQFEw2fFI0bqSHEJrgqZi27LqouNi1pKlkmJSH0GvUTXgxpBFP8WPS27KflYt8U2ujV/dJp0TjRbNL71NPY1d3b47nqOPIh+jUCOQrwER0ZjB8JJW0plCxoLtou5i2VK/cnKSNOHZUWLw9VB0T/OPdv7yToj+Hi20nX5tPT0SDR09Hm00nX4tuP4STob+8490T/VQcvD5UWTh0pI/cnlSvmLdouaC6ULG0pCSWMHx0Z8BE5CjUCIfo48rnq2+PV3dPY+9Rs0jjRadH90ujVFNpi36fltuxY9FP8aQReDPUT9BolIVkmaSo2Laouuy5mLbgqxCapIY0bnxQTDSQFD/0P9WPtRObq34TaPNYz03/RLtFB0rLUbdhV3UbjEeqE8Wb5eAGBCUERfRj/HpUkEylZLEwu3i4LLtkrWCikI+EdORfgDw8IAADx9yDwx+gf4lzcqNcn1PXRItG00afT7dZr2wHhg+e/7n/2iP6aBnwO7xW6HKsikydOK78t0i6BLs0sxCl8JRYgvBmdEvEK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tz67fJh63PkV9482UjVmtJF0VbRytKX1afZ294M5QvsovOX+60DqAtKE1kaniDsJRgqAy2XLsgulC0FKy0nKyIlHEcVyA3fBcv9x/UQ7uPmdOD32pPWbNOY0SbRGtJr1AnY19yy4mvp0fCr+LwAyAiRENwXcR4eJLcoGiwtLuAuLS4aLLcoHiRxHtwXkRDICLwAq/jR8GvpsuLX3AnYa9Qa0ibRmNFs05PW99p04OPmEO7H9cv93wXIDUcVJRwrIi0nBSuULcguly4DLRgq7CWeIFkaShOoC60Dl/ui8wvsDOXb3qfZl9XK0lbRRdGa0kjVPNlX3nPkYevt8tz68QLxCp0SvBkWIHwlxCnNLIEu0i6/LU4rkyerIroc7xV8DpoGiP5/9r/ug+cB4Wvb7dan07TRItH10SfUqNdc3B/ix+gg8PH3", + "format": "wav" + } + } + ] + } + ], + "stream": false, + "modalities": [ + "text" + ], + "allowed_openai_params": [ + "modalities" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788262, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 1eed63f65da0" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1546, + "completion_tokens": 210, + "total_tokens": 1756, + "prompt_tokens_details": { + "audio_tokens": 1450 + } + } + } + }, + "expected": { + "spend": 0.061108, + "input_cost": 0.058168, + "output_cost": 0.00294, + "prompt_tokens": 1546, + "completion_tokens": 210 + } + }, + { + "name": "gpt-5.6-audio_output", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c2f69182025b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "modalities": [ + "text", + "audio" + ], + "audio": { + "voice": "alloy", + "format": "pcm16" + }, + "allowed_openai_params": [ + "modalities", + "audio" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788262, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer c2f69182025b" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 220, + "completion_tokens": 1300, + "total_tokens": 1520, + "completion_tokens_details": { + "audio_tokens": 1120 + } + } + } + }, + "expected": { + "spend": 0.092505, + "input_cost": 0.000385, + "output_cost": 0.09212, + "prompt_tokens": 220, + "completion_tokens": 1300 + } + }, + { + "name": "gpt-5.6-reasoning", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "839418b0b1da summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "reasoning_effort": "medium", + "allowed_openai_params": [ + "reasoning_effort" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788263, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 839418b0b1da" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1240, + "completion_tokens": 4040, + "total_tokens": 5280, + "completion_tokens_details": { + "reasoning_tokens": 3480 + } + } + } + }, + "expected": { + "spend": 0.06569, + "input_cost": 0.00217, + "output_cost": 0.06352, + "prompt_tokens": 1240, + "completion_tokens": 4040 + } + }, + { + "name": "gpt-5.6-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "fa273468c07b summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788262, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer fa273468c07b" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "flex" + } + }, + "expected": { + "spend": 0.004494, + "input_cost": 0.00161, + "output_cost": 0.002884, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "dbb27812caea summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788262, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer dbb27812caea" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + }, + "service_tier": "priority" + } + }, + "expected": { + "spend": 0.017976, + "input_cost": 0.00644, + "output_cost": 0.011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-web_search_medium", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2fc2074db6f0 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "medium" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788263, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 2fc2074db6f0", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + }, + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.021488, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-web_search_low", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8a1c27e0ad34 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "low" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788262, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 8a1c27e0ad34", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.018988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-web_search_high", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "14ebe654d39f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "web_search_options": { + "search_context_size": "high" + }, + "allowed_openai_params": [ + "web_search_options" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788263, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 14ebe654d39f", + "annotations": [ + { + "type": "url_citation", + "url_citation": { + "url": "https://scripted.example/source", + "title": "scripted source", + "start_index": 0, + "end_index": 1 + } + } + ] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.023988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0d4dc45197bd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788262, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788262, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 0d4dc45197bd\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788262, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788262, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.008988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d2437c6d35d6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer d2437c6d35d6\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.75e-06, + "output_cost_per_token": 1.4e-05 + } + } + }, + { + "name": "gpt-5.6-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "510682506548 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.75e-06, + "output_cost_per_token": 1.4e-05 + } + } + }, + { + "name": "gpt-5.6-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "93ef594b4d91 summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudz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XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 93ef594b4d91\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.75e-06, + "output_cost_per_token": 1.4e-05 + } + } + }, + { + "name": "gpt-5.6-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e6d045b77d68 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788263, + "model": "gpt-5.4-mini", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer e6d045b77d68" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0017976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "49c74a898360 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 49c74a898360\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.4-mini\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.4-mini\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0017976, + "input_cost": 0.000644, + "output_cost": 0.0011536, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8a209834c60c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788263, + "model": "gpt-5.6", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.008988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "77c2cb29e969 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788264, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.008988, + "input_cost": 0.00322, + "output_cost": 0.005768, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "gpt-5.6-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "gpt-5.6", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "66e5a1e22691 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 66e5a1e22691\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788263, \"model\": \"gpt-5.6\", \"choices\": [], \"usage\": {\"prompt_tokens\": 8314, \"completion_tokens\": 1592, \"total_tokens\": 9906, \"prompt_tokens_details\": {\"cached_tokens\": 6144, \"audio_tokens\": 330}, \"completion_tokens_details\": {\"reasoning_tokens\": 900, \"audio_tokens\": 280}}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0600632, + "input_cost": 0.0174952, + "output_cost": 0.042568, + "prompt_tokens": 8314, + "completion_tokens": 1592 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "54c4ce4d8096 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 54c4ce4d8096" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.00084124, + "input_cost": 0.0004416, + "output_cost": 0.00039964, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-fallback_cache_read_at_input_rate", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "36b591711f22 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 36b591711f22" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 640, + "outputTokens": 380, + "totalTokens": 13308, + "cacheReadInputTokens": 12288 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.00347132, + "input_cost": 0.00310272, + "output_cost": 0.0003686, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-fallback_cache_write_at_input_rate", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3bd1faf7cebd summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 3bd1faf7cebd" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 512, + "outputTokens": 350, + "totalTokens": 10078, + "cacheWriteInputTokens": 9216, + "cacheDetails": [ + { + "inputTokens": 9216, + "ttl": "5m" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.00267422, + "input_cost": 0.00233472, + "output_cost": 0.0003395, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f515db6db1e8 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer f515db6db1e8" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.00084124, + "input_cost": 0.0004416, + "output_cost": 0.00039964, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c423409dd543 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer c423409dd543" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2.4e-07, + "output_cost_per_token": 9.7e-07 + } + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1b82e406f204 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockStart", + "payload": { + "start": { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler fil" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ler filler filler filler filler filler filler filler filler filler filler filler filler fi" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ller filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "tool_use" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2.4e-07, + "output_cost_per_token": 9.7e-07 + } + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "52555527573a summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSexEP+IhnvUWC4BeDWZQiCjhF7/4syzu4C5kF9ETfrG+udK0232R+NA+uESn014bRJmPMfahYljDojL1UAbuaA0PuOGOzBBlCKXAkFNHIfvvZHQafMkl9qmqdFF4x3Em6WDuijSQXN6nFtM3UXbUGmmCF4Rcyl4YhifPspUXLdXZMIvPo9zAhTSlQFEi8m83sw5KxL0rWBzS9c4XAIAOaz3py4dTb7d9QaqDMLk0J87/15PZKvEaC6/hZ62sCtuFTywatjViHrBXTgOO5IJsiyYuzmaeQJKHmr11gnixR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ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 52555527573a" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 2.4e-07, + "output_cost_per_token": 9.7e-07 + } + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c47a40f71743 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer c47a40f71743" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.00084124, + "input_cost": 0.0004416, + "output_cost": 0.00039964, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1aa422adaa97 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 1aa422adaa97" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.00084124, + "input_cost": 0.0004416, + "output_cost": 0.00039964, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2e3593b273a4 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather", + "input": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ] + } + }, + "stopReason": "tool_use", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.00084124, + "input_cost": 0.0004416, + "output_cost": 0.00039964, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3f3df4cdd7d9 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockStart", + "payload": { + "start": { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler fil" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ler filler filler filler filler filler filler filler filler filler filler filler filler fi" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ller filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "tool_use" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.00084124, + "input_cost": 0.0004416, + "output_cost": 0.00039964, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "meta.llama4-maverick-17b-instruct-v1:0-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "meta.llama4-maverick-17b-instruct-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5eec826ded90 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 5eec826ded90" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 11468, + "cacheReadInputTokens": 6144, + "cacheWriteInputTokens": 3072, + "cacheDetails": [ + { + "inputTokens": 2048, + "ttl": "5m" + }, + { + "inputTokens": 1024, + "ttl": "1h" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.00305308, + "input_cost": 0.00265344, + "output_cost": 0.00039964, + "prompt_tokens": 11056, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d6c7504381ab summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788266, + "model": "moonshotai/Kimi-K3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer d6c7504381ab" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1fb11cd276fc summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788266, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788266, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 1fb11cd276fc\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788266, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788266, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "316d5b71455c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 316d5b71455c\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.15e-06, + "output_cost_per_token": 3.45e-06 + } + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "d522e5409f42 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.15e-06, + "output_cost_per_token": 3.45e-06 + } + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "97f79b9004cf summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr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BOlp17bPGYIGTlFw+TOCLsGS103TZvSbyptAazsca/TY3o5hZLqX7SBvnfL6s/SU7BVyQY4PpZwHLa6PI2w+uFmJZbBsaruCVPW+FL+zSfvPO560ABJLD6nKsReNBwoxShnNi1XPSmX+C7Ij/ik2nfzubk6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 97f79b9004cf\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 1.15e-06, + "output_cost_per_token": 3.45e-06 + } + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "10e55a5c4a81 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788268, + "model": "zai-org/GLM-5.3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 10e55a5c4a81" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "598ed6ff4b9d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 598ed6ff4b9d\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788269, \"model\": \"zai-org/GLM-5.3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "761da386a9ae summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788269, + "model": "moonshotai/Kimi-K3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e33dced1d70c summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-moonshotai-Kimi-K3-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/moonshotai/Kimi-K3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "2e2f3465f331 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 2e2f3465f331\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788268, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5438abd6c548 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788271, + "model": "zai-org/GLM-5.3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 5438abd6c548" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "25be31c2d005 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 25be31c2d005\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "3a906f4aa16d summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 3a906f4aa16d\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.5e-07, + "output_cost_per_token": 2.2e-06 + } + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1143ec257764 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.5e-07, + "output_cost_per_token": 2.2e-06 + } + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "79e942a4452d summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9E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k6IFlomrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 79e942a4452d\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: [DONE]" + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.5e-07, + "output_cost_per_token": 2.2e-06 + } + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "29dffdfbd5fa summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788271, + "model": "moonshotai/Kimi-K3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "scripted answer 29dffdfbd5fa" + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "5985ca98af28 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 5985ca98af28\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788270, \"model\": \"moonshotai/Kimi-K3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0035374, + "input_cost": 0.002116, + "output_cost": 0.0014214, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "60392e73043e summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "application/json", + "body": { + "id": "chatcmpl-$REQUEST_ID", + "object": "chat.completion", + "created": 1789788270, + "model": "zai-org/GLM-5.3", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_$REQUEST_ID", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + } + ] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 1840, + "completion_tokens": 412, + "total_tokens": 2252 + } + } + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f2bebf9a77ac summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "tool_choice": "auto", + "allowed_openai_params": [ + "tool_choice" + ] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"tool_calls\": [{\"index\": 0, \"id\": \"call_$REQUEST_ID\", \"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"arguments\": \"\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"{\\\"city\\\": \\\"Berlin\\\", \\\"days\\\": 7, \\\"units\\\": \\\"metric\\\", \\\"notes\\\": \\\"filler filler filler filler fil\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ler filler filler filler filler filler filler filler filler filler filler filler filler fi\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"function\": {\"arguments\": \"ller filler filler filler filler filler filler filler filler filler filler filler filler \\\"}\"}}]}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788271, \"model\": \"zai-org/GLM-5.3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "together_ai-zai-org-GLM-5.3-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "together_ai/zai-org/GLM-5.3", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "63a7c8ddf892 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "text/event-stream", + "frames": [ + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788272, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788272, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"scripted answer 63a7c8ddf892\"}, \"finish_reason\": null}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788272, \"model\": \"zai-org/GLM-5.3\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": null}", + "data: {\"id\": \"chatcmpl-$REQUEST_ID\", \"object\": \"chat.completion.chunk\", \"created\": 1789788272, \"model\": \"zai-org/GLM-5.3\", \"choices\": [], \"usage\": {\"prompt_tokens\": 1840, \"completion_tokens\": 412, \"total_tokens\": 2252}}", + "data: [DONE]" + ] + }, + "expected": { + "spend": 0.0019184, + "input_cost": 0.001012, + "output_cost": 0.0009064, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-input_text", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "f6559891a89a summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer f6559891a89a" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-cache_read", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "c054e1cd6b20 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer c054e1cd6b20" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 640, + "outputTokens": 380, + "totalTokens": 13308, + "cacheReadInputTokens": 12288 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.0207284, + "input_cost": 0.0102784, + "output_cost": 0.01045, + "prompt_tokens": 12928, + "completion_tokens": 380 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-cache_write_5m", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "87e62170eee7 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 87e62170eee7" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 512, + "outputTokens": 350, + "totalTokens": 10078, + "cacheWriteInputTokens": 9216, + "cacheDetails": [ + { + "inputTokens": 9216, + "ttl": "5m" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.075801, + "input_cost": 0.066176, + "output_cost": 0.009625, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-cache_write_1h", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4566b7a4b0d6 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 4566b7a4b0d6" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 512, + "outputTokens": 350, + "totalTokens": 10078, + "cacheWriteInputTokens": 9216, + "cacheDetails": [ + { + "inputTokens": 2048, + "ttl": "5m" + }, + { + "inputTokens": 7168, + "ttl": "1h" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.105369, + "input_cost": 0.095744, + "output_cost": 0.009625, + "prompt_tokens": 9728, + "completion_tokens": 350 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-tiered_input_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e6889b23c228 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer e6889b23c228" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 204800, + "outputTokens": 620, + "totalTokens": 205420 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 2.278375, + "input_cost": 2.2528, + "output_cost": 0.025575, + "prompt_tokens": 204800, + "completion_tokens": 620 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-tiered_cache_read_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "1d35f19047ff summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 1d35f19047ff" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 4096, + "outputTokens": 480, + "totalTokens": 206304, + "cacheReadInputTokens": 201728 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.2867568, + "input_cost": 0.2669568, + "output_cost": 0.0198, + "prompt_tokens": 205824, + "completion_tokens": 480 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-tiered_cache_write_above_200k", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "14f144dc9bee summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 14f144dc9bee" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 4096, + "outputTokens": 480, + "totalTokens": 205280, + "cacheWriteInputTokens": 200704, + "cacheDetails": [ + { + "inputTokens": 200704, + "ttl": "5m" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 2.824536, + "input_cost": 2.804736, + "output_cost": 0.0198, + "prompt_tokens": 204800, + "completion_tokens": 480 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-service_tier_flex", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e984661f7bde summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "flex", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer e984661f7bde" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + }, + "serviceTier": { + "type": "flex" + } + } + }, + "expected": { + "spend": 0.010725, + "input_cost": 0.00506, + "output_cost": 0.005665, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-service_tier_priority", + "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "419bc91d93ae summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "service_tier": "priority", + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 419bc91d93ae" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + }, + "serviceTier": { + "type": "priority" + } + } + }, + "expected": { + "spend": 0.0268125, + "input_cost": 0.01265, + "output_cost": 0.0141625, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "4a3e5a729480 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 4a3e5a729480" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream_no_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "45449a962a21 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 45449a962a21" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.5e-06, + "output_cost_per_token": 2.75e-05 + } + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream_no_usage_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "e0e1b17ca05f summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockStart", + "payload": { + "start": { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler fil" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ler filler filler filler filler filler filler filler filler filler filler filler filler fi" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ller filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "tool_use" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.5e-06, + "output_cost_per_token": 2.75e-05 + } + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream_no_usage_image_input", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7d1ebbfd135c summarize the attached material in one line and name the city weather" + }, + { + "type": "image_url", + "image_url": { + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAMK0lEQVR4nAEgDN/zAM0HLNi+b59irEwJwoIG5+NVlKprNC9dCjpeSEL6tCj3YubiguXBZXx4w6lns2cR6zkGp8hgPXHUCeelTYe9wfcEQgJ6rx+pW3+GWJV430PkExZ66Nnc6zd2KDOBGnGnIwBzhiZIL2HGI3lifMEk1EYYPG5NnqGlpcz3LiFAwwS9/Goh5egSF1aINdSX+yErhrSeZWrPBkEWmgtZ9OYpQ58l2dRlT+yNSBn7QNa6ssjgEhxEGuYUp7jZKpIZrx7Oh1QAV1jeeB7zT4/0jccZhxGSWqLiJW9VRPJQuRZjnL/J8qO8F7vpSKdYNMGDc/cEMXKNBlAdehNaVHGe84Tdmm53hcOfr0ICjvEPuk0WzuaDIOumjneMSZ1+6qg8mAM8quAXAOyQPrjRNxDXsUwZZhYr07VMCinT0OP4yIEWDKvlaxGgReVKAJ1JpZx/Hlt+evT70yo3G94iWEhVavFwPnqJ87rKl0BT6+ohtOgz197MvB8QzMXpME/BwepPYkiRLpbBOAD37hU9bAWozdK3sPczg3okfSudzcFjAYtEIq5yw+1ZF9EYmBSex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omrI0bs386ztTMDifWKNO0ZnC+Oau6ZgwE4PwF8AqKtGFd5yqG0aMFq9rvwPb8DZCXmUHN5Uc40cNG5HWNSAK1yFAkCcG2GPV/7JYEi3t9ZA8NBeh9Dmvsjv8jiaeknPCij14x6BmGOFzyVNqRcS8x517fM39S0cC6bzu8wbnh96fwQ9z/JzCEsqxV9KjuES+xv3rYkX+r3JxcK7p78EACPip85gRBoIU7cZgrwLepMArrpA9YvR8Icag3YILzWcgXVoVRTs6Xc2PsiKasZ98y5CBkmP9Ri3lwZ9acgvPJ1fw729yDzDl/0qEeBOf7ZYZ7dreaPeaGHIymfgKAwmwhnjvAGaqLWhgAAAABJRU5ErkJggg==", + "detail": "high" + } + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 7d1ebbfd135c" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + } + ] + }, + "expected": { + "recount": { + "input_cost_per_token": 5.5e-06, + "output_cost_per_token": 2.75e-05 + } + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "80542567b1bb summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "text": "scripted answer 80542567b1bb" + } + ] + } + }, + "stopReason": "end_turn", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream_response_model_override", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "ab06cda24199 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer ab06cda24199" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "7a6c5d71a8fe summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/json", + "body": { + "output": { + "message": { + "role": "assistant", + "content": [ + { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather", + "input": { + "city": "Berlin", + "days": 7, + "units": "metric", + "notes": "filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler " + } + } + } + ] + } + }, + "stopReason": "tool_use", + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream_tool_call", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line." + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "0ef1034f8717 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the current weather and a short forecast for a city.", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "days": { + "type": "integer", + "description": "Forecast horizon in days" + }, + "units": { + "type": "string", + "enum": [ + "metric", + "imperial" + ] + } + }, + "required": [ + "city" + ] + } + } + } + ], + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockStart", + "payload": { + "start": { + "toolUse": { + "toolUseId": "tooluse_$REQUEST_ID", + "name": "get_weather" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "{\"city\": \"Berlin\", \"days\": 7, \"units\": \"metric\", \"notes\": \"filler filler filler filler fil" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ler filler filler filler filler filler filler filler filler filler filler filler filler fi" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "toolUse": { + "input": "ller filler filler filler filler filler filler filler filler filler filler filler filler \"}" + } + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "tool_use" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 2252 + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.02145, + "input_cost": 0.01012, + "output_cost": 0.01133, + "prompt_tokens": 1840, + "completion_tokens": 412 + } + }, + { + "name": "us.anthropic.claude-opus-5-v1:0-stream_full_usage", + "covers": "quota_management.spend_tracking.scripted_wire.logs_cost", + "model": "us.anthropic.claude-opus-5-v1:0", + "request": { + "model": "$MODEL", + "messages": [ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", + "cache_control": { + "type": "ephemeral", + "ttl": "1h" + } + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": "8ba9788e0bd5 summarize the attached material in one line and name the city weather" + } + ] + } + ], + "stream": true, + "stream_options": { + "include_usage": true + }, + "allowed_openai_params": [] + }, + "response": { + "content_type": "application/vnd.amazon.eventstream", + "events": [ + { + "event_type": "messageStart", + "payload": { + "role": "assistant" + } + }, + { + "event_type": "contentBlockDelta", + "payload": { + "delta": { + "text": "scripted answer 8ba9788e0bd5" + }, + "contentBlockIndex": 0 + } + }, + { + "event_type": "contentBlockStop", + "payload": { + "contentBlockIndex": 0 + } + }, + { + "event_type": "messageStop", + "payload": { + "stopReason": "end_turn" + } + }, + { + "event_type": "metadata", + "payload": { + "usage": { + "inputTokens": 1840, + "outputTokens": 412, + "totalTokens": 11468, + "cacheReadInputTokens": 6144, + "cacheWriteInputTokens": 3072, + "cacheDetails": [ + { + "inputTokens": 2048, + "ttl": "5m" + }, + { + "inputTokens": 1024, + "ttl": "1h" + } + ] + }, + "metrics": { + "latencyMs": 42 + } + } + } + ] + }, + "expected": { + "spend": 0.0501732, + "input_cost": 0.0388432, + "output_cost": 0.01133, + "prompt_tokens": 11056, + "completion_tokens": 412 + } + } + ] +} diff --git a/tests/integration/cost_calculation/test_cost_tracking.py b/tests/integration/cost_calculation/test_cost_tracking.py new file mode 100644 index 00000000000..a8a56fbfbbd --- /dev/null +++ b/tests/integration/cost_calculation/test_cost_tracking.py @@ -0,0 +1,101 @@ +"""Cost tracking coverage for literal integration request and response data.""" + +from __future__ import annotations + +from hashlib import sha256 +from typing import Final, cast + +import pytest + +from integration._support.client import JSON_OBJECT, Gateway +from integration.cost_calculation.conftest import ( + approx_equal, + assert_total_is_sum_of_components, + poll_cost_row, + register_scenario_deployment, +) +from integration.cost_calculation.cost_tracking_case import ( + CASES, + CostTrackingTestCase, + ExactExpected, + RecountExpected, + data_errors, +) + +if _data_errors := data_errors(): + raise ValueError("\n".join(_data_errors)) + + +_CASES: Final = tuple( + pytest.param(case, marks=pytest.mark.covers(case.covers), id=case.name) + for case in CASES +) + + +def _assert_stream_has_no_error(response_text: str) -> None: + for line in response_text.splitlines(): + if not line.startswith("data:"): + continue + payload = line.removeprefix("data:").strip() + if payload == "[DONE]": + continue + parsed = JSON_OBJECT.validate_json(payload) + assert "error" not in parsed, f"stream carried an error event: {parsed}" + + +@pytest.mark.parametrize("case", _CASES) +def test_case_bills_expected_cost(gateway: Gateway, case: CostTrackingTestCase) -> None: + marker: Final = sha256(case.name.encode()).hexdigest()[:12] + with gateway.scenario() as scenario: + key: Final = scenario.key() + model_name: Final = register_scenario_deployment(scenario, case, marker, key) + response: Final = gateway.request( + "POST", + "/v1/chat/completions", + {**case.request, "model": model_name}, + key=key, + ) + assert response.is_success, f"{case.name}: proxy returned {response.status_code}: {response.text[:400]}" + if case.response.content_type == "text/event-stream": + _assert_stream_has_no_error(response.text) + row: Final = poll_cost_row(key) + if isinstance(case.expected, RecountExpected): + assert row.prompt_tokens is not None and row.prompt_tokens > 0, ( + f"{case.name}: recount case counted no input tokens: prompt_tokens={row.prompt_tokens}" + ) + assert row.completion_tokens is not None and row.completion_tokens > 0, ( + f"{case.name}: recount case counted no output tokens: completion_tokens={row.completion_tokens}" + ) + recount: Final = row.prompt_tokens * case.expected.recount.input_cost_per_token + ( + row.completion_tokens * case.expected.recount.output_cost_per_token + ) + assert row.spend is not None and approx_equal(row.spend, recount), ( + f"{case.name}: spend {row.spend} != recount {recount} at map rates" + ) + assert_total_is_sum_of_components(row, case.name) + return + expected: Final = case.expected + assert isinstance(expected, ExactExpected) + if case.response.content_type == "application/json": + header: Final = cast(str | None, response.headers.get("x-litellm-response-cost")) + assert header is not None and approx_equal(float(header), expected.spend), ( + f"{case.name}: x-litellm-response-cost {header} != expected {expected.spend}" + ) + assert row.spend is not None and approx_equal(row.spend, expected.spend), ( + f"{case.name}: spend {row.spend} != expected {expected.spend} " + f"(breakdown {row.breakdown.model_dump()})" + ) + breakdown: Final = row.breakdown + assert breakdown.input_cost is not None and approx_equal(breakdown.input_cost, expected.input_cost), ( + f"{case.name}: input_cost {breakdown.input_cost} != expected {expected.input_cost}" + ) + assert breakdown.output_cost is not None and approx_equal(breakdown.output_cost, expected.output_cost), ( + f"{case.name}: output_cost {breakdown.output_cost} != expected {expected.output_cost}" + ) + assert row.prompt_tokens == expected.prompt_tokens, ( + f"{case.name}: prompt_tokens {row.prompt_tokens} != expected {expected.prompt_tokens}" + ) + assert row.completion_tokens == expected.completion_tokens, ( + f"{case.name}: completion_tokens {row.completion_tokens} != expected {expected.completion_tokens}" + ) + assert_total_is_sum_of_components(row, case.name) diff --git a/tests/integration/cost_calculation/test_token_pricing.py b/tests/integration/cost_calculation/test_token_pricing.py deleted file mode 100644 index cc48da2b819..00000000000 --- a/tests/integration/cost_calculation/test_token_pricing.py +++ /dev/null @@ -1,245 +0,0 @@ -"""Token pricing coverage for the integration scripted-shape cost shard.""" - -from __future__ import annotations - -import uuid -from typing import Final, cast - -import pytest -from pydantic import JsonValue - -from integration._support.client import JSON_OBJECT, Gateway -from integration._support.scripted_shapes import ScriptedUsage, Shape -from integration.cost_calculation.conftest import ( - approx_equal, - assert_total_is_sum_of_components, - poll_cost_row, - register_scenario_deployment, -) -from integration.cost_calculation.cost_matrix import ( - AUDIO_INPUT_DATA_URL, - FRONTIER_MODELS, - IMAGE_INPUT_DATA_URL, - SERVICE_TIER_REQUEST_SHAPES, - VIDEO_INPUT_DATA_URL, - Case, - FrontierModel, - cases_for, - matrix_data_errors, - recount_cost, -) - -if _data_errors := matrix_data_errors(): - raise ValueError("\n".join(_data_errors)) - -def _case_id(param: tuple[FrontierModel, Case]) -> str: - model, case = param - return f"{model.map_key.replace('/', '-')}-{case.name}" - - -_MATRIX: Final = tuple( - pytest.param( - (model, case), - marks=pytest.mark.covers( - "quota_management.spend_tracking.scripted_wire.logs_cost" - if case.family == "transport" - else "quota_management.spend_tracking.cost_matrix.logs_cost" - ), - id=_case_id((model, case)), - ) - for model in FRONTIER_MODELS - for case in cases_for(model) -) -_CACHE_SHAPES: Final = frozenset({"anthropic_messages", "bedrock_converse"}) -_WEB_SEARCH_OPTION_SHAPES: Final = frozenset({"openai_chat", "openai_responses"}) - - -def _cache_control(usage: ScriptedUsage, shape: Shape) -> dict[str, JsonValue] | None: - if shape not in _CACHE_SHAPES: - return None - if not (usage.cache_read_tokens or usage.cache_write_5m_tokens or usage.cache_write_1h_tokens): - return None - return {"type": "ephemeral", **({"ttl": "1h"} if usage.cache_write_1h_tokens else {})} - - -def _chat_body(model: FrontierModel, case: Case, model_name: str, marker: str) -> dict[str, JsonValue]: - usage: Final = case.usage_for(model.map_key) - user_parts: Final = [ - {"type": "text", "text": f"{marker} summarize the attached material in one line and name the city weather"}, - *( - [{"type": "image_url", "image_url": {"url": IMAGE_INPUT_DATA_URL, "detail": "high"}}] - if case.image_input - else [] - ), - *( - [{"type": "input_audio", "input_audio": {"data": AUDIO_INPUT_DATA_URL.split(",", 1)[1], "format": "wav"}}] - if case.audio_input - else [] - ), - *( - [{"type": "file", "file": {"file_data": VIDEO_INPUT_DATA_URL, "format": "mp4"}}] - if case.video_input - else [] - ), - ] - tools: Final[list[JsonValue]] = [ - *( - [ - { - "type": "function", - "function": { - "name": "get_weather", - "description": "Get the current weather and a short forecast for a city.", - "parameters": { - "type": "object", - "properties": { - "city": {"type": "string", "description": "City name"}, - "days": {"type": "integer", "description": "Forecast horizon in days"}, - "units": {"type": "string", "enum": ["metric", "imperial"]}, - }, - "required": ["city"], - }, - }, - } - ] - if case.tool_call - else [] - ), - *( - [{"type": "web_search_20250305", "name": "web_search", "max_uses": 5}] - if case.web_search is not None and model.shape == "anthropic_messages" - else [] - ), - *( - [{"googleSearch": {}}] - if case.web_search is not None and model.shape == "gemini_generate" - else [] - ), - *([{"googleMaps": {}}] if case.google_maps else []), - *([{"type": "file_search", "vector_store_ids": ["vs_cost_calc_fixture"]}] if case.file_search else []), - ] - cache_control: Final = _cache_control(usage, model.shape) - message: Final = { - "role": "system", - "content": [ - { - "type": "text", - "text": "You are a deterministic pricing-harness assistant. Keep answers to a single short line.", - **({"cache_control": cache_control} if cache_control else {}), - } - ], - } - return cast(dict[str, JsonValue], { - "model": model_name, - "messages": [message, {"role": "user", "content": user_parts}], - "stream": case.stream, - **({"stream_options": {"include_usage": True}} if case.stream else {}), - **( - {"service_tier": case.service_tier} - if case.service_tier is not None and model.shape in SERVICE_TIER_REQUEST_SHAPES - else {} - ), - **({"reasoning_effort": "medium"} if case.reasoning else {}), - **( - {"modalities": ["text", "audio"] if case.audio_output else ["text"]} - if case.audio_input or case.audio_output - else {} - ), - **({"audio": {"voice": "alloy", "format": "pcm16"}} if case.audio_output else {}), - **( - {"web_search_options": {"search_context_size": case.web_search}} - if case.web_search is not None and model.shape in _WEB_SEARCH_OPTION_SHAPES - else {} - ), - **({"tools": tools} if tools else {}), - **({"tool_choice": "auto"} if case.tool_call and model.shape != "bedrock_converse" else {}), - "allowed_openai_params": [ - name - for name, sent in ( - ("tool_choice", case.tool_call and model.shape != "bedrock_converse"), - ("modalities", case.audio_input or case.audio_output), - ("audio", case.audio_output), - ("web_search_options", case.web_search is not None), - ("reasoning_effort", case.reasoning), - ) - if sent - ], - }) - - -def _assert_stream_has_no_error(response_text: str) -> None: - for line in response_text.splitlines(): - if not line.startswith("data:"): - continue - payload = line.removeprefix("data:").strip() - if payload == "[DONE]": - continue - parsed = JSON_OBJECT.validate_json(payload) - assert "error" not in parsed, f"stream carried an error event: {parsed}" - - -@pytest.mark.parametrize("model_case", _MATRIX) -def test_scripted_usage_bills_at_map_rates( - gateway: Gateway, - model_case: tuple[FrontierModel, Case], -) -> None: - model, case = model_case - marker: Final = uuid.uuid4().hex[:12] - with gateway.scenario() as scenario: - key: Final = scenario.key() - model_name: Final = register_scenario_deployment(scenario, model, case, marker) - response: Final = gateway.request( - "POST", - "/v1/chat/completions", - _chat_body(model, case, model_name, marker), - key=key, - ) - assert response.is_success, ( - f"{model.map_key}/{case.name}: proxy returned {response.status_code}: {response.text[:400]}" - ) - if case.stream: - _assert_stream_has_no_error(response.text) - row: Final = poll_cost_row(key) - context: Final = f"{model.map_key}/{case.name}" - if not case.exact_spend: - assert row.prompt_tokens is not None and row.prompt_tokens > 0, ( - f"{context}: no-usage stream counted no input tokens: prompt_tokens={row.prompt_tokens}" - ) - assert row.completion_tokens is not None and row.completion_tokens > 0, ( - f"{context}: no-usage stream counted no output tokens: completion_tokens={row.completion_tokens}" - ) - if case.image_input: - assert row.prompt_tokens < 4000, ( - f"{context}: image data URL looks tokenized as text: prompt_tokens={row.prompt_tokens}" - ) - recount: Final = recount_cost(model, case, row.prompt_tokens, row.completion_tokens) - assert row.spend is not None and approx_equal( - row.spend, recount - ), f"{context}: no-usage stream spend {row.spend} != recount {recount} at map rates" - assert_total_is_sum_of_components(row, context) - return - golden: Final = case.expected_for(model) - if not case.stream: - header: Final = cast(str | None, response.headers.get("x-litellm-response-cost")) - assert header is not None and approx_equal(float(header), golden.spend), ( - f"{context}: x-litellm-response-cost {header} != golden {golden.spend}" - ) - assert row.spend is not None and approx_equal(row.spend, golden.spend), ( - f"{context}: spend {row.spend} != golden {golden.spend} " - f"(breakdown {row.breakdown.model_dump()})" - ) - breakdown: Final = row.breakdown - assert breakdown.input_cost is not None and approx_equal(breakdown.input_cost, golden.input_cost), ( - f"{context}: gross input_cost {breakdown.input_cost} != golden {golden.input_cost}; " - "cached/written tokens billed at the input rate" - ) - assert breakdown.output_cost is not None and approx_equal(breakdown.output_cost, golden.output_cost), ( - f"{context}: output_cost {breakdown.output_cost} != golden {golden.output_cost}" - ) - assert row.prompt_tokens == golden.prompt_tokens, ( - f"{context}: prompt_tokens {row.prompt_tokens} != golden {golden.prompt_tokens}" - ) - assert row.completion_tokens == golden.completion_tokens, ( - f"{context}: completion_tokens {row.completion_tokens} != golden {golden.completion_tokens}" - ) - assert_total_is_sum_of_components(row, context)