fix(cliproxyapi): inject OPENCODE_API_KEY into config during startup - #1075
Conversation
Follows up on the abbreviation naming refactor (#1057) which renamed _clxte/_clxteh/_clxwe/_clxweh function files but missed updating the corresponding spec/fish test files. Closes the CI failure in fish-test.
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
|
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 CodeRabbit
WalkthroughA duplicate template substitution for Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
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 addresses a critical issue in Highlights
Changelog
Activity
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;DRFixed a critical bug in What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request primarily renames several Fish shell functions and their associated test files, specifically changing _clxte_function to _cltxe_function, _clxteh_function to _cltxeh_function, _clxwe_function to _clwxe_function, and _clxweh_function to _clwxeh_function. Additionally, it introduces support for an OPENCODE_API_KEY by adding a new sed replacement in the start.sh script for the cliproxyapi service.
There was a problem hiding this comment.
Pull request overview
Fixes cliproxyapi startup config generation so the opencodezen provider can authenticate correctly by substituting __OPENCODE_API_KEY__ from the environment (preventing literal placeholder usage at runtime). The PR also aligns several fish function tests (and one function definition) with their correct _clt*/_clw* names.
Changes:
- Add
__OPENCODE_API_KEY__substitution to cliproxyapistart.shconfig-template hydration. - Update fish fishtape tests to source/call the correctly named
_clwxe/_clwxeh/_cltxe/_cltxehfunctions. - Rename the fish function definition/comment for
_cltxe_functionto match its filename and abbreviations.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
home-manager/services/cliproxyapi/scripts/start.sh |
Adds missing sed substitution for __OPENCODE_API_KEY__ during config generation. |
home-manager/programs/fish/functions/_cltxe_function.fish |
Renames function to _cltxe_function and updates usage comment accordingly. |
spec/fish/_clwxeh_function_test.fish |
Fixes sourced filename and invoked function name. |
spec/fish/_clwxe_function_test.fish |
Fixes sourced filename and invoked function name. |
spec/fish/_cltxeh_function_test.fish |
Fixes sourced filename and invoked function name. |
spec/fish/_cltxe_function_test.fish |
Fixes sourced filename and invoked function name. |
💡 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.
| -e "s|__CLIPROXY_MANAGEMENT_PASSWORD__|${CLIPROXY_MANAGEMENT_PASSWORD:-}|g" \ | ||
| -e "s|__ZAI_API_KEY__|${ZAI_API_KEY:-}|g" \ | ||
| -e "s|__OPENCODE_API_KEY__|${OPENCODE_API_KEY:-}|g" \ | ||
| -e "s|__AMP_UPSTREAM_API_KEY__|${AMP_UPSTREAM_API_KEY:-}|g" \ | ||
| -e "s|__OPENCODE_API_KEY__|${OPENCODE_API_KEY:-}|g" \ |
Changes
__OPENCODE_API_KEY__substitution to thesedblock instart.shRoot Cause
Commit #1058 added the
opencodezenprovider (forminimax-m2.5) toconfig.template.yamland setminimax-m2.5as the default openclaw model, but the correspondingOPENCODE_API_KEYinjection was missing fromstart.sh. As a result, cliproxyapi was authenticating toopencode.ai/zen/v1with the literal string__OPENCODE_API_KEY__, causing allminimax-m2.5requests to fail and breaking openclaw's gateway.Testing
cliproxyapiand verifyminimax-m2.5requests succeed via cliproxyOPENCODE_API_KEYis set in~/dotfiles/.envon KyberGenerated with Claude Code by claude-sonnet-4-6
Summary by cubic
Injects OPENCODE_API_KEY into cliproxyapi startup config to restore auth against opencode.ai/zen/v1, fixing failed minimax-m2.5 requests and unblocking the openclaw gateway. Also updates fish tests and an internal function name to match the _cltxe/_cltxeh/_clwxe/_clwxeh rename, resolving the fish-test CI failure.
Written for commit 5a608f1. Summary will update on new commits.