CLI: Configure Providers shows base engine fields (OPENAI_HOST) for custom providers
Describe the bug
When selecting a custom provider in the CLI's Configure Providers flow, the prompts show api_key_env variable correctly but then show the underlying engine's config variables (e.g., OPENAI_HOST, OPENAI_BASE_PATH for OpenAI-compatible providers) instead of custom provider-specific fields.
Updating the API key correctly updates the keychain. Changes to the underlying engine's variables don't update the custom provider's JSON config.
To Reproduce
- Create a custom OpenAI-compatible provider via CLI
- Run
goose configure>Configure Providers - Select the custom provider from the list
- Observe prompts for
OPENAI_HOSTandOPENAI_BASE_PATHinstead ofAPI URL(the language used when creating a custom provider) - Enter new values and complete the flow
- Check the provider's JSON config file in
~/.config/goose/custom_providers/ - Observe that
base_urlis unchanged - the values entered were not applied
Example output:
◇ Which model provider should we use?
│ Test OpenAI CP
│
● CUSTOM_TEST_OPENAI_CP_API_KEY is already configured
│
◇ Would you like to update this value?
│ No
│
● OPENAI_HOST is already configured <-- Inherited from OpenAI provider
│
◇ Would you like to update this value?
│ Yes
│
◇ Enter new value for OPENAI_HOST
│ https://is.yucca.cactus.com
│
● OPENAI_BASE_PATH is already configured <-- Inherited from OpenAI provider
Expected behavior
Updating custom providers via Configure Providers works, e.g.:
- Prompt for custom provider fields and save changes to the custom provider's JSON config (
base_urlfield) - Ideally allow updating other fields (display name, models, streaming support, custom headers)
Or create a dedicated Custom Providers > Update Custom Provider option
Screenshots N/A
Please provide the following information
- OS & Arch: macOS
- Interface: CLI
- Version: v1.16.0
- Extensions enabled: N/A
- Provider & Model: Custom OpenAI-compatible provider
Additional context
- The API key prompt (
CUSTOM_TEST_OPENAI_CP_API_KEY) works correctly and updates the keychain
Root cause: In crates/goose/src/providers/provider_registry.rs, the register_with_name function clones the base provider's config_keys and only replaces the API key name:
let mut config_keys = base_metadata.config_keys.clone();
// Only the API key is replaced; OPENAI_HOST, OPENAI_BASE_PATH, etc. remain
Current workarounds:
- Remove and re-add the custom provider via
Custom Providersmenu - Edit in goose Desktop or the JSON config file in
~/.config/goose/custom_providers/