Skip to content

Python: fix invalid options kwarg in workflow shared session sample - #6294

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 4 commits into
microsoft:mainfrom
benke520:fix/workflow-sample-invalid-options-kwarg
Jul 8, 2026
Merged

Python: fix invalid options kwarg in workflow shared session sample#6294
Eduard van Valkenburg (eavanvalkenburg) merged 4 commits into
microsoft:mainfrom
benke520:fix/workflow-sample-invalid-options-kwarg

Conversation

@benke520

Copy link
Copy Markdown
Member

Fix

Fixes #6293

Problem

azure_ai_agents_with_shared_session.py passes options={"store": False} to workflow.run(), but Workflow.run() does not accept an options parameter. The kwarg is silently absorbed by Python and store=False is never forwarded to the chat client.

Fix

Replace options={"store": False} with client_kwargs={"store": False}, which correctly forwards the parameter to the underlying chat client calls via Workflow.run()'s client_kwargs parameter.

Copilot AI review requested due to automatic review settings June 2, 2026 23:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the shared-session agents workflow sample to pass message storage configuration via client_kwargs instead of options.

Changes:

  • Reworded the inline comment to describe client_kwargs forwarding behavior.
  • Renamed options={"store": False} to client_kwargs={"store": False} in the workflow.run(...) call.

…ample

Workflow.run() does not accept an options parameter. The store=False
kwarg was silently ignored. Use client_kwargs to correctly forward it
to the underlying chat client.

Fixes microsoft#6293
@benke520
Benke Qu (benke520) force-pushed the fix/workflow-sample-invalid-options-kwarg branch from bd0eedf to 0088471 Compare June 3, 2026 00:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread python/samples/03-workflows/agents/azure_ai_agents_with_shared_session.py Outdated
@benke520

Copy link
Copy Markdown
Member Author

Evan Mattson (@moonbox3) Hey! Could you do a quick review on this one when you get a chance? It's a small fix - swaps options for client_kwargs in the shared-session workflow sample since Workflow.run() doesn't accept an options param. Thanks!

Merged via the queue into microsoft:main with commit 7f551f0 Jul 8, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: update workflow shared session sample to use client_kwargs instead of options

4 participants