{"record":{"id":"dca2fca51e2b1ab1","repo":"BerriAI/litellm","slug":"batch-creation-not-yet-implemented-for-anthropic","errorCode":null,"errorMessage":"Batch creation not yet implemented for Anthropic","messagePattern":"Batch creation not yet implemented for Anthropic","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/batches/transformation.py","lineNumber":92,"sourceCode":"        \"\"\"Get the complete URL for batch creation request.\"\"\"\n        api_base = api_base or self.anthropic_model_info.get_api_base(api_base)\n        if not api_base.endswith(\"/v1/messages/batches\"):\n            api_base = f\"{api_base.rstrip('/')}/v1/messages/batches\"\n        return api_base\n\n    def transform_create_batch_request(\n        self,\n        model: str,\n        create_batch_data: CreateBatchRequest,\n        optional_params: dict,\n        litellm_params: dict,\n    ) -> bytes | str | dict[str, Any]:\n        \"\"\"\n        Transform the batch creation request to Anthropic format.\n\n        Not currently implemented - placeholder to satisfy abstract base class.\n        \"\"\"\n        raise NotImplementedError(\"Batch creation not yet implemented for Anthropic\")\n\n    def transform_create_batch_response(\n        self,\n        model: str | None,\n        raw_response: httpx.Response,\n        logging_obj: LoggingClass,\n        litellm_params: dict,\n    ) -> LiteLLMBatch:\n        \"\"\"\n        Transform Anthropic MessageBatch creation response to LiteLLM format.\n\n        Not currently implemented - placeholder to satisfy abstract base class.\n        \"\"\"\n        raise NotImplementedError(\"Batch creation not yet implemented for Anthropic\")\n\n    def get_retrieve_batch_url(\n        self,\n        api_base: str | None,","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/anthropic/batches/transformation.py#L74-L110","documentation":"Feature-support guard: transform_create_batch_request is invoked but batch creation for Anthropic is not implemented in this LiteLLM version; only retrieval is supported, so the operation is explicitly rejected.","triggerScenarios":"Thrown at litellm/llms/anthropic/batches/transformation.py:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not call create_batch with the anthropic provider; Anthropic batch creation is not supported in this version.","Use a provider that implements batch creation, or upgrade litellm if support has been added."],"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-23T08:17:48.524Z"}