feat: Add support for Anthropic API - #2
Conversation
This commit introduces support for the Anthropic API, specifically for the `claude-sonnet-4-20250514` model with a 1M context window. The changes include: - Adding `anthropic` to the list of dependencies in `requirements.txt`. - Updating `main.py` to integrate Anthropic as a new AI provider alongside Gemini and OpenAI. - Adding configuration for the `ANTHROPIC_API_KEY`. - Implementing the `_enhance_with_anthropic` function to handle API calls to Anthropic, including the necessary `betas` parameter for the 1M context model. - Updating model selection logic, error handling, and help text to include the new provider.
|
Claude finished @ProCreations-Official's task —— View job PR Review: Add Anthropic API SupportI've completed a thorough review of this PR. Overall, the implementation is well-structured and follows the existing patterns, but there are several important issues that should be addressed. Todo List:
🔍 Code Review Findings✅ Positive Aspects
|
This commit introduces support for the Anthropic API, specifically for the
claude-sonnet-4-20250514model with a 1M context window.The changes include:
anthropicto the list of dependencies inrequirements.txt.main.pyto integrate Anthropic as a new AI provider alongside Gemini and OpenAI.ANTHROPIC_API_KEY._enhance_with_anthropicfunction to handle API calls to Anthropic, including the necessarybetasparameter for the 1M context model.