TanStackOSS
    ai
    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>
    nx run-many --targets=build --exclude=examples/**,testing/**
Succeeded
CI Pipeline Execution
Linux
4 CPU cores
11cabddd640
6%

Cache hits

2 of 31 tasks used cache.

Get faster results

Learn how to enable distribution.

Atomizer enabled

31 groups of tasks optimized.

© 2026 - Nx Cloud

Terms of ServicePrivacy PolicyChangelogStatusDocsContact Nx CloudPricingCompany@NxDevTools