fabro/lib/components
Bryan Helmkamp 0169725b4e
fix(llm): request streaming usage on openai_compatible providers
Chat Completions only emits the trailing usage chunk when the request sets
`stream_options: {"include_usage": true}`. The openai_compatible codec never
sent it, so providers that follow the spec strictly returned no usage at all
on streamed responses. Every message came back with zero tokens, and the
catalog cost estimate multiplied those zeros into $0.

Kimi is the visible case: a run's kimi-k3 stages report 0 tokens and no
dollars, while an openrouter stage in the same run bills normally because
OpenRouter volunteers usage (and an in-band cost) without being asked.

Send the opt-in whenever we stream. Providers that already volunteer usage
accept the field and are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 16:21:00 -04:00
..
fabro-acp refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-agent Merge remote-tracking branch 'origin/main' into feat/shared-checkout-parallel 2026-07-24 06:54:32 -04:00
fabro-automation refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-checkpoint refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-dump Merge branch 'main' into feat/shared-checkout-parallel 2026-07-24 06:29:57 -04:00
fabro-environment refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-github refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-graphviz refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-hooks refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-install refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-interview refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-llm fix(llm): request streaming usage on openai_compatible providers 2026-07-24 16:21:00 -04:00
fabro-manifest refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-mcp refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-mcp-store refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-sandbox Merge branch 'main' into feat/shared-checkout-parallel 2026-07-24 06:29:57 -04:00
fabro-slack refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-store Merge remote-tracking branch 'origin/feat/backward-event-pagination' into feat/backward-event-pagination 2026-07-24 10:21:40 -04:00
fabro-tool refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-tracker refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-validate Merge branch 'main' into feat/shared-checkout-parallel 2026-07-24 06:29:57 -04:00
fabro-variable refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-workflow Merge origin/main into feat/stage-execution-identity-on-resume 2026-07-24 10:07:35 -04:00