{"record":{"id":"e45dc0b70baca82a","repo":"BerriAI/litellm","slug":"kwarg-messages-must-be-an-array-of-messages-that-e45dc0","errorCode":null,"errorMessage":"kwarg `messages` must be an array of messages that follow the openai chat standard","messagePattern":"kwarg `messages` must be an array of messages that follow the openai chat standard","errorType":"exception","errorClass":"OCIError","httpStatus":400,"severity":"error","filePath":"litellm/llms/oci/chat/transformation.py","lineNumber":407,"sourceCode":"            api_base=api_base,\n            api_key=api_key,\n            model=model,\n            stream=stream,\n            fake_stream=fake_stream,\n        )\n\n    def validate_environment(\n        self,\n        headers: dict,\n        model: str,\n        messages: list[AllMessageValues],\n        optional_params: dict,\n        litellm_params: dict,\n        api_key: str | None = None,\n        api_base: str | None = None,\n    ) -> dict:\n        if not messages:\n            raise OCIError(\n                status_code=400,\n                message=\"kwarg `messages` must be an array of messages that follow the openai chat standard\",\n            )\n        if optional_params.get(\"oci_signer\") is None:\n            creds: Final = resolve_oci_credentials(optional_params)\n            missing: Final = [\n                k\n                for k in (\n                    \"oci_user\",\n                    \"oci_fingerprint\",\n                    \"oci_tenancy\",\n                    \"oci_compartment_id\",\n                )\n                if not creds.get(k)\n            ]\n            if missing or not (creds.get(\"oci_key\") or creds.get(\"oci_key_file\")):\n                raise OCIError(\n                    status_code=401,","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/oci/chat/transformation.py#L389-L425","documentation":"Error \"kwarg `messages` must be an array of messages that follow the openai chat standard\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/chat/transformation.py:407 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass messages as an array of OpenAI-standard chat messages."],"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-15T22:17:37.221Z"}