fix: enforce provider upstream stream policy

This commit is contained in:
stabey
2026-05-08 21:00:44 +08:00
parent 8958bf5e08
commit 7e5a08e09d
29 changed files with 1518 additions and 118 deletions

View File

@@ -281,8 +281,9 @@ pub fn apply_openai_responses_compact_special_body_edits(
return;
};
// `/v1/responses/compact` does not accept `store`.
// `/v1/responses/compact` does not accept `store` or body-level `stream`.
body_object.remove("store");
body_object.remove("stream");
}
pub fn apply_codex_openai_responses_special_body_edits(

View File

@@ -188,6 +188,9 @@ pub fn to_raw(
OPENAI_RESPONSES_LEGACY_EXTENSION_NAMESPACE,
&output,
));
if compact {
output.remove("stream");
}
output.remove("verbosity");
Some(Value::Object(output))
}