Metadata
| Status | done |
|---|---|
| Assigned | agent-171 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-26T13:03:27.076258932+00:00 |
| Started | 2026-04-26T23:42:59.972178422+00:00 |
| Completed | 2026-04-27T00:56:58.337477822+00:00 |
| Tags | eval-scheduled |
| Tokens | 0 in / 0 out |
| Eval score | 0.02 |
| └ blocking impact | 0.00 |
| └ completeness | 0.00 |
| └ coordination overhead | 0.05 |
| └ correctness | 0.00 |
| └ downstream usability | 0.00 |
| └ efficiency | 0.10 |
| └ intent fidelity | 0.20 |
| └ style adherence | 0.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) |
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
Required by
- (none)
Log
- 2026-04-26T13:03:27.076133783+00:00 Task paused
- 2026-04-26T16:03:14.701286617+00:00 Task published
- 2026-04-26T16:14:38.031108201+00:00 Spawned by coordinator --executor native --model claude-opus-4-6
- 2026-04-26T16:14:38.058020983+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T16:17:15.917503982+00:00 Task reset for retry from failed (attempt #2)
- 2026-04-26T18:59:20.778496046+00:00 Spawned by coordinator --executor native --model opus
- 2026-04-26T18:59:20.807959191+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T19:10:28.340403922+00:00 Task reset for retry from failed (attempt #3)
- 2026-04-26T19:10:54.314409907+00:00 Spawned by coordinator --executor native --model opus
- 2026-04-26T19:10:54.346605617+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T19:43:06.364176870+00:00 Task reset for retry from failed (attempt #4)
- 2026-04-26T21:10:18.385396389+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T21:10:21.229790323+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T22:44:09.478096090+00:00 Task reset for retry from failed (attempt #5)
- 2026-04-26T23:42:59.972186137+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T23:43:16.790078561+00:00 Starting fresh attempt — implementing inline (not decomposing). Previous attempt failed due to wrong decomposition. Target: 5 setup routes + complete default configs + wg config reset + wg init --route + tests.
- 2026-04-26T23:51:29.066207024+00:00 config_defaults module: 12 tests pass (route builders, tier population, round-trip, aliases). Now wiring into wg setup --route + wg init --route + wg config reset.
- 2026-04-27T00:43:30.136255070+00:00 Implementation complete: src/config_defaults.rs (5 routes + 12 unit tests), wg setup --route + --yes + --dry-run, wg init --route + --dry-run + populated [tiers] for -x claude/codex/nex (the bug), wg config reset --route --keep-keys --dry-run --yes (with auto backup), 15 integration tests pass, smoke scenario added (setup_routes_complete_configs.sh), README + AGENT-SERVICE docs updated. Awaiting full test suite results.
- 2026-04-27T00:48:14.281722168+00:00 Committed: 0cea16732 — pushed to remote
- 2026-04-27T00:56:58.337503370+00:00 Task marked as done