mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
fix(bedrock): avoid unchecked cast in token clamp
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
fc186f5613
commit
3673327fc4
1 changed files with 2 additions and 2 deletions
|
|
@ -1007,8 +1007,8 @@ class AmazonConverseConfig(BaseConfig):
|
|||
)
|
||||
if param == "max_tokens" or param == "max_completion_tokens":
|
||||
optional_params["maxTokens"] = (
|
||||
self._enforce_min_max_tokens(cast(object, value))
|
||||
if self._is_openai_gpt_reasoning_model(model)
|
||||
self._enforce_min_max_tokens(value)
|
||||
if self._is_openai_gpt_reasoning_model(model) and isinstance(value, int)
|
||||
else value
|
||||
)
|
||||
if param == "stream":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue