feat(designer): Add Foundry Models (Preview) agent model source#8965
feat(designer): Add Foundry Models (Preview) agent model source#8965Elaina-Lee merged 13 commits intomainfrom
Conversation
…ix model versions - Add "Foundry Models (Preview)" option to Agent Model Source dropdown - Rename SUPPORTED_AGENT_MODELS to SUPPORTED_AGENT_OPENAI_MODELS - Add SUPPORTED_FOUNDRY_AGENT_MODELS as full superset of all models - Fix AGENT_MODEL_CONFIG with correct versions from Azure (e.g. gpt-4o 2024-11-20, gpt-4 turbo-2024-04-09) - Add 22 new models including gpt-5.4 series, o3, o4-mini, model-router, etc. - Update deployment filtering to use correct model list per agent model type - Create new deployment modal always shows full model list 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 | ✅ | None needed |
| Commit Type | ✅ | None needed |
| Risk Level | ✅ | None needed |
| What & Why | ✅ | None needed (optionally add short TL;DR) |
| Impact of Change | ✅ | Consider linking any related backend/contract tasks |
| Test Plan | ✅ | Ensure CI passes; watch for flakiness |
| Contributors | Add contributor credits (optional but recommended) | |
| Screenshots/Videos | ✅ | Add brief caption if helpful |
Final notes
- Advised risk level:
risk:medium(matches the PR label and the PR body). I reviewed the code diff and unit test additions — the changes are substantial but appear additive and well-covered by tests. Because AGENT_MODEL_CONFIG and manifest/model-selection behavior were changed, please ensure the QA/CI pipelines run the full test suite and that any dependent teams are notified about model-version changes if they rely on the exact versions. - Please update the Contributors section if you'd like to credit co-authors/reviewers, and confirm CI passes before merging. Thank you for the thorough PR and test coverage — this is ready to merge once CI is green and any outstanding review comments are addressed.
Last updated: Mon, 30 Mar 2026 23:02:40 GMT
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
When MicrosoftFoundry is selected, the deploymentId is the model ID itself (e.g. claude-sonnet-4-5), not an Azure deployment instance name. Set deploymentModelProperties.name to the raw model ID and look up format/version from AGENT_MODEL_CONFIG. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…resource Add tests for CustomDeploymentModelResource component (both v1 and v2), expand helpers.spec.ts coverage, and add MicrosoftFoundry to Utils tests. Also removes debug div from v2 deploymentModelResource. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds MicrosoftFoundry / “Foundry Models (Preview)” as a new agent model source for the Agent Loop action, expands the supported model catalog, and updates filtering/serialization so the correct model metadata is applied based on the selected source across both designer v1 and v2.
Changes:
- Added
MicrosoftFoundryoption in the Agent Loop manifest and updated model version defaults. - Expanded
AGENT_MODEL_CONFIGand introduced split model lists:SUPPORTED_AGENT_OPENAI_MODELS(curated) vsSUPPORTED_FOUNDRY_AGENT_MODELS(full). - Updated designer v1/v2 agent deployment/model selection logic and added/updated unit tests.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/logic-apps-shared/src/utils/src/lib/models/agent.ts | Expands AGENT_MODEL_CONFIG with additional models and corrected versions. |
| libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/agentloop.ts | Adds MicrosoftFoundry to model source options and updates input dependency values/default version. |
| libs/logic-apps-shared/src/designer-client-services/lib/base/cognitiveService.ts | Updates model version fallback used when creating deployments. |
| libs/designer/src/lib/common/constants.ts | Renames curated model list constant and adds full Foundry superset list. |
| libs/designer/src/lib/common/utilities/Utils.ts (+ test) | Adds AgentUtils.ModelType.MicrosoftFoundry constant and validates it in tests. |
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Uses model-type-specific supported lists and attempts to populate dependent model properties for MicrosoftFoundry. |
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/helpers.ts (+ test) | Adjusts connection assignment behavior for MicrosoftFoundry and expands test coverage. |
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/custom/deploymentModelResource.tsx (+ test) | Ensures “Create new deployment” modal shows the full model list and adds tests. |
| libs/designer/src/lib/core/actions/bjsworkflow/connections.ts | Maps MicrosoftFoundry display name to manifest value. |
| libs/designer-v2/src/lib/common/constants.ts | Mirrors constants changes from designer v1. |
| libs/designer-v2/src/lib/common/utilities/Utils.ts (+ test) | Mirrors AgentUtils.ModelType.MicrosoftFoundry changes from designer v1. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Mirrors v1 logic changes for model filtering and dependent property population. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/helpers.ts (+ test) | Mirrors v1 connection assignment changes and adds tests. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/custom/deploymentModelResource.tsx (+ test) | Mirrors v1 modal model list updates and adds tests. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/connections.ts | Mirrors v1 mapping update for MicrosoftFoundry. |
Comments suppressed due to low confidence (2)
libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx:1749
- When
agentModelType === 'MicrosoftFoundry', options are still generated withvalue: deployment.name, which doesn’t match the later assumption that the selection is a raw model ID. Update either the option values (to model IDs) or the dependent-field population logic (to use deployment lookup) so the selected value and downstream serialization are consistent.
const supportedModels =
agentModelType === 'MicrosoftFoundry' ? constants.SUPPORTED_FOUNDRY_AGENT_MODELS : constants.SUPPORTED_AGENT_OPENAI_MODELS;
const options = deploymentsForCognitiveServiceAccount
.filter((deployment) => supportedModels.includes((deployment.properties?.model?.name ?? '').toLowerCase()))
.map((deployment) => ({
value: deployment.name,
displayName: `${deployment.name}${deployment.properties?.model?.name ? ` (${deployment.properties.model.name})` : ''}`,
}));
libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx:1736
- For
agentModelType === 'MicrosoftFoundry', the combobox options still usevalue: deployment.name. This conflicts with the later logic that assumes the selected value is a raw model ID. If the intent is to select model IDs for Foundry Models, update the optionvalue(and display) accordingly; otherwise keep using deployment lookup for model properties.
const supportedModels =
agentModelType === 'MicrosoftFoundry' ? constants.SUPPORTED_FOUNDRY_AGENT_MODELS : constants.SUPPORTED_AGENT_OPENAI_MODELS;
const options = deploymentsForCognitiveServiceAccount
.filter((deployment) => {
const modelName = (deployment.properties?.model?.name ?? '').toLowerCase();
return supportedModels.includes(modelName);
})
.map((deployment) => ({
value: deployment.name,
displayName: `${deployment.name}${deployment.properties?.model?.name ? ` (${deployment.properties.model.name})` : ''}`,
}));
libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx
Outdated
Show resolved
Hide resolved
libs/logic-apps-shared/src/designer-client-services/lib/base/cognitiveService.ts
Outdated
Show resolved
Hide resolved
libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx
Outdated
Show resolved
Hide resolved
- Utils.ts: Add tests for titleCase, isOpenApiSchemaVersion, getSKUDefaultHostOptions, isFoundryAgentIdParameter, filterDynamicConnectionFeatures - helpers.ts: Add tests for categorizeConnections, isAgentConnectorAndConsumptionAgentModel - connections.ts: Add tests for isOpenApiConnectionType, isConnectionRequiredForOperation, isConnectionAutoSelectionDisabled, getConnectionMetadata, needsConnection Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… agentLoopConnector tests Update createConnection tests to expect auth dropdown hidden for single-value parameter sets (matching showMultiAuthDropdown behavior). Add new test suite for agentLoopConnector notSupportedConnectionParameters verifying MicrosoftFoundry leaves only Key auth. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
takyyon
left a comment
There was a problem hiding this comment.
Thorough review of the Foundry Models feature. The overall architecture is sound — clean manifest additions, proper connection categorization, smart multi-auth UX fix. However, there is debug code that must be removed before merge, and several other issues detailed below.
Critical: 1 (merge blocker)
Significant: 5
Minor: 3
...i/panel/nodeDetailsPanel/tabs/parametersTab/custom/__test__/deploymentModelResource.spec.tsx
Outdated
Show resolved
Hide resolved
libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx
Outdated
Show resolved
Hide resolved
libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/connectionInline.tsx
Outdated
Show resolved
Hide resolved
libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/codeViewTab.tsx
Outdated
Show resolved
Hide resolved
libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/agentloop.ts
Outdated
Show resolved
Hide resolved
- Remove debug 'foo' code left in helper.ts (critical) - Fix early return in updateAgentParametersForConnection that skipped all subsequent parameter updates (deploymentId clearing, cognitive service account updates); changed to preserve value and continue - Extract duplicated manifestToDisplayName/displayNameToManifest mappings into shared AgentUtils.ManifestToDisplayName and AgentUtils.DisplayNameToManifest constants - Revert unrelated refetchOnMount change from 'always' back to false in codeViewTab - Fix deploymentModelResource test using wrong model list constant - Fix Playwright username-display strict mode violations with .first() - Add tests for new shared ManifestToDisplayName/DisplayNameToManifest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move SUPPORTED_AGENT_OPENAI_MODELS and SUPPORTED_FOUNDRY_AGENT_MODELS from designer v1/v2 constants.ts into logic-apps-shared agent.ts. Foundry list is now derived from Object.keys(AGENT_MODEL_CONFIG) so model additions only need one edit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-models-agent-source
…walee/add-foundry-models-agent-source
Commit Type
Risk Level
What & Why
Add "Foundry Models (Preview)" (
MicrosoftFoundry) as a new option in the Agent Model Source dropdown for the Agent Loop action. This enables users to select Foundry-hosted models in addition to Azure OpenAI.Also fixes incorrect model versions in
AGENT_MODEL_CONFIG(e.g.gpt-4ofrom2025-04-14→2024-11-20,gpt-4→turbo-2024-04-09) and adds 22 new models (gpt-5.4series,o3,o4-mini,o1,model-router, etc.).Key changes:
SUPPORTED_AGENT_MODELS→SUPPORTED_AGENT_OPENAI_MODELS(curated 10-model list for Azure OpenAI)SUPPORTED_FOUNDRY_AGENT_MODELSas a full superset of all 31 modelsagentModelTypeMicrosoftFoundry,deploymentModelProperties.nameis set to the raw model ID (not an Azure deployment instance), with format/version looked up fromAGENT_MODEL_CONFIGImpact of Change
SUPPORTED_AGENT_MODELSrenamed toSUPPORTED_AGENT_OPENAI_MODELS; newSUPPORTED_FOUNDRY_AGENT_MODELSconstant;getEditorAndOptionsnow accepts optionalagentModelTypeparameteragentloop.tsTest Plan
Unit tests added
deploymentModelResource.spec.tsx(v1 & v2) — 7 tests each: rendering, submit, cancel, error handling, model list verificationhelpers.spec.ts(v2, new) — 19 tests for agent connector helpers andgetConnectionToAssignhelpers.spec.ts(v1, expanded) — addedMicrosoftFoundrycases and edge casesUtils.test.ts(v1 & v2) — addedMicrosoftFoundrymodel type assertionManual verification
Contributors
Screenshots/Videos
Recording.2026-03-30.085558.mp4