diff --git a/src/crates/core/src/infrastructure/ai/client.rs b/src/crates/core/src/infrastructure/ai/client.rs index 6bfacb81..dd5faa33 100644 --- a/src/crates/core/src/infrastructure/ai/client.rs +++ b/src/crates/core/src/infrastructure/ai/client.rs @@ -572,6 +572,10 @@ impl AIClient { .header("Content-Type", "application/json") .header("Authorization", format!("Bearer {}", self.config.api_key)); + if self.config.base_url.contains("openbitfun.com") { + builder = builder.header("X-Verification-Code", "from_bitfun"); + } + if has_custom_headers && is_merge_mode { builder = self.apply_custom_headers(builder); } @@ -606,6 +610,10 @@ impl AIClient { .header("anthropic-version", "2023-06-01"); } + if url.contains("openbitfun.com") { + builder = builder.header("X-Verification-Code", "from_bitfun"); + } + if has_custom_headers && is_merge_mode { builder = self.apply_custom_headers(builder); } @@ -637,6 +645,10 @@ impl AIClient { format!("Bearer {}", self.config.api_key), ); + if self.config.base_url.contains("openbitfun.com") { + builder = builder.header("X-Verification-Code", "from_bitfun"); + } + if has_custom_headers && is_merge_mode { builder = self.apply_custom_headers(builder); }