Skip to content

feat: add Anthropic (Claude) provider via config - #365

Merged
sp2hari merged 1 commit into
mainfrom
feat/add-anthropic-provider
Jul 24, 2026
Merged

feat: add Anthropic (Claude) provider via config#365
sp2hari merged 1 commit into
mainfrom
feat/add-anthropic-provider

Conversation

@sp2hari

@sp2hari sp2hari commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Adds an anthropic provider block to providers.json so the pipeline can run on Claude models — no new code. It uses Anthropic's OpenAI-compatible endpoint (https://api.anthropic.com/v1), so the existing config-driven OpenAICompatibleProvider (introduced in #298) handles it, exactly like Gemini is wired via its OpenAI-compatible endpoint.

Registers claude-opus-4-8, claude-sonnet-5, and claude-haiku-4-5, keyed on ANTHROPIC_API_KEY.

Usage

export ANTHROPIC_API_KEY=sk-ant-...
DEFAULT_MODEL=claude-opus-4-8 ./venv/bin/python score.py resume/sample.pdf

Why config, not a provider class

After #298 the provider layer is fully config-driven (provider_for()OpenAICompatibleProvider); there's no ModelProvider enum or per-provider class anymore. Anthropic ships an OpenAI-compatible endpoint, so Claude access needs only a config entry.

Verified

  • providers.json is valid JSON
  • config.provider_for("claude-opus-4-8") resolves base_url, ANTHROPIC_API_KEY, and structured_output
  • MODEL_PARAMETERS["claude-opus-4-8"] returns params

Note

  • structured_output is json_object rather than json_schema — Anthropic's OpenAI-compatible layer has limited JSON-schema support, and the pipeline already cleans up JSON via extract_json_from_response. Worth confirming with one real run against a key.

Supersedes

Replaces the pre-#298 Claude-provider PRs that added bespoke provider classes / CLI-SDK integrations: #205, #224, #235, #279, #303, #330, #348.

🤖 Generated with Claude Code

Add an `anthropic` provider block to providers.json using Anthropic's
OpenAI-compatible endpoint (https://api.anthropic.com/v1). No new code is
needed — the config-driven OpenAICompatibleProvider (from #298) handles it,
the same way Gemini is wired via its OpenAI-compatible endpoint.

Registers claude-opus-4-8, claude-sonnet-5, and claude-haiku-4-5, keyed on
ANTHROPIC_API_KEY. structured_output is set to json_object (Anthropic's
OpenAI-compatible layer has limited json_schema support; the pipeline also
cleans up JSON via extract_json_from_response).

Supersedes the pre-#298 Claude-provider PRs that added bespoke provider
classes: #205, #224, #235, #279, #303, #330, #348.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant