Skip to content

Comments

feat: support VertexAIAnthropic Provider#776

Merged
njbrake merged 3 commits intomainfrom
vertexanthro
Jan 28, 2026
Merged

feat: support VertexAIAnthropic Provider#776
njbrake merged 3 commits intomainfrom
vertexanthro

Conversation

@njbrake
Copy link
Contributor

@njbrake njbrake commented Jan 27, 2026

Description

Vertex AI now supports Anthropic (just like Azure support OpenAI). Lets add that provider.

I have not actually tested the integration because I don't have a VertexAI -> Claude account. However, it does pass the type checks and lines up with the docs so I feel pretty confident that this implementation is good enough to merge and have people start using.

PR Type

  • 🆕 New Feature
  • 🐛 Bug Fix
  • 💅 Refactor
  • 📚 Documentation
  • 🚦 Infrastructure

Relevant issues

Checklist

  • I understand the code I am submitting.
  • I have added unit tests that prove my fix/feature works
  • I have run this code locally and verified it fixes the issue.
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines
  • AI Usage:
    • No AI was used.
    • AI was used for drafting/refactoring.
    • This is fully AI-generated.

AI Usage Information

  • AI Model used: Opus 4.5
  • AI Developer Tool used: Claude Code
  • Any other info you'd like to share: Opus overcomplicated things a bit at the beginning, so I did some manual cleaning to simplify it.

When answering questions by the reviewer, please respond yourself, do not copy/paste the reviewer comments into an AI system and paste back its answer. We want to discuss with you, not your AI :)

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 91.11111% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/any_llm/providers/anthropic/base.py 89.65% 6 Missing ⚠️
...m/providers/vertexaianthropic/vertexaianthropic.py 92.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/any_llm/constants.py 100.00% <100.00%> (ø)
src/any_llm/providers/anthropic/__init__.py 100.00% <100.00%> (ø)
src/any_llm/providers/anthropic/anthropic.py 100.00% <100.00%> (+6.55%) ⬆️
...rc/any_llm/providers/vertexaianthropic/__init__.py 100.00% <100.00%> (ø)
...m/providers/vertexaianthropic/vertexaianthropic.py 92.00% <92.00%> (ø)
src/any_llm/providers/anthropic/base.py 89.65% <89.65%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactor is inline with the ethos of what we do with BaseOpenAI and GoogleProvider

@njbrake njbrake requested a review from daavoo January 27, 2026 21:27
@njbrake
Copy link
Contributor Author

njbrake commented Jan 27, 2026

Integration tests (VertexAIAnthropic doesn't actually run with them because we don't have the Claude connection)

https://github.com/mozilla-ai/any-llm/actions/runs/21418636514

@njbrake njbrake linked an issue Jan 27, 2026 that may be closed by this pull request
Copy link
Contributor

@daavoo daavoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look reasonable to me.

Would be great to be able to test it via integration tests

@njbrake njbrake merged commit 7a3c52e into main Jan 28, 2026
14 of 15 checks passed
@njbrake njbrake deleted the vertexanthro branch January 28, 2026 12:53
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.

[Question] why vertexai has not claude

2 participants