[Frontend] Update OpenAI error response to upstream format (#22099)

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
This commit is contained in:
Moritz Sanft
2025-08-07 08:06:00 +02:00
committed by GitHub
parent cbc8457b26
commit 370661856b
10 changed files with 73 additions and 67 deletions

View File

@@ -73,8 +73,9 @@ async def test_non_asr_model(foscolo):
res = await client.audio.translations.create(model=model_name,
file=foscolo,
temperature=0.0)
assert res.code == 400 and not res.text
assert res.message == "The model does not support Translations API"
err = res.error
assert err["code"] == 400 and not res.text
assert err["message"] == "The model does not support Translations API"
@pytest.mark.asyncio