Skip to content

Conversation

@michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented May 29, 2025

I have been using with good effect an expensive model like opus claude4 for a bit, and switching to claude4 sonnet mid stream.

This feature will automatically switch from large to small as session goes on so you can make more efficient use if you set a lead model. this is similar to the /plan mode but you don't have to remember to call it.

How it works:

set the GOOSE_LEAD_MODEL and optionally GOOSE_LEAD_PROVIDER

this works with the plan feature, and similar to it but is automatic for tool calling/execution, vs plan which is more for planning/chat.

Also added docs and connected it with the plan feature (existing)

@michaelneale michaelneale requested a review from salman1993 May 29, 2025 10:05
@angiejones
Copy link
Collaborator

feedback here and here basically stating they'd like to confirm the switch

@michaelneale
Copy link
Collaborator Author

@angiejones interesting - I would think that you would configure that ahead of time - if you don't want it to do it, dont' have that extra model (as by default wont have one)?

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

PR Preview Action v1.6.0
Preview removed because the pull request was closed.
2025-06-05 03:57 UTC

Copy link
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

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

Looks good! love the idea and good call to make it a new provider type here

i think there are some issues with the failure handling still? but it mostly worked for me!

@blackgirlbytes
Copy link
Contributor

blackgirlbytes commented Jun 5, 2025

okay @michaelneale so making sure I understand this:

  1. User set the lead and worker model in an env variable (that's the user opting in to the switch)
  2. Goose shows a message that it's switching from lead to the worker model in the CLI
    It sounds like both of these address concerns from the community where they wanted to have control/transparency
  3. However, what I'm gathering from the PR is that while the env variables affect the UI..so like it will switch between lead and worker model, they will not see much a visual indicator that it's being switched?

Am I understanding this correctly and if so, could we add a little visual indicator?

Besides that, this PR is cool with me. I'm team "switch the model without me knowing..do the heavy decision making for me"

Sidenote: apologies for my rogue issue and comment that was added to this PR. I asked Goose to help me catch up on the Discord conversations related to this PR..and then it was like I will leave a comment on and open an issue based on the Discord conversation. Claude 4 is too powerful and fast 😆

@michaelneale
Copy link
Collaborator Author

@blackgirlbytes no worries - meant to ask for your feedback, yes you have it right, will be a subtle indicator it is switching models (we can improve it over time too) of course few will use this feature out of the gate as it won't be a default feature of course. It isn't just about cost too, it could apply to local models where very very slow ones are used as the lead vs the worker which is faster and more efficient

@blackgirlbytes
Copy link
Contributor

t just about cost too, it could apply to local models where very very slow ones are used as the lead vs the worker which is faster and more efficient

oh cool! I like it!

* main:
  feat: goose web for local terminal alternative (#2718)
  chore: run CI on merge_group (#2786)
@michaelneale michaelneale merged commit 2f8f8e5 into main Jun 5, 2025
8 checks passed
@michaelneale michaelneale deleted the micn/lead-model branch June 5, 2025 03:55
michaelneale added a commit that referenced this pull request Jun 5, 2025
* main: (82 commits)
  feat: lead/worker model (#2719)
  fix: pass ref in pr comment workflow (#2777)
  feat: goose web for local terminal alternative (#2718)
  chore: run CI on merge_group (#2786)
  fix: Don't break from consuming subprocess output in shell tool until both streams are done (#2771)
  Add retries w/ exponential backoff for databricks provider (#2764)
  Fix paths in google drive mcp documentation (#2775)
  testing windows build (#2770)
  docs: Add Context7 YouTube Video (#2779)
  cli(command): Add `export` command to CLI for markdown export of sessions (#2533)
  fix(copilot): gh copilot auth token conflicts w/ gh mcp env var (#2743)
  feat(providers): Add support for Gemini 2.5 Flash Preview and Pro Preview models (#2780)
  fix: pr comment build cli workflow (#2774)
  hotfix: don't always run prompt (#2773)
  Lifei/test workflow (#2772)
  chore: use hermit to install node, rust and protoc (#2766)
  Feat: Refined the documentation for Goose (#2751)
  mcp(developer): add fallback on .gitignore if no .gooseignore is present (#2661)
  cli(ux): Show active context length in CLI (#2315)
  cli(config): Add GOOSE_CONTEXT_STRATEGY setting (#2666)
  ...
lifeizhou-ap added a commit that referenced this pull request Jun 5, 2025
* main:
  feat: lead/worker model (#2719)
  fix: pass ref in pr comment workflow (#2777)
  feat: goose web for local terminal alternative (#2718)
  chore: run CI on merge_group (#2786)
  fix: Don't break from consuming subprocess output in shell tool until both streams are done (#2771)
  Add retries w/ exponential backoff for databricks provider (#2764)
  Fix paths in google drive mcp documentation (#2775)
  testing windows build (#2770)
  docs: Add Context7 YouTube Video (#2779)
  cli(command): Add `export` command to CLI for markdown export of sessions (#2533)
  fix(copilot): gh copilot auth token conflicts w/ gh mcp env var (#2743)
  feat(providers): Add support for Gemini 2.5 Flash Preview and Pro Preview models (#2780)
iandouglas pushed a commit that referenced this pull request Jun 5, 2025
katzdave added a commit to katzdave/goose that referenced this pull request Jun 6, 2025
* upstream/main:
  Iand/blog goosehints metadata update (block#2800)
  Iand/blog goosehints (block#2798)
  blog post about goosehints and persistent context (block#2796)
  [goose-llm] system prompt override (block#2791)
  chore: small bit of a cleanup - removing unused dir (block#2761)
  feat: lead/worker model (block#2719)
  fix: pass ref in pr comment workflow (block#2777)
  feat: goose web for local terminal alternative (block#2718)
  chore: run CI on merge_group (block#2786)
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

5 participants