Skip to content

Add MiniMax provider - #76

Merged
stefyi-4355 merged 8 commits into
ifixai-ai:mainfrom
octo-patch:octo/20260801-provider-add-recvqkTIK9u946
Aug 12, 2026
Merged

stefyi-4355 merged 8 commits into
ifixai-ai:mainfrom
octo-patch:octo/20260801-provider-add-recvqkTIK9u946

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Reason: MiniMax is not available as a first-class provider with dedicated credentials, regional endpoints, and current model metadata.

Changes

  • Add a dedicated MiniMax HTTP provider with both supported API styles and global/China endpoint presets.
  • Register MiniMax credentials, setup choices, default models, context, pricing, modalities, and thinking metadata.
  • Add subscription-key redaction and focused provider tests.

Checks

  • .venv/bin/python -m pytest -q (12 passed)
  • .venv/bin/ruff check ifixai test_minimax_provider.py
  • .venv/bin/ruff format --check ifixai/providers/minimax.py test_minimax_provider.py
  • .venv/bin/mypy --follow-imports=skip ifixai/providers/minimax.py ifixai/cli/model_catalog.py
  • .venv/bin/bandit -r ifixai -ll
  • .venv/bin/ifixai validate plus every example fixture
  • .venv/bin/mypy ifixai remains non-clean at the repository level (223 errors across 63 files); the changed modules pass the targeted typecheck above.

@stefyi-4355 stefyi-4355 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things I'd like sorted before this goes in.

First, the secret scrubbing only covers part of the surface. sk-cp- is the Coding Plan prefix, but standard platform keys are JWTs and don't match any of the patterns, which means looks_like_secret returns False and a key could end up written into a scorecard. Can you confirm which key shapes MiniMax actually issues and add the missing pattern?

Second, the M3 pricing in minimax.py is the wrong tier. MiniMax charges 0.30/1.20/0.06 up to 512k and 0.60/2.40/0.12 above it, but only the higher tier is hardcoded, so setup shows people double the real price for normal prompts.

A few smaller things for afterwards: coverage is at 62% with send_message and the whole error-mapping path untested; there's no anthropic-version header on the Messages path, which is worth a live smoke test since this is our first hand-rolled client; the judge tiebreaker and provider table in docs/testing-your-agent.md weren't updated; and the try/except ImportError in resolver.py can never fire because model_catalog and setup_cmd import the module unconditionally anyway.

@octo-patch

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I added JWT key detection and redaction, represented both MiniMax-M3 pricing tiers in setup, added the Messages compatibility header, updated the judge and provider docs, simplified the resolver import, and expanded request and error-path tests. I ran the full test suite (25 passed), focused MiniMax coverage (91%), ruff, mypy, bandit, and fixture validation.

@stefyi-4355
stefyi-4355 self-requested a review August 12, 2026 17:14

@stefyi-4355 stefyi-4355 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@stefyi-4355
stefyi-4355 merged commit cc85092 into ifixai-ai:main Aug 12, 2026
3 checks 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.

3 participants