Repository navigation
Python: Replace references to removed ChatAgent and Responses client classes - #9754
Draft
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
Draft
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
Conversation
…classes ChatAgent became Agent and OpenAIResponsesClient / AzureOpenAIResponsesClient were folded into OpenAIChatClient, but several docstrings and two error messages still name the old classes. The A2AExecutor example fails with ImportError as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 12:44 — with
GitHub Actions
Inactive
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 12:44 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The text-only replacements match the current APIs and introduce no blocking issues; remaining documentation cleanup is non-blocking.
1 open issue
What changed in this PR
Updates stale Python API references following the ChatAgent rename and removal of deprecated Responses clients in #3747 and #4990. Changes affect documentation, sample comments, and error-message text only.
Changes:
- Replace removed class names with
AgentandOpenAIChatClient, including imports and keyword arguments in examples. - Clarify Azure OpenAI compatibility in file-search documentation.
- Update MCP error guidance to recommend an
Agentwith a chat client.
| File | Description |
|---|---|
python/samples/03-workflows/parallelism/fan_out_fan_in_edges.py |
Corrects the AgentExecutor explanatory comment. |
python/packages/openai/agent_framework_openai/_chat_completion_client.py |
Updates web-search documentation and its agent example. |
python/packages/openai/agent_framework_openai/_chat_client.py |
Updates five hosted-tool examples and return descriptions. |
python/packages/github_copilot/agent_framework_github_copilot/_agent.py |
Replaces the removed agent name in MCP error guidance. |
python/packages/claude/agent_framework_claude/_agent.py |
Replaces the removed agent name in MCP error guidance. |
python/packages/azure-contentunderstanding/agent_framework_azure_contentunderstanding/_file_search.py |
Documents the current client and Azure endpoint support. |
python/packages/anthropic/agent_framework_anthropic/_chat_client.py |
Updates hosted-tool return descriptions to name Agent. |
python/packages/a2a/agent_framework_a2a/_a2a_executor.py |
Uses OpenAIChatClient in the executor example. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 15:15 — with
GitHub Actions
Inactive
This branch was previously deployed
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 & Context
ChatAgentwas renamed toAgentin #3747.OpenAIResponsesClientandAzureOpenAIResponsesClientwere folded intoOpenAIChatClientin #4990, which removed the deprecated surfaces. Some docstrings and two error messages still name the old classes:mainA2AExecutordocstring examplefrom agent_framework.openai import OpenAIResponsesClientImportErrorOpenAIFileSearchBackenddocstring (content understanding)OpenAIChatClientorAzureOpenAIResponsesClient"OpenAIChatClienthosted-tool helpers (5 docstrings)agent = ChatAgent(client, tools=[tool])ChatAgentis not definedOpenAIChatCompletionClient.get_web_search_toolAnthropicClienthosted-tool helpers (3 docstrings)ClaudeAgent/GitHubCopilotAgentMCP-tool error messagessamples/03-workflows/parallelism/fan_out_fan_in_edges.pyDescription & Review Guide
OpenAIChatClientreplacesOpenAIResponsesClient. For the file-search backend, the docstring now notes that it also works whenOpenAIChatClienttargets Azure OpenAI throughazure_endpoint.Agent(client=client, tools=[tool]), with an addedfrom agent_framework import Agent, replacesChatAgent(client, tools=[tool]).With the fix, the A2A example builds its Starlette app (2 routes) using the installed
a2aSDK. Onmainit stops at the import. The claude, github_copilot and a2a test suites pass (540 passed, 6 skipped). I found these by type-checking the docstring examples, then searching for the other renamed classes.Related Issue
N/A - trivial change: references to classes removed by #3747 and #4990 are updated to their documented replacements.
AI Assistance
AI assistance details: Claude Code helped find the stale names by type-checking docstring examples and searching for renamed classes, make the edits, and draft this description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.🤖 Generated with Claude Code