Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🏷️ refactor: Normalize Request Headers in `setRequestHeaders` (#9106)
Danny Avilaa6fd32a15aa1
diff --git a/packages/api/src/mcp/connection.ts b/packages/api/src/mcp/connection.tsindex 5f45bd8335..8e2eb00b4f 100644--- a/packages/api/src/mcp/connection.ts+++ b/packages/api/src/mcp/connection.ts@@ -88,8 +88,17 @@ export class MCPConnection extends EventEmitter {url?: string;setRequestHeaders(headers: Record<string, string> | null): void {- logger.debug(`${this.getLogPrefix()} Setting request headers: ${JSON.stringify(headers)}`);- this.requestHeaders = headers;+ if (!headers) {+ return;+ }+ const normalizedHeaders: Record<string, string> = {};+ for (const [key, value] of Object.entries(headers)) {+ normalizedHeaders[key.toLowerCase()] = value;+ }+ logger.debug(+ `${this.getLogPrefix()} Setting request headers: ${JSON.stringify(normalizedHeaders)}`,+ );+ this.requestHeaders = normalizedHeaders;}getRequestHeaders(): Record<string, string> | null | undefined {