mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-04 07:27:51 +00:00
fix(aiohttp_openai): set service_tier with setattr like other providers
ModelResponse has no declared service_tier field, so attribute assignment added a reportAttributeAccessIssue error to the type gate.
This commit is contained in:
parent
ddb8930f3e
commit
c20f0ec44a
1 changed files with 1 additions and 1 deletions
|
|
@ -83,5 +83,5 @@ class AiohttpOpenAIChatConfig(OpenAILikeChatConfig):
|
|||
model_response.object = _json_response.get("object")
|
||||
model_response.system_fingerprint = _json_response.get("system_fingerprint")
|
||||
if "service_tier" in _json_response:
|
||||
model_response.service_tier = _json_response.get("service_tier") # rebind-ok: fills the caller's response
|
||||
setattr(model_response, "service_tier", _json_response.get("service_tier")) # noqa: B010 # pydantic extra, not a declared field
|
||||
return model_response
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue