Repository navigation
Commit 4266443
committed
fix(workflows): drop assistant function calls orphaned by role filtering
Role-only filtering kept assistant(function_call) while dropping its
tool(function_result), producing an invalid call-without-result transcript
that providers reject on replay when the response is persisted through a
session. Assistant messages whose contents are entirely function-call
envelopes are now dropped alongside the non-assistant messages, so the
public response carries only user-facing assistant output with no dangling
calls. Regression test covers call → tool result → final.
Signed-off-by: Manohar Paturi <[email protected]>1 parent cf2a1c0 commit 4266443
2 files changed
Lines changed: 70 additions & 2 deletions
File tree
- python/packages/core
- agent_framework/_workflows
- tests/workflow
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
55 | 71 | | |
56 | 72 | | |
57 | 73 | | |
| |||
591 | 607 | | |
592 | 608 | | |
593 | 609 | | |
594 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
595 | 618 | | |
596 | 619 | | |
597 | 620 | | |
| |||
609 | 632 | | |
610 | 633 | | |
611 | 634 | | |
612 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
613 | 641 | | |
614 | 642 | | |
615 | 643 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2682 | 2682 | | |
2683 | 2683 | | |
2684 | 2684 | | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
2685 | 2725 | | |
2686 | 2726 | | |
2687 | 2727 | | |
| |||
0 commit comments