Skip to content

fix(opencode): clarify vertex anthropic authentication#29670

Open
rekram1-node wants to merge 1 commit into
devfrom
fix/google-vertex-anthropic-auth-message
Open

fix(opencode): clarify vertex anthropic authentication#29670
rekram1-node wants to merge 1 commit into
devfrom
fix/google-vertex-anthropic-auth-message

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

Summary

  • show a note in the Google Vertex API-key connection flow that Anthropic models require Google Cloud credentials
  • convert missing Google credentials from the Vertex Anthropic SDK path into an actionable provider auth error
  • carry resolved model context into session error formatting so the guidance applies only to @ai-sdk/google-vertex/anthropic, not other Vertex models

Context

Google Vertex exposes multiple model integrations under the same provider. API-key connections work for supported Vertex API-key model paths, while OpenCode routes Anthropic models through @ai-sdk/google-vertex/anthropic, whose AI SDK auth path uses Google Cloud credentials. Previously a user could connect Google Vertex with an API key, select a Claude model, and see only Could not load the default credentials.

The connection notice says:

Note: this API key cannot be used with Anthropic models.
Use `gcloud auth application-default login` or set `GOOGLE_APPLICATION_CREDENTIALS`.

Validation

  • bun install --frozen-lockfile --ignore-scripts
  • packages/opencode: bun typecheck
  • packages/opencode: bun test "test/session/message-v2.test.ts" "test/cli/cmd/tui/provider-options.test.ts" (42 pass)

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.

1 participant