Do not attempt to append after response.completed (#11402)

Completed responses are fully done, and new response must be created.
This commit is contained in:
pakrym-oai
2026-02-11 07:45:17 -08:00
committed by GitHub
parent 83a54766b7
commit eac5473114
9 changed files with 93 additions and 12 deletions

View File

@@ -431,6 +431,16 @@ pub fn ev_done() -> Value {
})
}
pub fn ev_done_with_id(id: &str) -> Value {
serde_json::json!({
"type": "response.done",
"response": {
"id": id,
"usage": {"input_tokens":0,"input_tokens_details":null,"output_tokens":0,"output_tokens_details":null,"total_tokens":0}
}
})
}
/// Convenience: SSE event for a created response with a specific id.
pub fn ev_response_created(id: &str) -> Value {
serde_json::json!({