fix(designer): restore deploymentModelProperties for AzureOpenAI agent connections#9108
fix(designer): restore deploymentModelProperties for AzureOpenAI agent connections#9108takyyon wants to merge 1 commit into
Conversation
…t connections Regression from #9012 which removed AzureOpenAI from the visibility dependencies of deploymentModelProperties (name, format, version) in the agent loop manifest. The assumption was that the backend derives model info from the deployment — but the backend requires these values explicitly, failing with InvalidAgentModelSettings when they're missing. Changes: - Restore AzureOpenAI in agentloop.ts manifest visibility for deploymentModelProperties.name, .format, .version - Restore AzureOpenAI deployment-info lookup in parametersTab (both designer and designer-v2) so model properties are populated from the ARM deployment response when selecting a deployment - Add regression tests verifying deploymentModelProperties visibility includes both AzureOpenAI and MicrosoftFoundry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
❌ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
✅ Screenshots/Videos
Summary Table
Final Notes
Please update the PR by adding the
|
There was a problem hiding this comment.
Pull request overview
Fixes a regression where AzureOpenAI agent connections could not be saved because deploymentModelProperties (name/format/version) were conditionally hidden and therefore not serialized/populated.
Changes:
- Restores
AzureOpenAIvisibility dependencies foragentModelSettings.deploymentModelProperties.{name,format,version}in the agent loop manifest. - Updates Parameters Tab logic (designer + designer-v2) to populate
deploymentModelPropertiesfor AzureOpenAI as well as MicrosoftFoundry when a deployment is selected. - Adds unit coverage to prevent future regressions in manifest visibility conditions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/agentloop.ts | Re-adds AzureOpenAI to visibility dependencies for deployment model property fields so they can serialize. |
| libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/test/agentloop.spec.ts | Adds regression tests asserting visibility values include AzureOpenAI + MicrosoftFoundry (and exclude V2). |
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Populates deploymentModelProperties for AzureOpenAI on deployment selection. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Same as above for designer-v2. |
| // Populate deploymentModelProperties for both AzureOpenAI and MicrosoftFoundry. | ||
| // The backend requires name/format/version for AzureOpenAI model type. | ||
| if ((currentModelType === 'MicrosoftFoundry' || currentModelType === 'AzureOpenAI') && selectedModelId) { | ||
| const deploymentInfo = deploymentsForCognitiveServiceAccount?.find((deployment: any) => deployment.name === selectedModelId); | ||
| const modelName = deploymentInfo?.properties?.model?.name; | ||
| const modelName = deploymentInfo?.properties?.model?.name ?? selectedModelId; |
There was a problem hiding this comment.
Since deploymentModelProperties are now required/populated for AzureOpenAI too, this handler can still end up with empty deploymentModelProperties when agentModelType switches away from MicrosoftFoundry (the earlier logic clears these fields whenever newValue !== 'MicrosoftFoundry'). Because this populate logic only runs when the deploymentId field changes, the cleared values may never be repopulated (e.g., if deploymentId remains unchanged / is set programmatically). Update the clearing condition to keep these fields for AzureOpenAI as well, or trigger repopulation based on the currently-selected deploymentId after model type changes.
| // Populate deploymentModelProperties for both AzureOpenAI and MicrosoftFoundry. | ||
| // The backend requires name/format/version for AzureOpenAI model type. | ||
| if ((currentModelType === 'MicrosoftFoundry' || currentModelType === 'AzureOpenAI') && selectedModelId) { | ||
| const deploymentInfo = deploymentsForCognitiveServiceAccount?.find((deployment: any) => deployment.name === selectedModelId); | ||
| const modelName = deploymentInfo?.properties?.model?.name; | ||
| const modelName = deploymentInfo?.properties?.model?.name ?? selectedModelId; |
There was a problem hiding this comment.
Same issue as designer v1: deploymentModelProperties are now populated for AzureOpenAI here, but the earlier agentModelType-change handler still clears deploymentModelProperties whenever newValue !== 'MicrosoftFoundry'. Because this block only runs on a user change to deploymentId, those cleared values may not be repopulated (e.g., if deploymentId stays the same or is updated via dispatch). Adjust the clearing condition to exclude AzureOpenAI, and/or add a repopulation step when model type changes and a deployment is already selected.
📊 Coverage CheckNo source files changed in this PR. |
Commit Type
Risk Level
What & Why
Regression from PR #9012 (merged April 6) which removed
AzureOpenAIfrom the visibility dependencies ofdeploymentModelPropertiesin the agent loop manifest. This causes saving agent workflows with AzureOpenAI model type to fail with:PR #9012 assumed the backend derives model info from the deployment for AzureOpenAI. The backend does not — it requires
deploymentModelProperties.name,.format,.versionexplicitly.Root Cause
The manifest at
agentloop.tshad itsdeploymentModelPropertiesfields (name, format, version) restricted tovalues: ['MicrosoftFoundry']only. WhenagentModelTypeisAzureOpenAI, these fields were hidden by the conditional visibility system and never serialized.Fix
agentloop.ts): RestoreAzureOpenAIin the visibilityvaluesarray for all threedeploymentModelPropertiesfieldsdeploymentModelPropertiesvisibility includes both AzureOpenAI and MicrosoftFoundryMicrosoftFoundry behavior is unchanged.
Impact of Change
Test Plan
Contributors
@takyyon
Screenshots/Videos
N/A