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
🛍️ feat: Add Programming App to OpenRouter Categories (#16228)
lia-by-librechat[bot]d0fb4593666a
diff --git a/packages/api/src/endpoints/openai/config.backward-compat.spec.ts b/packages/api/src/endpoints/openai/config.backward-compat.spec.tsindex 3f905ba21a..4ea48fe1c0 100644--- a/packages/api/src/endpoints/openai/config.backward-compat.spec.ts+++ b/packages/api/src/endpoints/openai/config.backward-compat.spec.ts@@ -90,7 +90,7 @@ describe('getOpenAIConfig - Backward Compatibility', () => {'HTTP-Referer': 'https://librechat.ai','X-Title': 'LibreChat','X-OpenRouter-Title': 'LibreChat',- 'X-OpenRouter-Categories': 'general-chat,personal-agent',+ 'X-OpenRouter-Categories': 'general-chat,personal-agent,programming-app','x-librechat-thread-id': '{{LIBRECHAT_BODY_CONVERSATIONID}}','x-test-key': '{{TESTING_USER_VAR}}',},diff --git a/packages/api/src/endpoints/openai/config.spec.ts b/packages/api/src/endpoints/openai/config.spec.tsindex 951ab72b74..209e3b619b 100644--- a/packages/api/src/endpoints/openai/config.spec.ts+++ b/packages/api/src/endpoints/openai/config.spec.ts@@ -377,7 +377,7 @@ describe('getOpenAIConfig', () => {'HTTP-Referer': 'https://librechat.ai','X-Title': 'LibreChat','X-OpenRouter-Title': 'LibreChat',- 'X-OpenRouter-Categories': 'general-chat,personal-agent',+ 'X-OpenRouter-Categories': 'general-chat,personal-agent,programming-app',});expect(result.llmConfig.include_reasoning).toBe(true);expect(result.llmConfig.promptCache).toBe(true);@@ -1193,11 +1193,24 @@ describe('getOpenAIConfig', () => {'HTTP-Referer': 'https://librechat.ai','X-Title': 'LibreChat','X-OpenRouter-Title': 'LibreChat',- 'X-OpenRouter-Categories': 'general-chat,personal-agent',+ 'X-OpenRouter-Categories': 'general-chat,personal-agent,programming-app','X-Custom-Header': 'custom-value',Authorization: 'Bearer custom-token',});});++ it('should allow custom OpenRouter categories to override attribution defaults', () => {+ const result = getOpenAIConfig(mockApiKey, {+ reverseProxyUrl: 'https://openrouter.ai/api/v1',+ headers: {+ 'X-OpenRouter-Categories': 'general-chat',+ },+ });++ expect(result.configOptions?.defaultHeaders?.['X-OpenRouter-Categories']).toBe(+ 'general-chat',+ );+ });});describe('Direct Endpoint Configuration', () => {diff --git a/packages/api/src/endpoints/openai/config.ts b/packages/api/src/endpoints/openai/config.tsindex 46067e9517..fba96de48f 100644--- a/packages/api/src/endpoints/openai/config.ts+++ b/packages/api/src/endpoints/openai/config.ts@@ -235,7 +235,7 @@ export function getOpenAIConfig('HTTP-Referer': 'https://librechat.ai','X-Title': 'LibreChat','X-OpenRouter-Title': 'LibreChat',- 'X-OpenRouter-Categories': 'general-chat,personal-agent',+ 'X-OpenRouter-Categories': 'general-chat,personal-agent,programming-app',},headers,);