mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix(anthropic-adapter): drop redundant casts to satisfy type-discipline budget
_apply_reasoning_summary_wrapping already returns Any, so wrapping its dict-literal returns in cast(Any, ...) was a no-op that only inflated the LIT006 cast-count budget the lint gate enforces.
This commit is contained in:
parent
5072590c27
commit
d478b9955e
1 changed files with 2 additions and 2 deletions
|
|
@ -710,9 +710,9 @@ class LiteLLMAnthropicMessagesAdapter:
|
|||
|
||||
summary = thinking.get("summary") if isinstance(thinking, dict) else None
|
||||
if summary:
|
||||
return cast(Any, {"effort": reasoning_effort, "summary": summary})
|
||||
return {"effort": reasoning_effort, "summary": summary}
|
||||
if is_reasoning_auto_summary_enabled():
|
||||
return cast(Any, {"effort": reasoning_effort, "summary": "detailed"})
|
||||
return {"effort": reasoning_effort, "summary": "detailed"}
|
||||
return reasoning_effort
|
||||
|
||||
def translate_anthropic_tool_choice_to_openai(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue