Skip to content

chore: show important keys for provider configuration#7265

Merged
lifeizhou-ap merged 6 commits intomainfrom
lifei/refactor-provider-configuration
Feb 18, 2026
Merged

chore: show important keys for provider configuration#7265
lifeizhou-ap merged 6 commits intomainfrom
lifei/refactor-provider-configuration

Conversation

@lifeizhou-ap
Copy link
Collaborator

@lifeizhou-ap lifeizhou-ap commented Feb 17, 2026

Summary

  • Refactors provider configuration UX across Desktop UI and goose configure by introducing a primary flag on provider ConfigKeys, allowing “prominent” keys to be shown first while keeping advanced settings tucked away. This is prepared for the simplified onboarding flow that user are only shown the "prominent" keys to get them onboarding quickly.
  • Fix the limitation that user cannot change the "non required" keys in CLI.

Changes:

  • Add primary to provider config-key metadata
  • Update Desktop provider setup modal to group config fields by primary.
  • Update goose-cli interactive configuration to prompt for primary (and OAuth) keys first, with an “advanced settings” opt-in for the rest.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Screenshots/Demos (for UX changes)

CLI:
Screenshot 2026-02-17 at 7 54 16 pm

Desktop
Before:
Screenshot 2026-02-17 at 7 59 56 pm

After:

Screenshot 2026-02-17 at 7 57 25 pm

Copilot AI review requested due to automatic review settings February 17, 2026 07:47
@lifeizhou-ap lifeizhou-ap changed the title Lifei/refactor provider configuration chore: show important keys for provider configuration Feb 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors provider configuration UX across Desktop UI and goose configure by introducing a primary flag on provider ConfigKeys, allowing “prominent” keys to be shown first while keeping advanced settings tucked away.

Changes:

  • Add primary to provider config-key metadata (Rust + OpenAPI + generated TS types).
  • Update Desktop provider setup modal to group config fields by primary.
  • Update goose-cli interactive configuration to prompt for primary (and OAuth) keys first, with an “advanced settings” opt-in for the rest.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/desktop/src/components/settings/providers/modal/subcomponents/forms/DefaultProviderSetupForm.tsx Uses primary to split config fields into above/below-the-fold sections.
ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx Renames requiredParametersprimaryParameters and changes action labeling based on it.
ui/desktop/src/components/settings/providers/modal/ProviderConfiguationModal.tsx Computes primaryParameters from metadata and wires it into actions/notice logic.
ui/desktop/src/api/types.gen.ts Adds optional primary?: boolean to ConfigKey client type.
ui/desktop/openapi.json Adds primary property to the ConfigKey schema.
crates/goose/src/providers/base.rs Adds primary: bool to ConfigKey and threads it through constructors.
crates/goose/src/providers/provider_registry.rs Marks declarative/custom provider API key config as primary.
crates/goose/src/providers/xai.rs Sets primary for xAI provider keys.
crates/goose/src/providers/venice.rs Sets primary for Venice provider keys.
crates/goose/src/providers/tetrate.rs Sets primary for Tetrate provider keys.
crates/goose/src/providers/snowflake.rs Sets primary for Snowflake provider keys.
crates/goose/src/providers/sagemaker_tgi.rs Sets primary for SageMaker TGI provider keys.
crates/goose/src/providers/openrouter.rs Sets primary for OpenRouter provider keys.
crates/goose/src/providers/openai.rs Sets primary for OpenAI provider keys.
crates/goose/src/providers/ollama.rs Sets primary for Ollama provider keys.
crates/goose/src/providers/litellm.rs Sets primary for LiteLLM provider keys.
crates/goose/src/providers/google.rs Sets primary for Google provider keys.
crates/goose/src/providers/githubcopilot.rs Updates OAuth key constructor call with primary arg.
crates/goose/src/providers/gemini_cli.rs Updates from_value_type constructor call with primary arg.
crates/goose/src/providers/gcpvertexai.rs Sets primary for Vertex AI provider keys.
crates/goose/src/providers/databricks.rs Sets primary for Databricks provider keys.
crates/goose/src/providers/cursor_agent.rs Updates from_value_type constructor call with primary arg.
crates/goose/src/providers/codex.rs Updates from_value_type constructor calls with primary arg.
crates/goose/src/providers/claude_code.rs Updates from_value_type constructor call with primary arg.
crates/goose/src/providers/chatgpt_codex.rs Updates OAuth key constructor call with primary arg.
crates/goose/src/providers/bedrock.rs Sets primary for Bedrock provider keys.
crates/goose/src/providers/azure.rs Sets primary for Azure provider keys.
crates/goose/src/providers/anthropic.rs Sets primary for Anthropic provider keys.
crates/goose-cli/src/commands/configure.rs Adds configure_single_key() helper and switches prompting flow to primary/OAuth first, then advanced.
Comments suppressed due to low confidence (1)

ui/desktop/src/components/settings/providers/modal/subcomponents/ProviderSetupActions.tsx:104

  • Using primaryParameters.length to choose between "Submit" and "Enable Provider" can mislabel the action when a provider has config keys but none are marked primary (or primary is absent); consider basing this on whether there are any config keys / required keys instead, or pass an explicit flag from the parent.
      {primaryParameters && primaryParameters.length > 0 ? (
        <>
          <Button
            type="submit"
            variant="ghost"
            onClick={onSubmit}

Comment on lines 171 to 173
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

Filtering solely on p.primary can leave aboveFoldParameters empty (e.g., providers/custom providers where primary is unset/false for all keys), which renders no fields above the fold and hides all inputs behind the collapsible; consider falling back to the previous behavior (e.g., treat required keys as primary, or if no primary keys exist show all keys above the fold).

Suggested change
const aboveFoldParameters = parameters.filter((p) => p.primary);
const belowFoldParameters = parameters.filter((p) => !p.primary);
let aboveFoldParameters = parameters.filter((p) => p.primary);
let belowFoldParameters = parameters.filter((p) => !p.primary);
// Fallback behavior: if no primary keys are defined, treat required keys as primary,
// and if there are no required keys either, show all keys above the fold.
if (aboveFoldParameters.length === 0 && parameters.length > 0) {
const requiredParameters = parameters.filter((p) => p.required);
if (requiredParameters.length > 0) {
aboveFoldParameters = requiredParameters;
belowFoldParameters = parameters.filter((p) => !requiredParameters.includes(p));
} else {
aboveFoldParameters = parameters;
belowFoldParameters = [];
}
}

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

primaryParameters is derived from param.primary, but primary is optional in the API schema; when it’s missing/false for all keys this becomes empty and downstream UI (button labels, notices) behaves as if there are no parameters—consider a fallback (e.g., primary ?? required or “if none primary, treat all as primary”).

Suggested change
const primaryParameters = provider.metadata.config_keys.filter((param) => param.primary);
const filteredPrimaryParameters = provider.metadata.config_keys.filter(
(param) => param.primary ?? param.required ?? false,
);
const primaryParameters =
filteredPrimaryParameters.length > 0
? filteredPrimaryParameters
: provider.metadata.config_keys;

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 17, 2026 08:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Comment on lines +602 to +603
ConfigKey::from_value_type::<CodexReasoningEffort>(false, false, true),
ConfigKey::from_value_type::<CodexSkipGitCheck>(false, false, true),
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

These non-required parameters with sensible defaults (reasoning_effort defaults to "high", skip_git_check defaults to false) are marked as primary, which means they'll be shown prominently during initial provider setup. Consider setting primary to false for these advanced settings so users only see the required CODEX_COMMAND during initial configuration.

Suggested change
ConfigKey::from_value_type::<CodexReasoningEffort>(false, false, true),
ConfigKey::from_value_type::<CodexSkipGitCheck>(false, false, true),
ConfigKey::from_value_type::<CodexReasoningEffort>(false, false, false),
ConfigKey::from_value_type::<CodexSkipGitCheck>(false, false, false),

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is good to show these options to advanced user directly when configure codex

ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None),
ConfigKey::new("AWS_PROFILE", false, false, Some("default"), true),
ConfigKey::new("AWS_REGION", false, false, None, true),
ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None, true),
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

All three AWS configuration parameters are marked as primary but none are required. This means all three will be shown during initial setup even though AWS SDK can auto-discover credentials. Consider marking AWS_BEARER_TOKEN_BEDROCK as non-primary since it's an advanced authentication method, keeping only AWS_PROFILE and AWS_REGION as primary for most common use cases.

Suggested change
ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None, true),
ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None, false),

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

even this is not required, it is useful for user to see these 3 options

secret: bool,
default: Option<&str>,
primary: bool,
) -> Self {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we could almost consider a builder pattern here

ConfigKey("API_KEY").secret().required().with_default("value")

type of thing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will do this in next PR

Copy link
Collaborator

@katzdave katzdave left a comment

Choose a reason for hiding this comment

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

Nice!

@lifeizhou-ap lifeizhou-ap added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit 5dacfde Feb 18, 2026
26 checks passed
@lifeizhou-ap lifeizhou-ap deleted the lifei/refactor-provider-configuration branch February 18, 2026 07:16
jh-block added a commit that referenced this pull request Feb 18, 2026
* origin/main: (49 commits)
  chore: show important keys for provider configuration (#7265)
  fix: subrecipe relative path with summon (#7295)
  fix extension selector not displaying the correct enabled extensions (#7290)
  Use the working dir from the session (#7285)
  Fix: Minor logging uplift for debugging of prompt injection mitigation (#7195)
  feat(otel): make otel logging level configurable (#7271)
  docs: add documentation for Top Of Mind extension (#7283)
  Document gemini 3 thinking levels (#7282)
  docs: stream subagent tool calls (#7280)
  Docs: delete custom provider in desktop (#7279)
  Everything is streaming (#7247)
  openai: responses models and hardens event streaming handling (#6831)
  docs: disable ai session naming (#7194)
  Added cmd to validate bundled extensions json (#7217)
  working_dir usage more clear in add_extension (#6958)
  Use Canonical Models to set context window sizes (#6723)
  Set up direnv and update flake inputs (#6526)
  fix: restore subagent tool call notifications after summon refactor (#7243)
  fix(ui): preserve server config values on partial provider config save (#7248)
  fix(claude-code): allow goose to run inside a Claude Code session (#7232)
  ...
aharvard added a commit that referenced this pull request Feb 18, 2026
* origin/main:
  feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options (#7277)
  fix(openai): support "reasoning" field alias in streaming deltas (#7294)
  fix(ui): revert app-driven iframe width and send containerDimensions per ext-apps spec (#7300)
  New OpenAI event (#7301)
  ci: add fork guards to scheduled workflows (#7292)
  fix: allow ollama input limit override (#7281)
  chore: show important keys for provider configuration (#7265)
  fix: subrecipe relative path with summon (#7295)
  fix extension selector not displaying the correct enabled extensions (#7290)
  Use the working dir from the session (#7285)
  Fix: Minor logging uplift for debugging of prompt injection mitigation (#7195)
  feat(otel): make otel logging level configurable (#7271)
  docs: add documentation for Top Of Mind extension (#7283)
  Document gemini 3 thinking levels (#7282)
  docs: stream subagent tool calls (#7280)
  Docs: delete custom provider in desktop (#7279)

# Conflicts:
#	ui/desktop/src/components/McpApps/McpAppRenderer.tsx
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.

3 participants

Comments