feat: add minimax m2.5 via opencode zen to cliproxyapi - #1067
Conversation
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
Summary of ChangesHello, 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 Highlights
Changelog
Using Gemini Code AssistThe 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
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 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
|
Mesa DescriptionTL;DRAdded MiniMax M2.5 as an OpenAI-compatible provider in What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
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.
| - 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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
minimaxprovider configuration underopenai-compatibility. - Add
MiniMax-M2.5model with aliasminimax-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.
| - name: "minimax" | ||
| base-url: "https://opencode.ai/zen/v1" | ||
| api-key-entries: | ||
| - api-key: "__OPENCODE_ZEN_API_KEY__" |
There was a problem hiding this comment.
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.
| - api-key: "__OPENCODE_ZEN_API_KEY__" | |
| - api-key: "__OPENROUTER_API_KEY__" |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Disabled knowledge base sources:
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughA single-line configuration addition extends the template placeholder substitution logic in the start script to include Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
9da3776 to
dd1a98e
Compare
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
There was a problem hiding this comment.
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.shstill only populates and substitutesOPENROUTER_API_KEYandCLIPROXY_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
📒 Files selected for processing (2)
config/cliproxyapi/config.template.yamlhome-manager/services/cliproxyapi/scripts/start.sh
…Y for opencodezen
Summary
https://opencode.ai/zen/v1(opencode zen proxy)MiniMax-M2.5exposed with aliasminimax-m2.5__OPENCODE_ZEN_API_KEY__placeholder (requiresOPENCODE_ZEN_API_KEYenv var / Doppler secret)Test plan
OPENCODE_ZEN_API_KEYis set in Dopplermake build && make switchto apply and restart cliproxyapiSummary by cubic
Add MiniMax M2.5 as an OpenAI-compatible provider in
cliproxyapi, routed viahttps://opencode.ai/zen/v1, exposingMiniMax-M2.5asminimax-m2.5. Removed direct MiniMax API support and switched toOPENCODE_API_KEYfor Zen.OPENCODE_API_KEYin Doppler.make build && make switch, then verifyminimax-m2.5appears in the management UI.Written for commit 51ef25e. Summary will update on new commits.