fix-remove-openrouter

Fix: remove [openrouter] from default config — only include when --route openrouter is chosen

Metadata

Statusdone
Assignedagent-1338
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-05-01T14:51:51.936346967+00:00
Started2026-05-01T14:53:42.132019428+00:00
Completed2026-05-01T15:39:46.138466412+00:00
Tagsfix,config,defaults,cleanup, eval-scheduled
Eval score0.91
└ blocking impact0.93
└ completeness0.95
└ constraint fidelity0.10
└ coordination overhead0.92
└ correctness0.90
└ downstream usability0.90
└ efficiency0.85
└ intent fidelity0.90
└ style adherence0.92

Description

Description

A fresh wg init (claude-cli, codex-cli, local, nex-custom routes) writes an [openrouter] section into the config. The dispatcher's registry-refresh job then probes OpenRouter every ~30s; without an API key it errors continuously. User reports 25+ consecutive failures filling the daemon log with no operational impact — pure log spam.

User question 2026-05-01: 'should we remove it as a default part of the config?'

Answer: yes. [openrouter] should only be in the config when the user explicitly chose the openrouter route OR added it via wg endpoint add openrouter .... For users on claude / codex / nex routes, OpenRouter has no purpose.

Scope

Routes affected

  • wg init --route claude-cli — should NOT write [openrouter]
  • wg init --route codex-cli — should NOT write [openrouter]
  • wg init --route local — should NOT write [openrouter]
  • wg init --route nex-custom — should NOT write [openrouter]
  • wg init --route openrouter — should write [openrouter] (this is the openrouter route, of course)

Verify each route's dry-run output and remove the [openrouter] section from the routes that aren't openrouter.

Existing user configs

Per the user's 'skip back-compat ceremony' standing rule (memory: feedback_skip_backcompat_ceremony.md):

  • For the user's local config: remove [openrouter] directly as part of this task
  • wg migrate config should also recognize and offer to remove the section if no openrouter usage is detected (idempotent — running it on a config that already has it removed is a no-op)

Registry refresh side

Even when [openrouter] IS present (because the user wants it), the registry-refresh failure mode should be quieter:

  • After N consecutive failures (e.g., 5), log ONCE and stop trying for ~1h (cooldown)
  • On manual config reload OR API key set, retry immediately

This is a small backoff/circuit-breaker for the noisy log; matches the design-exponential-failure design (filed earlier today) for failure cycles.

Validation

  • Failing test: wg init --route claude-cli --dry-run output does NOT contain [openrouter]
  • Same for codex-cli, local, nex-custom routes
  • wg init --route openrouter --dry-run DOES contain [openrouter] (don't break the path that needs it)
  • User's local config /home/erik/workgraph/.wg/config.toml has [openrouter] section removed (this task does the surgery directly)
  • wg migrate config recognizes orphaned [openrouter] sections (no api key, no usage in profiles or endpoints) and offers to remove. Idempotent.
  • Registry refresh failure surfacing: cooldown after N failures (don't spam the log every poll)
  • cargo build + cargo test pass
  • cargo install --path . was run before claiming done

Depends on

Required by

Log