BerriAI/litellm · error · CometAPIException
raw_response.text
Error message
raw_response.text
What it means
Error "raw_response.text" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/cometapi/embed/transformation.py:129
def transform_embedding_response(
self,
model: str,
raw_response: httpx.Response,
model_response: EmbeddingResponse,
logging_obj: LiteLLMLoggingObj,
api_key: str | None,
request_data: dict,
optional_params: dict,
litellm_params: dict,
) -> EmbeddingResponse:
"""
Transform CometAPI response into standard EmbeddingResponse format.
"""
try:
raw_response_json: Final = raw_response.json()
except Exception:
raise CometAPIException(
message=raw_response.text,
status_code=raw_response.status_code,
headers=raw_response.headers,
)
model_response.model = raw_response_json.get("model")
model_response.data = raw_response_json.get("data")
model_response.object = raw_response_json.get("object")
usage: Final = Usage(
prompt_tokens=raw_response_json.get("usage", {}).get("prompt_tokens", 0),
total_tokens=raw_response_json.get("usage", {}).get("total_tokens", 0),
)
model_response.usage = usage
return model_response
def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:View on GitHub (pinned to 6c2dcb801b)
Solutions
- Inspect the CometAPI error response body for details.
When it happens
Trigger: Thrown at litellm/llms/cometapi/embed/transformation.py:129 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/37f923075ed48b2c.
Report an issue: GitHub.