Repository navigation
feat: add configurable auto model modes - #389
Conversation
Automated reviewNEEDS HUMAN REVIEW — berdctl sends into an Auto session deadlock on their own dispatch lease (sessionSend.ts passes no sessionSelectionToken), locking that session until restart; reviewed f98c9ae. (per amp) From F1 — [BLOCKER] berdctl sends into an Auto session deadlock on their own dispatch leaseLocation: berd/src/features/chat/lib/autoRoutingDispatch.ts Lines 73 to 78 in f98c9ae berd/src/features/berdctl/commands/runtime/sessionSend.ts Lines 135 to 178 in f98c9ae Trigger: An agent runs How it deadlocks:
Impact: The berdctl command never returns. Every later queued or berdctl send to that session sees Fix direction: Pass F2 — [WARNING] On the home composer, choosing an Auto mode can leave Auto off or turn it offLocation: berd/src/features/chat/hooks/useResolvedAgentModelPicker.ts Lines 855 to 873 in f98c9ae Trigger: No session exists yet, and the effective model already equals the mode's What happens:
Impact: The user cannot enable Auto from the home screen in this state. When Fix direction: When there is no session, treat a same-model no-op as accepted. Alternatively, set the pending mode without going through the path that clears it. F3 — [WARNING] An unavailable routed model fails the send instead of using the configured fallbackLocation: berd/src/features/chat/lib/autoRoutingDispatch.ts Lines 81 to 91 in f98c9ae Trigger: The router returns a configured candidate that the provider does not currently serve, so inventory repair substitutes another model. What happens: By the time of the check, the target transition has already been applied. The session therefore sits on a substitute model that neither the user nor the router chose. The code then throws Fix direction: Retry once with F4 — [WARNING] Choosing a persona with a pinned model does not exit AutoLocation: berd/src/features/chat/lib/autoRoutingDispatch.ts Lines 35 to 40 in f98c9ae What happens:
Fix direction: Call F5 — [WARNING] Full router responses are logged in release builds and included in feedback log exportsLocation: andLine 132 in f98c9ae What happens: Why it matters: Fix direction: Log only the selection, source, and a truncated rationale at Info level, and keep the full response in memory. Alternatively, filter the F6 — [WARNING] The routing request cannot be cancelled and holds the send/queue lease for up to
|
Treat the home composer's same-fallback selection as accepted Auto intent.\nRestore the previous Auto mode and diagnostic if fallback activation fails,\nwhile preserving newer selections. These fixes share the activation path.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
REQUEST_CHANGES. Fresh static Engineering review of the exact three-dot comparison 180fe23...4d03af0 found two blocking changed-line defects: routing context can disclose agent-hidden transcript text to the configured routing service, and persisted Auto selections become send-blocking when a distribution removes or renames a mode. The supplied GitHub evidence was inspected and is structurally valid for the exact head; all listed checks completed successfully, though required checks still independently govern merge readiness. Final self-check covered every changed user flow; accessibility; i18n/localization completeness; navigation and consent guards; async, error, never-completes, lifecycle, and race behavior; test honesty; design-system/project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity.
Deterministic publication result: 2 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
REQUEST_CHANGES. Fresh static Engineering review of the exact three-dot comparison 180fe23...70a8603 found one blocking changed-line defect: a transient unavailable runtime-config result is treated as authoritative absence and permanently clears a restored chat's Auto intent. The two prior automation findings were rechecked: agent-hidden transcript content is now excluded from routing history, and genuinely removed or renamed modes recover to the concrete target. The supplied GitHub evidence is structurally valid for the exact head; several checks pass and the frontend and platform Rust checks remain in progress, while required checks independently govern merge readiness. Final self-check covered every changed user flow; accessibility; i18n/localization completeness; navigation and consent guards; async, error, never-completes, lifecycle, and race behavior; test honesty; design-system/project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity.
Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
APPROVE. Fresh static Engineering review of the full exact three-dot comparison 180fe23...d2313ef found no publishable changed-line defects. All three prior automated blockers were rechecked and are fixed: agent-hidden and replay-coordination transcript content is excluded before routing history is selected; genuinely removed or renamed Auto modes recover to the concrete target; and unavailable runtime configuration now preserves persisted Auto intent until a ready configuration is authoritative. The changed regression tests discriminate each corrected behavior. The supplied GitHub evidence is structurally valid for the exact head and all listed checks completed successfully, though required checks still independently govern merge readiness. Final self-check covered every changed user flow; accessibility; i18n/localization completeness; navigation and consent guards; async, error, never-completes, lifecycle, and race behavior; test honesty; design-system/project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity.
Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
Pending checks: 1 check(s) are not complete.
This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
APPROVE. Fresh static Engineering review of the full exact three-dot comparison 180fe23...e8c1778 found no publishable changed-line defects. The new-chat runtime-config refresh, last-valid fallback, renderer/native snapshot agreement, UI and CLI creation paths, queue dispatch, routing transport, and persisted Auto recovery were traced through success, unavailable, timeout, supersession, and concurrent-request behavior. All prior automated blockers remain fixed: hidden replay content is excluded, removed modes recover safely, and failed config loads preserve Auto intent. The supplied GitHub evidence is structurally valid for the exact head and all listed checks completed successfully, though required checks still independently govern merge readiness. Final self-check covered every changed user flow; accessibility; i18n/localization completeness; navigation and consent guards; async, error, never-completes, lifecycle, and race behavior; test honesty; design-system/project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity.
Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
Pending checks: 1 check(s) are not complete.
This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.
Automated reviewAPPROVE WITH CAUTION — Reviewed e8c1778; prior blockers are fixed, and two nonblocking defects remain: numeric routeSelector.config values fail the native config-equality guard (WARNING), and a failed new-chat refresh downgrades an app-default config to unavailable (INFO). (per amp) From F1 — [WARNING] Whole-number floats in
|
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
REQUEST_CHANGES. Fresh static Engineering review of the full exact three-dot comparison 180fe23...9c775f0 found one blocking changed-line lifecycle defect: when an older runtime-config load finishes while a newer generation is still pending and no current value exists, the older caller receives a synthetic unavailable result even if its own source read succeeded. That can make startup or native Auto routing fail or fall back during a valid concurrent refresh. Existing overlap tests cover a newer result that has already committed, not this pending gap. All prior automated blockers remain fixed. The supplied GitHub evidence is structurally valid for the exact head; the macOS Tauri Rust check failed, two checks remain in progress, and the other listed checks passed. Required checks independently govern merge readiness. Final self-check covered every changed user flow; accessibility; i18n/localization completeness; navigation and consent guards; async, error, never-completes, lifecycle, and race behavior; test honesty; design-system/project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity.
Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
Automated reviewAPPROVE WITH CAUTION — Reviewed 9c775f0; no high-severity defects; medium findings remain on bearerTokenEnv secret scope, overlapping native config loads (unresolved thread), provider sync blocking new chats, and effort-bound send failures. (per amp) From F1 — [WARNING] Runtime config can send any process environment variable as a bearer token to any http(s) URLLocation: berd/src-tauri/src/commands/runtime_config.rs Lines 1227 to 1252 in 9c775f0 berd/src-tauri/src/commands/auto_routing.rs Lines 106 to 113 in 9c775f0 Until now, runtime config could not choose or carry secrets. F2 — [WARNING] Overlapping native config loads can return a false Unavailable result (unresolved thread)Location: berd/src-tauri/src/commands/runtime_config.rs Lines 539 to 544 in 9c775f0 This is still present at this head, as described in #389 (comment). F3 — [WARNING] A custom-provider sync failure now blocks all new chat creation, and every new chat reseeds the model cacheLocation: berd/src/shared/runtime-config/newChatRuntimeConfig.ts Lines 37 to 46 in 9c775f0 berd/src/features/providers/runtimeProviderConfig.ts Lines 219 to 253 in 9c775f0
F4 — [WARNING] Effort selection fails the send when no session option falls within the candidate's boundsLocation: berd/src/features/chat/lib/autoRoutingDispatch.ts Lines 163 to 186 in 9c775f0 The effort mapping only recognizes F5 — [INFO] Routing prompt truncation can split a surrogate pair, which makes routing silently use the fallbackLocation: berd/src/features/chat/lib/autoRoutingPrompt.ts Lines 15 to 19 in 9c775f0 berd/src/features/chat/lib/autoRoutingPrompt.ts Lines 83 to 85 in 9c775f0
From F1 — [WARNING] Preserve successful overlapping configuration loadsLocation: runtime_config.rs:539–544 The existing finding remains valid: when two initial loads overlap, the older successful result becomes synthetic F2 — [WARNING] Preserve Auto opt-out across detached-window returnLocation: acpSessionMapping.ts:136–139 Open an Auto chat in a detached window, select its current concrete model to leave Auto, then close that window and send from the main window. The detached renderer persists Reviewed at commit |
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
APPROVE. Fresh static Engineering review of the full exact three-dot comparison 180fe23...792c81d found no publishable changed-line defects. The previously reported overlapping-load race is fixed: an obsolete successful read remains usable by its caller without taking cache ownership, and a discriminating concurrent-load test verifies the newer generation ultimately becomes current. The complete Auto routing, new-chat refresh, provider reconciliation, UI and CLI creation, queue, transport, persistence, stale-window resync, and failure/recovery paths were rechecked; all prior automated blockers remain fixed. The supplied GitHub evidence is structurally valid for the exact head; four checks remain in progress and the other listed checks passed. Required checks still independently govern merge readiness. Final self-check covered every changed user flow; accessibility; i18n/localization completeness; navigation and consent guards; async, error, never-completes, lifecycle, and race behavior; test honesty; design-system/project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity.
Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
Pending checks: 4 check(s) are not complete.
This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.
Summary
Add configurable Auto modes so each new prompt can choose a model and reasoning effort. The picker lists modes first with branching-arrow icons, shows the concrete model, and offers expandable routing details. Steering keeps the current model; choosing a concrete model exits Auto.
goose.autoRoutingshares the endpoint, timeout, optional bearer-token environment variable, and optional route selector. Each mode defines its candidates, effort bounds, and fallback. An optional default mode applies to new chats. Public setup examples use Databricks.Routing allows 24,000 characters each for task text, loaded skill instructions, each file preview, and recent agent-visible conversation. Replay coordination and hidden transcript records are excluded. Requests run through the native backend; failed or invalid selections use the configured fallback. Queue coordination preserves explicit model choices when a routing response arrives late. Full bounded responses remain in transient UI details only. Logs record transport metadata, and feedback exports omit legacy logs containing raw responses. Removed Auto modes clear stale intent so existing chats can continue on their concrete model. Failed config loads and built-in defaults preserve Auto intent until an authoritative configuration confirms removal.
New chats refresh runtime config before choosing their initial model, including reused drafts and CLI creation. Refresh failures retain the last valid source config or usable built-in defaults. New chats wait for provider endpoint and catalog updates before selecting their target. Native-issued routing revisions avoid JSON number conversion errors. Detached windows resync stale configuration before retrying, and native checks reject responses whose configuration changed during the request. Overlapping initial loads preserve successful results without letting an older load overwrite the newer cache. This supplies the refresh boundary for future distribution-owned LaunchDarkly overrides; Auto routing remains file-configured for now. The queue behavior continues to follow
LAWS/CHAT.md.Related issue
None found in the existing issues or PRs.
Testing
Rebuilt and export-verified the native distribution at
792c81d. Startup and new-chat creation succeeded; Auto Balanced completed a synthetic prompt using GLM Flash 5.3/high. The overlapping-load race is covered by a deterministic regression that holds the newer load pending while the older load completes.Built and export-verified the native macOS distribution at
9c775f0. Auto Balanced completed a synthetic prompt with GLM Flash 5.3/high. Renaming an Auto mode in the disposable bundled config appeared on the next new chat, which completed another routed prompt. The original config was restored byte-for-byte. Numeric precision, stale-window recovery, provider synchronization, and refresh races have regression coverage.Earlier live tests at
e8c1778passed Balanced and Premium routing, fresh-prompt rerouting, expandable rationale, steering with the same model, and manual selection exiting Auto. A temporary bundled-config change appeared only after a new chat. Invalid JSON retained the last valid config and completed inference. An unreachable router used the configured fallback and displayed its reason. The original config was restored byte-for-byte. Screenshots below show4d03af0.Screenshots
Native distribution UI at
4d03af0, with the sidebar collapsed and synthetic prompts.Completed live prompt with the selected model visible:
Generated with Codex