Added Antropic AI Model Support - #188
Merged
Merged
Conversation
- Introduced tests for prompt caching, token counting, server tools, and batch processing in `test_anthropic_features.py`. - Implemented provider detection, client construction, and request assembly tests in `test_anthropic_provider.py`. - Created tests for pure Anthropic request translation in `test_anthropic_request.py`. - Enhanced LLM call tests to include Anthropic model dispatching and parameter handling in `test_call_llm.py`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces native Anthropic Claude support to the codebase, making Claude models first-class citizens alongside OpenAI and Google providers. It updates documentation, installation instructions, and the core agent implementation to support Anthropic's APIs, including advanced features like server tools, prompt caching, and token counting. The changes also clarify provider selection, add new extras for Anthropic backends, and correct prior documentation that implied but did not provide native Claude support.
Major Anthropic Claude Integration
agentflow/core/graph/agent_internal/anthropic.py, including request assembly, parameter mapping, and token counting.Documentation and Installation Updates
README.md,CLAUDE.md,.github/copilot-instructions.md,CONTRIBUTING.md) to reflect native Anthropic support, new extras (anthropic,anthropic-vertex,anthropic-bedrock,all), and correct prior misleading statements about Claude support. [1] [2] [3] [4] [5] [6] [7]Provider Detection and Selection Improvements
anthropic/andclaude/model prefixes, and clarified the use of theanthropic_backendselector for different Claude backends. [1] [2]Bug Fixes and Breaking Changes
use_vertex_ai=Trueincorrectly routed Claude models to Google GenAI, and where model prefixes were not stripped before sending requests.anthropic/andclaude/prefixes now select the native Anthropic provider by default; explicit provider override is required to use OpenAI-compatible endpoints.Extras and Development Workflow
These changes make Anthropic Claude models fully supported and configurable, improve the clarity and accuracy of documentation, and ensure provider selection is robust and explicit.