mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-17 22:24:21 +01:00
feat: allow OPENAI_CUSTOM_HEADERS to be set in goose config (#2235)
This commit is contained in:
@@ -58,6 +58,7 @@ impl OpenAiProvider {
|
||||
let project: Option<String> = config.get_param("OPENAI_PROJECT").ok();
|
||||
let custom_headers: Option<HashMap<String, String>> = config
|
||||
.get_secret("OPENAI_CUSTOM_HEADERS")
|
||||
.or_else(|_| config.get_param("OPENAI_CUSTOM_HEADERS"))
|
||||
.ok()
|
||||
.map(parse_custom_headers);
|
||||
let timeout_secs: u64 = config.get_param("OPENAI_TIMEOUT").unwrap_or(600);
|
||||
|
||||
@@ -128,7 +128,7 @@ Goose supports using custom OpenAI-compatible endpoints, which is particularly u
|
||||
| `OPENAI_HOST` | No | Custom endpoint URL (defaults to api.openai.com) |
|
||||
| `OPENAI_ORGANIZATION` | No | Organization ID for usage tracking and governance |
|
||||
| `OPENAI_PROJECT` | No | Project identifier for resource management |
|
||||
| `OPENAI_CUSTOM_HEADERS` | No | Additional headers to include in the request, in the format "HEADER_A=VALUE_A,HEADER_B=VALUE_B" |
|
||||
| `OPENAI_CUSTOM_HEADERS` | No | Additional headers to include in the request. Can be set via environment variable, configuration file, or CLI, in the format `HEADER_A=VALUE_A,HEADER_B=VALUE_B`. |
|
||||
|
||||
### Example Configurations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user