Server: Change Invalid Schema from Server Error (500) to User Error (400) (#17572)

* Make invalid schema a user error (400)

* Move invalid_argument exception handler to ex_wrapper

* Fix test

* Simplify test back to original pattern
This commit is contained in:
Chad Voegele 2025-12-02 10:33:50 -06:00 committed by GitHub
parent e148380c7c
commit c4357dcc35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 44 additions and 38 deletions

View file

@ -199,7 +199,7 @@ def test_completion_with_response_format(response_format: dict, n_predicted: int
choice = res.body["choices"][0]
assert match_regex(re_content, choice["message"]["content"])
else:
assert res.status_code != 200
assert res.status_code == 400
assert "error" in res.body