feat: add Anthropic (Claude) provider via config - #365
Merged
Conversation
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>
This was referenced Jul 24, 2026
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.
Summary
Adds an
anthropicprovider block toproviders.jsonso 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-drivenOpenAICompatibleProvider(introduced in #298) handles it, exactly like Gemini is wired via its OpenAI-compatible endpoint.Registers
claude-opus-4-8,claude-sonnet-5, andclaude-haiku-4-5, keyed onANTHROPIC_API_KEY.Usage
export ANTHROPIC_API_KEY=sk-ant-... DEFAULT_MODEL=claude-opus-4-8 ./venv/bin/python score.py resume/sample.pdfWhy config, not a provider class
After #298 the provider layer is fully config-driven (
provider_for()→OpenAICompatibleProvider); there's noModelProviderenum or per-provider class anymore. Anthropic ships an OpenAI-compatible endpoint, so Claude access needs only a config entry.Verified
providers.jsonis valid JSONconfig.provider_for("claude-opus-4-8")resolvesbase_url,ANTHROPIC_API_KEY, andstructured_outputMODEL_PARAMETERS["claude-opus-4-8"]returns paramsNote
structured_outputisjson_objectrather thanjson_schema— Anthropic's OpenAI-compatible layer has limited JSON-schema support, and the pipeline already cleans up JSON viaextract_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