diff --git a/src/config/mod.rs b/src/config/mod.rs index 4d94ae48..68b23ab2 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -57,8 +57,7 @@ pub use self::wasm::WasmConfig; pub use self::workspace::WorkspaceConfig; pub use crate::llm::config::{ BedrockConfig, CacheRetention, GeminiOauthConfig, LlmConfig, NearAiConfig, OAUTH_PLACEHOLDER, - OpenAiCodexConfig, - RegistryProviderConfig, + OpenAiCodexConfig, RegistryProviderConfig, }; pub use crate::llm::session::SessionConfig; diff --git a/src/llm/gemini_oauth.rs b/src/llm/gemini_oauth.rs index 50f0179c..92066787 100644 --- a/src/llm/gemini_oauth.rs +++ b/src/llm/gemini_oauth.rs @@ -89,7 +89,7 @@ fn default_safety_settings() -> Vec { /// Parse `GEMINI_CLI_CUSTOM_HEADERS` env var in format `key:value,key:value`. /// Commas inside values are preserved — splits only on commas followed by a -/// valid HTTP header name pattern (ASCII alphanumeric/hyphen/underscore, then `:`). +/// valid HTTP header-name pattern (`[A-Za-z0-9_-]+:`). fn parse_custom_headers() -> std::collections::HashMap { let mut headers = std::collections::HashMap::new(); let env_val = match std::env::var("GEMINI_CLI_CUSTOM_HEADERS") { @@ -98,7 +98,7 @@ fn parse_custom_headers() -> std::collections::HashMap { }; // Manual split: a comma is a separator only when followed (after optional - // whitespace) by `:` where header-name is `[A-Za-z0-9\-]+`. + // whitespace) by `:` where header-name is `[A-Za-z0-9_-]+`. let bytes = env_val.as_bytes(); let mut start = 0; let mut i = 0;