Skip to content

fix(conversations): dedupe deferred-responses block in run_async - #496

Merged
andreaonofrei01 merged 1 commit into
mainfrom
fix/dedupe-deferred-responses-block
Apr 21, 2026
Merged

fix(conversations): dedupe deferred-responses block in run_async#496
andreaonofrei01 merged 1 commit into
mainfrom
fix/dedupe-deferred-responses-block

Conversation

@andreaonofrei01

@andreaonofrei01 andreaonofrei01 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes a duplicate copy of the deferred-response handling block inside Conversations.run_async in src/mistralai/client/conversations.py. The Speakeasy regen in chore: 🐝 Update SDK - Generate MISTRALAI MISTRALAI-SDK 2.3.2 #484 re-emitted the block (originally hand-added inside the sdk-class-body custom region in feat: add Human in the loop confirmations #482) on top of the existing one, leaving two identical copies.
  • The second copy unconditionally reset pending_tool_confirmations = None, silently dropping the server-side HITL confirmations the first block had just computed. Deleting the duplicate restores correct behavior.

Notes

  • The duplicate nonlocal pending_tool_confirmations previously reported in run_stream_async is no longer present on main and did not need a fix here.
  • Per Speakeasy's analysis, the root cause is on their side (a ruff-formatting drift that confuses diffmatchpatch's overlap detector during region merge). They are tracking a longer-term fix; this PR is the manual cleanup on our side.

The Speakeasy regen in #484 re-emitted the deferred-response handling
block on top of the existing one inside the sdk-class-body custom
region, leaving two identical copies in run_async. The second copy
unconditionally reset pending_tool_confirmations to None, silently
dropping the server-side HITL confirmations computed by the first.

Removes the duplicate block so HITL confirmations are preserved.
@tchardonnens

tchardonnens commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Cool! You told me earlier IRL about another line that was also duplicated. I don't see it in this PR. Is it fixed already?

@andreaonofrei01

Copy link
Copy Markdown
Contributor Author

yes, by a previous regeneration

@andreaonofrei01
andreaonofrei01 merged commit 6b21473 into main Apr 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants