{"record":{"id":"dbb5c458495271b9","repo":"BerriAI/litellm","slug":"response-json-error","errorCode":null,"errorMessage":"{response_json[\"error\"]}","messagePattern":"\\{response_json\\[\"error\"\\]\\}","errorType":"exception","errorClass":"OCIError","httpStatus":null,"severity":"error","filePath":"litellm/llms/oci/chat/transformation.py","lineNumber":617,"sourceCode":"        logging_obj: LiteLLMLoggingObj,\n        request_data: dict,\n        messages: list[AllMessageValues],\n        optional_params: dict,\n        litellm_params: dict,\n        encoding: Any,\n        api_key: str | None = None,\n        json_mode: bool | None = None,\n    ) -> ModelResponse:\n        response_json: Final = raw_response.json()\n\n        if not isinstance(response_json, dict):\n            raise OCIError(\n                message=\"Invalid response format from OCI\",\n                status_code=raw_response.status_code,\n            )\n\n        if response_json.get(\"error\") is not None:\n            raise OCIError(\n                message=str(response_json[\"error\"]),\n                status_code=raw_response.status_code,\n            )\n\n        vendor: Final = get_vendor_from_model(model)\n        if vendor == OCIVendors.COHERE:\n            model_response = handle_cohere_response(response_json, model, model_response, raw_response)\n        else:\n            model_response = handle_generic_response(response_json, model, model_response, raw_response)\n\n        model_response._hidden_params[\"additional_headers\"] = raw_response.headers\n        return model_response\n\n    @track_llm_api_timing()\n    def get_sync_custom_stream_wrapper(\n        self,\n        model: str,\n        custom_llm_provider: str,","sourceCodeStart":599,"sourceCodeEnd":635,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/oci/chat/transformation.py#L599-L635","documentation":"Error \"{response_json[\"error\"]}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/chat/transformation.py:617 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the OCI error field in the response."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}