{"record":{"id":"edbbe2c25a1c5d9a","repo":"BerriAI/litellm","slug":"model-is-not-set","errorCode":null,"errorMessage":"model is not set","messagePattern":"model is not set","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure/azure.py","lineNumber":1471,"sourceCode":"                api_version=api_version,\n                api_key=api_key,\n                timeout=timeout,\n                http_client=client_session,\n            )\n            model = None\n            # cloudflare ai gateway, needs model=None\n        else:\n            client = AzureOpenAI(\n                api_version=api_version,\n                azure_endpoint=api_base,\n                api_key=api_key,\n                timeout=timeout,\n                http_client=client_session,\n            )\n\n            # only run this check if it's not cloudflare ai gateway\n            if model is None and mode != \"image_generation\":\n                raise Exception(\"model is not set\")\n\n        completion = None\n\n        if messages is None:\n            messages = [{\"role\": \"user\", \"content\": \"Hey\"}]\n        try:\n            completion = client.chat.completions.with_raw_response.create(\n                model=model,\n                messages=messages,\n            )\n        except Exception as e:\n            raise e\n        response: Final = {}\n\n        if completion is None or not hasattr(completion, \"headers\"):\n            raise Exception(\"invalid completion response\")\n\n        if (","sourceCodeStart":1453,"sourceCodeEnd":1489,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/azure/azure.py#L1453-L1489","documentation":"Error \"model is not set\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure/azure.py:1471 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the model parameter for the call."],"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"}