Step 3 of the opencode#1146 deploy-gated sequence, unblocked by the #1627 facade redeploy (PR #5567; the standing server now runs the +63c50ee build and serves the /v1 facade live).
Rewire (home/openclaw/default.nix). OpenClaw's opencode-route provider — the route proxy's only live consumer — now targets the server facade directly (http://127.0.0.1:13420/v1). The facade requires the server credential: it travels as an Authorization header whose value is an env SecretRef (OPENCODE_SERVER_AUTH), materialized at every gateway start by the unit's new ExecStartPre from the server's service record (~/.local/state/opencode/service-prod.json — the same source oc-password-sync reads), via programs.openclaw.environment's file contract. The credential never enters the store. The gateway unit no longer Afters/Wants the route proxy.
Four-part proof (live, 2026-11-04, before this change was written). (1) All five route ids answered through the direct path: workhorse, specialist, summit and scout turns completed through the gateway with exact-marker replies, ledgered in route_attempt with session_id NULL and in-route failover (specialist/summit failed over antigravity/opencode-go failures to openai.main successes). Speed routed and ledgered but could not complete: its only non-walled leaf today is antigravity-direct, which is down fleet-wide on the pre-existing keyring credential defect (opencode#1633) — the proxy path fails speed identically (A/B: facade 502 'Antigravity keyring credential unavailable', proxy 502 GoUsageLimitError on its chosen leaf; both are leaf-availability failures, and the Meta leaves are walled until Nov 9 regardless of front). (2) A real workhorse turn completed — including a final turn run with the proxy already stopped. (3) The route proxy showed zero new traffic in the window: its journal gained 0 lines (365 -> 365) and no connections to :18750 were observed while :13420 carried the turns. (4) Gateway healthy throughout (active, Control UI 200). Live state already matches: the gateway runs the repointed config behind a labelled stand-in drop-in, and the proxy unit is stopped + disabled; this PR makes both permanent at the next switch and the stand-in comes out then.
Retirement (home/common/default.nix, bin/, guard script). Mirrors the clef (#5583) and antigravity (#5517) retirements: the opencodeRouteProxyPort let, the opencode-route-proxy user service, bin/opencode-route-proxy.mjs + start script + test are removed, and the port-fallback guard loses its row (re-run: 4 proxies, pass). Demotion behaviour is not lost: it lives in the fork as routes.settings.demotion + ledger-backed counts (opencode#1151, closed). No other live consumer references :18750 (repo + live config greps clean).
Verification: full nixosConfigurations.amd evaluation succeeds from this branch; the rendered provider baseUrl evaluates to the facade URL; the evaluated gateway unit carries the ExecStartPre and the OPENCODE_SERVER_AUTH environment entry.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.