-
Notifications
You must be signed in to change notification settings - Fork 97
fix(designer): restore deploymentModelProperties for AzureOpenAI agent connections #9108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1096,11 +1096,11 @@ export const ParameterSection = ({ | |
| const selectedModelId = value?.length ? value[0]?.value : undefined; | ||
| const currentModelType = findFoundryParam(nodeInputs.parameterGroups, group.id, agentModelTypeParameterKey)?.value?.[0]?.value; | ||
|
|
||
| // Only populate deploymentModelProperties for MicrosoftFoundry. | ||
| // For AzureOpenAI the backend derives model info from the deployment itself. | ||
| if (currentModelType === 'MicrosoftFoundry' && selectedModelId) { | ||
| // 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; | ||
|
Comment on lines
+1099
to
+1103
|
||
| let modelFormat = deploymentInfo?.properties?.model?.format; | ||
| let modelVersion = deploymentInfo?.properties?.model?.version; | ||
| if (!modelFormat || !modelVersion) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.