Skip to content

feat(minimax): add China / Token Plan provider routes for minimaxi.com#4686

Open
ffaacceelee wants to merge 1 commit into
Hmbown:mainfrom
ffaacceelee:feat/minimax-anthropic-cn
Open

feat(minimax): add China / Token Plan provider routes for minimaxi.com#4686
ffaacceelee wants to merge 1 commit into
Hmbown:mainfrom
ffaacceelee:feat/minimax-anthropic-cn

Conversation

@ffaacceelee

Copy link
Copy Markdown

Add four new provider identifiers that target api.minimaxi.com (the Chinese / Token Plan sibling of api.minimax.io):

  • minimax-cn (OpenAI Chat Completions on api.minimaxi.com/v1)
  • minimax-anthropic-cn (Anthropic Messages on api.minimaxi.com/anthropic)

The Anthropic-compatible variant is what Token Plan subscribers use, since config.example.toml already mentions api.minimaxi.com/anthropic in passing but no provider route actually pointed there.

Both providers share the same [providers.minimax] runtime config when keys land in the defaults (parallel to how SiliconflowCN reuses Siliconflow's fields), so no new env-vars are introduced; MINIMAX_API_KEY continues to cover pay-as-you-go and Token Plan keys.

Note: this is a partial plumbing change. Additional non-exhaustive match arms in crates/tui/src/config.rs and elsewhere may still need CN variants added to make cargo check green; follow-up patch welcome.

Summary

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features
  • cargo test --workspace --all-features

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes
  • Harvested/co-authored credit uses a GitHub numeric noreply address

Add four new provider identifiers that target api.minimaxi.com (the Chinese /
Token Plan sibling of api.minimax.io):

  - minimax-cn                   (OpenAI Chat Completions on api.minimaxi.com/v1)
  - minimax-anthropic-cn         (Anthropic Messages on api.minimaxi.com/anthropic)

The Anthropic-compatible variant is what Token Plan subscribers use, since
config.example.toml already mentions api.minimaxi.com/anthropic in passing
but no provider route actually pointed there.

Both providers share the same [providers.minimax] runtime config when keys
land in the defaults (parallel to how SiliconflowCN reuses Siliconflow's
fields), so no new env-vars are introduced; MINIMAX_API_KEY continues to
cover pay-as-you-go and Token Plan keys.

Note: this is a partial plumbing change. Additional non-exhaustive match
arms in crates/tui/src/config.rs and elsewhere may still need CN variants
added to make cargo check green; follow-up patch welcome.
@ffaacceelee
ffaacceelee requested a review from Hmbown as a code owner July 22, 2026 16:03
@github-actions

Copy link
Copy Markdown
Contributor

Thanks @ffaacceelee for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

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