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
🚏 fix: Localized Guidance for Model-Not-Found Errors
Danny Avila557c22d10240
diff --git a/client/src/components/Messages/Content/Error.tsx b/client/src/components/Messages/Content/Error.tsxindex b1582d54ec..f6e262a350 100644--- a/client/src/components/Messages/Content/Error.tsx+++ b/client/src/components/Messages/Content/Error.tsx@@ -6,6 +6,7 @@ import { useLocalize } from '~/hooks';import CodeBlock from './CodeBlock';const localizedErrorPrefix = 'com_error';+const langChainModelNotFoundUrl = /langchain\.com\/.*\/MODEL_NOT_FOUND(?:\/|\b)/i;type TConcurrent = {limit: number;@@ -135,6 +136,10 @@ const Error = ({ text }: { text: string }) => {const errorMessage = text.length > 512 && !jsonString ? text.slice(0, 512) + '...' : text;const defaultResponse = `Something went wrong. Here's the specific error message we encountered: ${errorMessage}`;+ if (langChainModelNotFoundUrl.test(text)) {+ return localize('com_error_model_not_found');+ }+if (!isJson(jsonString)) {return defaultResponse;}diff --git a/client/src/components/Messages/Content/__tests__/Error.spec.tsx b/client/src/components/Messages/Content/__tests__/Error.spec.tsxindex d985888135..5e2bc1ce76 100644--- a/client/src/components/Messages/Content/__tests__/Error.spec.tsx+++ b/client/src/components/Messages/Content/__tests__/Error.spec.tsx@@ -30,6 +30,15 @@ describe('Error — typed provider errors', () => {expect(catalog.com_error_google_video_unprocessable).toMatch(/too long/i);});+ it('replaces LangChain model-not-found attribution with localized guidance', () => {+ const raw =+ 'An error occurred while processing the request: 404 404 page not found Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/MODEL_NOT_FOUND/';+ render(<Error text={raw} />);++ expect(screen.getByText(catalog.com_error_model_not_found)).toBeInTheDocument();+ expect(screen.queryByText(/langchain\.com/i)).not.toBeInTheDocument();+ });+it('falls back to the raw provider text for an unmapped error', () => {const raw ='[GoogleGenerativeAI Error]: [400 Bad Request] Request contains an invalid argument';diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.jsonindex f5f92c84a8..74a15c0b42 100644--- a/client/src/locales/en/translation.json+++ b/client/src/locales/en/translation.json@@ -392,6 +392,7 @@"com_error_invalid_base_url": "The base URL you provided targets a restricted address. Please use a valid external URL and try again.","com_error_invalid_user_key": "Invalid key provided. Please provide a valid key and try again.","com_error_missing_model": "No model selected for {{0}}. Please select a model and try again.",+ "com_error_model_not_found": "The selected model is unavailable from this provider. Select a different model or ask an administrator to verify the provider configuration.","com_error_models_not_loaded": "Models configuration could not be loaded. Please refresh the page and try again.","com_error_moderation": "It appears that the content submitted has been flagged by our moderation system for not aligning with our community guidelines. We're unable to proceed with this specific topic. If you have any other questions or topics you'd like to explore, please edit your message, or create a new conversation.","com_error_no_base_url": "No base URL found. Please provide one and try again.",