Repository navigation
Add LLM Router settings section - #73
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.xcodeprojuses the classic explicitPBXFileReferenceformat rather thanPBXFileSystemSynchronizedRootGroup, so a new source file needs hand-authored UUIDs across fourproject.pbxprojsections. To avoid that risk, the router UI is embedded directly in the existingSettingsView.swiftas 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 existingWeeModels.swift/WeeAPIClient.swiftrather than new files.Test plan
xcodebuild build(macOS destination) — succeedsxcodebuild test— succeeds, all 215 existing tests unaffectedCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com