{"record":{"id":"632675f5372aefff","repo":"mem0ai/mem0","slug":"sarvam-api-request-failed-e","errorCode":null,"errorMessage":"Sarvam API request failed: {e}","messagePattern":"Sarvam API request failed: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"mem0/llms/sarvam.py","lineNumber":92,"sourceCode":"                if param in self.config.model:\n                    params[param] = self.config.model[param]\n\n        # Forward any per-call provider-specific parameters (LLMBase contract).\n        params.update(kwargs)\n\n        try:\n            response = requests.post(url, headers=headers, json=params, timeout=30)\n            response.raise_for_status()\n\n            result = response.json()\n\n            if \"choices\" in result and len(result[\"choices\"]) > 0:\n                return result[\"choices\"][0][\"message\"][\"content\"]\n            else:\n                raise ValueError(\"No response choices found in Sarvam API response\")\n\n        except requests.exceptions.RequestException as e:\n            raise RuntimeError(f\"Sarvam API request failed: {e}\")\n        except KeyError as e:\n            raise ValueError(f\"Unexpected response format from Sarvam API: {e}\")\n","sourceCodeStart":74,"sourceCodeEnd":95,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/llms/sarvam.py#L74-L95","documentation":"Error \"Sarvam API request failed: {e}\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0/llms/sarvam.py:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity and Sarvam API key validity.","Review the exception message for HTTP status and retry with backoff for transient errors."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}