Compare commits

...

3 Commits

Author SHA1 Message Date
Aiden Cline ea3e0d1be4 revert non-transform provider changes 2026-01-24 23:27:53 -05:00
Aiden Cline 87f0b68f5a Merge remote-tracking branch 'origin/dev' into fix/google-vertex-anthropic-thinking 2026-01-24 23:23:57 -05:00
Michael Yochpaz b110291d38 fix(provider): enable thinking for google-vertex-anthropic models
Fixes reasoning/thinking not working for Claude models on GCP Vertex AI by correcting the npm package identifier and provider options key mapping.

The issue had two root causes:
1. models.dev API returns npm: '@ai-sdk/google-vertex' for google-vertex-anthropic provider, but variant generation expects '@ai-sdk/google-vertex/anthropic' (subpath import)
2. sdkKey() function didn't map '@ai-sdk/google-vertex/anthropic' to 'anthropic' key, causing thinking options to be wrapped with wrong provider key

Changes:
- Transform npm package to '@ai-sdk/google-vertex/anthropic' for google-vertex-anthropic provider in fromModelsDevModel()
- Add '@ai-sdk/google-vertex/anthropic' case to sdkKey() to return 'anthropic' key
- Add comprehensive tests for npm transformation, variant generation, and providerOptions key mapping
2026-01-24 23:17:02 +02:00
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ export namespace ProviderTransform {
case "@ai-sdk/amazon-bedrock": case "@ai-sdk/amazon-bedrock":
return "bedrock" return "bedrock"
case "@ai-sdk/anthropic": case "@ai-sdk/anthropic":
case "@ai-sdk/google-vertex/anthropic":
return "anthropic" return "anthropic"
case "@ai-sdk/google-vertex": case "@ai-sdk/google-vertex":
case "@ai-sdk/google": case "@ai-sdk/google":