Regression: Tool Name Lost in Streaming Chat Completions After PR #6996
Resolved 💬 3 comments Opened Dec 4, 2025 by ivanmurashko Closed Dec 15, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Error:
Invalid 'input[3].name': empty string. Expected a string with minimum length 1, but got an empty string instead.
Cause: PR #6996 introduced a regression in SSE streaming response parsing. When the Chat Completions API streams tool calls, the first delta contains the function name while subsequent deltas contain empty names at my case. The original code used get_or_insert_with() to preserve existing names, but the new code in codex-api/src/sse/chat.rs unconditionally overwrites with = Some(fname.to_string()), causing valid names to be replaced with empty strings.
Proposed Fix: Add !fname.is_empty() check before updating the tool name:
if let Some(fname) = func.get("name").and_then(|n| n.as_str()) {
if !fname.is_empty() {
call_state.name = Some(fname.to_string());
}
}
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Can confirm this bug has existed for me since 0.64.0
Thanks for the bug report.
The fix is in prerelease version 0.66.0-alpha.5 and will be included in 0.66.0 once it's published.