Skip to content

Add MiniMax Anthropic-compatible provider support with model facts and regional endpoints - #122

Open
octo-patch wants to merge 3 commits into
anthropics:mainfrom
octo-patch:octo/20260728-provider-add-recvppb1B6EUVc
Open

octo-patch wants to merge 3 commits into
anthropics:mainfrom
octo-patch:octo/20260728-provider-add-recvppb1B6EUVc

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 28, 2026 •

Copy link
Copy Markdown

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

  • Add a provider registry (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.
  • Wire the registry into ClaudeAPIClient and get_claude_api_client via optional provider and region parameters. 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 explicit base_url still takes precedence.
  • Thread provider/region through FindingsFilter and initialize_findings_filter, reading CLAUDE_PROVIDER and CLAUDE_REGION environment variables.
  • Add claude-base-url, claude-provider and claude-region action inputs in action.yml and document them (and the MiniMax model facts and regional endpoints) in the README.

Checks

  • python3 -m py_compile on changed modules → ok.
  • python3 -m pytest claudecode/ -q → 211 passed.

Notes

  • The provider endpoint, regional endpoints and model identifiers/facts come from the provider configuration and the provider registry; no other provider values are hardcoded in product code. Tests exercise the regional endpoints and model facts to verify they are exposed correctly.

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.
@octo-patch octo-patch changed the title Add Anthropic-compatible provider base URL support Add MiniMax Anthropic-compatible provider support with model facts and regional endpoints Jul 28, 2026
@octo-patch

Copy link
Copy Markdown
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).

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.

1 participant