fix(designer): Use actual model name for deploymentModelProperties#9054
fix(designer): Use actual model name for deploymentModelProperties#9054Elaina-Lee merged 5 commits intomainfrom
Conversation
…stead of deployment ID PRs #9012 and #9028 regressed #8965 by using the deployment ID (selectedModelId) directly as the model name and for AGENT_MODEL_CONFIG lookup. Since the config is keyed by model names (e.g. "gpt-4.1"), not deployment names (e.g. "my-gpt4-deployment"), the lookup would fail and deploymentModelProperties.name was set to the deployment ID. This restores PR #8965's approach: look up the deployment object from deploymentsForCognitiveServiceAccount to get the actual model name, format, and version from deployment.properties.model, falling back to AGENT_MODEL_CONFIG only when the deployment doesn't provide format/version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | Keep as-is — clear and conventional commit style. |
| Commit Type | ✅ | Properly selected (fix). |
| Risk Level | ✅ | Medium is appropriate and matches label. |
| What & Why | ✅ | Clear and sufficient. |
| Impact of Change | ✅ | Good; optionally cite the removal commit for the local file. |
| Test Plan | ✅ | Unit tests present and verified. Fill the "Tested in:" checklist or add short results. |
| Contributors | Optional: add credits if applicable. | |
| Screenshots/Videos | Optional: add only if UI changes are visible. |
Final message:
This PR passes the PR title/body validation. The advised risk level (medium) matches the PR label and the change surface in the diff. The unit tests you referenced were found in the diff and cover the new helper functions. Please consider the two small recommendations before merge:
- Fill out the "Tested in:" checklist or add a short note describing which environments/flows you manually validated (this helps release engineers and reviewers confirm manual QA coverage).
- Add contributor credits in the Contributors section if anyone else (PMs, designers, reviewers) helped with testing/review.
- Optionally reference the commit that removed
.claude/settings.local.jsonin the body for traceability (or confirm that removal is in the PR commits).
Thank you — this PR is ready from a PR title/body perspective. Good job including unit tests and a clear description of the bug and the fix!
Last updated: Mon, 13 Apr 2026 23:07:47 GMT
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes a regression where MicrosoftFoundry deploymentModelProperties incorrectly used the deployment ID as the model name, causing AGENT_MODEL_CONFIG lookups (keyed by model name) to fail.
Changes:
- Resolve the real model name/format/version from the selected deployment’s
properties.modelinstead of usingselectedModelId. - Add fallback logic to
AGENT_MODEL_CONFIG[modelName]only when the deployment doesn’t provide format/version. - Apply the fix in both designer v1 and designer v2.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Lookup deployment by name to derive true model metadata; fallback to AGENT_MODEL_CONFIG for missing fields. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Same deployment-based model metadata derivation and fallback logic as v1. |
📊 Coverage Check🎉 All changed files have adequate test coverage! |
…ion setup The auto-connection flow (dynamicallyLoadAgentConnection → updateConnectionAndDeployment) only set deploymentId but never populated deploymentModelProperties. Since onValueChange only fires on manual dropdown changes, the model properties were missing when the deployment was auto-populated. Now updateConnectionAndDeployment also sets deploymentModelProperties (name, format, version) for MicrosoftFoundry by using getFirstDeploymentInfo to extract the actual model info from the deployment object. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tDeploymentModelName Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9d20d73 to
05fe862
Compare
…gnore The file contained local paths and allowed shell commands specific to a developer's machine. Added .claude/settings.local.json to .gitignore to prevent future accidental commits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…9054) * fix(designer): Use actual model name for deploymentModelProperties instead of deployment ID PRs #9012 and #9028 regressed #8965 by using the deployment ID (selectedModelId) directly as the model name and for AGENT_MODEL_CONFIG lookup. Since the config is keyed by model names (e.g. "gpt-4.1"), not deployment names (e.g. "my-gpt4-deployment"), the lookup would fail and deploymentModelProperties.name was set to the deployment ID. This restores PR #8965's approach: look up the deployment object from deploymentsForCognitiveServiceAccount to get the actual model name, format, and version from deployment.properties.model, falling back to AGENT_MODEL_CONFIG only when the deployment doesn't provide format/version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(designer): Populate deploymentModelProperties during auto-connection setup The auto-connection flow (dynamicallyLoadAgentConnection → updateConnectionAndDeployment) only set deploymentId but never populated deploymentModelProperties. Since onValueChange only fires on manual dropdown changes, the model properties were missing when the deployment was auto-populated. Now updateConnectionAndDeployment also sets deploymentModelProperties (name, format, version) for MicrosoftFoundry by using getFirstDeploymentInfo to extract the actual model info from the deployment object. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(designer): Add unit tests for getFirstDeploymentInfo and getFirstDeploymentModelName Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: Remove accidental .claude/settings.local.json and add to .gitignore The file contained local paths and allowed shell commands specific to a developer's machine. Added .claude/settings.local.json to .gitignore to prevent future accidental commits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * remove changes --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…9054) (#9056) * fix(designer): Use actual model name for deploymentModelProperties instead of deployment ID PRs #9012 and #9028 regressed #8965 by using the deployment ID (selectedModelId) directly as the model name and for AGENT_MODEL_CONFIG lookup. Since the config is keyed by model names (e.g. "gpt-4.1"), not deployment names (e.g. "my-gpt4-deployment"), the lookup would fail and deploymentModelProperties.name was set to the deployment ID. This restores PR #8965's approach: look up the deployment object from deploymentsForCognitiveServiceAccount to get the actual model name, format, and version from deployment.properties.model, falling back to AGENT_MODEL_CONFIG only when the deployment doesn't provide format/version. * fix(designer): Populate deploymentModelProperties during auto-connection setup The auto-connection flow (dynamicallyLoadAgentConnection → updateConnectionAndDeployment) only set deploymentId but never populated deploymentModelProperties. Since onValueChange only fires on manual dropdown changes, the model properties were missing when the deployment was auto-populated. Now updateConnectionAndDeployment also sets deploymentModelProperties (name, format, version) for MicrosoftFoundry by using getFirstDeploymentInfo to extract the actual model info from the deployment object. * test(designer): Add unit tests for getFirstDeploymentInfo and getFirstDeploymentModelName * chore: Remove accidental .claude/settings.local.json and add to .gitignore The file contained local paths and allowed shell commands specific to a developer's machine. Added .claude/settings.local.json to .gitignore to prevent future accidental commits. * remove changes --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Commit Type
Risk Level
What & Why
PRs #9012 and #9028 regressed #8965 in two ways:
onValueChangehandler: Used the deployment ID (selectedModelId) directly asdeploymentModelProperties.nameand as the key forAGENT_MODEL_CONFIGlookup. SinceAGENT_MODEL_CONFIGis keyed by model names (e.g.,"gpt-4.1"), not deployment names (e.g.,"my-gpt4-deployment"), the lookup fails and incorrect values are written.Auto-connection flow:
updateConnectionAndDeployment(called bydynamicallyLoadAgentConnectionwhen model type switches) only setdeploymentIdbut never populateddeploymentModelProperties. SinceonValueChangeonly fires on manual dropdown changes, the model properties were missing when the deployment was auto-populated.Fixes:
onValueChange: look up the deployment object fromdeploymentsForCognitiveServiceAccountto extract the actual model name, format, and version fromdeployment.properties.model, falling back toAGENT_MODEL_CONFIG[modelName]only when the deployment doesn't provide format/version.getFirstDeploymentInfohelper that returns full deployment info (name, model name, format, version).updateConnectionAndDeploymentto also populatedeploymentModelPropertiesfor MicrosoftFoundry during auto-connection setup.Applied to both designer v1 and v2.
Impact of Change
deploymentModelProperties.namewith the actual model name instead of the deployment ID, in both manual dropdown changes and auto-connection setup flows.claude/settings.local.jsonwas accidentally included in earlier commits and has been removed — it contained local paths/commands and no secrets or tokens.Test Plan
libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/__test__/helpers.spec.tslibs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/__test__/helpers.spec.tsdeploymentModelPropertiesis auto-populated with correct model name/format/versiondeploymentModelProperties.nameis the actual model name (e.g.,"gpt-4.1"), NOT the deployment IDContributors
Screenshots/Videos
🤖 Generated with Claude Code