chore: show important keys for provider configuration#7265
chore: show important keys for provider configuration#7265lifeizhou-ap merged 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
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
primaryto provider config-key metadata (Rust + OpenAPI + generated TS types). - Update Desktop provider setup modal to group config fields by
primary. - Update
goose-cliinteractive 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 requiredParameters → primaryParameters 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.lengthto choose between "Submit" and "Enable Provider" can mislabel the action when a provider has config keys but none are marked primary (orprimaryis 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}
There was a problem hiding this comment.
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).
| 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 = []; | |
| } | |
| } |
There was a problem hiding this comment.
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”).
| 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; |
| ConfigKey::from_value_type::<CodexReasoningEffort>(false, false, true), | ||
| ConfigKey::from_value_type::<CodexSkipGitCheck>(false, false, true), |
There was a problem hiding this comment.
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.
| 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), |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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.
| ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None, true), | |
| ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None, false), |
There was a problem hiding this comment.
even this is not required, it is useful for user to see these 3 options
| secret: bool, | ||
| default: Option<&str>, | ||
| primary: bool, | ||
| ) -> Self { |
There was a problem hiding this comment.
we could almost consider a builder pattern here
ConfigKey("API_KEY").secret().required().with_default("value")
type of thing
There was a problem hiding this comment.
will do this in next PR
* 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) ...
* 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
Summary
Changes:
primaryto provider config-key metadataType of Change
AI Assistance
Screenshots/Demos (for UX changes)
CLI:

Desktop

Before:
After: