From c64759915f225e8650c8318ff923fa1c5cab81b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 05:35:02 +0000 Subject: [PATCH] docs: sync schemas and specs with source changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add reasoning_tokens property to schemas/token-usage.schema.json. Triggered by commit 58f77fde (fix: add Gemini usageMetadata support to token parsers). The buildGeminiUsage() function maps Gemini's thoughtsTokenCount → reasoning_tokens in the normalized usage object, and normalizeUsage() always emits reasoning_tokens. The field was actively written to token-usage.jsonl but missing from the JSON Schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- schemas/token-usage.schema.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/schemas/token-usage.schema.json b/schemas/token-usage.schema.json index 8996e6b27..ea66b0f03 100644 --- a/schemas/token-usage.schema.json +++ b/schemas/token-usage.schema.json @@ -206,6 +206,11 @@ "type": "number", "exclusiveMinimum": 0, "description": "Per-model cost multiplier applied to the effective token calculation for this request. Present only when apiProxy.maxEffectiveTokens is configured." + }, + "reasoning_tokens": { + "type": "integer", + "minimum": 0, + "description": "Number of reasoning/thinking tokens consumed (e.g. OpenAI o-series completion_tokens_details.reasoning_tokens, Anthropic thinking blocks, or Gemini thoughtsTokenCount). Zero when the model does not emit reasoning tokens." } } }