Skip to content

fix: emit integer chat stream output indexes#3112

Closed
Aphroq wants to merge 1 commit intoopenai:mainfrom
Aphroq:fix/chat-stream-output-index-int
Closed

fix: emit integer chat stream output indexes#3112
Aphroq wants to merge 1 commit intoopenai:mainfrom
Aphroq:fix/chat-stream-output-index-int

Conversation

@Aphroq
Copy link
Copy Markdown
Contributor

@Aphroq Aphroq commented May 4, 2026

Summary

Fixes Chat Completions streaming events so assistant message output_index values are emitted as integers instead of booleans when reasoning content precedes the message.

The stream handler now uses a shared helper to compute the assistant message output index and the reasoning-content regression test asserts that text/message events use 1 with exact int type, not True.

Test plan

  • uv run pytest tests/models/test_reasoning_content.py -k 'stream_response_yields_events_for_reasoning_content'
  • bash .agents/skills/code-change-verification/scripts/run.sh

Issue number

Closes #3109

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@Aphroq
Copy link
Copy Markdown
Contributor Author

Aphroq commented May 4, 2026

Closing as duplicate. #3108 now contains both Chat Completions streaming output_index fixes

@Aphroq Aphroq closed this May 4, 2026
@Aphroq Aphroq changed the title Fix Chat Completions streaming output indexes fix: emit integer chat stream output indexes May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat Completions streaming computes assistant output_index with a bool expression

1 participant