Skip to content

fix: activate custom provider after adding via configure - #9213

Merged
DOsinga merged 1 commit into
mainfrom
fix/activate-custom-provider-6692
May 18, 2026
Merged

fix: activate custom provider after adding via configure#9213
DOsinga merged 1 commit into
mainfrom
fix/activate-custom-provider-6692

Conversation

@DOsinga

@DOsinga DOsinga commented May 14, 2026

Copy link
Copy Markdown
Collaborator

After adding a custom provider through goose configure → Custom Providers → Add, the provider was saved to disk but not set as the active provider in config.yaml. Users had to separately navigate to "Configure Providers" to select it.

Now prompts the user to set the new provider as active immediately after creation, and if confirmed, writes GOOSE_PROVIDER and GOOSE_MODEL to config.yaml. If only one model was entered, it's auto-selected; if multiple, the user picks the default.

Closes #6692

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

Copy link
Copy Markdown

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: 551c1868a1

ℹ️ 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 +2114 to +2121
let model_items: Vec<_> = provider_config
.models
.iter()
.map(|m| (m.name.as_str(), m.name.as_str(), ""))
.collect();
cliclack::select("Which model should be the default?")
.items(&model_items)
.interact()?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Guard activation flow against empty model list

If the user enters only commas/spaces in the model prompt (e.g. ", ,"), the current validator still accepts it, models becomes empty after trimming/filtering, and this new activation path reaches the select("Which model should be the default?") call with zero items. In that case, activation fails at runtime after the provider has already been created, leaving users in a partial-success state. This regression is introduced by the new post-create activation logic and is triggered specifically when provider_config.models is empty.

Useful? React with 👍 / 👎.

After adding a custom provider through 'goose configure → Custom Providers →
Add', the provider was saved to disk but not set as the active provider in
config.yaml. Users had to separately navigate to 'Configure Providers' to
select it.

Now prompts the user to set the new provider as active immediately after
creation, and if confirmed, writes GOOSE_PROVIDER and GOOSE_MODEL to
config.yaml.

Closes #6692

Signed-off-by: Douwe Osinga <douwe@squareup.com>
@DOsinga
DOsinga force-pushed the fix/activate-custom-provider-6692 branch from 551c186 to 1df2d3e Compare May 14, 2026 16:32

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

Copy link
Copy Markdown

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: 1df2d3e4af

ℹ️ 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 +2112 to +2115
if let Ok(model) = cliclack::select("Which model should be the default?")
.items(&model_items)
.interact()
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate model-selection failures during activation

The new activation step silently ignores any error from select(...).interact() by using if let Ok(model), so cancellation/interrupts (for example Esc/Ctrl+C) or terminal I/O errors now fall through to a successful Custom provider added outro without writing GOOSE_PROVIDER/GOOSE_MODEL. This creates a partial-success state introduced by this commit: provider creation succeeds, but activation may be skipped with no feedback. Please handle the error path explicitly (or propagate it) so users don’t get a false success signal.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

well, it silently didn't activate before, so this is no worse. up to you whether to deal with this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

too me this seems fine. if the user wants to abort it is on to them

@jh-block jh-block left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one nit

@DOsinga
DOsinga added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit 7bce91e May 18, 2026
23 checks passed
@DOsinga
DOsinga deleted the fix/activate-custom-provider-6692 branch May 18, 2026 14:12
michaelneale added a commit that referenced this pull request May 19, 2026
* origin/main: (160 commits)
  Add Linux musl CLI builds (#9240)
  feat(acp): paginate session list (#9199)
  docs: reorganize (#9310)
  Structured per-provider config block, non-destructive provider switching (#8977)
  feat(cli): add `goose review` local code review command (#9114)
  feat(tui): diff viewer (#9260)
  fix(otel): emit trace_output as span attribute instead of event (#9255)
  docs: add guide for connecting goose Desktop to a remote goosed server (#9275)
  fix(config): check file fallback when keyring has no entry (#9279)
  fix(desktop): ScheduleModal error message styling (#9278)
  fix(ui): align sidebar hamburger in macOS fullscreen (#9257)
  Add documentation for new provider SaladCloud AI Gateway (#9253)
  fix: use current_exe() instead of PATH lookup when spawning goose (#9236)
  fix(extension_manager): set TCP_USER_TIMEOUT on streamable HTTP clients (#9207)
  fix: activate custom provider after adding via configure (#9213)
  Flush OTLP traces reliably on exit with configurable timeout (#9228)
  fix: reduce excessive MISSING_TRANSLATION warnings for fallback locales (#9294)
  feat(acp): pass session cwd param to acp providers (#9229)
  fix(desktop): eliminate cross-window deep link contamination (#9273)
  fix: improve Telegram gateway error reporting and connection reliability (#9223)
  ...

Signed-off-by: Michael Neale <michael.neale@gmail.com>

# Conflicts:
#	crates/goose/src/agents/agent.rs
#	crates/goose/tests/agent.rs
shafqatevo pushed a commit to shafqatevo/goose that referenced this pull request Aug 7, 2026
…9213)

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.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.

config.yaml is not updated when using goose configure

2 participants