Skip to content

feat: add Anthropic API provider support with automatic provider dete…#13

Merged
jeancsil merged 3 commits intomainfrom
test-both-api-providers
Feb 28, 2026
Merged

feat: add Anthropic API provider support with automatic provider dete…#13
jeancsil merged 3 commits intomainfrom
test-both-api-providers

Conversation

@jeancsil
Copy link
Owner

…ction

  • Add ChatAnthropic support alongside ChatOpenAI
  • Add provider detection logic based on available API keys (ANTHROPIC_API_KEY preferred over OPENAI_API_KEY)
  • Add get_default_model() and detect_provider() functions in constants.py
  • Update .env.example to document both providers
  • Update langgraph_agent.py and simple_agent.py to use provider detection
  • Update tests to support new _create_model factory function

The framework now automatically selects Anthropic if ANTHROPIC_API_KEY is set, otherwise falls back to OpenAI when OPENAI_API_KEY is available.

…ction

- Add ChatAnthropic support alongside ChatOpenAI
- Add provider detection logic based on available API keys (ANTHROPIC_API_KEY preferred over OPENAI_API_KEY)
- Add get_default_model() and detect_provider() functions in constants.py
- Update .env.example to document both providers
- Update langgraph_agent.py and simple_agent.py to use provider detection
- Update tests to support new _create_model factory function

The framework now automatically selects Anthropic if ANTHROPIC_API_KEY is set,
otherwise falls back to OpenAI when OPENAI_API_KEY is available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@rafaelzimmermann rafaelzimmermann left a comment

Choose a reason for hiding this comment

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

❤️

jeancsil and others added 2 commits February 28, 2026 10:42
Co-authored-by: Rafael Zimmermann <engzimmermann@gmail.com>
Co-authored-by: Rafael Zimmermann <engzimmermann@gmail.com>
@jeancsil jeancsil merged commit 3146ece into main Feb 28, 2026
2 checks passed
@jeancsil jeancsil deleted the test-both-api-providers branch February 28, 2026 09:44
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.

2 participants