Skip to content

fix: bug fix and consistency updates - #321

Merged
gpickett merged 11 commits into
devfrom
psl-revert
Jul 27, 2026
Merged

fix: bug fix and consistency updates #321
gpickett merged 11 commits into
devfrom
psl-revert

Conversation

@PrekshithD-Microsoft

@PrekshithD-Microsoft PrekshithD-Microsoft commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This pull request updates documentation, workflow scripts, and code comments to consistently use the latest Azure product names and branding, replacing legacy terms like "Microsoft Foundry" and "Cosmos DB" with "Azure AI Foundry," "Azure Cosmos DB," and similar. These changes improve clarity and align with current Azure service naming.

Documentation and Branding Updates:

  • Updated the README.md to refer to "Azure AI Foundry" and "Azure AI Services (Azure OpenAI)" instead of "Microsoft Foundry" and "AI Services (OpenAI)" throughout the solution overview, feature list, and cost table. [1] [2] [3] [4] [5] [6]
  • Changed references in chat-app/backend/README.md from "Cosmos DB" to "Azure Cosmos DB," from "AI Search" to "Azure AI Search," and from "Azure AD" to "Microsoft Entra ID." [1] [2]

Workflow and Script Messaging:

  • Updated workflow scripts and messages in .github/workflows/deploy.yml and .github/workflows/job-post-deploy.yml to use "Azure OpenAI," "Azure AI Search," and "Azure Cosmos DB" for clarity during resource provisioning and logging. [1] [2] [3] [4]
  • Updated instructions in azure.yaml to refer to "Azure AI Foundry agents" instead of "AI Foundry agents." [1] [2]

Code and Agent Instructions:

  • Updated agent tool descriptions and docstrings in app/agent_instructions.py and app/cosmos_service.py to consistently use "Azure AI Search" and "Azure Cosmos DB," and clarified error/help messages to match the new naming. [1] [2] [3] [4] [5] [6] [7]

Other Improvements:

  • Added a .dockerignore file to chat-app/backend to exclude environment files, caches, and development artifacts from Docker builds.## Purpose
  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Roopan-Microsoft and others added 5 commits July 21, 2026 10:29
chore: Update azure.yaml to include GitHub issue URL
feat: Scenario packs implemented & bicep infra upgrades
fix: Update frontend images and address security issue

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.

Pull request overview

This pull request primarily standardizes Azure product naming/branding across documentation, workflow logs, infrastructure templates, and in-code comments/messages (for both chat-app and scenario-app) to reflect current names like “Azure AI Foundry”, “Azure OpenAI”, “Azure AI Search”, “Azure Cosmos DB”, and “Microsoft Entra ID”.

Changes:

  • Updated docs and in-repo guidance to replace legacy service names with current Azure branding.
  • Updated workflow/script log output and inline code comments/docstrings to align on the same naming.
  • Minor infra module refinements (e.g., parameter typing/defaults) and Docker build context exclusions via .dockerignore.

Reviewed changes

Copilot reviewed 74 out of 77 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
scenario-app/frontend/src/lib/api.ts Branding-only update in a frontend API comment.
scenario-app/frontend/LOCAL_AUTH_SETUP.md Updates local auth setup instructions to “Microsoft Entra ID”.
scenario-app/backend/README.md Branding updates for database/search/auth naming.
scenario-app/backend/app/utils/voice_utils.py Updates voice-related comments/docstrings (naming consistency).
scenario-app/backend/app/simple_foundry_orchestrator.py Updates Foundry/OpenAI wording in comments.
scenario-app/backend/app/routers/voice_live.py Updates realtime endpoint error message wording.
scenario-app/backend/app/routers/chat.py Updates Cosmos DB references in docstrings/comments.
scenario-app/backend/app/plugins/product_plugin.py Updates plugin docstrings/comments for Azure AI Search/Cosmos DB.
scenario-app/backend/app/plugins/orders_plugin.py Updates plugin docstring for Azure Cosmos DB.
scenario-app/backend/app/list_assistants.py Updates console text/comments to “Azure OpenAI client”.
scenario-app/backend/app/database.py Updates fallback log string for missing Azure Cosmos DB config.
scenario-app/backend/app/create_assistants.py Updates console text/comments to “Azure OpenAI client”.
scenario-app/backend/app/cosmos_service.py Updates many log/error/help strings to Azure Cosmos DB branding.
scenario-app/backend/app/config.py Updates comments and modifies dotenv loading order/override behavior.
scenario-app/backend/app/agent_instructions.py Updates agent tool descriptions (Azure AI Search/Cosmos DB).
scenario-app/backend/.dockerignore Expands ignored artifacts (env/caches/venv/markdown) for Docker context.
README.md Updates top-level solution branding to “Azure AI Foundry” and related names.
infra/scripts/pre-provision/checkquota.sh Updates quota output messaging to include “Azure OpenAI” branding.
infra/scripts/post-provision/data_scripts/run_upload_data_scripts.sh Updates logging to “Azure AI Search/Azure Cosmos DB/Azure AI Foundry”.
infra/scripts/post-provision/data_scripts/run_upload_data_scripts.ps1 Same as bash version: branding/log message updates.
infra/scripts/post-provision/data_scripts/03_write_products_to_cosmos.py Updates print/error strings to “Azure Cosmos DB”.
infra/scripts/post-provision/data_scripts/01_create_products_search_index.py Branding update in docstring text.
infra/scripts/post-provision/data_scripts/02_create_policies_search_index.py Branding update in docstring text.
infra/scripts/post-provision/agent_scripts/run_create_agents_scripts.sh Updates log output/comments to “Azure AI Foundry/Azure OpenAI/Azure AI Search”.
infra/scripts/post-provision/agent_scripts/run_create_agents_scripts.ps1 Same as bash version: branding/log message updates.
infra/scripts/post-provision/agent_scripts/01_create_agents.py Updates exception message to “Azure AI Search connection”.
infra/main.bicep Updates parameter descriptions to Azure AI Foundry/Cosmos DB naming.
infra/bicep/main.bicep Updates output/parameter descriptions for Azure AI Foundry/OpenAI/Cosmos DB.
infra/bicep/main.json Regenerated/updated ARM JSON with the same description/name updates.
infra/bicep/modules/identity/role-assignments.bicep Updates comments/descriptions for Azure AI Search/Foundry/Cosmos DB.
infra/bicep/modules/data/postgresql-flexible-server.bicep Updates “Azure AD” wording to “Microsoft Entra ID”.
infra/bicep/modules/data/cosmos-db-nosql.bicep Updates module header/comments and tightens container param typing.
infra/bicep/modules/data/cosmos-db-mongo.bicep Updates module header/comments for Azure Cosmos DB naming.
infra/bicep/modules/ai/existing-project-setup.bicep Updates output descriptions and endpoint key naming for Foundry endpoint.
infra/bicep/modules/ai/ai-search.bicep Updates module header/output descriptions to “Azure AI Search”.
infra/bicep/modules/ai/ai-search-identity.bicep Updates module header/param/output descriptions to “Azure AI Search”.
infra/bicep/modules/ai/ai-foundry-project.bicep Updates module header/output descriptions to “Azure AI Foundry”.
infra/bicep/modules/ai/ai-foundry-connection.bicep Updates module header/param description to “Azure AI Foundry”.
infra/avm/main.bicep Updates param/output descriptions to Azure AI Foundry/OpenAI/Cosmos DB naming.
infra/avm/modules/identity/role-assignments.bicep Updates comments/descriptions for Azure AI Search/Foundry/Cosmos DB.
infra/avm/modules/identity/cross-scope-role-assignment.bicep Updates param description to “Azure AI Foundry”.
infra/avm/modules/data/postgresql-flexible-server.bicep Updates “Azure AD” wording to “Microsoft Entra ID”.
infra/avm/modules/data/cosmos-db-nosql.bicep Updates module header/comments; defaults privateEndpoints and casts for AVM input.
infra/avm/modules/data/cosmos-db-mongo.bicep Updates module header/comments to Azure Cosmos DB naming.
infra/avm/modules/compute/container-registry.bicep Updates “Azure AD” wording to “Microsoft Entra ID”.
infra/avm/modules/ai/existing-project-setup.bicep Updates output descriptions and Foundry endpoint key naming.
infra/avm/modules/ai/ai-search.bicep Updates module header/output descriptions to “Azure AI Search”.
infra/avm/modules/ai/ai-foundry-project.bicep Updates module header/output descriptions to “Azure AI Foundry”.
infra/avm/modules/ai/ai-foundry-connection.bicep Updates module header/param description to “Azure AI Foundry”.
documents/TroubleShootingSteps.md Updates tenant/auth and model-access wording (Entra ID/Azure OpenAI).
documents/TechnicalArchitecture.md Minor formatting/heading tweak.
documents/LocalDevelopmentSetup.md Updates branding references across local dev guidance.
documents/DeploymentGuide.md Updates branding references across deployment guidance.
documents/AVMPostDeploymentGuide.md Updates “AI Foundry” references to “Azure AI Foundry”.
documents/AppAuthentication.md Fixes “Microsoft Entra ID” casing in instructions.
documents/embeddable-chat-widget-technical-plan.md Removes the technical plan document.
documents/customer-chatbot-product-roadmap.md Removes the roadmap document.
chat-app/frontend/src/lib/api.ts Branding-only update in a frontend API comment.
chat-app/frontend/LOCAL_AUTH_SETUP.md Updates local auth setup instructions to “Microsoft Entra ID”.
chat-app/backend/README.md Branding updates for Azure AI Search/Cosmos DB/Entra ID references.
chat-app/backend/app/utils/voice_utils.py Updates voice-related comments/docstrings (naming consistency).
chat-app/backend/app/simple_foundry_orchestrator.py Updates Foundry/OpenAI wording in comments.
chat-app/backend/app/routers/voice_live.py Updates realtime endpoint error message wording.
chat-app/backend/app/routers/chat.py Updates Cosmos DB references in docstrings.
chat-app/backend/app/routers/auth.py Updates log/comments referencing Cosmos DB.
chat-app/backend/app/plugins/orders_plugin.py Updates plugin docstring for Azure Cosmos DB.
chat-app/backend/app/list_assistants.py Updates console text/comments to “Azure OpenAI client”.
chat-app/backend/app/database.py Updates errors/comments to “Azure Cosmos DB”.
chat-app/backend/app/create_assistants.py Updates console text/comments to “Azure OpenAI client”.
chat-app/backend/app/cosmos_service.py Updates many log/error/help strings to Azure Cosmos DB branding.
chat-app/backend/app/agent_instructions.py Updates agent tool descriptions (Azure AI Search/Cosmos DB).
chat-app/backend/.dockerignore Adds Docker ignore rules to reduce build context (env/caches/venv/markdown).
azure.yaml Updates post-provision instructions to “Azure AI Foundry agents”.
.github/workflows/job-post-deploy.yml Updates workflow messaging to Azure service names.
.github/workflows/deploy.yml Updates workflow messaging to Azure service names.
Comments suppressed due to low confidence (2)

chat-app/backend/app/utils/voice_utils.py:49

  • The docstring says "valid OpenAI host" but the check is for Azure OpenAI hosts (openai.azure.com). This should say "Azure OpenAI" to be accurate.
def is_valid_realtime_endpoint(endpoint: str) -> bool:
    """Check if endpoint is a valid OpenAI host for realtime."""
    return "openai.azure.com" in endpoint.lower()

scenario-app/backend/app/utils/voice_utils.py:49

  • The host validator is Azure OpenAI-specific (openai.azure.com), so the docstring should not say "OpenAI host".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread chat-app/backend/app/cosmos_service.py Outdated
Comment thread scenario-app/backend/app/cosmos_service.py Outdated
Comment thread chat-app/backend/app/utils/voice_utils.py Outdated
Comment thread chat-app/backend/app/routers/voice_live.py
Comment thread scenario-app/backend/app/utils/voice_utils.py Outdated
Comment thread scenario-app/backend/app/routers/voice_live.py
Comment thread scenario-app/backend/app/config.py Outdated
Copilot AI review requested due to automatic review settings July 27, 2026 09:34

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.

Pull request overview

Copilot reviewed 70 out of 73 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (3)

chat-app/backend/app/cosmos_service.py:141

  • The built-in Cosmos DB SQL RBAC role is named "Cosmos DB Built-in Data Contributor". Referring to it as "Azure Cosmos DB Built-in Data Contributor" in this guidance is likely to confuse users when they try to locate/assign the role.
2. Ask your Microsoft Entra ID admin to assign "Azure Cosmos DB Built-in Data Contributor" role

scenario-app/backend/app/cosmos_service.py:139

  • The built-in Cosmos DB SQL RBAC role is named "Cosmos DB Built-in Data Contributor". Referring to it as "Azure Cosmos DB Built-in Data Contributor" in this guidance is likely to confuse users when they try to locate/assign the role.
    infra/scripts/post-provision/agent_scripts/run_create_agents_scripts.sh:317
  • The role definition GUID used here (5e0bd9bd-7b93-4f28-af87-19fc36ad61bd) corresponds to the built-in role named "Cognitive Services OpenAI User". Updating the success log text to a non-existent role name makes it harder to verify assignments in Azure.

Comment thread documents/LocalDevelopmentSetup.md
Comment thread chat-app/backend/app/cosmos_service.py Outdated
Comment thread scenario-app/backend/app/cosmos_service.py Outdated
Comment thread infra/scripts/pre-provision/checkquota.sh Outdated
Comment thread documents/TroubleShootingSteps.md
Comment thread infra/scripts/post-provision/data_scripts/03_write_products_to_cosmos.py Outdated
Comment thread chat-app/backend/app/cosmos_service.py Outdated
Comment thread documents/LocalDevelopmentSetup.md Outdated
Comment thread infra/avm/modules/ai/ai-foundry-project.bicep Outdated
Comment thread infra/avm/modules/ai/ai-foundry-project.bicep Outdated
Comment thread infra/avm/modules/ai/existing-project-setup.bicep Outdated
Comment thread infra/bicep/modules/ai/ai-foundry-project.bicep Outdated
Comment thread infra/bicep/modules/ai/existing-project-setup.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread infra/bicep/main.bicep Outdated
Comment thread scenario-app/backend/app/cosmos_service.py Outdated
Copilot AI review requested due to automatic review settings July 27, 2026 10:15

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.

Pull request overview

Copilot reviewed 70 out of 73 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

chat-app/backend/app/cosmos_service.py:121

  • The RBAC remediation command block is inconsistent with the updated Azure Cosmos DB naming, and the --role-definition-name line is mis-indented compared to the other continued CLI args. This makes the copy/paste instructions harder to follow and doesn’t match the preceding “Assign Azure Cosmos DB Data Contributor role” text.
    --role-definition-name "Cosmos DB Built-in Data Contributor"

Comment thread infra/avm/modules/ai/ai-foundry-project.bicep
Comment thread infra/avm/modules/ai/existing-project-setup.bicep
Comment thread infra/main.bicep
Comment thread infra/bicep/main.bicep
Comment thread infra/avm/main.bicep
Copilot AI review requested due to automatic review settings July 27, 2026 10:35

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.

Pull request overview

Copilot reviewed 70 out of 73 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (6)

infra/avm/modules/ai/existing-project-setup.bicep:56

  • projectEndpoint output still reads endpoints['AI Foundry API'] even though the surrounding docs now refer to "Azure AI Foundry". If Azure returns only the new endpoint key, this output will be null and will break any consumers wiring projectEndpoint into app settings. Consider a backwards-compatible fallback to support both keys.
    infra/avm/modules/ai/ai-foundry-project.bicep:136
  • projectEndpoint output still reads endpoints['AI Foundry API'] while the rest of the templates (non-AVM path) have moved to endpoints['Azure AI Foundry API']. If the endpoint key changes, this output becomes null and downstream app settings (e.g., AZURE_AI_AGENT_ENDPOINT) will break. A small fallback keeps AVM deployments compatible across API versions.
@description('Azure AI Foundry project endpoint.')
output projectEndpoint string = aiProject.properties.endpoints['AI Foundry API']

infra/scripts/pre-provision/checkquota.sh:63

  • The quota keys checked in MIN_CAPACITY (and queried from az cognitiveservices usage) are still OpenAI.GlobalStandard.*, but the user-facing echo output now says Azure OpenAI.GlobalStandard.*. This mismatch can confuse users when they compare the printed requirements to the actual quota names returned by Azure.
    scenario-app/backend/app/cosmos_service.py:120
  • This CLI snippet uses --role-definition-name "Azure Cosmos DB Built-in Data Contributor", but other repo instructions use the role name "Cosmos DB Built-in Data Contributor" (e.g. documents/LocalDevelopmentSetup.md) and the chat-app backend keeps that name. Since --role-definition-name is an exact string match, this change could make the copy/paste command fail for users.
    scenario-app/backend/app/cosmos_service.py:140
  • The error guidance here refers to assigning the role named "Azure Cosmos DB Built-in Data Contributor", but elsewhere in the repo the role name is "Cosmos DB Built-in Data Contributor". To avoid users searching for a non-existent/renamed role in the portal, it’s safer to use the established role name (even if the surrounding service branding uses "Azure Cosmos DB").
    infra/scripts/post-provision/data_scripts/03_write_products_to_cosmos.py:110
  • This error message tells users to look for an 'Azure Cosmos DB Built-in Data Contributor' role, but other setup docs in the repo use the role name 'Cosmos DB Built-in Data Contributor'. Keeping the role name consistent avoids confusion and aligns with the az cosmosdb sql role assignment create --role-definition-name examples.

Comment thread infra/bicep/modules/ai/ai-foundry-project.bicep Outdated
Comment thread infra/bicep/modules/ai/existing-project-setup.bicep Outdated
Comment thread infra/scripts/pre-provision/checkquota.sh Outdated
Copilot AI review requested due to automatic review settings July 27, 2026 13:44

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.

Pull request overview

Copilot reviewed 69 out of 72 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

chat-app/backend/app/cosmos_service.py:142

  • The authentication error guidance refers to "Azure Cosmos DB Built-in Data Contributor", but earlier in the same message the CLI example uses the role-definition-name "Cosmos DB Built-in Data Contributor". This inconsistency is confusing, and the renamed role may not match the actual built-in role name users must assign.
❌ Authentication Error: This Azure Cosmos DB requires AAD authentication and your credentials don't have proper permissions.

Solutions:
1. Grant RBAC permissions (see commands above)
2. Ask your Microsoft Entra ID admin to assign "Azure Cosmos DB Built-in Data Contributor" role
3. Or temporarily enable local auth: az cosmosdb update --name ecommerce-prod-cosmos-202510211322 --resource-group [RESOURCE_GROUP] --disable-key-based-metadata-write-access false

Comment thread infra/bicep/main.json
Copilot AI review requested due to automatic review settings July 27, 2026 14:06

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.

Pull request overview

Copilot reviewed 70 out of 72 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (6)

README.md:50

  • The feature heading still says "Microsoft Agent Framework" while the updated body text now refers to "Azure AI Foundry's Agent Framework", which makes the bullet internally inconsistent.
  Leverage Azure AI Foundry's Agent Framework with an orchestrator agent that uses automatic tool selection to route customer queries to specialized agents (catalog/product lookup and policy/knowledge). The orchestrator analyzes user intent and automatically invokes the appropriate specialist agent as a tool, ensuring queries are handled by the most capable agent for each task.

infra/main.bicep:124

  • The parameter name is azureOpenaiAPIVersion, but the description now says "OpenAI API version" which is ambiguous (this is an Azure OpenAI API version). This change also conflicts with the PR goal of using consistent Azure product naming.
    infra/bicep/main.bicep:117
  • The parameter is azureOpenaiAPIVersion, but the description now says "OpenAI API version" which is ambiguous (this is an Azure OpenAI API version). Keeping "Azure OpenAI" here matches the parameter name and the PR's naming consistency goal.
    infra/bicep/main.json:803
  • projectEndpoint is indexed by endpoints['Azure AI Foundry API'], but other templates/modules in this repo still read endpoints['AI Foundry API'] (e.g., infra/bicep/modules/ai/ai-foundry-project.bicep). If Azure returns only the legacy key (or only the new key), one of these paths will evaluate to null and can break downstream consumers. Consider using a coalesce(...) fallback to support both keys.
    infra/bicep/main.json:923
  • Same issue as the other projectEndpoint output above: this indexes endpoints['Azure AI Foundry API'] while other templates/modules still use endpoints['AI Foundry API']. Using coalesce(...) here avoids producing null if the endpoint key differs by API version/region.
    infra/bicep/modules/ai/ai-foundry-project.bicep:109
  • projectEndpoint currently reads endpoints['AI Foundry API'], but other generated templates in this PR read endpoints['Azure AI Foundry API'] (see infra/bicep/main.json). If the service exposes only one of these keys, one of the templates will output null. Using coalesce(...) makes this output compatible with either key without breaking existing deployments.

Comment thread README.md
Comment thread infra/bicep/modules/ai/ai-foundry-project.bicep

@gpickett gpickett 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.

LGTM

@gpickett
gpickett merged commit e764f8c into dev Jul 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants