goose icon indicating copy to clipboard operation
goose copied to clipboard

CLI: Configure Providers shows base engine fields (OPENAI_HOST) for custom providers

Open dianed-square opened this issue 2 weeks ago • 0 comments

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

  1. Create a custom OpenAI-compatible provider via CLI
  2. Run goose configure > Configure Providers
  3. Select the custom provider from the list
  4. Observe prompts for OPENAI_HOST and OPENAI_BASE_PATH instead of API URL (the language used when creating a custom provider)
  5. Enter new values and complete the flow
  6. Check the provider's JSON config file in ~/.config/goose/custom_providers/
  7. Observe that base_url is 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_url field)
  • 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 Providers menu
  • Edit in goose Desktop or the JSON config file in ~/.config/goose/custom_providers/

dianed-square avatar Dec 10 '25 17:12 dianed-square