Skip to content

Add Anthropic Claude provider support#279

Open
SajbenDani wants to merge 3 commits into
interviewstreet:mainfrom
SajbenDani:add-anthropic-claude-provider
Open

Add Anthropic Claude provider support#279
SajbenDani wants to merge 3 commits into
interviewstreet:mainfrom
SajbenDani:add-anthropic-claude-provider

Conversation

@SajbenDani

Copy link
Copy Markdown

Summary

Adds Anthropic Claude as a supported LLM provider alongside Ollama and Gemini.

Changes

  • Adds an Anthropic provider implementation using the Messages API.
  • Maps modern Claude model IDs for Sonnet, Opus, and Haiku.
  • Adds ANTHROPIC_API_KEY configuration.
  • Updates setup documentation and requirements.

Testing

  • Ran Python compile checks for provider/config files.
  • Verified whitespace with git diff --check.

Copilot AI review requested due to automatic review settings June 25, 2026 18:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Anthropic Claude as an additional LLM backend, extending the existing provider abstraction (Ollama + Gemini) with a new provider implementation, configuration, and documentation updates.

Changes:

  • Add AnthropicProvider (Claude Messages API) and wire it into provider initialization.
  • Add Claude model IDs to model-parameter defaults and model→provider mapping, plus ANTHROPIC_API_KEY.
  • Update setup docs and .env.example; add anthropic dependency.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
requirements.txt Adds the anthropic SDK dependency.
README.md Documents Claude support, configuration variables, and example model IDs.
prompt.py Adds Claude model parameter defaults, provider mapping, and ANTHROPIC_API_KEY env read.
models.py Implements AnthropicProvider using the Messages API and tool-based JSON return.
llm_utils.py Adds Anthropic provider initialization based on selected model/provider.
.env.example Adds ANTHROPIC_API_KEY and updates LLM_PROVIDER options/docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread models.py
Comment thread llm_utils.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comment thread llm_utils.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comment thread llm_utils.py
Comment on lines +54 to +58
if "LLM_PROVIDER" in os.environ:
model_provider = ModelProvider(PROVIDER)
else:
model_provider = MODEL_PROVIDER_MAPPING.get(model_name, ModelProvider.OLLAMA)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants