TanStack
OSS
ai
Sign in / Sign up
Open main menu
ai
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
fix/structured-output-finalization-usage
11cabddd fix(ai): report finalization-call usage on synthesized RUN_FINISHED Adapters without a native `structuredOutputStream` (Anthropic, Gemini, Ollama, OpenRouter) ran agentic structured output through the legacy finalization round-trip, and that extra call's token usage never reached the chat middleware `onUsage` hook — any cost-tracking middleware silently under-counted by exactly one call per request. Adapters now return `usage` from `structuredOutput()`, and `fallbackStructuredOutputStream` forwards it onto the synthesized RUN_FINISHED event. `StructuredOutputResult` gains an optional `usage` field; adapters that can't report it leave it undefined, which the engine treats as "no usage to report" — same as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Failed
fix/structured-output-finalization-usage
11cabddd Merge 554d31e9d201a8cf6474dd4dc43a88b9f41b4ae5 into ad23da92c279759b3778672dcee3d1616a02994b
by Tom Beckenham
T
Previous page
Previous
Next
Next page