Add Vertex AI routing support (#753)
* add Vertex AI routing support * include Vertex smokes in action CI
This commit is contained in:
committed by
pullfrog[bot]
parent
09344a9ec9
commit
c43ed65c3b
@@ -3,6 +3,7 @@ import {
|
||||
getModelEnvVars,
|
||||
getModelProvider,
|
||||
isBedrockAnthropicId,
|
||||
isVertexAnthropicId,
|
||||
modelAliases,
|
||||
parseModel,
|
||||
providers,
|
||||
@@ -258,6 +259,20 @@ describe("isBedrockAnthropicId", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("isVertexAnthropicId", () => {
|
||||
it("matches Claude Vertex IDs by anchored prefix", () => {
|
||||
expect(isVertexAnthropicId("claude-opus-4-1@20250805")).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects Gemini IDs", () => {
|
||||
expect(isVertexAnthropicId("gemini-2.5-pro")).toBe(false);
|
||||
});
|
||||
|
||||
it("ignores Anthropic substrings outside the prefix", () => {
|
||||
expect(isVertexAnthropicId("publishers/anthropic/models/claude-opus-4-1")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("providers registry", () => {
|
||||
it("every provider has envVars", () => {
|
||||
for (const [key, config] of Object.entries(providers)) {
|
||||
|
||||
Reference in New Issue
Block a user