- 
                Notifications
    You must be signed in to change notification settings 
- Fork 30
fix: Support previous v4 of Vercel AI SDK #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fix: Fix metric tracking for v5 responses
| @launchdarkly/browser size report | 
| @launchdarkly/js-sdk-common size report | 
| @launchdarkly/js-client-sdk size report | 
| @launchdarkly/js-client-sdk-common size report | 
| The build issues should be solved by #963 and once it is merged I will update this branch. | 
🤖 I have created a release *beep* *boop* --- <details><summary>server-sdk-ai: 0.12.2</summary> ## [0.12.2](server-sdk-ai-v0.12.1...server-sdk-ai-v0.12.2) (2025-10-16) ### Bug Fixes * Reduce dependencies and use peer dependencies when needed ([#963](#963)) ([7f3da30](7f3da30)) </details> <details><summary>server-sdk-ai-langchain: 0.1.2</summary> ## [0.1.2](server-sdk-ai-langchain-v0.1.1...server-sdk-ai-langchain-v0.1.2) (2025-10-16) ### Bug Fixes * Reduce dependencies and use peer dependencies when needed ([#963](#963)) ([7f3da30](7f3da30)) </details> <details><summary>server-sdk-ai-openai: 0.1.1</summary> ## [0.1.1](server-sdk-ai-openai-v0.1.0...server-sdk-ai-openai-v0.1.1) (2025-10-16) ### Bug Fixes * Reduce dependencies and use peer dependencies when needed ([#963](#963)) ([7f3da30](7f3da30)) </details> <details><summary>server-sdk-ai-vercel: 0.1.1</summary> ## [0.1.1](server-sdk-ai-vercel-v0.1.0...server-sdk-ai-vercel-v0.1.1) (2025-10-16) ### Bug Fixes * Fix metric tracking for v5 responses ([e6c42a8](e6c42a8)) * Reduce dependencies and use peer dependencies when needed ([#963](#963)) ([7f3da30](7f3da30)) * Support previous v4 of Vercel AI SDK ([#962](#962)) ([e6c42a8](e6c42a8)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is generating a summary for commit ffe7807. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fix: Fix metric tracking for v5 responses
Note
Add v5 token usage mapping (inputTokens/outputTokens with precedence) and switch to
LanguageModelAPI; remove@ai-sdk/providerdependency.createAIMetricsnow supports v5 fieldsinputTokens/outputTokens(prefers them over v4promptTokens/completionTokens), withtotalTokensand null-safe defaults.LanguageModelV2withLanguageModel; updategenerateTextusage and getters accordingly; clean up dynamic imports (removeas any).@ai-sdk/providerfrom dev and peer dependencies.Written by Cursor Bugbot for commit d94bbb7. This will update automatically on new commits. Configure here.