Skip to content

Fix compatibility with agent-framework-core 1.0.0rc4 and openai 2.x#201

Merged
biswapm merged 5 commits intomicrosoft:mainfrom
biswapm:pmohapatra-A365-Python
Mar 25, 2026
Merged

Fix compatibility with agent-framework-core 1.0.0rc4 and openai 2.x#201
biswapm merged 5 commits intomicrosoft:mainfrom
biswapm:pmohapatra-A365-Python

Conversation

@biswapm
Copy link
Copy Markdown
Contributor

@biswapm biswapm commented Mar 17, 2026

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.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.toml and regenerated uv.lock for agent-framework-azure-ai, openai, openai-agents, and semantic-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

nikhilNava
nikhilNava previously approved these changes Mar 17, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 18, 2026 09:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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., ChatAgentRawAgent, ChatMessageMessage, store list_messages()get_messages()).
  • Updated workspace constraints and lockfile to agent-framework-*-rc4 and openai==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-agents is pinned to 0.4.2 in uv.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 incompatible openai-agents version when combined with openai >= 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",

- 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
@biswapm biswapm force-pushed the pmohapatra-A365-Python branch from 419605f to 070febc Compare March 20, 2026 12:18
Copilot AI review requested due to automatic review settings March 20, 2026 12:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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., ChatAgentRawAgent, ChatMessageMessage, store list_messages()get_messages(), ctor kwarg chat_client=client=).
  • Upgrade dependency constraints and lockfile to agent-framework-* rc4 and openai 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 out of 6 changed files in this pull request and generated no new comments.

@biswapm biswapm requested review from ajmfehr and sellakumaran March 25, 2026 03:48
@biswapm biswapm enabled auto-merge (squash) March 25, 2026 06:23
@biswapm biswapm disabled auto-merge March 25, 2026 06:41
@biswapm biswapm merged commit 942e809 into microsoft:main Mar 25, 2026
10 checks passed
@biswapm biswapm deleted the pmohapatra-A365-Python branch March 26, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python/agent-framework/sample-agent no longer works due to breaking changes in Agent Framework

6 participants