Skip to content

Add MiniMax provider alias for pi and claude nodes - #36

Open
octo-patch wants to merge 2 commits into
berabuddies:masterfrom
octo-patch:octo/20260730-provider-add-recvqgvkFH1cAr
Open

Add MiniMax provider alias for pi and claude nodes#36
octo-patch wants to merge 2 commits into
berabuddies:masterfrom
octo-patch:octo/20260730-provider-add-recvqgvkFH1cAr

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Add the MiniMax provider preset for Pi and Claude nodes with global OpenAI- and Anthropic-compatible endpoints.

Changes

  • agentflow/specs.py: resolve the minimax provider alias in resolve_provider. For claude nodes it points at the MiniMax Anthropic-compatible endpoint (https://api.minimax.io/anthropic) with api_key_env=MINIMAX_API_KEY; for pi nodes it points at the OpenAI-compatible chat-completions endpoint (https://api.minimax.io/v1) with the same key env. The alias is rejected for codex nodes because MiniMax exposes chat completions, not the Responses API Codex requires. The China region (https://api.minimaxi.com) or any custom base URL can still be supplied via a full ProviderConfig.
  • docs/pipelines.md: document the new minimax shorthand under built-in provider shorthands and note the per-agent endpoint routing, the codex rejection, and the custom-endpoint escape hatch.
  • tests/test_agents.py: cover the Pi adapter materializing a scoped models.json for provider: "minimax" (baseUrl https://api.minimax.io/v1, api: openai-completions, key env MINIMAX_API_KEY, model id stripped of the minimax/ prefix) and the Claude adapter surfacing ANTHROPIC_BASE_URL=https://api.minimax.io/anthropic plus the key for the same alias.
  • tests/test_store_and_validation.py: cover pipeline validation rejecting provider: "minimax" on codex nodes.

Checks

  • python3 -m pytest tests/test_store_and_validation.py tests/test_agents.py tests/test_tuned_agents.py tests/test_inference.py -q -> 131 passed.
  • python3 -m py_compile agentflow/specs.py tests/test_agents.py tests/test_store_and_validation.py -> OK.
  • Secret scan over the diff -> no hits.

Resolve the  provider shorthand in resolve_provider: route
claude nodes to the MiniMax Anthropic-compatible endpoint and pi nodes to
the OpenAI-compatible chat-completions endpoint (materialized into a
scoped models.json). Reject the alias on codex nodes because MiniMax
exposes chat completions rather than the Responses API.
@octo-patch

Copy link
Copy Markdown
Author

Updated the MiniMax provider coverage with global and China aliases and scoped Pi declarations for MiniMax-M3 and MiniMax-M2.7. I ran pytest tests/test_agents.py tests/test_store_and_validation.py (103 passed) and python -m compileall -q agentflow.

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