Metadata
| Status | abandoned ‖ paused |
|---|---|
| Created | 2026-04-26T13:00:39.516855229+00:00 |
Description
Description
wg setup and wg init should offer 5 named, smooth routes — each backed by a complete, working default config. No empty [tiers], no half-set fields, no confusing 'Anthropic vs Claude Code' duplication. The user picks ONE route and gets a config that works end-to-end.
The 5 routes
| Route name | Executor | Auth | Endpoint | Models (tiers) |
|---|---|---|---|---|
openrouter | nex | OPENROUTER_API_KEY (env or file) | openrouter.ai/api/v1 | fast=anthropic/claude-haiku, std=anthropic/claude-sonnet, premium=anthropic/claude-opus (or user-pickable defaults from openrouter catalog) |
claude-cli | claude | local claude login (no API key) | n/a | fast=claude:haiku, std=claude:sonnet, premium=claude:opus |
codex-cli | codex | local codex login | n/a | fast/std/premium = whatever codex CLI accepts (gpt-5-mini / gpt-5 / o1-pro or current equivalents) |
local | nex | none | http://localhost:11434/v1 (ollama default) or user-supplied | fast/std/premium = single locally-available model with a note that user should adjust |
nex-custom | nex | user-supplied (env / file) | user-supplied URL | user-supplied model id; setup just collects the inputs and wires them |
Spec
-
src/config/defaults.rs(or similar):pub enum SetupRoute { Openrouter, ClaudeCli, CodexCli, Local, NexCustom } pub fn config_for_route(route: SetupRoute, params: RouteParams) -> Config;Each branch returns a complete Config with: agent, coordinator, tiers (all three filled), models.evaluator/assigner, llm_endpoints (when applicable), model_registry (when applicable). Round-trips through TOML. Tested per-route.
-
wg setuprework:- Top-level menu lists exactly the 5 routes above with one-line descriptions, no Anthropic-vs-Claude-Code split.
- 'Ctrl-C exits without saving' hint at top.
- After route pick + any required params (api key path, endpoint URL), show diff-style preview vs current global config.
- Final prompt: [a]ccept / [c]ustomize / [q]uit.
wg setup --route <name> [--api-key-file PATH] [--api-key-env VAR] [--url URL] [--model ID] --yesfor non-interactive use; errors if required params for the route are missing.
-
wg init:-x <executor>continues to work but now produces a complete config (populates tiers from executor's default route, e.g.-x claudeuses claude-cli route defaults).- Add
--route <name>as an alternative selector that picks a full route (not just executor). - Add
--dry-runflag. - Print summary on success: 'Wrote .wg/config.toml: route=claude-cli, executor=claude, tiers=haiku/sonnet/opus'.
-
wg config reset(new command):wg config reset --route <name>resets to that route's defaults.wg config resetwith no route uses the current config's executor to pick the closest route.--keep-keyspreserves [[llm_endpoints.endpoints]] entries.--dry-runprints diff.--yesskips confirmation.- Always backs up to config.toml.bak- first.
-
wg nexreminder docs: README + AGENT-SERVICE should mention that thenexexecutor is the native path for OAI-compatible endpoints, andopenrouter/local/nex-customroutes all use it under the hood.
Open design questions for the implementer to resolve
- Does
claudeexecutor support being pointed at openrouter, or is openrouter strictly nex-only? (Current global config has bothexecutor=claudeAND an openrouter endpoint configured — that combo's behavior should be documented.) - For the
codex-cliroute: confirm what model ids the codex CLI currently accepts and pick sensible tier defaults. - For the
localroute: should we probehttp://localhost:11434/v1/models(ollama) at setup time and offer detected models, or just write a placeholder?
These are research-then-decide items; the implementer should investigate and pick reasonable defaults, not block.
Validation
- Failing tests written first: test_route_openrouter_complete_config, test_route_claude_cli_complete_config, test_route_codex_cli_complete_config, test_route_local_complete_config, test_route_nex_custom_complete_config, test_init_dry_run_no_write, test_setup_non_interactive_route_writes_config, test_config_reset_keep_keys_preserves_endpoints, test_config_reset_creates_backup
- Implementation makes all tests pass
- cargo build + cargo test pass with no regressions
-
Manual smoke (in a scratch dir, with backup of ~/.wg/config.toml):
-
wg setup --route claude-cli --yesproduces complete config with populated [tiers] -
wg setup --route openrouter --api-key-env OPENROUTER_API_KEY --yesproduces config with nex executor + openrouter endpoint + tiers -
wg setup --route local --url http://localhost:11434/v1 --model qwen3:4b --yesproduces config with nex executor + local endpoint + tiers populated with the chosen model -
wg setupinteractive shows the 5-route menu with clear labels and an escape hint -
wg init -x claudeproduces config with populated [tiers] (the bug) -
wg config reset --route claude-cli --dry-runprints diff;--yeswrites defaults; backup file exists
-
Depends on
- (none)
Required by
- (none)
Log
- 2026-04-26T13:00:39.516714493+00:00 Task paused
- 2026-04-26T13:03:27.062242123+00:00 Task abandoned