{"record":{"id":"f417b1091cee38b1","repo":"BerriAI/litellm","slug":"unsupported-http-method-method","errorCode":null,"errorMessage":"Unsupported HTTP method: {method}","messagePattern":"Unsupported HTTP method: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/custom_httpx/container_handler.py","lineNumber":271,"sourceCode":"\n        # An empty dict passed as `params` to httpx strips any existing query\n        # string from the URL (e.g. ?api-version=...).  Use None instead so\n        # httpx leaves the URL's own query string intact.\n        effective_params: Final = query_params or None\n\n        try:\n            if method == \"GET\":\n                response = http_client.get(url=url, headers=headers, params=effective_params)\n            elif method == \"DELETE\":\n                response = http_client.delete(url=url, headers=headers, params=effective_params)\n            elif method == \"POST\":\n                if is_multipart and \"file\" in kwargs:\n                    files, headers = _prepare_multipart_file_upload(kwargs[\"file\"], headers)\n                    response = http_client.post(url=url, headers=headers, params=effective_params, files=files)\n                else:\n                    response = http_client.post(url=url, headers=headers, params=effective_params)\n            else:\n                raise ValueError(f\"Unsupported HTTP method: {method}\")\n\n            # For binary responses, return raw content\n            if returns_binary:\n                return response.content\n\n            # Check for error response\n            response_json: Final = response.json()\n            if \"error\" in response_json:\n                from litellm.llms.base_llm.chat.transformation import BaseLLMException\n\n                error_msg: Final = response_json.get(\"error\", {}).get(\"message\", str(response_json))\n                raise BaseLLMException(\n                    status_code=response.status_code,\n                    message=error_msg,\n                    headers=dict(response.headers),\n                )\n\n            # Parse response","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/custom_httpx/container_handler.py#L253-L289","documentation":"Error \"Unsupported HTTP method: {method}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/custom_httpx/container_handler.py:271 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported HTTP method for the container endpoint."],"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"}