mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
feat(anthropic/messages): auto-inject advisor-tool-2026-03-01 beta header in /messages path
This commit is contained in:
parent
0f9eba4de0
commit
ed4aa84235
1 changed files with 10 additions and 0 deletions
|
|
@ -324,6 +324,16 @@ class AnthropicMessagesConfig(BaseAnthropicMessagesConfig):
|
|||
if optional_params.get("speed") == "fast":
|
||||
beta_values.add(ANTHROPIC_BETA_HEADER_VALUES.FAST_MODE_2026_02_01.value)
|
||||
|
||||
# Check for advisor tool
|
||||
tools = optional_params.get("tools")
|
||||
if tools:
|
||||
for tool in tools:
|
||||
if isinstance(tool, dict) and tool.get("type") == "advisor_20260301":
|
||||
beta_values.add(
|
||||
ANTHROPIC_BETA_HEADER_VALUES.ADVISOR_TOOL_2026_03_01.value
|
||||
)
|
||||
break
|
||||
|
||||
# Check for tool search tools
|
||||
tools = optional_params.get("tools")
|
||||
if tools:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue