Skip to content

Python: correct built-in chat-client selectors in sample guide - #9673

Open
LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:docs/builtin-chat-client-selectors-20261024-1311
Open

LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:docs/builtin-chat-client-selectors-20261024-1311

Conversation

@ktz03

Copy link
Copy Markdown
Contributor

Motivation & Context

The built-in chat-client sample guide recommends openai_responses and azure_openai_responses, but get_client() accepts openai_chat and azure_openai_chat. Following either documented selector reaches the factory's unsupported-name error instead of selecting the intended client.

Description & Review Guide

  • What are the major changes? Correct the two selector names in the startup example, available-client list, and environment-variable descriptions. Clarify that main() receives the name and calls get_client() internally.
  • What is the impact of these changes? Documentation only. The factory, accepted selector names, clients, and runtime behavior are unchanged.
  • What do you want reviewers to focus on? Agreement with the sample's existing ClientName, factory branches, default argument, and entry point. Isolated checks executed the unchanged factory body with inert constructors: both old documented names raised ValueError, while the corrected eight-name list was accepted and six unchanged selectors remained controls. No SDK client, credential, full sample, model call, or build was run.

Related Issue

N/A - trivial change. These are stale string arguments and an inaccurate call-flow description; the correction follows the existing sample without adding aliases or changing its behavior.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Codex: documentation and this PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:34
@ktz03
LI (ktz03) deployed to github-app-auth October 24, 2026 13:35 — with GitHub Actions Active
@ktz03
LI (ktz03) deployed to github-app-auth October 24, 2026 13:35 — with GitHub Actions Active
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Oct 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The documentation-only corrections match the sample’s accepted selectors and call flow, with no unresolved findings.

No open issues 🎉

What changed in this PR

Corrects the built-in chat-client sample guide to match the existing factory selectors and call flow. Runtime behavior is unchanged.

Changes:

  • Replaces stale selectors with openai_chat and azure_openai_chat in the startup example, client list, and environment-variable descriptions.
  • Clarifies that main() receives a client name and calls get_client() internally.
File Description
python/​samples/​02-agents/​chat_client/​README.md Aligns documented selectors and call flow with the existing sample.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github-app-auth — 7b7cb920 Deployed Oct 24, 2026 by ktz03 via team_check #7393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants