Skip to content

feat: Add vertex-anthropic provider to support Claude models on Google Vertex AI #1648

@dklanac

Description

@dklanac

The vertex provider currently only uses createVertex from @ai-sdk/google-vertex, which routes all requests through Google's publishers/google/models/...generateContent endpoint. This means specifying a Claude model (e.g., claude-sonnet-4-6) with provider: "vertex" fails because Claude models aren't served at that path. They require the publishers/anthropic endpoint.

The underlying SDK already ships with Anthropic support via @ai-sdk/google-vertex/anthropic (which exports createVertexAnthropic), but Task Master never imports or wires it up.

Expected behavior: Users with Google Cloud credentials should be able to use Claude models through Vertex AI, either via a new provider name (e.g., vertex-anthropic) or by auto-detecting Claude model IDs in the existing vertex provider and routing them through createVertexAnthropic.

Current behavior: Setting provider: "vertex" with modelId: "claude-sonnet-4-6" produces an API error because the request is sent to publishers/google/models/claude-sonnet-4-6@default:generateContent instead of the Anthropic endpoint.

Environment:

  • Task Master v0.43.0
  • @ai-sdk/google-vertex v3.0.113 (includes ./anthropic subpath export)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions