mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
fix(router): give the _text_completion model_name cast a cast-ok reason (LIT006 gate)
This commit is contained in:
parent
585702f260
commit
104f225164
1 changed files with 3 additions and 1 deletions
|
|
@ -5749,7 +5749,9 @@ class Router:
|
|||
self._update_kwargs_with_deployment(deployment=deployment, kwargs=kwargs)
|
||||
|
||||
data: Final = deployment["litellm_params"] # not mutated; the call below merges into a new dict
|
||||
model_name = cast(str, data["model"]) # rebind-ok: assigned inside try so except can attribute the failure
|
||||
model_name = cast( # cast-ok: deployment params hold a str model # rebind-ok: set in try, read in except
|
||||
str, data["model"]
|
||||
)
|
||||
self.total_calls[model_name] += 1
|
||||
|
||||
### DEPLOYMENT-SPECIFIC PRE-CALL CHECKS ### (e.g. update rpm pre-call. Raise error, if deployment over limit)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue