Skip to content

Remove lead/worker provider#7989

Merged
DOsinga merged 2 commits intomainfrom
remove-lead-worker
Mar 18, 2026
Merged

Remove lead/worker provider#7989
DOsinga merged 2 commits intomainfrom
remove-lead-worker

Conversation

@DOsinga
Copy link
Collaborator

@DOsinga DOsinga commented Mar 18, 2026

Summary

Remove the lead/worker provider feature entirely from the codebase.

The lead/worker provider allowed switching between a "lead" model for initial turns and a "worker" model for subsequent turns, with automatic fallback to the lead model on consecutive failures.

Changes

Deleted files (3):

  • crates/goose/src/providers/lead_worker.rs — full provider implementation (~500 lines)
  • ui/desktop/src/components/settings/models/subcomponents/LeadWorkerSettings.tsx — settings modal
  • ui/desktop/src/components/settings/models/subcomponents/LeadWorkerSettings.test.tsx — its tests

goose crate:

  • Removed LeadWorkerProviderTrait and as_lead_worker()/get_active_model_name() from the Provider trait
  • Removed ModelChange variant from AgentEvent enum and all match arms
  • Removed GOOSE_LEAD_MODEL check in provider create() and related helper functions
  • Removed lead/worker posthog analytics tracking
  • Removed all related tests

goose-cli:

  • Removed ModelChange from StreamEvent enum and its handling
  • Simplified display_session_info() by removing the provider_instance parameter and lead/worker display logic

goose-server:

  • Removed ModelChange from MessageEvent SSE enum and its stream handling

Desktop UI:

  • Removed Lead/Worker Settings menu item and modal from the model dropdown
  • Removed lead/worker status badge display
  • Removed CurrentModelContext/useCurrentModelInfo from BaseChat
  • Removed GOOSE_LEAD_PROVIDER/GOOSE_LEAD_MODEL config labels

Testing

  • cargo build
  • cargo clippy --all-targets -- -D warnings
  • cargo test -p goose
  • npx tsc --noEmit
  • pnpm test — all 321 UI tests pass ✅

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6cf56062e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Remove the lead/worker provider feature which allowed switching between
a lead model for initial turns and a worker model for subsequent turns
with automatic fallback on failures.

Removed across all layers:
- goose crate: LeadWorkerProvider, LeadWorkerProviderTrait, ModelChange
  agent event, related posthog tracking, and all tests
- goose-cli: lead/worker display logic, ModelChange stream event
- goose-server: ModelChange message event
- desktop UI: LeadWorkerSettings modal, lead/worker status display,
  CurrentModelContext, and related config labels

Signed-off-by: Douwe Osinga <douwe@squareup.com>
@DOsinga DOsinga force-pushed the remove-lead-worker branch from a6cf560 to bcb1e6c Compare March 18, 2026 14:53
@DOsinga DOsinga requested a review from jh-block March 18, 2026 16:07
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0426566333

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 158 to 161
pub enum AgentEvent {
Message(Message),
McpNotification((String, ServerNotification)),
ModelChange { model: String, mode: String },
HistoryReplaced(Conversation),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove stale ModelChange consumers after deleting AgentEvent variant

After AgentEvent::ModelChange is removed from the enum, all downstream matches need to be updated as well; crates/goose-server/src/routes/session_events.rs still matches AgentEvent::ModelChange (around line 465) and publishes MessageEvent::ModelChange (around line 468), while MessageEvent no longer defines that variant in routes/reply.rs. This leaves the server event-stream path inconsistent and causes goose-server to fail to compile when that module is built.

Useful? React with 👍 / 👎.

@DOsinga DOsinga force-pushed the remove-lead-worker branch from 0426566 to 869afc0 Compare March 18, 2026 18:58
Signed-off-by: Douwe Osinga <douwe@squareup.com>

# Conflicts:
#	ui/desktop/src/hooks/useChatStream.ts
@DOsinga DOsinga force-pushed the remove-lead-worker branch from 869afc0 to ff31fc6 Compare March 18, 2026 19:37
@DOsinga DOsinga added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 6435e1a Mar 18, 2026
22 of 23 checks passed
@DOsinga DOsinga deleted the remove-lead-worker branch March 18, 2026 20:42
michaelneale added a commit that referenced this pull request Mar 19, 2026
* origin/main:
  fix(openai): use Responses API for gpt-5.4 (#7982)
  Remove lead/worker provider (#7989)
  chore(release): release version 1.28.0 (#7991)
  Fix empty tool results from resource content (e.g. auto visualiser) (#7866)
  Separate SSE streaming from POST work submission (#7834)
  fix: include token usage in Databricks streaming responses (#7959)
  Optimize tool summarization (#7938)
lifeizhou-ap added a commit that referenced this pull request Mar 20, 2026
* main: (22 commits)
  feat: add gemini-acp provider, update docs on subscription models + improvements to codex (#8000)
  fix(openai): use Responses API for gpt-5.4 (#7982)
  Remove lead/worker provider (#7989)
  chore(release): release version 1.28.0 (#7991)
  Fix empty tool results from resource content (e.g. auto visualiser) (#7866)
  Separate SSE streaming from POST work submission (#7834)
  fix: include token usage in Databricks streaming responses (#7959)
  Optimize tool summarization (#7938)
  fix: overwrite the deprecated googledrive extension config (#7974)
  refactor: remove unnecessary Arc<Mutex> from tool execution pipeline (#7979)
  Revert message flush & test (#7966)
  docs: add Remote Access section with Telegram Gateway documentation (#7955)
  fix: update webmcp blog post metadata image URL (#7967)
  fix: clean up OAuth token cache on provider deletion (#7908)
  fix: hard-coded tool call id in code mode callback (#7939)
  Fix SSE parsers to accept optional space after data: prefix (#7929)
  docs: add GOOSE_INPUT_LIMIT to config-files.md (#7961)
  Add WebMCP for Beginners blog post (#7957)
  Fix download manager (#7933)
  Improve the formatting of tool calls, show thinking, treat Reasoning and Thinking as the same thing (sorry Kant) (#7626)
  ...
elijahsgh pushed a commit to elijahsgh/goose that referenced this pull request Mar 21, 2026
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Signed-off-by: esnyder <elijah.snyder1@gmail.com>
elijahsgh pushed a commit to elijahsgh/goose that referenced this pull request Mar 21, 2026
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Signed-off-by: esnyder <elijah.snyder1@gmail.com>
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.

2 participants