• v1.6.0 e895c0e8eb

    nntrivi2001 released this 2026-09-14 09:08:31 +00:00 | 216 commits to main since this release

    AI Router profiles

    A new AI Router tab in Settings, next to Codex, stores named router endpoints (9Router, OpenRouter, a self-hosted gateway) as profiles: base URL, API key, a default model and optional per-tier overrides. A lane picks one when it is created, via a Native / AI Router radio, and the choice is written into that lane's own config.

    • Claude lane — eight env keys merged into its own .claude/settings.local.json.
    • Codex lane — $CODEX_HOME/<name>.config.toml, the layer codex -p <name> loads. The base config.toml is never touched.

    Native is a built-in profile, not a branch: it blanks the two connection variables (an absent key at project scope would let a user-level router apply) and removes the model names (writing them would override your own global model choice).

    Key material never leaves the server. Profiles live one file each under <CLAUDE_HOME>/agenthub-routers/ (0700/0600), GET /api/ai-routers reports only hasKey, and no route returns a profile in full.

    Three fixes this release depends on

    • wire_api = "chat" is rejected outright by codex-cli 0.149, so every Codex lane on a router would have failed to start. The layer now writes responses, and writes env_key only when the profile actually has a key.
    • The API key is no longer typed into a pane. tmux.sendCommand used send-keys with a KEY=... cmd prefix — visible in the pane the dashboard streams to the browser, in the tmux scrollback, and in ~/.bash_history. It now takes over the idle pane with respawn-pane -k -e, passing env through argv.
    • Editing or deleting a profile reaches the lanes using it. Attaching copies a profile, so a rotated key would otherwise never reach the lane still holding the revoked one. An edit re-applies; a delete resets those lanes to native and removes the Codex layer file. Per-lane failures are reported in the tab.

    .claude/settings.local.json is also added to each lane's git exclude — agenthub lanes reset runs git clean -fd without -x, which would delete it, and untracked meant the key was committable.

    DB: lanes.router_profile, nullable and additive.

    Server 1783/1783, client 503/503.

    Downloads