cloudaxe-opencode/packages/opencode
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
..
bin
script fix nix 2026-01-24 13:24:40 -05:00
src fix(provider): enable thinking for google-vertex-anthropic models 2026-01-24 23:17:02 +02:00
test fix(provider): enable thinking for google-vertex-anthropic models 2026-01-24 23:17:02 +02:00
.gitignore get rid of models.dev macro 2026-01-24 12:27:13 -05:00
AGENTS.md
bunfig.toml
Dockerfile
package.json fix: bump gitlab-ai-provider version (#10255) 2026-01-24 00:11:18 -05:00
parsers-config.ts
README.md
sst-env.d.ts
tsconfig.json

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.