Files
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
..
2025-11-13 12:22:07 -06:00
2026-01-24 13:24:40 -05:00
2026-01-24 12:27:13 -05:00
2026-01-03 20:56:47 -06:00
2025-12-29 21:43:50 -06:00
2025-12-02 18:36:15 -05:00
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.