Skip to content

feat: add minimax m2.5 via opencode zen to cliproxyapi - #1067

Merged
shunkakinoki merged 2 commits into
mainfrom
feat/minimax-m2.5-cliproxyapi
Mar 12, 2026
Merged

feat: add minimax m2.5 via opencode zen to cliproxyapi#1067
shunkakinoki merged 2 commits into
mainfrom
feat/minimax-m2.5-cliproxyapi

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add MiniMax M2.5 as an OpenAI-compatible provider in cliproxyapi config template
  • Routes through https://opencode.ai/zen/v1 (opencode zen proxy)
  • Model MiniMax-M2.5 exposed with alias minimax-m2.5
  • Uses __OPENCODE_ZEN_API_KEY__ placeholder (requires OPENCODE_ZEN_API_KEY env var / Doppler secret)

Test plan

  • Ensure OPENCODE_ZEN_API_KEY is set in Doppler
  • Run make build && make switch to apply and restart cliproxyapi
  • Verify minimax provider appears in cliproxyapi management UI

Summary by cubic

Add MiniMax M2.5 as an OpenAI-compatible provider in cliproxyapi, routed via https://opencode.ai/zen/v1, exposing MiniMax-M2.5 as minimax-m2.5. Removed direct MiniMax API support and switched to OPENCODE_API_KEY for Zen.

  • Migration
    • Set OPENCODE_API_KEY in Doppler.
    • Run make build && make switch, then verify minimax-m2.5 appears in the management UI.

Written for commit 51ef25e. Summary will update on new commits.

Copilot AI review requested due to automatic review settings March 12, 2026 12:03
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 12, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the cliproxyapi's capabilities by integrating the MiniMax M2.5 model as a new OpenAI-compatible provider. This enhancement allows the system to leverage an additional AI model, routing its requests through the opencode zen proxy and utilizing a dedicated API key for authentication, thereby broadening the range of available language models.

Highlights

  • MiniMax M2.5 Integration: Added MiniMax M2.5 as an OpenAI-compatible provider within the cliproxyapi configuration template.
  • Routing Configuration: Configured MiniMax M2.5 requests to route through the https://opencode.ai/zen/v1 (opencode zen proxy).
  • API Key Management: Implemented __OPENCODE_ZEN_API_KEY__ as a placeholder for the required API key, expecting it from an environment variable or Doppler secret.
  • Model Exposure: Exposed the MiniMax-M2.5 model with the alias minimax-m2.5.
Changelog
  • config/cliproxyapi/config.template.yaml
    • Added a new minimax provider configuration block.
    • Specified https://opencode.ai/zen/v1 as the base URL for the minimax provider.
    • Included __OPENCODE_ZEN_API_KEY__ as the API key entry for the minimax provider.
    • Defined MiniMax-M2.5 with the alias minimax-m2.5 under the minimax provider's models.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Mar 12, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Added MiniMax M2.5 as an OpenAI-compatible provider in cliproxyapi via https://opencode.ai/zen/v1 and https://api.minimax.io/v1, exposing MiniMax-M2.5 as minimax-m2.5.

What changed?

  • config/cliproxyapi/config.template.yaml: Added a new 'minimax' entry to the 'openai-compatibility' configuration, including its base URL, API key placeholder, and model configuration for "MiniMax-M2.5".
  • home-manager/services/cliproxyapi/scripts/start.sh: The start.sh script was updated to include a sed substitution that replaces the __MINIMAX_API_KEY__ placeholder with the MINIMAX_API_KEY environment variable when generating the configuration file.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds configuration for the MiniMax M2.5 model via the opencode.ai proxy. The change in config.template.yaml is well-structured and consistent with existing provider configurations. However, a critical component appears to be missing. The startup script responsible for substituting the __OPENCODE_ZEN_API_KEY__ placeholder with the actual API key from environment variables does not seem to be updated in this PR. Without this change, the new provider will not be functional and will fail authentication. This should be addressed before merging.

Comment thread config/cliproxyapi/config.template.yaml Outdated
Comment on lines +98 to +104
- name: "minimax"
base-url: "https://opencode.ai/zen/v1"
api-key-entries:
- api-key: "__OPENCODE_ZEN_API_KEY__"
models:
- name: "MiniMax-M2.5"
alias: "minimax-m2.5"

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.

critical

This adds the configuration for the minimax provider, but the logic to substitute the __OPENCODE_ZEN_API_KEY__ placeholder seems to be missing. The startup script (likely home-manager/services/cliproxyapi/scripts/start.sh) needs to be updated to replace this placeholder with the value from the OPENCODE_ZEN_API_KEY environment variable. The existing substitution logic, as hinted at in spec/cliproxyapi_spec.sh, appears to be specific to each key and will not handle this new one automatically.

Without this change, the API key will be the literal string __OPENCODE_ZEN_API_KEY__, and requests to this provider will fail authentication. Please update the startup script and add a corresponding test case to spec/cliproxyapi_spec.sh.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Copilot AI 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.

Pull request overview

Adds a new OpenAI-compatibility provider entry to the CLIProxyAPI configuration template so the proxy can route requests to a MiniMax-backed endpoint.

Changes:

  • Add minimax provider configuration under openai-compatibility.
  • Add MiniMax-M2.5 model with alias minimax-m2.5.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread config/cliproxyapi/config.template.yaml Outdated
- name: "minimax"
base-url: "https://opencode.ai/zen/v1"
api-key-entries:
- api-key: "__OPENCODE_ZEN_API_KEY__"

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

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

This introduces a new API key placeholder (OPENCODE_ZEN_API_KEY), but the cliproxyapi startup script only substitutes a fixed set of placeholders when generating config.yaml. As a result, config.yaml will likely contain the literal string "OPENCODE_ZEN_API_KEY" and requests to this provider will fail authentication. Please update home-manager/services/cliproxyapi/scripts/start.sh to replace this placeholder (and ensure it is sourced from the expected env var) when generating the config.

Suggested change
- api-key: "__OPENCODE_ZEN_API_KEY__"
- api-key: "__OPENROUTER_API_KEY__"

Copilot uses AI. Check for mistakes.
@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5259b7a8-78a8-4b13-9506-688cbbfb5682

📥 Commits

Reviewing files that changed from the base of the PR and between f0488b1 and 51ef25e.

📒 Files selected for processing (1)
  • home-manager/services/cliproxyapi/scripts/start.sh

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Chores
    • Added support for OPENCODE_API_KEY configuration during application initialization, extending the existing API key configuration options.

Walkthrough

A single-line configuration addition extends the template placeholder substitution logic in the start script to include __OPENCODE_API_KEY__, enabling the OPENCODE_API_KEY environment variable to be injected into the generated configuration alongside existing API key placeholders.

Changes

Cohort / File(s) Summary
Template Placeholder Substitution
home-manager/services/cliproxyapi/scripts/start.sh
Added OPENCODE_API_KEY placeholder substitution to the config generation step, extending the existing template variable replacement logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • #447 — Modifies the same start.sh template placeholder logic by adding multiple API key substitutions (AMP_UPSTREAM_API_KEY and others) alongside existing replacements.
  • #1067 — Also extends the template substitution logic in start.sh to add additional API key placeholders (MINIMAX_API_KEY and OPENCODE_ZEN_API_KEY) following the same pattern.

Poem

🐰 One simple line, a hop and bound,
OPENCODE_API_KEY is now found,
In config templates, safe and sound,
Where placeholders and secrets rendezvous 🔑

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions adding minimax but the raw_summary shows the config uses MINIMAX_API_KEY while the PR description indicates OPENCODE_ZEN_API_KEY. The title doesn't reference opencode zen which is the primary routing method described in the PR. Update the title to clarify the primary change: 'feat: add minimax m2.5 provider via opencode zen proxy' or similar to accurately reflect that the main purpose is routing through opencode zen.
Linked Issues check ❓ Inconclusive The PR title references issue #1067 but no linked issues were mentioned in the provided context to validate if the PR properly addresses them. Verify that issue #1067 is properly linked and that the changes fully address the requirements outlined in that issue.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset, providing context about MiniMax M2.5 integration, routing through opencode zen, and a clear test plan.
Out of Scope Changes check ✅ Passed The changeset only modifies config template and startup script to add minimax provider support. Changes appear focused and within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/minimax-m2.5-cliproxyapi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@shunkakinoki
shunkakinoki force-pushed the feat/minimax-m2.5-cliproxyapi branch from 9da3776 to dd1a98e Compare March 12, 2026 12:09
@shunkakinoki shunkakinoki reopened this Mar 12, 2026
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 12, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
home-manager/services/cliproxyapi/scripts/start.sh (1)

77-83: Add test coverage for the new placeholder substitution.

Line 81 adds a new render path, but the existing test harness in spec/cliproxyapi_spec.sh still only populates and substitutes OPENROUTER_API_KEY and CLIPROXY_MANAGEMENT_PASSWORD (Lines 13-24 and 62-70 in that file). A small spec update to include __MINIMAX_API_KEY__ would keep this from regressing silently.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/services/cliproxyapi/scripts/start.sh` around lines 77 - 83, The
test spec doesn't set or verify the new __MINIMAX_API_KEY__ placeholder added in
start.sh; update spec/cliproxyapi_spec.sh to export/populate MINIMAX_API_KEY
(similar to OPENROUTER_API_KEY and CLIPROXY_MANAGEMENT_PASSWORD) and extend the
existing substitution/assertion so the rendered config contains the expected
MINIMAX_API_KEY value (i.e., add MINIMAX_API_KEY to the environment setup and
the assertion that checks the template rendering).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/cliproxyapi/config.template.yaml`:
- Around line 105-111: The minimax provider block is shadowed because
routing.strategy is set to fill-first and opencodezen already registers the same
alias minimax-m2.5; update the config so minimax can be selected by either (a)
changing the alias in this minimax block to a unique value (e.g.,
minimax-m2.5-alt), (b) moving the entire minimax provider block so it appears
before the opencodezen block, or (c) removing/replacing the conflicting alias
from the opencodezen mapping; ensure you update any references to the alias
elsewhere if you rename it and keep the routing.strategy fill-first behavior
consistent.

---

Nitpick comments:
In `@home-manager/services/cliproxyapi/scripts/start.sh`:
- Around line 77-83: The test spec doesn't set or verify the new
__MINIMAX_API_KEY__ placeholder added in start.sh; update
spec/cliproxyapi_spec.sh to export/populate MINIMAX_API_KEY (similar to
OPENROUTER_API_KEY and CLIPROXY_MANAGEMENT_PASSWORD) and extend the existing
substitution/assertion so the rendered config contains the expected
MINIMAX_API_KEY value (i.e., add MINIMAX_API_KEY to the environment setup and
the assertion that checks the template rendering).
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 24e0e21d-bdf5-4467-b259-5d21f74a32ef

📥 Commits

Reviewing files that changed from the base of the PR and between dd1a98e and f0488b1.

📒 Files selected for processing (2)
  • config/cliproxyapi/config.template.yaml
  • home-manager/services/cliproxyapi/scripts/start.sh

Comment thread config/cliproxyapi/config.template.yaml Outdated
@shunkakinoki
shunkakinoki merged commit 21efb83 into main Mar 12, 2026
6 of 7 checks passed
@shunkakinoki
shunkakinoki deleted the feat/minimax-m2.5-cliproxyapi branch March 12, 2026 12:56
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