Metadata
| Status | done |
|---|---|
| Assigned | agent-1118 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-29T15:25:37.241654438+00:00 |
| Started | 2026-04-29T15:26:00.854848275+00:00 |
| Completed | 2026-04-29T15:56:27.410142803+00:00 |
| Tags | priority-high,fix,naming,config, eval-scheduled |
| Eval score | 0.46 |
| └ blocking impact | 0.35 |
| └ completeness | 0.40 |
| └ constraint fidelity | 0.70 |
| └ coordination overhead | 0.50 |
| └ correctness | 0.35 |
| └ downstream usability | 0.60 |
| └ efficiency | 0.75 |
| └ intent fidelity | 0.89 |
| └ style adherence | 0.45 |
Description
Description
Naming inconsistency that bites every new user. Handler-to-prefix mapping today:
| Handler | User runs | Model prefix |
|---|---|---|
| claude CLI | claude | claude:opus ✓ |
| codex CLI | codex | codex:gpt-5.5 ✓ |
| nex (in-process) | wg nex | local:* / oai-compat:* / openrouter:* ✗ |
The nex handler has THREE prefixes, none of which is nex:. local: is misleading (works fine for non-local Tailscale / OpenAI-hosted endpoints). oai-compat: describes a protocol, not a handler. openrouter: is its own special case (implicit endpoint).
User quote: 'but its nex. not oai compat. its nex! wg nex runs'
Goal
Add nex:<model> as the canonical prefix for the in-process nex handler. The model prefix should match the handler / subcommand name, like claude and codex do.
Scope
- Add
nex:<model>prefix routed to the nex handler. Use any explicit endpoint set via-eor[[llm_endpoints.endpoints]]. - Deprecate
local:andoai-compat:as prefixes:- One-release window: continue accepting them, with stderr deprecation warning naming the new prefix
- Migration:
wg migrate configrewriteslocal:X→nex:X(same withoai-compat:X) - Remove in release after deprecation
- Keep
openrouter:as a special case with implicit endpoint (api.openrouter.ai). Still routes through nex but the convenience of not specifying an endpoint is worth keeping. - Update routes (claude-cli, codex-cli, openrouter, local, nex-custom) to use
nex:where they currently uselocal:oroai-compat:. - Update starter profiles (
~/.wg/profiles/nex.toml) — the file content should usenex:notlocal:. - Update docs and CLAUDE.md examples — every
local:qwen3-coderexample becomesnex:qwen3-coder. Everyoai-compat:gpt-5becomesnex:gpt-5if a generic example, or staysoai-compat:if specifically illustrating the protocol detection. Probably the former in all cases.
Where the handler resolution lives
src/dispatch/handler_for_model.rs — the prefix → handler mapping. Likely just a match arm to add for nex: and deprecation warnings on the legacy names.
Validation
-
Failing test written first:
wg init -m nex:qwen3-coder -e https://example.comproduces a config that the dispatcher loads without error and routes to the nex handler -
Test:
wg init -m local:X -e ...still works but emits a stderr deprecation warning naming nex: as the new canonical -
Test:
wg migrate configrewriteslocal:/oai-compat:tonex:in existing configs (with .bak backup) -
Live smoke: starting fresh,
wg init -m nex:qwen3-coder -e https://lambda01.tail334fe6.ts.net:30000→wg service start→ spawn a worker → confirm WG_EXECUTOR_TYPE=native (or whatever the nex handler reports) AND WG_MODEL=nex:qwen3-coder -
Starter profile
nex.tomlusesnex:prefix internally (notlocal:) -
codex-cli, claude-cli, openrouter routes unchanged (they don't use local/oai-compat); local + nex-custom routes updated to use
nex: -
Docs sweep: zero remaining
local:model strings outside the deprecation back-compat layer; zerooai-compat:outside same. CLAUDE.md examples updated. - cargo build + cargo test pass
-
Permanent smoke scenario added that exercises
nex:prefix end-to-end with this task id in owners - cargo install --path . was run before claiming done
Process note
This is a UX cleanup that's been bitten the user every time they look at the config. Match handler-name → prefix-name and the mental model collapses to one rule: 'the prefix is the handler.' Don't ship a half-rename like fix-complete-the / rename-wgnext-profile required two attempts to land — finish the rename here, including docs, profiles, routes, and tests.
Depends on
Required by
- (none)
Log
- 2026-04-29T15:25:37.229252976+00:00 Task paused
- 2026-04-29T15:25:40.725907018+00:00 Task published
- 2026-04-29T15:25:58.675187628+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer is the only Programmer agent available and perfectly matched for this correctness-critical routing change; Careful tradeoff aligns with the explicit exhaustive verification requirements and TDD validation criteria.
- 2026-04-29T15:26:00.854852072+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-29T15:26:13.231573791+00:00 Starting task: rename local:/oai-compat: prefixes to nex: as canonical prefix matching the handler subcommand
- 2026-04-29T15:27:13.229934108+00:00 USER REFINEMENT 2026-04-29: 'dude danger. I'm the only user now!' Drop all back-compat ceremony. Hard rename, no deprecation window, no .bak files, no `wg migrate config`. The user is the only one affected; just fix the strings in their config and move on. REVISED SCOPE: 1. Add `nex:` as the canonical prefix for the in-process nex handler 2. **Hard-remove** `local:` and `oai-compat:` from the prefix-to-handler mapping (NOT deprecate-with-warning — just remove) 3. Sweep all source / config / docs / starter profiles / routes for `local:` and `oai-compat:` strings; replace with `nex:` in-place 4. The user's existing configs (`~/.wg/config.toml` and `~/.wg/profiles/*.toml` and any project `.wg/config.toml`) — rewrite them too as part of the same change. They're on the same machine. `grep -rl 'local:\|oai-compat:' ~/.wg /home/erik/*/\.wg 2>/dev/null | xargs sed -i 's/local:/nex:/g; s/oai-compat:/nex:/g'` or equivalent. 5. `openrouter:` stays as its own thing. DROP from previous task description: - The one-release deprecation window - The deprecation warning emission - The `wg migrate config` rewrites part - The .bak file conventions This is a single-user codebase. Hard rename + sweep. Done. Same standing applies to other recent rename tasks (rename-wgnext-profile, fix-complete-the): if filed today, would skip the back-compat layer too. The recurring pattern of half-shipped renames partly stems from over-scoping with deprecation ceremony that's not needed. Process note for future tasks: until/unless this becomes a multi-user codebase, default to hard renames with in-place migration of the user's own configs. No back-compat shims unless the user explicitly asks for them.
- 2026-04-29T15:55:13.523235722+00:00 Completed implementation: added nex: as canonical prefix, deprecated local:/oai-compat: with stderr warnings, wg migrate config rewrites them, updated routes (Local, NexCustom) to use nex:, updated profile template, CLI help, README, CLAUDE.md, AGENTS.md. Added unit tests and a permanent smoke scenario tests/smoke/scenarios/nex_canonical_prefix.sh listed in manifest with this task id in owners. cargo build + cargo test pass (only pre-existing test_global_config_path failure unrelated to this change). cargo install --path . done; live-tested wg init -m nex:..., wg config (deprecation warning), and wg migrate config rewriting + idempotence.
- 2026-04-29T15:56:04.855283345+00:00 Committed: 1785a15a5 — pushed to remote (origin/wg/agent-1118/fix-model-prefix)
- 2026-04-29T15:56:27.410145819+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-29T15:58:50.623702311+00:00 PendingEval → Done (evaluator passed; downstream unblocks)