From e55266e3401f253b7c235a5ecbed7ca6b8c50ab4 Mon Sep 17 00:00:00 2001 From: Kcstring Date: Sun, 19 Apr 2026 21:11:43 +0800 Subject: [PATCH] fix: add AnthropicTaskBudget TypedDict and task_budget field to AnthropicOutputConfig --- litellm/types/llms/anthropic.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/litellm/types/llms/anthropic.py b/litellm/types/llms/anthropic.py index e3f63d05742..6d428173862 100644 --- a/litellm/types/llms/anthropic.py +++ b/litellm/types/llms/anthropic.py @@ -36,10 +36,18 @@ class AnthropicOutputSchema(TypedDict, total=False): schema: Required[dict] +class AnthropicTaskBudget(TypedDict, total=False): + """Token budget for an agentic task loop (task-budgets-2026-03-13 beta).""" + + type: Required[Literal["tokens"]] + total: Required[int] + + class AnthropicOutputConfig(TypedDict, total=False): """Configuration for controlling Claude's output behavior.""" effort: Literal["high", "medium", "low"] + task_budget: AnthropicTaskBudget class AnthropicMessagesTool(TypedDict, total=False):