Chore: remove response model check and rely on header model for downgrade (#12061)

### Summary
Ensure that we use the model value from the response header only so that
we are guaranteed with the correct slug name. We are no longer checking
against the model value from response so that we are less likely to have
false positive.

There are two different treatments - for SSE we use the header from the
response and for websocket we check top-level events.
This commit is contained in:
Shijie Rao
2026-02-17 17:50:06 -08:00
committed by GitHub
parent 31cbebd3c2
commit b3a8571219
5 changed files with 126 additions and 63 deletions

View File

@@ -99,7 +99,9 @@ async fn response_model_field_mismatch_emits_model_rerouted_notification_v2_when
"type": "response.created",
"response": {
"id": "resp-1",
"model": SERVER_MODEL,
"headers": {
"OpenAI-Model": SERVER_MODEL
}
}
}),
responses::ev_assistant_message("msg-1", "Done"),