{"record":{"id":"48a9f54ec2be796f","repo":"BerriAI/litellm","slug":"custom-llm-provider-is-required-but-passed-as-none","errorCode":null,"errorMessage":"custom_llm_provider is required but passed as None","messagePattern":"custom_llm_provider is required but passed as None","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/responses/main.py","lineNumber":1103,"sourceCode":"            user=user,\n            optional_params=dict(responses_api_request_params),\n            litellm_params={\n                **responses_api_request_params,\n                \"aresponses\": _is_async,\n                \"litellm_call_id\": litellm_call_id,\n                \"model_info\": kwargs.get(\"model_info\"),\n                \"data_residency\": infer_openai_data_residency(custom_llm_provider, litellm_params.api_base),\n                \"metadata\": (kwargs[\"litellm_metadata\"] if \"litellm_metadata\" in kwargs else kwargs.get(\"metadata\")),\n            },\n            custom_llm_provider=custom_llm_provider,\n        )\n\n        # Decode any litellm-encoded encrypted-content item IDs back to their original IDs\n        input = ResponsesAPIRequestUtils._restore_encrypted_content_item_ids_in_input(input)\n\n        # Call the handler with _is_async flag instead of directly calling the async handler\n        if custom_llm_provider is None:\n            raise ValueError(\"custom_llm_provider is required but passed as None\")\n\n        response = base_llm_http_handler.response_api_handler(\n            model=model,\n            input=input,\n            responses_api_provider_config=responses_api_provider_config,\n            response_api_optional_request_params=responses_api_request_params,\n            custom_llm_provider=custom_llm_provider,\n            litellm_params=litellm_params,\n            logging_obj=litellm_logging_obj,\n            extra_headers=extra_headers,\n            extra_body=extra_body,\n            timeout=timeout or request_timeout,\n            _is_async=_is_async,\n            client=kwargs.get(\"client\"),\n            fake_stream=responses_api_provider_config.should_fake_stream(\n                model=model, stream=stream, custom_llm_provider=custom_llm_provider\n            ),\n            litellm_metadata=kwargs.get(\"litellm_metadata\", {}),","sourceCodeStart":1085,"sourceCodeEnd":1121,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/responses/main.py#L1085-L1121","documentation":"Dispatch guard in the Responses API: custom_llm_provider is None after get_llm_provider_info, so the model string could not be mapped to a provider and no provider config can be selected.","triggerScenarios":"Thrown at litellm/responses/main.py:1103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass custom_llm_provider explicitly (e.g., 'openai') when calling the responses API."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}