Skip to content

Support end_turn in response.completed#19610

Merged
tibo-openai merged 5 commits intomainfrom
andrey/use-end-turn-properly
Apr 26, 2026
Merged

Support end_turn in response.completed#19610
tibo-openai merged 5 commits intomainfrom
andrey/use-end-turn-properly

Conversation

@andmis
Copy link
Copy Markdown
Collaborator

@andmis andmis commented Apr 25, 2026

Some providers of Responses API forward a model-defined end_turn boolean indicating explicitly the model's indication of whether it would like to end the turn or to be inferenced again. In this PR, we update the sampling loop to use this field correctly if it's set. If the field is not set by the provider, we fall back to the existing sampling logic.

Comment thread codex-rs/core/src/session/turn.rs Outdated
@tibo-openai tibo-openai merged commit 355c40a into main Apr 26, 2026
24 of 25 checks passed
@tibo-openai tibo-openai deleted the andrey/use-end-turn-properly branch April 26, 2026 04:57
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants