Skip to content

Commit

Permalink
simplify per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
shaper committed Jan 6, 2025
1 parent fbdfbba commit 48bb7db
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions examples/ai-core/src/e2e/google-vertex-anthropic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,15 @@ type AnthropicProviderMetadata = {
};
};

const EXPECTED_CLAUDE_LOCATION = 'us-east5';

describe.each(Object.values(RUNTIME_VARIANTS))(
'Vertex Anthropic E2E Tests - $name',
({ createVertexAnthropic, vertexAnthropic }) => {
vi.setConfig({ testTimeout: LONG_TEST_MILLIS });

const location = process.env.GOOGLE_VERTEX_LOCATION;
if (location !== EXPECTED_CLAUDE_LOCATION) {
console.warn(
`⚠️ Warning: Check your vertex location settings -- Anthropic models are typically only available in '${EXPECTED_CLAUDE_LOCATION}' (found: '${location}')`,
);
}

const provider = createVertexAnthropic({
project: process.env.GOOGLE_VERTEX_PROJECT!,
location: process.env.GOOGLE_VERTEX_LOCATION ?? EXPECTED_CLAUDE_LOCATION,
// Anthropic models are typically only available in us-east5 region.
location: process.env.GOOGLE_VERTEX_LOCATION ?? 'us-east5',
});

describe.each(MODEL_VARIANTS.chat)('Chat Model: %s', modelId => {
Expand Down

0 comments on commit 48bb7db

Please sign in to comment.