Skip to content

Python: use AZURE_OPENAI_EMBEDDING_MODEL in the Foundry memory sample README - #9741

Open
NingLin Liu (ninglinLiu) wants to merge 1 commit into
microsoft:mainfrom
ninglinLiu:docs/foundry-memory-embedding-env
Open

NingLin Liu (ninglinLiu) wants to merge 1 commit into
microsoft:mainfrom
ninglinLiu:docs/foundry-memory-embedding-env

Conversation

@ninglinLiu

Copy link
Copy Markdown

Motivation & Context

The context providers README lists AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME as the embedding setting for azure_ai_foundry_memory.py, but the sample reads os.environ["AZURE_OPENAI_EMBEDDING_MODEL"] when it builds the memory store definition (and its own docstring says "Set AZURE_OPENAI_EMBEDDING_MODEL for the embedding model"). Following the README gives KeyError: 'AZURE_OPENAI_EMBEDDING_MODEL' before the memory store is created.

Description & Review Guide

  • What are the major changes? Rename the variable in the azure_ai_foundry_memory.py prerequisites of python/samples/02-agents/context_providers/README.md to AZURE_OPENAI_EMBEDDING_MODEL.
  • What is the impact of these changes? Documentation only; the sample and its behavior are unchanged.
  • What do you want reviewers to focus on? azure_ai_foundry_memory.py line 58 (embedding_model=os.environ["AZURE_OPENAI_EMBEDDING_MODEL"]). The same name is also what azure_ai_search/search_context_semantic.py uses, so the README is now consistent across the context provider samples.

Related Issue

N/A - trivial change. A stale environment-variable name in one README line; the correction follows the variable the existing sample already reads, 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 variables vs. os.environ reads in the samples), 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.

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 single-line documentation correction matches the sample’s environment-variable lookup and has no unresolved review issues.

No open issues 🎉

What changed in this PR

Corrects the Foundry memory sample’s prerequisites so the README matches the environment variable read by the sample.

Changes:

  • Replaces AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME with AZURE_OPENAI_EMBEDDING_MODEL.
  • Documentation only; sample code and runtime behavior are unchanged.
File Description
python/​samples/​02-agents/​context_providers/​README.md Corrects the embedding environment-variable name for the Foundry memory sample.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github-app-auth — 30aac8b8 Deployed Oct 27, 2026 by ninglinLiu via team_check #7612
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