BerriAI/litellm · error · NotImplementedError
Batch creation not yet implemented for Anthropic
Error message
Batch creation not yet implemented for Anthropic
What it means
Error "Batch creation not yet implemented for Anthropic" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/anthropic/batches/transformation.py:92
"""Get the complete URL for batch creation request."""
api_base = api_base or self.anthropic_model_info.get_api_base(api_base)
if not api_base.endswith("/v1/messages/batches"):
api_base = f"{api_base.rstrip('/')}/v1/messages/batches"
return api_base
def transform_create_batch_request(
self,
model: str,
create_batch_data: CreateBatchRequest,
optional_params: dict,
litellm_params: dict,
) -> bytes | str | dict[str, Any]:
"""
Transform the batch creation request to Anthropic format.
Not currently implemented - placeholder to satisfy abstract base class.
"""
raise NotImplementedError("Batch creation not yet implemented for Anthropic")
def transform_create_batch_response(
self,
model: str | None,
raw_response: httpx.Response,
logging_obj: LoggingClass,
litellm_params: dict,
) -> LiteLLMBatch:
"""
Transform Anthropic MessageBatch creation response to LiteLLM format.
Not currently implemented - placeholder to satisfy abstract base class.
"""
raise NotImplementedError("Batch creation not yet implemented for Anthropic")
def get_retrieve_batch_url(
self,
api_base: str | None,View on GitHub (pinned to 6c2dcb801b)
Solutions
- Anthropic batch creation is not implemented; use the Messages API instead.
When it happens
Trigger: Thrown at litellm/llms/anthropic/batches/transformation.py:92 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/dca2fca51e2b1ab1.
Report an issue: GitHub.