Skip to content

Python: fix(python): handle function_invocation_configuration in as_agent#5150

Open
saschabuehrle wants to merge 1 commit intomicrosoft:mainfrom
saschabuehrle:fix/issue-4985-as-agent-function-config
Open

Python: fix(python): handle function_invocation_configuration in as_agent#5150
saschabuehrle wants to merge 1 commit intomicrosoft:mainfrom
saschabuehrle:fix/issue-4985-as-agent-function-config

Conversation

@saschabuehrle
Copy link
Copy Markdown

Fixes #4985

BaseChatClient.as_agent() accepted function_invocation_configuration but forwarded it to Agent(...), which no longer has that constructor argument. That produced a TypeError.

This change keeps as_agent() compatible by applying the provided config to the client-level function invocation configuration when available, and then creating the agent without unsupported kwargs.

Also adds a regression test to verify that as_agent(function_invocation_configuration=...) updates the client config without raising.

Greetings, saschabuehrle

@moonbox3 moonbox3 added the python label Apr 7, 2026
@github-actions github-actions bot changed the title fix(python): handle function_invocation_configuration in as_agent Python: fix(python): handle function_invocation_configuration in as_agent Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: The as_agent method of BaseChatClient accepts a function_invocation_configuration parameter, but Agent no longer agrees with that.

2 participants