Skip to content

CLI: Custom provider configuration only prompts for headers on OpenAI compatible providers #7014

@dianed-square

Description

@dianed-square

Describe the bug

The CLI's custom provider configuration flow only prompts for custom headers when creating OpenAI compatible providers, even though the backend supports custom headers for all three provider types (OpenAI, Anthropic, and Ollama compatible). PR #6774 added custom headers support to Anthropic and Ollama providers in the backend.


To Reproduce
Steps to reproduce the behavior:

  1. Run goose configure
  2. Select Custom ProvidersAdd A Custom Provider
  3. Choose Anthropic Compatible or Ollama Compatible as the API type
  4. Complete the prompts
  5. Notice there is no prompt for custom headers (unlike OpenAI Compatible which does prompt)

Workaround: Users can manually edit the JSON configuration file in ~/.config/goose/custom_providers/ to add headers for Anthropic or Ollama compatible providers.


Expected behavior
All three provider types (OpenAI, Anthropic, and Ollama compatible) should prompt for custom headers during CLI configuration, since the backend supports them for all types.


Screenshots
N/A


Please provide the following information

  • OS & Arch: macOS (affects all platforms)
  • Interface: CLI
  • Version: main branch
  • Extensions enabled: N/A
  • Provider & Model: N/A (configuration issue)

Additional context

CLI limitation in crates/goose-cli/src/commands/configure.rs starting line ~1913:

// Ask about custom headers for OpenAI compatible providers
let headers = if provider_type == "openai_compatible" {
    collect_custom_headers()?
} else {
    None
};

Suggested Fix: Update the CLI to call collect_custom_headers() for all three provider types, not just OpenAI compatible.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions