Python: [BREAKING] parameter naming and other fixes - #1255
Merged
eavanvalkenburg merged 10 commits intoOct 7, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes parameter naming across the Agent Framework by making model_id the consistent parameter name instead of the previously mixed usage of model and model_id. Additionally, it improves parameter handling for additional chat options and enhances reasoning content processing in OpenAI clients.
- Renamed
modelparameter tomodel_idacross agents, chat clients, and type definitions for consistency - Renamed
request_kwargstoadditional_chat_optionsin agent constructors for clarity - Improved parsing and handling of additional properties in OpenAI chat and responses clients
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/getting_started/agents/openai/openai_responses_client_reasoning.py | Updated sample to use gpt-5 model and improved reasoning content handling with proper additional_chat_options usage |
| python/packages/devui/agent_framework_devui/models/_discovery_models.py | Changed model field to model_id in EntityInfo model |
| python/packages/devui/agent_framework_devui/_session.py | Updated parameter name from model to model_id in session management |
| python/packages/devui/agent_framework_devui/_discovery.py | Updated model parameter references to use model_id |
| python/packages/core/tests/openai/test_openai_chat_client_base.py | Added test for additional_properties handling and cleaned up test formatting |
| python/packages/core/tests/core/test_types.py | Removed unused imports, updated exception handling to use ContentError, and removed redundant test cases |
| python/packages/core/tests/core/test_observability.py | Updated test calls to use model_id parameter instead of model |
| python/packages/core/agent_framework/openai/_responses_client.py | Enhanced additional properties parsing and added summary content handling for reasoning responses |
| python/packages/core/agent_framework/openai/_chat_client.py | Improved options preparation with better additional properties handling |
| python/packages/core/agent_framework/observability.py | Updated observability tracking to use model_id parameter consistently |
| python/packages/core/agent_framework/exceptions.py | Added new ContentError exception class |
| python/packages/core/agent_framework/azure/_shared.py | Removed unused parameter documentation |
| python/packages/core/agent_framework/_types.py | Major refactoring of content parsing, ChatOptions, and parameter handling with improved error handling |
| python/packages/core/agent_framework/_serialization.py | Enhanced serialization to conditionally exclude type field |
| python/packages/core/agent_framework/_middleware.py | Updated middleware to use model_id instead of model |
| python/packages/core/agent_framework/_clients.py | Comprehensive parameter renaming from model to model_id and improved documentation |
| python/packages/core/agent_framework/_agents.py | Updated ChatAgent to use additional_chat_options instead of request_kwargs and improved parameter handling |
| python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py | Updated Azure AI client to use model_id parameter and added ToolDefinition case handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
eavanvalkenburg
force-pushed
the
fix_output_format_agent_streaming
branch
from
October 7, 2025 10:50
71fdbf5 to
e58633d
Compare
Contributor
This was referenced Oct 7, 2025
dmytrostruk
approved these changes
Oct 7, 2025
ekzhu
approved these changes
Oct 7, 2025
eavanvalkenburg
enabled auto-merge
October 7, 2025 18:34
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 7, 2025
eavanvalkenburg
force-pushed
the
fix_output_format_agent_streaming
branch
from
October 7, 2025 19:50
919dd5a to
8af38b0
Compare
eavanvalkenburg
enabled auto-merge
October 7, 2025 19:50
dmytrostruk
approved these changes
Oct 7, 2025
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 7, 2025
dmytrostruk
approved these changes
Oct 7, 2025
eavanvalkenburg
enabled auto-merge
October 7, 2025 21:14
ReubenBond
pushed a commit
to ReubenBond/agent-framework
that referenced
this pull request
Oct 28, 2025
* parameter naming and other fixes * fix test * fix azure openai responses decorator ordering * fix test * fix mypy * fixes in options handling * fix tests * final fixes * exclude macos tests * fix model param
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
* parameter naming and other fixes * fix test * fix azure openai responses decorator ordering * fix test * fix mypy * fixes in options handling * fix tests * final fixes * exclude macos tests * fix model param
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 and Context
Made the use of
model_idconsistent across agents, chat_clients and types, in some placesmodelwas used, that is now alwaysmodel_id.Also made some improvements in parameter names on the agents for the additional options passed to the chat client.
Improved the parsing of additional_properties for several clients.
Improved the handling of Responses Reasoning content, and improved sample
Also removed
to_provider_settingsfrom ChatOptions, as it was not used, and to_dict does a similar thing.Added handling of
typeto exclude from to_dict.Closes #1245 #1246
Description
Contribution Checklist