{"record":{"id":"ede8bb798fd6b2f9","repo":"langflow-ai/langflow","slug":"failed-to-load-models-please-check-your-provider","errorCode":null,"errorMessage":"Failed to load models. Please check your provider credentials.","messagePattern":"Failed to load models\\. Please check your provider credentials\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/frontend/src/controllers/API/queries/deployments/use-get-deployment-llms.ts","lineNumber":30,"sourceCode":"interface GetDeploymentLlmsParams {\n  providerId: string;\n}\n\nconst STALE_TIME = 1000 * 60 * 1; // 1 minute\n\nexport const useGetDeploymentLlms: useQueryFunctionType<\n  GetDeploymentLlmsParams,\n  DeploymentLlmListResponse\n> = ({ providerId }, options) => {\n  const { query } = UseRequestProcessor();\n\n  const getDeploymentLlmsFn = async (): Promise<DeploymentLlmListResponse> => {\n    const response = await api.get<DeploymentLlmListResponse>(\n      `${getURL(\"DEPLOYMENTS\")}/llms`,\n      { params: { provider_id: providerId } },\n    );\n    if (!response) {\n      throw new Error(\n        \"Failed to load models. Please check your provider credentials.\",\n      );\n    }\n    return response.data;\n  };\n\n  return query([\"useGetDeploymentLlms\", { providerId }], getDeploymentLlmsFn, {\n    ...options,\n    retry: false,\n    staleTime: STALE_TIME,\n  });\n};\n","sourceCodeStart":12,"sourceCodeEnd":43,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/controllers/API/queries/deployments/use-get-deployment-llms.ts#L12-L43","documentation":"Catch-all 500 from the Streamable HTTP transport handler for a project MCP server. Any non-HTTPException raised by project_server.session_manager.handle_request is logged (with traceback) and replaced by this opaque message, so the real cause only exists in the logs.","triggerScenarios":"GET/POST/DELETE on the project streamable-HTTP MCP route when the session manager rejects an unknown/expired session id, the request body is malformed JSON-RPC, or the transport state for that project was reset (restart, composer recycle).","commonSituations":"MCP client resumes a session after a backend restart; concurrent connections racing the transport; malformed initialize request from a client speaking a different MCP revision.","solutions":["Grep server logs for 'Error handling Streamable HTTP request for project' — the original traceback is there.","Have the client re-initialize (new session) instead of resuming an old Mcp-Session-Id.","Verify client and server MCP SDK versions are compatible (mcp_sdk_constraint_args pins the server side).","If the body is hand-rolled, ensure it is valid JSON-RPC 2.0 with a known method."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = await client.request(method, streamable_url, json=body)\nexcept httpx.HTTPStatusError as e:\n    if e.response.status_code == 500:\n        drop_session_id_and_reinitialize()  # the log has the cause; client must re-init","preventionTips":["Drop the stored Mcp-Session-Id whenever the server restarts (watch for shutdown events).","Keep MCP client SDK version aligned with the server's pinned SDK constraints.","Never reuse initialize handshake payloads across sessions."],"tags":["mcp","streamable-http","http-500","transport"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}