Skip to content

Python: use FOUNDRY_* settings in the ChatKit integration sample README - #9758

Open
NingLin Liu (ninglinLiu) wants to merge 13 commits into
microsoft:mainfrom
ninglinLiu:docs/chatkit-foundry-env
Open

NingLin Liu (ninglinLiu) wants to merge 13 commits into
microsoft:mainfrom
ninglinLiu:docs/chatkit-foundry-env

Conversation

@ninglinLiu

Copy link
Copy Markdown
Contributor

Motivation & Context

The ChatKit integration README's backend setup asks for AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_VERSION and AZURE_OPENAI_MODEL, but app.py creates its agent with FoundryChatClient(credential=AzureCliCredential()) (imported from agent_framework.foundry). That client reads FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL (env_prefix="FOUNDRY_") and ignores the AZURE_OPENAI_* variables, so following the README fails at startup with Model is required. Set via 'model' parameter or 'FOUNDRY_MODEL' environment variable. The install line also omits agent-framework-foundry, which provides agent_framework.foundry.FoundryChatClient (agent-framework-chatkit only depends on agent-framework-core), so the import fails first.

Description & Review Guide

  • What are the major changes? In python/samples/05-end-to-end/chatkit-integration/README.md:
    • backend step 2 now exports FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL instead of the AZURE_OPENAI_* variables;
    • the pip install line adds agent-framework-foundry;
    • the prerequisite reads "A Microsoft Foundry project with a deployed model".
  • What is the impact of these changes? Documentation only; the sample code is unchanged.
  • What do you want reviewers to focus on? app.py line 34 (from agent_framework.foundry import FoundryChatClient) and line 225 (FoundryChatClient(credential=AzureCliCredential())), and RawFoundryChatClient.__init__ in packages/foundry/agent_framework_foundry/_chat_client.py.

Related Issue

N/A - trivial change. Stale setup instructions in one sample README; the correction follows what the existing sample already uses, with no behavior change.

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: finding the mismatch (README setup vs. the client and import the sample uses), the documentation edit, 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.

@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 27, 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 corrections match the existing integration, with only a minor installation-command convention issue remaining.

1 open issue
What changed in this PR

This documentation-only change aligns the ChatKit sample’s backend setup with its existing FoundryChatClient integration.

Changes:

  • Replace Azure OpenAI settings with FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL.
  • Add agent-framework-foundry to the installation command.
  • Update the prerequisite to a Microsoft Foundry project with a deployed model.
File Description
python/​samples/​05-end-to-end/​chatkit-integration/​README.md Align prerequisites, dependencies, and environment settings with the Foundry backend.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github-app-auth — 0a27671f Deployed Oct 30, 2026 by ninglinLiu via add_label #26746
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