{"record":{"id":"d82da38332acc11a","repo":"mem0ai/mem0","slug":"no-response-choices-found-in-sarvam-api-response","errorCode":null,"errorMessage":"No response choices found in Sarvam API response","messagePattern":"No response choices found in Sarvam API response","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/llms/sarvam.py","lineNumber":89,"sourceCode":"            sarvam_specific_params = [\"reasoning_effort\", \"frequency_penalty\", \"presence_penalty\", \"seed\", \"stop\", \"n\"]\n\n            for param in sarvam_specific_params:\n                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":71,"sourceCodeEnd":95,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/llms/sarvam.py#L71-L95","documentation":"Error \"No response choices found in Sarvam API response\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0/llms/sarvam.py:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Sarvam API response; the request may have been filtered or the model returned no output.","Retry the request or verify the model name and parameters."],"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-15T22:17:37.221Z"}