Skip to content

Claude Sonnet 4 and Opus 4 Support for VertexAI Provider #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

king-11
Copy link

@king-11 king-11 commented Jul 14, 2025

  • Added support for Claude Sonnet 4 and Claude Opus 4 models in the VertexAI provider
  • Implemented proper VertexAI Claude authentication using the official Anthropic SDK
  • Fixed authentication failures and nil pointer panics by using vertex.WithGoogleAuth()
  • Added comprehensive test suite for VertexAI Claude models
  • Updated error handling to properly handle Google Cloud API responses
  • Implemented model routing logic to correctly handle Claude vs Gemini models

Fixes #290

Copilot AI and others added 4 commits July 14, 2025 06:19
Co-authored-by: king-11 <52061363+king-11@users.noreply.github.com>
Co-authored-by: king-11 <52061363+king-11@users.noreply.github.com>
…official SDK

Replaces manual OAuth2 implementation with the official Anthropic SDK VertexAI integration
to resolve authentication failures and nil pointer panics.

Key changes:
- Use vertex.WithGoogleAuth() for proper VertexAI authentication
- Add comprehensive test suite for VertexAI Claude models
- Fix nil pointer panic by ensuring config initialization in tests
- Update error handling to expect real Google Cloud API responses
- Add model routing logic to correctly handle Claude vs Gemini models

All 16 VertexAI tests now pass, confirming proper integration with Google Cloud
authentication and correct endpoint format for VertexAI Anthropic models.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

Add support for Claude Sonnet/Opus 4 in Vertex AI
2 participants