mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
temporarily relax ResponsesAPIResponse parsing to support custom backends (#15362)
- Replace `ResponsesAPIResponse(**raw_response_json)` with `ResponsesAPIResponse.model_construct(**raw_response_json)` to bypass strict Pydantic validation. - Allows Response API to work with self-hosted or non-strict models (e.g., vLLM) without raising literal/type errors. - This is a temporary, low-risk relaxation to improve compatibility with more backend implementations.
This commit is contained in:
parent
eb0b263532
commit
2686156c37
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ class OpenAIResponsesAPIConfig(BaseResponsesAPIConfig):
|
|||
raise OpenAIError(
|
||||
message=raw_response.text, status_code=raw_response.status_code
|
||||
)
|
||||
return ResponsesAPIResponse(**raw_response_json)
|
||||
return ResponsesAPIResponse.model_construct(**raw_response_json)
|
||||
|
||||
def validate_environment(
|
||||
self, headers: dict, model: str, litellm_params: Optional[GenericLiteLLMParams]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue