Skip to content

feat(sse): discover Anthropic partner models on Vertex AI - #11279

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.50from
maci0:feat/vertex-anthropic-discovery
Aug 23, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.50from
maci0:feat/vertex-anthropic-discovery

Conversation

@maci0

@maci0 maci0 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add dynamic discovery of Anthropic/Claude models on Vertex AI via the Model Garden publisher endpoint (/v1/publishers/anthropic/models), using project-scoped URLs when a Service Account JSON credential is available
  • Add targetFormat: "claude" heuristic in getModelTargetFormat so dynamically discovered Claude models on vertex/vertex-partner are correctly routed through the Anthropic Messages translator instead of Gemini
  • Tag all static Claude model entries with targetFormat: "claude" and expand both vertex and vertex-partner registries with the current Claude model catalog

Motivation

Vertex AI model discovery only queried the Gemini Generative Language API (generativelanguage.googleapis.com/v1beta/models), so Claude models available through Vertex AI as Anthropic partner models were never discovered. The executor already handled Claude execution correctly via rawPredict, but without discovery the models didn't appear in the dashboard catalog unless manually added.

Changes

File What
src/lib/providerModels/vertexAnthropicModelsParser.ts New parser for Model Garden publisher response; handles both global and project-scoped resource name formats
src/app/api/providers/[id]/models/route.ts Best-effort Anthropic discovery after Gemini discovery (Bearer auth only); extracts project_id from SA JSON for project-scoped endpoint
open-sse/config/providerModels.ts getModelTargetFormat heuristic: claude-* on vertex/vp returns "claude" so response translation works for models not in the static list
open-sse/config/providers/registry/vertex/index.ts Expanded static Claude list with targetFormat: "claude"
open-sse/config/providers/registry/vertex/partner/index.ts Same treatment for vertex-partner

Test plan

  • Configure a Vertex AI connection with a Service Account JSON credential
  • Hit /api/providers/{vertex-id}/models and verify Claude models appear in the response alongside Gemini models
  • Send a chat completion request to a discovered Claude model through the vertex provider and verify the response translates correctly
  • Verify Express API key connections still discover Gemini models (Anthropic discovery is skipped, best-effort)
  • Verify a Claude model NOT in the static registry (e.g. a future model) gets targetFormat: "claude" via the heuristic

Vertex model discovery only queried the Gemini Generative Language API,
missing Claude and other Anthropic models entirely. This adds a second
discovery fetch to the Vertex AI Model Garden publisher endpoint
(aiplatform.googleapis.com/v1/publishers/anthropic/models) that runs
after Gemini discovery and merges results.

Key changes:
- Add vertexAnthropicModelsParser for Model Garden response format
- Add project-scoped discovery with SA JSON project_id extraction
- Add targetFormat heuristic in getModelTargetFormat for claude-* on
  vertex/vp so dynamically discovered models route through the
  Anthropic Messages translator (not Gemini)
- Tag all static Claude entries with targetFormat: "claude"
- Expand static Claude model lists in both vertex and vertex-partner
@maci0
maci0 requested a review from diegosouzapw as a code owner August 23, 2026 18:32
…ristic (#11279)

Hard Rule #8 fix-in-place: the PR shipped no automated test for the new
parser; this covers the pure units (global/project-scoped names, malformed
input, claude-* heuristic on vertex/vertex-partner). 4/4.
@diegosouzapw
diegosouzapw merged commit 29caad9 into diegosouzapw:release/v3.8.50 Aug 23, 2026
3 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…pw#11279)

Validated on the combined 8-PR board + the branch itself: vertex-anthropic-models 4/4 (new — pushed to your branch as a fix-in-place commit per Hard Rule diegosouzapw#8, covering the parser's global/project-scoped resource names, malformed-input handling, and the claude-* → targetFormat heuristic on vertex/vertex-partner), 88/88 across the board's focused suites, typecheck:core clean, gates within baseline. Anthropic partner models on Vertex AI now discover dynamically via the Model Garden publisher endpoint and route through the Claude translator even for models outside the static registry. Thank you @maci0!
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.

3 participants