{"record":{"id":"2e983b9323782696","repo":"BerriAI/litellm","slug":"internal-server-error-e-2e983b","errorCode":null,"errorMessage":"Internal Server Error ({e})","messagePattern":"Internal Server Error \\((.+?)\\)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/public_endpoints/public_endpoints.py","lineNumber":416,"sourceCode":"    return provider_create_fields\n\n\n@router.get(\n    \"/public/litellm_model_cost_map\",\n    tags=[\"public\", \"model management\"],\n)\nasync def get_litellm_model_cost_map():\n    \"\"\"\n    Public endpoint to get the LiteLLM model cost map.\n    Returns pricing information for all supported models.\n    \"\"\"\n    import litellm\n\n    try:\n        _model_cost_map: Final = litellm.model_cost\n        return _model_cost_map\n    except Exception as e:\n        raise HTTPException(\n            status_code=500,\n            detail=f\"Internal Server Error ({e})\",\n        )\n\n\n@router.get(\n    \"/public/litellm_blog_posts\",\n    tags=[\"public\"],\n    response_model=BlogPostsResponse,\n)\nasync def get_litellm_blog_posts():\n    \"\"\"\n    Public endpoint to get the latest LiteLLM blog posts.\n\n    Fetches from GitHub with a 1-hour in-process cache.\n    Falls back to the bundled local backup on any failure.\n    \"\"\"\n    try:","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/public_endpoints/public_endpoints.py#L398-L434","documentation":"Catch-all around litellm.model_cost access on the public model cost map endpoint: reading the model cost map raised unexpectedly (import or initialization problem inside litellm). The original exception is embedded and surfaced as a 500.","triggerScenarios":"Thrown at litellm/proxy/public_endpoints/public_endpoints.py:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check proxy logs for the exception detail; fix the failing configuration or request and retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}