Python: Fix AG-UI approval resume at the protocol boundary - #7480
Merged
moonbox3 merged 4 commits intoAug 4, 2026
Conversation
moonbox3
temporarily deployed
to
github-app-auth
August 3, 2026 05:02 — with
GitHub Actions
Inactive
moonbox3
temporarily deployed
to
github-app-auth
August 3, 2026 05:02 — with
GitHub Actions
Inactive
moonbox3
temporarily deployed
to
github-app-auth
August 3, 2026 05:02 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an incompatibility between AG-UI’s synthesized approval-resume user messages and the Ollama connector by dropping control-only approval-resume messages during Ollama message formatting, and adds a regression test to ensure the rest of the transcript (user → assistant tool call → tool result) still reaches Ollama.
Changes:
- Skip
role="user"messages that contain onlyfunction_approval_responsecontent when formatting user messages for Ollama. - Add a regression test validating the approval-resume message is omitted from the outgoing Ollama
messagespayload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/packages/ollama/agent_framework_ollama/_chat_client.py | Drops control-only approval-resume user messages by returning an empty formatted message list. |
| python/packages/ollama/tests/test_ollama_chat_client.py | Adds a regression test asserting the approval-resume message is not forwarded to Ollama. |
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
|||||||||||||||||||||||||||||||||||
moonbox3
marked this pull request as ready for review
August 3, 2026 05:14
moonbox3
temporarily deployed
to
github-app-auth
August 3, 2026 05:14 — with
GitHub Actions
Inactive
moonbox3
temporarily deployed
to
github-app-auth
August 3, 2026 05:25 — with
GitHub Actions
Inactive
moonbox3
enabled auto-merge
August 3, 2026 05:33
TaoChenOSU
reviewed
Aug 3, 2026
TaoChenOSU
approved these changes
Aug 3, 2026
giles17
approved these changes
Aug 3, 2026
moonbox3
force-pushed
the
fix-7451-ollama-approval-resume
branch
from
August 4, 2026 00:52
af69d2f to
b2d4435
Compare
moonbox3
temporarily deployed
to
github-app-auth
August 4, 2026 00:53 — with
GitHub Actions
Inactive
moonbox3
temporarily deployed
to
github-app-auth
August 4, 2026 00:53 — with
GitHub Actions
Inactive
moonbox3
temporarily deployed
to
github-app-auth
August 4, 2026 02:07 — with
GitHub Actions
Inactive
giles17
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
AG-UI approval resumes can replay a terminal function result before the approval response synthesized from the resume payload. Connector-specific filtering would scatter AG-UI protocol semantics across providers and can allow stale approval controls to be replayed. The fix belongs at the AG-UI protocol boundary so every connector receives the appropriate transcript.
Description & Review Guide
Related Issue
Fixes #7451
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.