Only one backend is saved at a time: keep backends as named profiles, so trogdor and the Claude API are one click apart #161

Closed
opened 2026-10-09 00:31:36 -04:00 by cmoriarty · 1 comment
Owner

Settings hold one main backend and one planning backend. Moving from trogdor to the Claude API means retyping the kind, URL, model, window, output reservation and effort, and moving back means retyping trogdor's, which nobody remembers. Since #160, moving the URL to another host also removes the pasted key, so it has to be pasted again too.

What it needs

  • Backend profiles: named, saved sets of kind, base URL, model, context window, output reservation, reasoning effort and API key (pasted or a file).
  • One profile is active for runs. Switching is one click on the Settings page, and a run keeps the profile it started with, as it keeps its backend today.
  • Each profile keeps its own pasted key, bound to that profile's host (#160's rule). Switching profiles never removes a key; editing a profile's URL to another host still does.
  • Planning picks a profile: "Same as the main backend" or any saved profile. This replaces the separate planning fields.
  • Today's saved backend becomes the first profile (named after its kind and model, for example vLLM · qwen3.8-27b), and a separate planning backend becomes a second one, so nothing is lost on upgrade.
  • Add, rename, duplicate and delete a profile. The active one, and one planning uses, cannot be deleted.

Done when

trogdor and the Claude API are both saved as profiles, switching between them on the Settings page takes one click and no retyping, both keep their keys, and a run started after a switch uses the new profile while one already running keeps its own.

Settings hold one main backend and one planning backend. Moving from trogdor to the Claude API means retyping the kind, URL, model, window, output reservation and effort, and moving back means retyping trogdor's, which nobody remembers. Since #160, moving the URL to another host also removes the pasted key, so it has to be pasted again too. ## What it needs - **Backend profiles**: named, saved sets of kind, base URL, model, context window, output reservation, reasoning effort and API key (pasted or a file). - One profile is **active** for runs. Switching is one click on the Settings page, and a run keeps the profile it started with, as it keeps its backend today. - Each profile keeps its own pasted key, bound to that profile's host (#160's rule). Switching profiles never removes a key; editing a profile's URL to another host still does. - **Planning picks a profile**: "Same as the main backend" or any saved profile. This replaces the separate planning fields. - Today's saved backend becomes the first profile (named after its kind and model, for example `vLLM · qwen3.8-27b`), and a separate planning backend becomes a second one, so nothing is lost on upgrade. - Add, rename, duplicate and delete a profile. The active one, and one planning uses, cannot be deleted. ## Done when trogdor and the Claude API are both saved as profiles, switching between them on the Settings page takes one click and no retyping, both keep their keys, and a run started after a switch uses the new profile while one already running keeps its own.
Author
Owner

Shipped in da22c2c (deployed; new boot id). Change archived as openspec/changes/archive/2026-10-09-backend-profiles.

What shipped

  • Settings → Backend lists the saved backends as profiles: name, kind, URL, model, context window, output reservation, reasoning effort and API key. One is Used by runs; Use for runs on another switches in one click, as its own save, disabled while other edits are unsaved. A run keeps the backend it started with; the status light and the engine probe follow the switch.
  • Each profile keeps its own pasted key: switching never removes one, and moving one profile's URL to another host removes only its key. Add a backend, Duplicate and Delete; the profile runs use and the one planning uses cannot be deleted.
  • Planning is a select of "Same as the backend runs use" or any profile, and the planning provider now runs on that profile's own output reservation and effort.
  • Settings saved before profiles read as one profile until the first save. Production upgraded with no change of value: one profile vLLM · qwen3.8-27b with its saved 524,288 window and 32,000 reservation.

Found and fixed on the way: a context per agent saved together with a wider window was judged on the old window; and after saving a new backend with a typed key, Use for runs stayed disabled until a reload (the settings spec now covers it, and fails without the fix).

Checked: browser check on a local stack upgraded from #160-era settings (two runs kept the backend each started on; both keys and a rename survived an osfd restart); full lane green (backend, 188 browser specs, 13 simulated runs).

Next: #162 builds the Connect flow and per-model defaults on these profiles.

Shipped in da22c2c (deployed; new boot id). Change archived as `openspec/changes/archive/2026-10-09-backend-profiles`. **What shipped** - Settings → Backend lists the saved backends as profiles: name, kind, URL, model, context window, output reservation, reasoning effort and API key. One is **Used by runs**; **Use for runs** on another switches in one click, as its own save, disabled while other edits are unsaved. A run keeps the backend it started with; the status light and the engine probe follow the switch. - Each profile keeps its own pasted key: switching never removes one, and moving one profile's URL to another host removes only its key. Add a backend, Duplicate and Delete; the profile runs use and the one planning uses cannot be deleted. - **Planning** is a select of "Same as the backend runs use" or any profile, and the planning provider now runs on that profile's own output reservation and effort. - Settings saved before profiles read as one profile until the first save. Production upgraded with no change of value: one profile `vLLM · qwen3.8-27b` with its saved 524,288 window and 32,000 reservation. **Found and fixed on the way:** a context per agent saved together with a wider window was judged on the old window; and after saving a new backend with a typed key, Use for runs stayed disabled until a reload (the settings spec now covers it, and fails without the fix). **Checked:** browser check on a local stack upgraded from #160-era settings (two runs kept the backend each started on; both keys and a rename survived an osfd restart); full lane green (backend, 188 browser specs, 13 simulated runs). Next: #162 builds the Connect flow and per-model defaults on these profiles.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid#161
No description provided.