Python: Forward function invocation kwargs through DevUI - #7355
Closed
hsusul wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes DevUI’s local agent execution path so request-scoped function_invocation_kwargs provided on the OpenAI-compatible request are preserved and forwarded into agent.run(...), restoring parity with direct agent.run(..., function_invocation_kwargs=...) calls and unblocking tools that read from FunctionInvocationContext.kwargs.
Changes:
- Added optional
function_invocation_kwargstoAgentFrameworkRequest(DevUI request model). - Forwarded
request.function_invocation_kwargsthroughAgentFrameworkExecutorintoagent.run(...)during agent execution. - Added a regression test verifying the request-to-agent handoff includes
function_invocation_kwargs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/packages/devui/tests/devui/test_execution.py | Adds a focused regression test asserting function_invocation_kwargs is passed to agent.run(...). |
| python/packages/devui/agent_framework_devui/models/_openai_custom.py | Extends AgentFrameworkRequest with optional function_invocation_kwargs. |
| python/packages/devui/agent_framework_devui/_executor.py | Conditionally forwards function_invocation_kwargs into the agent run call. |
Member
|
this is a duplicate of #7352 closing |
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
DevUI accepts
function_invocation_kwargson its OpenAI-compatible response request, but the local agent executor previously dropped the mapping before callingagent.run(). Tools that depend on request-scoped values throughFunctionInvocationContext.kwargstherefore failed when the same agent was invoked through DevUI.Description & Review Guide
function_invocation_kwargsfield toAgentFrameworkRequest.agent.run()calls.Related Issue
Fixes #7344
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.