mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix: clamp max_output_tokens to OpenAI min of 16 in anthropic-to-responses adapter
This commit is contained in:
parent
6e6b2ca2d8
commit
7fec1b58ea
1 changed files with 2 additions and 0 deletions
|
|
@ -333,8 +333,10 @@ class LiteLLMAnthropicToResponsesAPIAdapter:
|
|||
responses_kwargs["instructions"] = "\n".join(filter(None, text_parts))
|
||||
|
||||
# max_tokens -> max_output_tokens
|
||||
# OpenAI Responses API requires max_output_tokens >= 16
|
||||
max_tokens = anthropic_request.get("max_tokens")
|
||||
if max_tokens:
|
||||
max_tokens = max(max_tokens, 16)
|
||||
responses_kwargs["max_output_tokens"] = max_tokens
|
||||
|
||||
# temperature / top_p passed through
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue