Fix compatibility with agent-framework-core 1.0.0rc4 and openai 2.x#201
Fix compatibility with agent-framework-core 1.0.0rc4 and openai 2.x#201biswapm merged 5 commits intomicrosoft:mainfrom
Conversation
Update microsoft-agents-a365-tooling-extensions-agentframework to use renamed APIs introduced in agent-framework-core 1.0.0rc4: - ChatAgent -> RawAgent - ChatMessage -> Message - ChatMessageStoreProtocol -> BaseHistoryProvider - Constructor kwarg chat_client= -> client= - Store method list_messages() -> get_messages() Upgrade constraints and lock file: - agent-framework-azure-ai: >=1.0.0b251114 -> >=1.0.0rc4 (1.0.0rc4) - agent-framework-core: 1.0.0b260130 -> 1.0.0rc4 - openai: >=1.0.0 -> >=2.0.0 (2.28.0, required by rc4) - openai-agents: 0.3.3 -> 0.4.2 - semantic-kernel: 1.39.4 -> 1.41.0 Update integration test (test_agentframework_trace_processor.py) and unit tests to use the new API names.
There was a problem hiding this comment.
Pull request overview
This PR updates the microsoft-agents-a365-tooling-extensions-agentframework library to be compatible with agent-framework-core 1.0.0rc4 and openai 2.x by renaming APIs to match upstream changes.
Changes:
- Renamed all references from old API names (
ChatAgent,ChatMessage,ChatMessageStoreProtocol,chat_client=,list_messages()) to new names (RawAgent,Message,BaseHistoryProvider,client=,get_messages()) in source and test files. - Updated dependency version constraints in
pyproject.tomland regenerateduv.lockforagent-framework-azure-ai,openai,openai-agents, andsemantic-kernel.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
libraries/.../mcp_tool_registration_service.py |
Core API rename: imports, type annotations, constructor call, docstrings |
tests/.../test_send_chat_history.py |
Updated mock method names from list_messages to get_messages and docstrings |
tests/.../test_mcp_tool_registration_service.py |
Updated patched class name from ChatAgent to RawAgent in 8 test methods |
tests/.../test_agentframework_trace_processor.py |
Updated integration test imports and constructor calls to use new API names |
pyproject.toml |
Bumped constraints for agent-framework-azure-ai and openai |
uv.lock |
Regenerated lock file with updated package versions |
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the Agent Framework tooling extension to stay compatible with agent-framework-core==1.0.0rc4 and openai>=2.x by renaming types/APIs, adjusting construction kwargs, and aligning tests + dependency locks accordingly.
Changes:
- Renamed Agent Framework types/usages (e.g.,
ChatAgent→RawAgent,ChatMessage→Message, storelist_messages()→get_messages()). - Updated workspace constraints and lockfile to
agent-framework-*-rc4andopenai==2.28.0(plus related dependency updates). - Updated unit/integration tests to the new Agent Framework API surface.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Locks upgraded Agent Framework/OpenAI dependency set and adjusts constraints/dep graph for rc4. |
pyproject.toml |
Raises workspace constraints for agent-framework-azure-ai and openai to match rc4/OpenAI 2.x compatibility target. |
libraries/.../mcp_tool_registration_service.py |
Migrates service implementation to RawAgent, Message, BaseHistoryProvider, and new constructor/store APIs. |
tests/tooling/extensions/agentframework/services/test_send_chat_history.py |
Updates mocks/assertions for get_messages() store API. |
tests/tooling/extensions/agentframework/services/test_mcp_tool_registration_service.py |
Updates patch targets from ChatAgent to RawAgent. |
tests/observability/extensions/agentframework/integration/test_agentframework_trace_processor.py |
Updates integration tests to instantiate RawAgent(client=...) instead of ChatAgent(chat_client=...). |
Comments suppressed due to low confidence (1)
pyproject.toml:88
openai-agentsis pinned to 0.4.2 inuv.lock(and the PR description calls out upgrading it), but the workspace constraint here still allows much older versions (openai-agents >= 0.2.6). This can let dependency resolution pick an incompatibleopenai-agentsversion when combined withopenai >= 2.0.0/ agent-framework-core rc4. Consider raising the minimum constraint to the intended compatible version (e.g., >=0.4.2) to match the lockfile and stated compatibility target.
# --- AI Frameworks ---
"agent-framework-azure-ai >= 1.0.0rc4",
"langchain >= 0.1.0",
"langchain-core >= 0.1.0",
"openai-agents >= 0.2.6",
"semantic-kernel >= 1.39.3",
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Show resolved
Hide resolved
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Show resolved
Hide resolved
- Correct return type of add_tool_servers_to_agent from Optional[RawAgent] to RawAgent - Update docstring to reference RawAgent instead of stale chat agent - Fix docstring example to use string role user instead of undefined Role.USER
419605f to
070febc
Compare
There was a problem hiding this comment.
Pull request overview
Updates the AgentFramework tooling extension to remain compatible with agent-framework-core==1.0.0rc4 and the openai>=2.x ecosystem by adopting renamed AgentFramework APIs and refreshing dependency constraints/locks.
Changes:
- Rename AgentFramework types/usages (e.g.,
ChatAgent→RawAgent,ChatMessage→Message, storelist_messages()→get_messages(), ctor kwargchat_client=→client=). - Upgrade dependency constraints and lockfile to
agent-framework-* rc4andopenai 2.x(plus related packages). - Update unit/integration tests to the new AgentFramework API names.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Bumps locked versions to AgentFramework rc4 and openai==2.28.0, plus related dependency graph updates. |
pyproject.toml |
Updates constraint-dependencies for AgentFramework Azure AI and openai>=2.0.0. |
libraries/.../mcp_tool_registration_service.py |
Switches imports/types to RawAgent/Message/BaseHistoryProvider and updates store call to get_messages(). |
tests/tooling/.../test_send_chat_history.py |
Updates store mocking and assertions to use get_messages() and adjusts docstrings accordingly. |
tests/tooling/.../test_mcp_tool_registration_service.py |
Updates patch targets from ChatAgent to RawAgent to match renamed AgentFramework API. |
tests/observability/.../test_agentframework_trace_processor.py |
Updates integration test to instantiate RawAgent(client=...) per rc4 API changes. |
Update microsoft-agents-a365-tooling-extensions-agentframework to use renamed APIs introduced in agent-framework-core 1.0.0rc4:
Upgrade constraints and lock file:
Update integration test (test_agentframework_trace_processor.py) and unit tests to use the new API names.