docs: sync schemas and specs with source changes#6014
Conversation
Add reasoning_tokens property to schemas/token-usage.schema.json. Triggered by commit 58f77fd (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>
|
@copilot merge main |
This branch is already up to date with |
There was a problem hiding this comment.
Pull request overview
Updates the token-usage JSON schema so it accurately reflects fields that the api-proxy already emits, specifically documenting reasoning_tokens in token-usage.jsonl records.
Changes:
- Add
reasoning_tokenstoschemas/token-usage.schema.jsonwith non-negative integer constraints and a clarifying description.
Show a summary per file
| File | Description |
|---|---|
| schemas/token-usage.schema.json | Documents the reasoning_tokens field in the token usage schema to match actual normalized usage output (including Gemini’s thoughtsTokenCount). |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
|
✅ Copilot review passed with no inline comments. @github-actions[bot] Add the |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 98.92% | 98.92% | ➡️ +0.00% |
| Statements | 98.87% | 98.87% | ➡️ +0.00% |
| Functions | 99.44% | 99.44% | ➡️ +0.00% |
| Branches | 95.39% | 95.35% | 📉 -0.04% |
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test completed. File writing and bash tool tests passed. Connectivity and GitHub MCP tests failed. |
|
✅ Build Test Suite completed successfully! |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🚀 Security Guard has started processing this pull request |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Claude passed |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed... |
|
✅ Contribution Check completed successfully! PR #6014 follows the applicable CONTRIBUTING.md guidelines; no contribution-guidelines comment needed. |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
Smoke Test: Claude Engine Validation
Overall Result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL — Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Gemini Engine Validation
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
Smoke Test: Copilot BYOK (Direct) Mode✅ GitHub.com connectivity (HTTP 200) Status: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Copilot PAT Auth — PASS ✅
Overall: PASS | Auth mode: PAT (COPILOT_GITHUB_TOKEN) Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🔬 Smoke Test Results
Overall: FAIL — workflow pre-step outputs (
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Chroot Version Comparison Results
Result: Not all tests passed — Python and Node.js versions differ between host and chroot environments. Go matches. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios pass. ✅ Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Summary
Adds
reasoning_tokenstoschemas/token-usage.schema.json.Triggered by
Commit
58f77fd— fix: add Gemini usageMetadata support to token parsers (#6008)What changed
token-parsers.jsintroducedbuildGeminiUsage(), which maps Gemini'susageMetadata.thoughtsTokenCount→reasoning_tokensin the normalized usage object. ThenormalizeUsage()function already always emittedreasoning_tokens(from OpenAI o-series / Anthropic thinking blocks). However, thereasoning_tokensfield was absent fromschemas/token-usage.schema.json, so the schema did not document a field that is actively written to everytoken-usage.jsonlrecord.Change made
Added
reasoning_tokensproperty toschemas/token-usage.schema.json:No changes needed
docs/awf-config.schema.json—src/cli.tsandsrc/config-file.tschanges are file refactors with no new CLI flags or config fields.schemas/audit.schema.json—src/squid-config.tsandsrc/logs/log-parser.tschanges are facade re-exports, no new log fields.schemas/README.md— schema structure unchanged.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.