Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in the repo.
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Fr4nc3 @Vinay-Microsoft @aniaroramsft
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Fr4nc3 @Vinay-Microsoft @aniaroramsft @toherman-msft @nchandhi
2 changes: 1 addition & 1 deletion code/backend/batch/utilities/helpers/env_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def __load_config(self, **kwargs) -> None:
"AZURE_OPENAI_MODEL_NAME", "gpt-4.1"
)

self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4")
self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4.1")
self.AZURE_OPENAI_TEMPERATURE = os.getenv("AZURE_OPENAI_TEMPERATURE", "0")
self.AZURE_OPENAI_TOP_P = os.getenv("AZURE_OPENAI_TOP_P", "1.0")
self.AZURE_OPENAI_MAX_TOKENS = os.getenv("AZURE_OPENAI_MAX_TOKENS", "1000")
Expand Down
2 changes: 1 addition & 1 deletion code/tests/utilities/helpers/test_push_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_embed_file_advanced_image_processing_uses_vision_model_for_captioning(
):
# given
env_helper_mock = MagicMock()
env_helper_mock.AZURE_OPENAI_VISION_MODEL = "gpt-4"
env_helper_mock.AZURE_OPENAI_VISION_MODEL = "gpt-4.1"
push_embedder = PushEmbedder(MagicMock(), env_helper_mock)
source_url = "http://localhost:8080/some-file-name.jpg"

Expand Down
2 changes: 2 additions & 0 deletions docs/LOCAL_DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The easiest way to run this accelerator is in a VS Code Dev Containers, which wi
* **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.
* 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.
* 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.
> **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`.

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.

> 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.
Expand Down
26 changes: 26 additions & 0 deletions docs/LogAnalyticsReplicationDisable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 🛠 Handling Log Analytics Workspace Deletion with Replication Enabled

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.

## ✅ Steps to Disable Replication Before Deletion
Run the following Azure CLI command. Note: This operation may take about 5 minutes to complete.

```bash
az resource update --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --set properties.replication.enabled=false
```

Replace:
- `{subscriptionId}` → Your Azure subscription ID
- `{resourceGroupName}` → The name of your resource group
- `{logAnalyticsName}` → The name of your Log Analytics workspace

Optional: Verify replication disabled (should output `false`):
```bash
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsv
```

## ✅ After Disabling Replication
You can safely delete:
- The Log Analytics workspace (manual)
- The resource group (manual), or
- All provisioned resources via `azd down`
4 changes: 2 additions & 2 deletions docs/model_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ This document outlines the necessary steps and configurations required for setti
- `AZURE_OPENAI_VISION_MODEL`: The Azure OpenAI Model Deployment Name
- example: `my-gpt-4`
- `AZURE_OPENAI_VISION_MODEL_NAME`: The Azure OpenAI Model Name
- example: `gpt-4`
- example: `gpt-4.1`
- `AZURE_OPENAI_VISION_MODEL_VERSION`: The Azure OpenAI Model Version
- example: `turbo-2024-04-09`
- example: `2025-04-14`
- `AZURE_OPENAI_VISION_MODEL_CAPACITY`: The Tokens per Minute Rate Limit (thousands)
- example: `10`

Expand Down
28 changes: 4 additions & 24 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ param useAdvancedImageProcessing bool = false
param advancedImageProcessingMaxImages int = 1

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

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

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

@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.')
param azureOpenAIVisionModelCapacity int = 10
Expand Down Expand Up @@ -963,26 +963,6 @@ var defaultOpenAiDeployments = [
}
]

var openAiDeployments = concat(
defaultOpenAiDeployments,
useAdvancedImageProcessing
? [
{
name: azureOpenAIVisionModel
model: {
format: 'OpenAI'
name: azureOpenAIVisionModelName
version: azureOpenAIVisionModelVersion
}
sku: {
name: 'GlobalStandard'
capacity: azureOpenAIVisionModelCapacity
}
}
]
: []
)

module openai 'modules/core/ai/cognitiveservices.bicep' = {
name: azureOpenAIResourceName
scope: resourceGroup()
Expand All @@ -992,7 +972,7 @@ module openai 'modules/core/ai/cognitiveservices.bicep' = {
tags: allTags
kind: 'OpenAI'
sku: azureOpenAISkuName
deployments: openAiDeployments
deployments: defaultOpenAiDeployments
userAssignedResourceId: managedIdentityModule.outputs.resourceId
restrictOutboundNetworkAccess: true
allowedFqdnList: concat(
Expand Down
Loading
Loading