feat: add AnthropicVertexClient for claude-* models

- @anthropic-ai/vertex-sdk: proper Anthropic Messages API on Vertex
- AnthropicVertexClient: converts OAI message format ↔ Anthropic format,
  handles tool_use blocks, retries 429/503 with backoff
- createLLM: routes anthropic/* and claude-* models through new client
- Tier B/C default: claude-sonnet-4-6 via us-east5 Vertex endpoint
- /generate endpoint: accepts region param for regional endpoint testing

Made-with: Cursor
This commit is contained in:
2026-03-07 12:54:39 -08:00
parent 9c8a08a686
commit 551fdb9e54
4 changed files with 366 additions and 13 deletions

View File

@@ -10,6 +10,8 @@
"test": "ts-node src/test.ts"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.78.0",
"@anthropic-ai/vertex-sdk": "^0.14.4",
"@google/genai": "^1.0.0",
"cors": "^2.8.5",
"express": "^4.19.2",