Repository navigation
feat: Add Vertex AI Claude Proxy (Express.js) - #10678
zaherweb-2 wants to merge 1 commit into
Conversation
- Add vertex-ai-proxy/ directory with Express.js proxy server - Supports both OpenAI (/v1/chat/completions) and Anthropic (/v1/messages) formats - Uses google-auth-library for GCP authentication (no SDK conflicts) - Full streaming support with SSE - Image and file processing support - Automatic token refresh Models supported: - Claude 4.x: sonnet-4-5, sonnet-4, opus-4, opus-4-5, opus-4-1, haiku-4-5 - Claude 3.x: 3-7-sonnet, 3-5-sonnet-v2, 3-5-haiku, 3-opus, 3-haiku NPM scripts added: - backend:dev now starts both API and proxy concurrently - backend:dev:no-proxy for API only - vertex-proxy, vertex-proxy:install, vertex-proxy:dev Closes #XXXX
|
There’s another PR open, how does it compare? #9798 |
Hello @danny-avila, I took a look at the other open PR (#9798). I think Ziyann did a great job overall, and the direction makes sense. That said, his implementation relies on the Anthropic + LangChain SDKs. While they do support calling Vertex AI models, in practice it can introduce dependency complexity and versioning issues—especially when multiple providers and streaming transports are involved. The main concerns I ran into were:
This was also mentioned in Ziyann’s PR, for example:
The problem with this kind of workaround is that it forces specific versions to be pinned, and it won’t always remain stable across environments (or as new releases land). It can also make debugging and upgrades harder for maintainers and users since the failure mode often shows up as runtime or build-time incompatibilities. My implementation takes a different approach:
In short: Ziyann’s PR is great if we’re comfortable accepting the SDK dependency surface area. My approach is more “thin adapter / minimal deps”: it keeps the integration small, predictable, and easier to maintain long-term, while still matching the APIs and streaming behavior expected by clients. |
|
Hello @danny-avila, |
|
@zaherweb-2 - Just curious, This proxy based approach is similar to litellm - Shouldn't this be in a different repo? |
Models supported:
NPM scripts added:
Closes #XXXX
Hint