Refactoring AI Services (Speech/OAI) to use AI Foundry Projects#5
Merged
Refactoring AI Services (Speech/OAI) to use AI Foundry Projects#5
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the AI infrastructure to use Azure AI Foundry instead of separate Speech and OpenAI services, improving modularity and alignment with Azure's latest offerings. The changes standardize naming conventions and reduce default resource usage for development environments.
Key changes:
- Introduces a new Azure AI Foundry Terraform module that consolidates Speech and OpenAI services
- Standardizes variable naming from
openai_modelstomodel_deploymentsacross all configurations - Reduces default pool sizes and prewarming batch sizes in development scripts
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
infra/terraform/modules/ai/ |
New AI Foundry module with account, project, and model deployment provisioning |
infra/terraform/variables.tf |
Renamed openai_models variable to model_deployments |
infra/terraform/outputs.tf |
Updated outputs to use AI Foundry module endpoints instead of direct service references |
infra/terraform/containers.tf |
Updated container environment variables to use AI Foundry module outputs |
devops/scripts/azd/helpers/generate-env.sh |
Reduced default pool sizes from 50-100 to 5-10 for development optimization |
Comment on lines
+307
to
+319
| # value = "https://${azurerm_cognitive_account.speech.custom_subdomain_name}.cognitiveservices.azure.com/" | ||
| } | ||
|
|
||
| env { | ||
| name = "AZURE_SPEECH_DOMAIN_ENDPOINT" | ||
| value = "https://${azurerm_cognitive_account.speech.custom_subdomain_name}.cognitiveservices.azure.com/" | ||
| value = module.ai_foundry.openai_endpoint | ||
| # value = "https://${azurerm_cognitive_account.speech.custom_subdomain_name}.cognitiveservices.azure.com/" | ||
| } | ||
|
|
||
| env { | ||
| name = "AZURE_SPEECH_RESOURCE_ID" | ||
| value = azurerm_cognitive_account.speech.id | ||
| value = module.ai_foundry.account_id | ||
| # value = azurerm_cognitive_account.speech.id |
There was a problem hiding this comment.
Remove commented-out code to improve maintainability. Multiple instances of commented legacy code should be cleaned up throughout the file.
…dling and provide fallback for Service Principal authentication; improve error messaging and preview functionality.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pablosalvador10
pushed a commit
that referenced
this pull request
Dec 19, 2025
…pps/rtagent/frontend/vite-6.4.1 Bump vite from 6.3.5 to 6.4.1 in /apps/rtagent/frontend
JinLee794
pushed a commit
that referenced
this pull request
Dec 19, 2025
JinLee794
added a commit
that referenced
this pull request
Dec 19, 2025
Refactoring AI Services (Speech/OAI) to use AI Foundry Projects
JinLee794
added a commit
that referenced
this pull request
Dec 23, 2025
…pps/rtagent/frontend/vite-6.4.1 Bump vite from 6.3.5 to 6.4.1 in /apps/rtagent/frontend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the infrastructure provisioning for AI services, primarily by integrating a new Azure AI Foundry module and updating how model deployments are managed. It also refactors environment variables and documentation to align with these changes, and removes some obsolete resources. The updates improve modularity, clarity, and future extensibility of the infrastructure code.
AI Foundry Integration:
modules/ai/foundry.tf) for provisioning Azure AI Foundry resources, including account, project, model deployments, role assignments, and diagnostic settings. This module outputs key resource identifiers and endpoints for downstream use. [1] [2]ai-foundry.tf), passing in relevant variables and wiring outputs for use by other resources.Model Deployment Refactor:
openai_modelstomodel_deploymentsthroughout Terraform code and documentation, improving clarity and consistency. [1] [2] [3] [4] [5] [6]Environment and Configuration Updates:
generate-env.shto lower resource usage, likely for development or cost optimization.main.tf."SecurityControl" = "Ignore"tag to resource tags for compliance or policy purposes.Cleanup and Minor Fixes:
azurerm_role_assignmentfor ACS Speech User and commented-out Cosmos DB resource block. [1] [2]source_arm_resource_idtosource_resource_idin Event Grid topic resource for ACS.Documentation Updates:
README.mdto reflect new variable/resource names and usage patterns for model deployments and AI Foundry integration. [1] [2] [3]These changes collectively modernize the AI infrastructure setup, making it more modular, maintainable, and aligned with Azure's latest offerings.