Add MiniMax Anthropic-compatible provider support with model facts and regional endpoints - #122
Open
octo-patch wants to merge 3 commits into
Open
octo-patch wants to merge 3 commits into
octo-patch wants to merge 3 commits into
Conversation
Introduce an optional ANTHROPIC_BASE_URL configuration (claude-base-url action input) so the findings filter ClaudeAPIClient can route calls through an Anthropic-compatible provider endpoint instead of the default Anthropic API. The provider endpoint and model identifiers are supplied via configuration, enabling use of Anthropic-compatible providers.
Register the MiniMax Anthropic-compatible provider with the MiniMax-M3 and MiniMax-M2.7 model identifiers and their per-model facts (context window, pricing, input modalities and thinking modes). Add global (api.minimax.io) and China (api.minimaxi.com) regional endpoint configuration and wire the registry into ClaudeAPIClient, FindingsFilter and the GitHub Action so requests can be routed through the provider by name and region.
Author
|
Updated MiniMax provider resolution so omitting claude-model or claude-base-url now uses MiniMax-M3 and the selected regional Anthropic endpoint for both Claude Code and findings filtering; invalid provider, model, or region values now fail fast. I ran the focused Python tests (83 passed), the remaining Python suite (218 passed with the existing CLI no-key integration assertion excluded), and Bun tests (11 passed). |
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.
Reason: Add Anthropic-compatible provider support so the findings filter can route Claude API calls through a configurable provider endpoint with provider-supplied model identifiers and per-model facts.
Changes
claudecode/providers.py) for Anthropic-compatible providers. It records the MiniMax provider with the MiniMax-M3 and MiniMax-M2.7 model identifiers and their per-model facts (context window, USD-per-million-token pricing, input modalities and thinking modes) plus global (https://api.minimax.io/anthropic) and China (https://api.minimaxi.com/anthropic) regional endpoint configuration.ClaudeAPIClientandget_claude_api_clientvia optionalproviderandregionparameters. When a provider is supplied, the Anthropic-compatible base URL is resolved from the registry for the chosen region (or the provider default region); an explicitbase_urlstill takes precedence.provider/regionthroughFindingsFilterandinitialize_findings_filter, readingCLAUDE_PROVIDERandCLAUDE_REGIONenvironment variables.claude-base-url,claude-providerandclaude-regionaction inputs inaction.ymland document them (and the MiniMax model facts and regional endpoints) in the README.Checks
python3 -m py_compileon changed modules → ok.python3 -m pytest claudecode/ -q→ 211 passed.Notes