continue-custom/packages
continue[bot] df143e7f27 fix(openai-adapters): Use stream.usage Promise exclusively for usage tokens
The Vercel AI SDK's fullStream finish event contains preliminary/incomplete
usage data (often zeros). The authoritative usage is ONLY available via the
stream.usage Promise which resolves after the stream completes.

Changes:
- convertVercelStream: Skip finish event entirely (return null)
- OpenAI.ts: Always await stream.usage after consuming fullStream
- Anthropic.ts: Same approach with cache token support
- Tests: Updated to reflect that finish event doesn't emit usage

This is the correct architecture per Vercel AI SDK design:
- fullStream: Stream events (text, tools, etc) - finish has no reliable usage
- stream.usage: Promise that resolves with complete usage after stream ends

Co-authored-by: nate <nate@continue.dev>
Generated with [Continue](https://continue.dev)
2025-12-10 19:54:10 +00:00
..
config-types fix: upgrade zod from 3.24.2 to 3.25.76 2025-11-04 07:18:35 +00:00
config-yaml merge main 2025-12-02 12:25:02 -08:00
continue-sdk fix: packages/continue-sdk/python/api/requirements.txt to reduce vulnerabilities 2025-12-08 08:04:54 +00:00
fetch feat: simplify onboarding 2025-12-03 16:21:28 -08:00
hub chore: config yaml 36, fetch 6 (#8906) 2025-12-01 11:27:26 -08:00
llm-info merge main 2025-12-02 12:25:02 -08:00
openai-adapters fix(openai-adapters): Use stream.usage Promise exclusively for usage tokens 2025-12-10 19:54:10 +00:00
terminal-security style: run prettier on terminal security code 2025-10-30 00:56:55 +00:00
shared-release.config.js fix prettier 2025-07-18 19:20:13 +02:00