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:
TemoSulava 2026-10-25 12:07:15 +04:00
parent ddb8930f3e
commit c20f0ec44a

View file

@ -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