Skip to content

.NET: Point Foundry-migrated sample READMEs at FOUNDRY_* settings - #9600

Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/dotnet-sample-readme-foundry-env
Open

Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/dotnet-sample-readme-foundry-env

Conversation

@1aifanatic

Copy link
Copy Markdown
Contributor

Motivation & Context

#6557 moved these 13 samples to AIProjectClient. Their Program.cs now reads FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL (plus FOUNDRY_EMBEDDING_MODEL in the custom vector store RAG sample). Their READMEs still tell readers to set AZURE_OPENAI_ENDPOINT / AZURE_OPENAI_DEPLOYMENT_NAME, so following a README ends in InvalidOperationException: FOUNDRY_PROJECT_ENDPOINT is not set.

  • 02-agents/Agents: Agent_Step02_StructuredOutput, Agent_Step10_BackgroundResponsesWithToolsAndPersistence, Agent_Step14_BackgroundResponses, Agent_Step18_CompactionPipeline, Agent_Step19_InFunctionLoopCheckpointing, Agent_Step20_DynamicFunctionTools
  • 02-agents/AgentSkills: Agent_Step01 to Agent_Step04, Agent_Step06
  • 02-agents/AgentWithRAG: AgentWithRAG_Step02_CustomVectorStoreRAG, AgentWithRAG_Step05_Neo4jGraphRAG

Description & Review Guide

  • What are the major changes?
    • The environment variable blocks use FOUNDRY_PROJECT_ENDPOINT, FOUNDRY_MODEL and FOUNDRY_EMBEDDING_MODEL. The endpoint placeholder is the one most other .NET sample READMEs use (https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project). Defaults and comments are unchanged.
    • The prerequisite bullet that names the endpoint now says "Microsoft Foundry project…", and the az login notes say "access to the Foundry project", matching sibling READMEs such as Agent_Step11_Middleware.
  • What is the impact of these changes? Documentation only.
  • What do you want reviewers to focus on? I left the RBAC role lines and the conceptual mentions of "Azure OpenAI Responses" alone, because I wasn't sure what wording you want there for Foundry projects.

I found these by comparing the variables each sample README sets with the variables its .cs files read. After this change, all 13 READMEs set exactly the variables their code reads.

Related Issue

N/A - trivial change: the READMEs name environment variables that the samples' code no longer reads, and the correct names are given by Program.cs, so the desired result is not in dispute.

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 write the README-versus-code comparison script that found these, make the edits, 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

microsoft#6557 moved these samples' code to AIProjectClient and FOUNDRY_PROJECT_ENDPOINT /
FOUNDRY_MODEL (and FOUNDRY_EMBEDDING_MODEL), but their READMEs still told readers
to set AZURE_OPENAI_ENDPOINT / AZURE_OPENAI_DEPLOYMENT_NAME, so following the
README fails with "FOUNDRY_PROJECT_ENDPOINT is not set."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 12:54
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net labels Oct 22, 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

These documentation-only corrections match the samples’ configuration names and defaults, with no unresolved blocking issues.

No open issues 🎉

What changed in this PR

Updates 13 .NET sample READMEs to match the Foundry-first AIProjectClient migration in #6557, correcting setup instructions that still referenced obsolete environment variables. No runtime code changes are included.

Changes:

  • Replaces AZURE_OPENAI_* settings with FOUNDRY_PROJECT_ENDPOINT and FOUNDRY_MODEL.
  • Updates the custom vector store RAG sample to use FOUNDRY_EMBEDDING_MODEL.
  • Aligns endpoint prerequisites and relevant authentication notes with Foundry projects while preserving model defaults.
File Description
dotnet/​samples/​02-agents/​AgentWithRAG/​AgentWithRAG_Step05_Neo4jGraphRAG/​README.md Updates Foundry prerequisites and chat settings.
dotnet/​samples/​02-agents/​AgentWithRAG/​AgentWithRAG_Step02_CustomVectorStoreRAG/​README.md Updates Foundry chat, embedding, and access instructions.
dotnet/​samples/​02-agents/​AgentSkills/​Agent_Step06_McpBasedSkills/​README.md Updates Foundry prerequisites and PowerShell setup.
dotnet/​samples/​02-agents/​AgentSkills/​Agent_Step04_MixedSkills/​README.md Updates Foundry prerequisites and Bash setup.
dotnet/​samples/​02-agents/​AgentSkills/​Agent_Step03_ClassBasedSkills/​README.md Updates Foundry prerequisites and Bash setup.
dotnet/​samples/​02-agents/​AgentSkills/​Agent_Step02_CodeDefinedSkills/​README.md Updates Foundry prerequisites and Bash setup.
dotnet/​samples/​02-agents/​AgentSkills/​Agent_Step01_FileBasedSkills/​README.md Updates Foundry prerequisites and Bash setup.
dotnet/​samples/​02-agents/​Agents/​Agent_Step20_DynamicFunctionTools/​README.md Updates Foundry prerequisites and environment variables.
dotnet/​samples/​02-agents/​Agents/​Agent_Step19_InFunctionLoopCheckpointing/​README.md Updates Foundry prerequisites and environment variables.
dotnet/​samples/​02-agents/​Agents/​Agent_Step18_CompactionPipeline/​README.md Updates Foundry prerequisites and environment variables.
dotnet/​samples/​02-agents/​Agents/​Agent_Step14_BackgroundResponses/​README.md Updates Foundry configuration and access instructions.
dotnet/​samples/​02-agents/​Agents/​Agent_Step10_BackgroundResponsesWithToolsAndPersistence/​README.md Updates Foundry configuration and access instructions.
dotnet/​samples/​02-agents/​Agents/​Agent_Step02_StructuredOutput/​README.md Updates Foundry configuration and access instructions.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github-app-auth — 7bcac25a Deployed Oct 24, 2026 by rogerbarreto via team_check #7359
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 .NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants