We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 593e02f commit 0214933Copy full SHA for 0214933
pydantic_ai_slim/pydantic_ai/_parts_manager.py
@@ -510,7 +510,9 @@ def _emit_thinking_start_from_text(
510
511
if existing_part is not None and existing_part.part.content:
512
new_part_index = self.append_and_track_new_part(thinking_part, vendor_part_id)
513
- if existing_part.part.potential_opening_tag_buffer:
+ if (
514
+ existing_part.part.potential_opening_tag_buffer
515
+ ): # pragma: no cover - this can't happen by the current logic so it's more of a safeguard
516
raise RuntimeError(
517
'The buffer of an existing TextPart should have been flushed before creating a ThinkingPart'
518
)
0 commit comments