Skip to content

Conversation

@caozhiyuan
Copy link

@caozhiyuan caozhiyuan commented Jan 10, 2026

What does this PR do?

fix #7481

How did you verify your code works?

run bun dev . and input prompt
2bd30c6b-b405-4f22-b474-18b0ccab7b21

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@caozhiyuan
Copy link
Author

caozhiyuan commented Jan 10, 2026

@hank9999
Copy link

hank9999 commented Jan 12, 2026

Hi, my fixes to ai-sdk/anthropic has been merged, only need to update it to 3.0.10, it will be fix. I will do update pr asap

@caozhiyuan
Copy link
Author

@hank9999 Upgrading from v2 to v3 seems to be a breaking change

@hank9999
Copy link

@hank9999 Upgrading from v2 to v3 seems to be a breaking change

maybe, but i have seen v3 sdk in project.

"@ai-sdk/google-vertex": "3.0.97",

"@ai-sdk/amazon-bedrock": "3.0.73",

I think it's not too hard to do update.

@caozhiyuan
Copy link
Author

@hank9999 I noticed that the data structure of ai sdk usage has changed between v2 and v3 versions; I'll need to review the related code when I have time. Or you could take a look and help submit a PR, much appreciated

https://github.com/vercel/ai/blob/main/packages/provider/src/language-model/v2/language-model-v2-usage.ts#L7

https://github.com/vercel/ai/blob/main/packages/provider/src/language-model/v3/language-model-v3-usage.ts

@hank9999
Copy link

@caozhiyuan Hi, I find a sad fact, there were a version number mass in ai-sdk. Actually, all packages in project are V2, although the version number is 3.0, such as ai-sdk/[email protected], it's V2!

@hank9999
Copy link

This PR is the best solution in this case. ):

@caozhiyuan
Copy link
Author

@rekram1-node can help review and merge it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom @ai-sdk/anthropic provider , context token usage display error

2 participants