You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opencode v2: preset BILLION_CONTEXT_PROXY disarms native routing while tools still find the proxy — all tool forwards 404 #886
Start a bili proxy manually (bili start --port 44765).
Run bare opencode v2 with the plugin installed and BILLION_CONTEXT_PROXY=http://127.0.0.1:44765 preset.
Ask the model to call acp_status.
Symptom
Model traffic goes direct to the upstream (the proxy log never sees the session), while the plugin's tools still discover the proxy through the env: every /plugin/tool forward returns 404 unknown plugin conversation (no model request has arrived with this conversation id yet). The model surfaces the raw error and tells the user to refresh/restart — the exact "ACP never activates, tools are fake" experience reported during v2 testing.
Root cause
nativeBootstrapGate treats a preset BILLION_CONTEXT_PROXY as "a bili launch already owns a proxy" → native bootstrap off. But nothing actually routes the model traffic (no MITM, no config rewrite — those only happen under a real launcher): createNativeRoute runs with origin: undefined and no respawn, so every model-API request silently goes direct. Meanwhile opencode-v2's tool execute() finds the proxy via proxyBaseFromEnv() and forwards — to a proxy that has never seen the conversation.
Fix
planNativeOpencode treats the preset value as an external attach target (probe + rewrite + stamp, same as BILLION_CONTEXT_ATTACH), plus a guided message for the residual never-registered 404. Shipped in #885 (verified end-to-end in all four postures).
Activity
fix(#1795): route preset BILLION_CONTEXT_PROXY to attach in the omp n…
fix(ranxianglei#1795): route preset BILLION_CONTEXT_PROXY to attach i…