Skip to content

feat(inference): add MiniMax provider - #6761

Closed
octo-patch wants to merge 3 commits into
NVIDIA:mainfrom
octo-patch:octo/20260713-minimax-provider-compliant-recvoNmbfQOgyd
Closed

feat(inference): add MiniMax provider#6761
octo-patch wants to merge 3 commits into
NVIDIA:mainfrom
octo-patch:octo/20260713-minimax-provider-compliant-recvoNmbfQOgyd

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • Add MiniMax as a first-class hosted inference option with curated MiniMax-M3 and MiniMax-M2.7 choices.
  • Configure credential handling, managed request routing, known context windows, and image-input capability detection.
  • Keep installer values, provider menus, model selection, and inference switching aligned.

Testing

  • npx vitest run --project cli src/lib/domain/installer/provider.test.ts src/lib/inference/config.test.ts src/lib/inference/context-window.test.ts src/lib/inference/model-prompts.test.ts src/lib/onboard/provider-menu.test.ts src/lib/onboard/providers.test.ts src/lib/onboard/setup-nim-flow.test.ts src/lib/validation.test.ts
  • npx vitest run --project package-contract test/package-contract/onboard/compatible-endpoint-reasoning.test.ts
  • npm run build:cli
  • npm run typecheck:cli
  • npm run check:installer-hash
  • npm run check:diff

Signed-off-by: octo-patch 266937838+octo-patch@users.noreply.github.com

Summary by CodeRabbit

  • New Features
    • Added MiniMax as a supported inference provider.
    • Added MiniMax model selection, default models, endpoint configuration, and onboarding menu support.
    • Added support for MiniMax API credentials, including secure handling and redaction.
    • Added model-specific context window detection and image-input capability handling.
  • Bug Fixes
    • Updated validation to avoid incompatible Responses API probing for MiniMax.
  • Documentation
    • Updated installer help text to list MiniMax as an available provider.

Signed-off-by: octo-patch <266937838+octo-patch@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

MiniMax support is added across provider registration, inference configuration, onboarding menus, model selection, context-window handling, credentials, validation, installer help text, and associated tests.

Changes

MiniMax provider integration

Layer / File(s) Summary
Provider registration and inference selection
src/lib/inference/minimax.ts, src/lib/onboard/providers.ts, src/lib/onboard/provider-menu.ts, src/lib/inference/config.ts, src/lib/actions/inference-set.ts, src/lib/domain/installer/provider.ts, src/lib/onboard/inference-providers/types.ts, related tests
Adds MiniMax metadata, provider aliases, remote configuration, onboarding menu entries, inference selection handling, managed routing, and registration coverage.
Model prompts and context-window onboarding
src/lib/inference/model-prompts.ts, src/lib/inference/context-window.ts, src/lib/onboard/inference-input-capability.ts, src/lib/onboard/setup-nim-flow.ts, related tests
Adds curated MiniMax models, known context-window resolution, image-input detection, context-window environment staging, and setup-flow integration.
Credential and API validation
src/lib/credentials/store.ts, src/lib/security/credential-env.ts, src/lib/security/redact.ts, src/lib/validation.ts, related tests
Recognizes MINIMAX_API_KEY for credential loading, migration, environment stripping, and redaction, and skips Responses probing for minimax-api.
Installer help and onboarding fixture alignment
install.sh, scripts/install.sh, src/lib/domain/installer/provider.test.ts, test/onboard-selection-anthropic-retry.test.ts, test/package-contract/onboard/compatible-endpoint-reasoning.test.ts
Updates documented provider values and adjusts scripted provider selections affected by the new menu entry.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant SetupNim
  participant ProviderConfig
  participant InferenceConfig
  participant ContextWindow
  participant Environment
  Operator->>SetupNim: select minimax and model
  SetupNim->>ProviderConfig: resolve minimax configuration
  ProviderConfig->>InferenceConfig: use minimax-api
  SetupNim->>ContextWindow: apply known model context window
  ContextWindow->>Environment: set NEMOCLAW_CONTEXT_WINDOW
  InferenceConfig-->>SetupNim: return managed inference configuration
Loading

Possibly related PRs

Suggested labels: feature, area: onboarding, area: cli

Suggested reviewers: ericksoa, cv, jyaunches, cjagwani

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding MiniMax as an inference provider.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-onboard, credential-sanitization, security-posture, inference-routing, network-policy, onboard-repair, onboard-resume
Optional E2E: None

Dispatch hint: cloud-onboard,credential-sanitization,security-posture,inference-routing,network-policy,onboard-repair,onboard-resume

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: target/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-onboard: Required validation floor for installer/platform changes on a clean supported host.
  • credential-sanitization: Required validation floor for the new MiniMax credential handling and secret-sanitization paths.
  • security-posture: Required validation floor for credential and security-boundary behavior.
  • inference-routing: Required validation floor for hosted-provider route reachability and sandbox inference configuration.
  • network-policy: Required validation floor for intended inference egress and denied unintended egress.
  • onboard-repair: Required validation floor for onboarding state convergence after provider setup changes.
  • onboard-resume: Required validation floor for resumed onboarding after provider selection and setup changes.

Optional E2E

  • None.

New E2E recommendations

  • inference-policy (high): Existing required routing coverage validates the generic managed inference boundary but does not establish a credential-backed MiniMax onboarding and assistant-turn contract. The new provider has provider-specific endpoint, model catalog, image-input capability, forced Chat Completions API, store compatibility, and known context-window behavior.
    • Suggested test: Add a trusted-secret MiniMax live E2E that performs non-interactive onboarding with MINIMAX_API_KEY, verifies the gateway provider base URL and credential placeholder, confirms the selected model's context window and input capability in sandbox configuration, performs a real assistant request through inference.local, and verifies MiniMax egress is permitted while unrelated egress remains denied.

Dispatch hint

  • Workflow: E2E
  • jobs input: cloud-onboard,credential-sanitization,security-posture,inference-routing,network-policy,onboard-repair,onboard-resume

Signed-off-by: octo-patch <266937838+octo-patch@users.noreply.github.com>
Signed-off-by: octo-patch <266937838+octo-patch@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/onboard/setup-nim-flow.test.ts`:
- Around line 376-395: Update the test’s handleRemoteProviderSelection setup to
use the real production handler, or a delegating spy that invokes it, instead of
manually assigning MiniMax fields in the mock callback. Keep only external/input
boundaries such as menu selection mocked, and retain assertions through the
public createSetupNim flow so the test exercises the actual MiniMax
configuration and selection behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d4ea1b10-75bf-4e99-853a-bb67b34ca29b

📥 Commits

Reviewing files that changed from the base of the PR and between d7ec270 and acf9c1e.

📒 Files selected for processing (1)
  • src/lib/onboard/setup-nim-flow.test.ts

Comment on lines +376 to +395
const handleRemoteProviderSelection = vi.fn<SetupNimFlowDeps["handleRemoteProviderSelection"]>(
async ({ selected }, state) => {
expect(selected.key).toBe("minimax");
state.model = "MiniMax-M3";
state.provider = "minimax-api";
state.endpointUrl = "https://api.minimax.io/v1";
state.credentialEnv = "MINIMAX_API_KEY";
return "selected";
},
);
const setupNim = createSetupNim(
makeDeps({
applyKnownModelContextWindow,
handleRemoteProviderSelection,
selectFromNumberedMenu: (_rawChoice, _defaultIndex, options) => {
const selected = options.find(({ key }) => key === "minimax");
expect(selected).toBeDefined();
return selected!;
},
}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Exercise the real remote-provider selection handler.

Line 376 replaces the behavior this test is meant to cover, and Lines 379-382 manually populate every MiniMax result field. The assertions then only prove that the mock wrote those values; they would still pass if the production MiniMax configuration or selection handler were broken. Use the real handler (or a delegating spy), with only external/input boundaries mocked.

As per path instructions, tests must verify observable behavior through the public boundary and must not use broad mocks that bypass the behavior under test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/onboard/setup-nim-flow.test.ts` around lines 376 - 395, Update the
test’s handleRemoteProviderSelection setup to use the real production handler,
or a delegating spy that invokes it, instead of manually assigning MiniMax
fields in the mock callback. Keep only external/input boundaries such as menu
selection mocked, and retain assertions through the public createSetupNim flow
so the test exercises the actual MiniMax configuration and selection behavior.

Source: Path instructions

@ericksoa

Copy link
Copy Markdown
Contributor

Thanks for taking the time to put this together. We intentionally treat the providers shown in NemoClaw onboarding as a curated and supported product surface, rather than a general provider registry. Additions there require prior product and maintainer alignment, a clear support commitment, and provider-specific validation.

MiniMax is not currently part of that curated set, so we’re not going to accept this change. I’m closing the PR now so you don’t spend more time iterating on it.

For future provider additions, please start with an issue or discussion so we can confirm the fit before implementation. Thanks again for the contribution.

@ericksoa ericksoa closed this Jul 13, 2026
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.

2 participants