Skip to content

Commit dc2e5a9

Browse files
Roopan-MicrosoftAjitPadhi-MicrosoftPavan-Microsoftross-p-smithgpickett
authored
fix: merging dev changes to main (#1968)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Ajit Padhi <[email protected]> Co-authored-by: Pavan-Microsoft <[email protected]> Co-authored-by: Ross Smith <[email protected]> Co-authored-by: gpickett <[email protected]> Co-authored-by: Francia Riesco <[email protected]> Co-authored-by: Francia Riesco <[email protected]> Co-authored-by: Prajwal D C <[email protected]> Co-authored-by: Harmanpreet-Microsoft <[email protected]> Co-authored-by: UtkarshMishra-Microsoft <[email protected]> Co-authored-by: Priyanka-Microsoft <[email protected]> Co-authored-by: Prasanjeet-Microsoft <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kiran-Siluveru-Microsoft <[email protected]> Co-authored-by: Prashant-Microsoft <[email protected]> Co-authored-by: Rohini-Microsoft <[email protected]> Co-authored-by: Avijit-Microsoft <[email protected]> Co-authored-by: RaviKiran-Microsoft <[email protected]> Co-authored-by: Somesh Joshi <[email protected]> Co-authored-by: Himanshi Agrawal <[email protected]> Co-authored-by: pradeepjha-microsoft <[email protected]> Co-authored-by: Harmanpreet Kaur <[email protected]> Co-authored-by: Bangarraju-Microsoft <[email protected]> Co-authored-by: Harsh-Microsoft <[email protected]> Co-authored-by: Kanchan-Microsoft <[email protected]> Co-authored-by: Cristopher Coronado <[email protected]> Co-authored-by: Cristopher Coronado Moreira <[email protected]> Co-authored-by: Vamshi-Microsoft <[email protected]> Co-authored-by: Thanusree-Microsoft <[email protected]> Co-authored-by: Niraj Chaudhari (Persistent Systems Inc) <[email protected]> Co-authored-by: Rohini-Microsoft <[email protected]> Co-authored-by: Kingshuk-Microsoft <[email protected]> Co-authored-by: Ayaz-Microsoft <[email protected]> Co-authored-by: Abdul-Microsoft <[email protected]>
1 parent ad907f0 commit dc2e5a9

File tree

9 files changed

+127
-120
lines changed

9 files changed

+127
-120
lines changed

code/backend/batch/utilities/helpers/env_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __load_config(self, **kwargs) -> None:
186186
"AZURE_OPENAI_MODEL_NAME", "gpt-4.1"
187187
)
188188

189-
self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4")
189+
self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4.1")
190190
self.AZURE_OPENAI_TEMPERATURE = os.getenv("AZURE_OPENAI_TEMPERATURE", "0")
191191
self.AZURE_OPENAI_TOP_P = os.getenv("AZURE_OPENAI_TOP_P", "1.0")
192192
self.AZURE_OPENAI_MAX_TOKENS = os.getenv("AZURE_OPENAI_MAX_TOKENS", "1000")

code/tests/utilities/helpers/test_push_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_embed_file_advanced_image_processing_uses_vision_model_for_captioning(
192192
):
193193
# given
194194
env_helper_mock = MagicMock()
195-
env_helper_mock.AZURE_OPENAI_VISION_MODEL = "gpt-4"
195+
env_helper_mock.AZURE_OPENAI_VISION_MODEL = "gpt-4.1"
196196
push_embedder = PushEmbedder(MagicMock(), env_helper_mock)
197197
source_url = "http://localhost:8080/some-file-name.jpg"
198198

docs/LOCAL_DEPLOYMENT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The easiest way to run this accelerator is in a VS Code Dev Containers, which wi
2121
* **Important**: Beware that the resources created by this command will incur immediate costs, primarily from the AI Search resource. These resources may accrue costs even if you interrupt the command before it is fully executed. You can run `azd down` or delete the resources manually to avoid unnecessary spending.
2222
* You will be prompted to select a subscription, and a location. That location list is based on the [OpenAI model availability table](https://learn.microsoft.com/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability) and may become outdated as availability changes.
2323
* If you do, accidentally, chose the wrong location; you will have to ensure that you use `azd down` or delete the Resource Group as the deployment bases the location from this Resource Group.
24+
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down` else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down`.
25+
2426
1. After the application has been successfully deployed you will see a URL printed to the console. Click that URL to interact with the application in your browser.
2527

2628
> NOTE: It may take up to an hour for the application to be fully deployed. If you see a "Python Developer" welcome screen or an error page, then wait a bit and refresh the page.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 🛠 Handling Log Analytics Workspace Deletion with Replication Enabled
2+
3+
If redundancy (replication) is enabled for your Log Analytics workspace, you must disable it before deleting the workspace or resource group. Otherwise, deletion will fail.
4+
5+
## ✅ Steps to Disable Replication Before Deletion
6+
Run the following Azure CLI command. Note: This operation may take about 5 minutes to complete.
7+
8+
```bash
9+
az resource update --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --set properties.replication.enabled=false
10+
```
11+
12+
Replace:
13+
- `{subscriptionId}` → Your Azure subscription ID
14+
- `{resourceGroupName}` → The name of your resource group
15+
- `{logAnalyticsName}` → The name of your Log Analytics workspace
16+
17+
Optional: Verify replication disabled (should output `false`):
18+
```bash
19+
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsv
20+
```
21+
22+
## ✅ After Disabling Replication
23+
You can safely delete:
24+
- The Log Analytics workspace (manual)
25+
- The resource group (manual), or
26+
- All provisioned resources via `azd down`

docs/model_configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ This document outlines the necessary steps and configurations required for setti
2727
- `AZURE_OPENAI_VISION_MODEL`: The Azure OpenAI Model Deployment Name
2828
- example: `my-gpt-4`
2929
- `AZURE_OPENAI_VISION_MODEL_NAME`: The Azure OpenAI Model Name
30-
- example: `gpt-4`
30+
- example: `gpt-4.1`
3131
- `AZURE_OPENAI_VISION_MODEL_VERSION`: The Azure OpenAI Model Version
32-
- example: `turbo-2024-04-09`
32+
- example: `2025-04-14`
3333
- `AZURE_OPENAI_VISION_MODEL_CAPACITY`: The Tokens per Minute Rate Limit (thousands)
3434
- example: `10`
3535

infra/main.bicep

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ param useAdvancedImageProcessing bool = false
151151
param advancedImageProcessingMaxImages int = 1
152152

153153
@description('Optional. Azure OpenAI Vision Model Deployment Name.')
154-
param azureOpenAIVisionModel string = 'gpt-4'
154+
param azureOpenAIVisionModel string = 'gpt-4.1'
155155

156156
@description('Optional. Azure OpenAI Vision Model Name.')
157-
param azureOpenAIVisionModelName string = 'gpt-4'
157+
param azureOpenAIVisionModelName string = 'gpt-4.1'
158158

159159
@description('Optional. Azure OpenAI Vision Model Version.')
160-
param azureOpenAIVisionModelVersion string = 'turbo-2024-04-09'
160+
param azureOpenAIVisionModelVersion string = '2025-04-14'
161161

162162
@description('Optional. Azure OpenAI Vision Model Capacity - See here for more info https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/quota.')
163163
param azureOpenAIVisionModelCapacity int = 10
@@ -963,26 +963,6 @@ var defaultOpenAiDeployments = [
963963
}
964964
]
965965

966-
var openAiDeployments = concat(
967-
defaultOpenAiDeployments,
968-
useAdvancedImageProcessing
969-
? [
970-
{
971-
name: azureOpenAIVisionModel
972-
model: {
973-
format: 'OpenAI'
974-
name: azureOpenAIVisionModelName
975-
version: azureOpenAIVisionModelVersion
976-
}
977-
sku: {
978-
name: 'GlobalStandard'
979-
capacity: azureOpenAIVisionModelCapacity
980-
}
981-
}
982-
]
983-
: []
984-
)
985-
986966
module openai 'modules/core/ai/cognitiveservices.bicep' = {
987967
name: azureOpenAIResourceName
988968
scope: resourceGroup()
@@ -992,7 +972,7 @@ module openai 'modules/core/ai/cognitiveservices.bicep' = {
992972
tags: allTags
993973
kind: 'OpenAI'
994974
sku: azureOpenAISkuName
995-
deployments: openAiDeployments
975+
deployments: defaultOpenAiDeployments
996976
userAssignedResourceId: managedIdentityModule.outputs.resourceId
997977
restrictOutboundNetworkAccess: true
998978
allowedFqdnList: concat(

0 commit comments

Comments
 (0)