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 fix: windows install (#4293) 2025-11-13 12:22:07 -06:00
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 docs: update AGENTS.md (#6800) 2026-01-03 20:56:47 -06:00
bunfig.toml feat: add variants toggle (#6325) 2025-12-29 21:43:50 -06:00
Dockerfile add ARM64 Docker image support (#5483) 2025-12-13 13:01:59 -06:00
package.json fix: bump gitlab-ai-provider version (#10255) 2026-01-24 00:11:18 -05:00
parsers-config.ts feat(highlight): add nix syntax highlighting (#6386) 2025-12-29 15:53:41 -06:00
README.md sync 2025-05-30 20:48:36 -04:00
sst-env.d.ts wip: zen 2025-12-02 18:36:15 -05:00
tsconfig.json try tsgo 2025-10-14 18:30:32 -04:00

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.