-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Add lead-worker model selection and real-time model display in GUI #2964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add lead-worker model selection and real-time model display in GUI #2964
Conversation
## Summary Implements real-time model display updates in the GUI when using lead-worker mode, showing which model (lead or worker) is currently active. ## Changes ### Backend - Add ModelChange event type to AgentEvent enum for tracking model switches - Emit ModelChange events when the lead-worker provider switches between models - Add /config/current-model API endpoint to fetch the currently active model - Update global current model store when providers complete requests - Fix runtime panic by avoiding block_on in async context (use global store instead) ### Frontend - Create LeadWorkerSettings UI component for configuring lead-worker mode - Add fields for lead model, worker model, lead turns, failure threshold, and fallback turns - Update useMessageStream hook to capture ModelChange events from SSE stream - Use React Context to share current model info instead of window.appConfig (which is read-only) - Update ModelsBottomBar to display active model with mode indicator (lead/worker) - Prioritize active model display when lead-worker mode is enabled ### Event Handling - Handle ModelChange events in all AgentEvent match statements: - CLI session handler - Web command handler - FFI library - Scheduler - Scheduler executor - Agent tests ## Testing - Fixed agent tests to handle the new ModelChange event - All tests pass - Clippy checks pass - Frontend linting and type checking pass
LuismiLabs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to the newlines at end of files in order to follow code standards, I just added in one place but for readability its nice to have, not a blocker
| </div> | ||
| </div> | ||
| ); | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to add this newline at end of file in order to follow code standards
|
Thanks @joanna2028 for your interest in goose! We'll try to keep the discussion here scoped to the code and probably prefer X for other topics |
michaelneale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a nice addition to lead/worker. The CI failure should be resolved on main now (apparently a dependabot update gone wrong)
…ackjackbits/goose into jackjackbits-feature/gui-lead-worker-model-selector * 'feature/gui-lead-worker-model-selector' of github.com:jackjackbits/goose: feat: Add real-time model display updates for lead-worker mode
|
updating it 🤞 that fixes the temporal build quirk |
|
also don't worry about the apparent "extra" changes (which are already on main) its a forever github bug with showing synced fork diffs (will see if can get rid of it, but they aren't actual changes as already on main upstream/origin!) |
|
ok - nice clean history now phew. Need to teach goose how to work around this 8 year old github bug |
baxen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
In testing this, realized there is an unrelated issue where the model returned in usage does not exactly match the names in config (the providers use a more specific versioned result) - that makes the logic here yield some unknowns. However that's a separate PR - cc: @michaelneale
* main: (28 commits) feat: optional fast edit models (#2580) feat: Add lead-worker model selection and real-time model display in GUI (#2964) chore(release): release version 1.0.29 (#2978) [fix][small] Replaced goose prompt unicode quotations with ascii quotations (#2972) fix: goose recipe prompt is not shown again when switch the view from settings to chat (#2870) fix: remove computer controller presentation (#2956) Fix GitHub Copilot Provider Config (#2955) Blog: Why I Used Goose to Build a Chaotic Emotion Detection App (#2959) Docs: Recipe settings (#2970) feat(ui): Add confirmation dialog for unsaved changes in extension modal (#2971) feat: alphabetize extensions in goose CLI (#2966) switch roles on condition for windows (#2975) fix version param for canary (#2974) enabling windows builds with code signing (#2968) feat(cli): add system prompt parameter to run command (#2253) Fix window not showing for some users (#2967) Add documentation for running with Ramalama local model serving in OCI Containers (#1973) Reddit MCP Server Tutorial (#2949) [fix] goose not quitting app completely (#2950) Opopadich/issue 1625 (#2904) ...
|
The event-driven model sync, global state refactor, and React Context integration show sharp architectural thinking. Real-time clarity in lead-worker dynamics delivers true operational confidence. Solid execution! |
* main: Blog: Add video to container use blog (#3008) Use official logo in Goose web (#3012) fix shims for extensions on windows (#3009) fix powershell executions (#3006) Docs linux desktop (#3007) Platform Tool for Scheduler: Allow Goose to Manage Its Own Schedule (#2944) docs: container use blog and guide (#2962) Fix: Workflow syntax (#3002) Added just lint-ui for linting front end code (#2997) fix typo in secret name (#2994) feat(ui): add chain-of-thought panel above assistant messages (#2899) feat(cli): Add `--quiet /-q` flag to goose run (#2939) Feat: Recipe Library (#2946) Docs: Goose on Windows Installation (#2990) Fixes : Workflow error on issue comment (#2958) Add a setting for the quit confirmation dialog (#2901) Update bundle-desktop-windows.yml (#2988) feat: optional fast edit models (#2580) feat: Add lead-worker model selection and real-time model display in GUI (#2964)
…GUI (block#2964) Co-authored-by: jack <[email protected]>
…GUI (block#2964) Co-authored-by: jack <[email protected]> Signed-off-by: Soroosh <[email protected]>
…GUI (block#2964) Co-authored-by: jack <[email protected]>
Summary
This PR implements a comprehensive feature for configuring and monitoring different AI models for planning (lead) and execution (worker) phases in the Goose GUI, with real-time display of the currently active model.
Changes
Backend Enhancements
AgentEvent::ModelChangeevent type to track when the system switches between models/config/current-modelendpoint to retrieve the active model informationget_active_model()method for accurate model state trackingFrontend Improvements
Configuration Options
Users can now configure:
Technical Details
The main challenge was displaying the correct active model during execution. This was solved by:
usage.modelfield from provider responses for accurate model identificationModelContext) for shared model state across componentsTesting
cargo fmtand passescargo clippy -- -D warningsScreenshots
The new UI allows users to:
Files changed: 16
Insertions: 475
Deletions: 9