Skip to content

Add LLM Router settings section - #73

Merged
leprachuan merged 1 commit into
mainfrom
issue-506-llm-router-settings
Oct 4, 2026
Merged

leprachuan merged 1 commit into
mainfrom
issue-506-llm-router-settings

Conversation

@leprachuan

Copy link
Copy Markdown
Owner

Closes #72.

Adds a Settings > LLM Router section for configuring the Wee-Orchestrator LLM model router (Wee-Orchestrator#506, PR leprachuan/Wee-Orchestrator#511): enable toggle, brain runtime/model, allowlist editor, fallback pair, stickiness/cooldown, prompt-template editor, and a "Test Route" box.

Implementation note: this repo's .xcodeproj uses the classic explicit PBXFileReference format rather than PBXFileSystemSynchronizedRootGroup, so a new source file needs hand-authored UUIDs across four project.pbxproj sections. To avoid that risk, the router UI is embedded directly in the existing SettingsView.swift as a new section (matching how .env/notification settings are already sections in that same file), and the new Codable models/API-client methods were appended to the existing WeeModels.swift/WeeAPIClient.swift rather than new files.

Test plan

  • xcodebuild build (macOS destination) — succeeds
  • xcodebuild test — succeeds, all 215 existing tests unaffected
  • Manual check against a live dev backend with routing enabled: load config, edit allowlist, save, test-route a prompt

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Adds an "LLM Router" box to Settings (WeeOrchestrator/Views/SettingsView.swift),
following the existing load/save/status pattern used by the .env and
notification-toggle sections in this same file. Embedded directly in
SettingsView.swift rather than a new file, since this project's .xcodeproj
uses the classic explicit PBXFileReference format (no
PBXFileSystemSynchronizedRootGroup) — a new file would need hand-authored
UUIDs across four pbxproj sections, which this avoids entirely.

- WeeOrchestrator/Models/WeeModels.swift: RouterConfig, RouterRuntimeModel,
  RouterAllowlistEntry, RouterStickiness, RouterConfigResponse/Update/Save
  requests, RouterTestRequest/Response, RouterDecision, RouterStatusResponse,
  RouterCooldownEntry — Codable structs matching the Core API's
  GET/PUT /api/v1/router-config, POST /api/v1/router/test,
  GET /api/v1/router/status.
- WeeOrchestrator/Services/WeeAPIClient.swift: routerConfig(),
  saveRouterConfig(_:), testRouter(prompt:), routerStatus().
- WeeOrchestrator/Views/SettingsView.swift: enable toggle, brain
  runtime/model fields, allowlist row editor (add/remove + hint), fallback
  pair, stickiness/cooldown fields, prompt-template editor, and a "Test
  Route" box hitting POST /api/v1/router/test. Added "router" to
  runtimeFallbacks so it's selectable even before the live API responds.
- Note: PUT /api/v1/router-config returns {saved, config} (no
  enabled_effective/validation_errors, unlike GET) — modeled as a distinct
  RouterConfigSaveResponse rather than forcing it into RouterConfigResponse;
  the save handler re-fetches afterward to refresh effective state.

Verified: xcodebuild build and test both succeed (macOS destination, 215
existing tests unaffected).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@leprachuan
leprachuan merged commit 976e422 into main Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add LLM Router configuration UI (Wee-Orchestrator#506)

1 participant