{"record":{"id":"181289b742bdf9d4","repo":"BerriAI/litellm","slug":"cancel-eval-is-not-supported-for-custom-llm-provi","errorCode":null,"errorMessage":"CANCEL eval is not supported for {custom_llm_provider}","messagePattern":"CANCEL eval is not supported for (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/evals/main.py","lineNumber":1034,"sourceCode":"    try:\n        litellm_logging_obj: Final[LiteLLMLoggingObj] = kwargs.get(\"litellm_logging_obj\")\n        litellm_call_id: Final[str | None] = kwargs.get(\"litellm_call_id\", None)\n        _is_async: Final = kwargs.pop(\"acancel_eval\", False) is True\n\n        # Get LiteLLM parameters\n        litellm_params: Final = GenericLiteLLMParams(**kwargs)\n\n        # Determine provider\n        if custom_llm_provider is None:\n            custom_llm_provider = \"openai\"\n\n        # Get provider config\n        evals_api_provider_config: BaseEvalsAPIConfig | None = ProviderConfigManager.get_provider_evals_api_config(\n            provider=litellm.LlmProviders(custom_llm_provider),\n        )\n\n        if evals_api_provider_config is None:\n            raise ValueError(f\"CANCEL eval is not supported for {custom_llm_provider}\")\n\n        # Validate environment and get headers\n        headers = extra_headers or {}\n        headers = evals_api_provider_config.validate_environment(headers=headers, litellm_params=litellm_params)\n\n        # Transform request\n        api_base: Final = litellm_params.api_base or DEFAULT_OPENAI_API_BASE\n        (\n            url,\n            headers,\n            request_body,\n        ) = evals_api_provider_config.transform_cancel_eval_request(\n            eval_id=eval_id,\n            api_base=api_base,\n            litellm_params=litellm_params,\n            headers=headers,\n        )\n","sourceCodeStart":1016,"sourceCodeEnd":1052,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/evals/main.py#L1016-L1052","documentation":"litellm.cancel_eval is subject to the same single-provider gate: the evals provider registry (litellm/utils.py:8487) only maps LlmProviders.OPENAI to OpenAIEvalsConfig, so evals/main.py:1034 raises ValueError(\"CANCEL eval is not supported for {custom_llm_provider}\") before the cancel request is built. Cancelling running evals is OpenAI-only.","triggerScenarios":"Calling litellm.cancel_eval(eval_id=..., custom_llm_provider=<non-openai>) — e.g. trying to stop a run against azure or a self-hosted provider.","commonSituations":"Operational runbooks that cancel long-running evals regardless of backend; automation reusing one provider env var for all evals helpers.","solutions":["Pass custom_llm_provider=\"openai\" or omit it (default \"openai\").","Target OpenAI-compatible gateways via api_base/api_key with provider \"openai\".","Upgrade litellm and re-check provider support.","Use the provider's native cancel endpoint otherwise."],"exampleFix":"# before\nlitellm.cancel_eval(eval_id=\"eval_123\", custom_llm_provider=\"azure\")  # ValueError\n\n# after\nlitellm.cancel_eval(eval_id=\"eval_123\", custom_llm_provider=\"openai\")","handlingStrategy":"validation","validationCode":"import litellm\n\ndef assert_evals_provider(custom_llm_provider: str | None) -> None:\n    provider = custom_llm_provider or \"openai\"\n    if litellm.LlmProviders(provider) is not litellm.LlmProviders.OPENAI:\n        raise ValueError(f\"litellm cancel_eval is OpenAI-only; got {provider!r}\")","typeGuard":"import litellm\n\ndef supports_litellm_evals(custom_llm_provider: str | None) -> bool:\n    return litellm.LlmProviders(custom_llm_provider or \"openai\") is litellm.LlmProviders.OPENAI","tryCatchPattern":null,"preventionTips":["Add the provider guard to operational runbooks that cancel evals.","Parameterize evals helpers on eval_id only, keeping provider fixed as 'openai'.","Re-validate provider coverage after litellm upgrades."],"tags":["evals","provider-support","validation","openai"],"backgroundTag":"unsupported-provider","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}