Skip to content

Python: Point multimodal and declarative MCP samples at FOUNDRY_* settings - #10082

Draft
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/python-multimodal-declarative-foundry-settings
Draft

Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/python-multimodal-declarative-foundry-settings

Conversation

@1aifanatic

Copy link
Copy Markdown
Contributor

Motivation & Context

Two sample folders document settings their code doesn't read:

  • 02-agents/multimodal_input: the Azure examples use FoundryChatClient(credential=AzureCliCredential()), which reads FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL. The README lists AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_MODEL (twice), AZURE_OPENAI_API_VERSION and AZURE_OPENAI_API_KEY. The two files' comments say "Requires AZURE_OPENAI_ENDPOINT and FOUNDRY_MODEL". The README also suggests an api_key parameter, which FoundryChatClient doesn't have.
  • 02-agents/declarative/mcp_tool_yaml.py: the Foundry example tells you to set PROJECT_ENDPOINT. The provider: Foundry agent reads FOUNDRY_PROJECT_ENDPOINT.

If you follow either set of instructions, the client fails with ValueError: Either 'project_endpoint' or 'project_client' is required. Set project_endpoint via parameter or 'FOUNDRY_PROJECT_ENDPOINT' environment variable.

Description & Review Guide

  • What are the major changes? Documentation and comments only:
    • The multimodal README and comments list FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL. The Azure OpenAI version and key settings, which this client doesn't use, are removed.
    • The declarative MCP sample names FOUNDRY_PROJECT_ENDPOINT.
  • What is the impact of these changes? Documentation only. Same follow-up as Python: Point Foundry-migrated sample READMEs at the settings the code reads #9759 for folders that one didn't cover.
  • What do you want reviewers to focus on? Nothing in particular.

Checked by creating each client with only the documented variables set. The old ones fail with the error above. With the new ones, FoundryChatClient is created with model == "gpt-4o", and the declarative factory gets past the endpoint check.

Related Issue

N/A - trivial change: sample documentation is corrected to the environment variables the code reads.

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: Claude Code helped find the mismatches by comparing sample docs with the settings the clients read, make the change, verify both settings sets, and draft this 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.

🤖 Generated with Claude Code

…tings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 05:37
@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 Nov 4, 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

No active review issues are reported for the documentation updates clarifying Foundry client settings and authentication guidance.

No open issues 🎉

What changed in this PR

Corrects Python sample documentation to match the settings read by Foundry clients, extending the cleanup in #9759. Changes are limited to documentation, comments, and a docstring; runtime behavior is unchanged.

Changes:

  • Document FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL for Azure multimodal samples.
  • Remove unused Azure OpenAI settings and unsupported api_key authentication guidance.
  • Correct the endpoint variable named in the declarative MCP sample.
File Description
python/​samples/​02-agents/​multimodal_input/​README.md Corrects Foundry settings and authentication guidance.
python/​samples/​02-agents/​multimodal_input/​azure_responses_multimodal.py Corrects the endpoint variable in setup comments.
python/​samples/​02-agents/​multimodal_input/​azure_chat_multimodal.py Corrects the endpoint variable in setup comments.
python/​samples/​02-agents/​declarative/​mcp_tool_yaml.py Corrects the endpoint variable in prerequisites and run instructions.

Review effort: Balanced

This branch was previously deployed

1 inactive deployment
github-app-auth — fdb8ed4c Deployed Nov 4, 2026 by 1aifanatic via team_check #8671
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