fix(opencode): add OPENCODE_CONFIG_EXTRA to passthrough allowlist#86
fix(opencode): add OPENCODE_CONFIG_EXTRA to passthrough allowlist#86
Conversation
Without this entry, OPENCODE_CONFIG_EXTRA set on the orchestrator host never crosses into spawned workspace sandboxes — the entrypoint heredoc falls through to the canonical 3-provider default and operators cannot route opencode through a self-hosted OpenAI-compat gateway (LiteLLM, OpenLLM, etc.) despite the recipe being documented in docs/cli-config-templates.md. Closes #77
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesEnvironment Variable Allowlist Extension
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
Superseded by #87, which extends the same fix with CODEX_CONFIG_EXTRA parity and a regression test in tests/orchestrator/test_passthrough_isolation.py to lock in the per-CLI isolation contract (Pitfall 1). |
Summary
OPENCODE_CONFIG_EXTRAtoOPENCODE_PASSTHROUGH_ENVSincomputer-use-server/docker_manager.pyso the operator override actually crosses the orchestrator → workspace-sandbox boundary.docs/cli-config-templates.mdcannot work in v0.9.2.2: the var is set on the host, but_create_containerfilters it out, so the entrypoint heredoc inside the sandbox falls through to the canonical 3-provider default and dialshttps://openrouter.ai/api/v1directly.Why
Self-hosted deployments with a proxy-only invariant (LiteLLM, OpenLLM, etc.) for spend attribution / budget enforcement / no-direct-egress can't route opencode sub-agent traffic through their gateway without forking. This unblocks the documented configuration path.
Test plan
SUBAGENT_CLI=opencode,OPENAI_API_KEY=<gateway-key>,OPENCODE_CONFIG_EXTRA='{ "provider": { "litellm": { ... "options": { "baseURL": "http://litellm:4000/v1" } } }, "model": "litellm/<model>" }',OPENCODE_SUB_AGENT_DEFAULT_MODEL=litellm/<model>docker compose up -d --force-recreate computer-use-serverprintenv | grep OPENCODE_CONFIG_EXTRAreturns the JSON (was empty before this PR)cat /tmp/opencode.jsonrenders the operator'slitellmprovider (was canonical 3-provider default before this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes