simplify ResponsesApiDeploymentCheck

This commit is contained in:
Ishaan Jaff 2025-04-21 19:38:55 -07:00
parent 39610d4888
commit a582a067f4
5 changed files with 102 additions and 73 deletions

View file

@ -116,6 +116,13 @@ async def aresponses(
response = await init_response
else:
response = init_response
# Update the responses_api_response_id with the model_id
if isinstance(response, ResponsesAPIResponse):
response = ResponsesAPIRequestUtils._update_responses_api_response_id_with_model_id(
responses_api_response=response,
kwargs=kwargs,
)
return response
except Exception as e:
raise litellm.exception_type(
@ -248,6 +255,13 @@ def responses(
),
)
# Update the responses_api_response_id with the model_id
if isinstance(response, ResponsesAPIResponse):
response = ResponsesAPIRequestUtils._update_responses_api_response_id_with_model_id(
responses_api_response=response,
kwargs=kwargs,
)
return response
except Exception as e:
raise litellm.exception_type(