Skip to content

feat(designer): Add Foundry Models (Preview) agent model source#8965

Merged
Elaina-Lee merged 13 commits intomainfrom
hyehwalee/add-foundry-models-agent-source
Mar 30, 2026
Merged

feat(designer): Add Foundry Models (Preview) agent model source#8965
Elaina-Lee merged 13 commits intomainfrom
hyehwalee/add-foundry-models-agent-source

Conversation

@Elaina-Lee
Copy link
Copy Markdown
Contributor

@Elaina-Lee Elaina-Lee commented Mar 26, 2026

Commit Type

  • feature - New functionality

Risk Level

  • Medium - Moderate changes, some user impact

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-4o from 2025-04-142024-11-20, gpt-4turbo-2024-04-09) and adds 22 new models (gpt-5.4 series, o3, o4-mini, o1, model-router, etc.).

Key changes:

  • Rename SUPPORTED_AGENT_MODELSSUPPORTED_AGENT_OPENAI_MODELS (curated 10-model list for Azure OpenAI)
  • Add SUPPORTED_FOUNDRY_AGENT_MODELS as a full superset of all 31 models
  • Deployment filtering uses the correct model list based on selected agentModelType
  • For MicrosoftFoundry, deploymentModelProperties.name is set to the raw model ID (not an Azure deployment instance), with format/version looked up from AGENT_MODEL_CONFIG
  • "Create new deployment" modal always shows the full model list
  • All changes mirrored in both designer v1 and designer v2

Impact of Change

  • Users: New "Foundry Models (Preview)" option in Agent model source dropdown; corrected model versions for deployments
  • Developers: SUPPORTED_AGENT_MODELS renamed to SUPPORTED_AGENT_OPENAI_MODELS; new SUPPORTED_FOUNDRY_AGENT_MODELS constant; getEditorAndOptions now accepts optional agentModelType parameter
  • System: No architectural changes; additive manifest update in agentloop.ts

Test Plan

  • Unit tests added/updated
  • Manual testing completed
  • Tested in: Standalone designer

Unit tests added

  • deploymentModelResource.spec.tsx (v1 & v2) — 7 tests each: rendering, submit, cancel, error handling, model list verification
  • helpers.spec.ts (v2, new) — 19 tests for agent connector helpers and getConnectionToAssign
  • helpers.spec.ts (v1, expanded) — added MicrosoftFoundry cases and edge cases
  • Utils.test.ts (v1 & v2) — added MicrosoftFoundry model type assertion

Manual verification

  • Open standalone designer with an agent workflow
  • Verify "Foundry Models (Preview)" appears in the Agent model source dropdown
  • Select "Azure OpenAI" — verify AI model combobox filters by curated OpenAI list
  • Select "Foundry Models (Preview)" — verify AI model combobox filters by full Foundry list
  • Click "Create new" on deployment model — verify dropdown shows all models
  • Create a new deployment — verify correct version in API request (Network tab)

Contributors

Screenshots/Videos

Recording.2026-03-30.085558.mp4
image

…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>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: feat(designer): Add Foundry Models (Preview) agent model source
  • Issue: None — title is clear, follows conventional commit style and includes scope and concise description. Including "(Preview)" is helpful.
  • Recommendation: None.

Commit Type

  • Properly selected (feature).
  • Note: Only one commit type checkbox is selected which is correct for this change.

Risk Level

  • The PR body marks Medium and the repository labels include risk:medium — these match.
  • Assessment: The code changes are fairly large (many files changed across designer, designer-v2, and shared libs) but appear additive and focused; Medium is an appropriate risk classification.

What & Why

  • Current: Adds a new agent model source "Foundry Models (Preview)", introduces SUPPORTED_FOUNDRY_AGENT_MODELS and SUPPORTED_AGENT_OPENAI_MODELS, fixes AGENT_MODEL_CONFIG versions, and updates behavior for deployment filtering and model property mapping.
  • Issue: None — the What & Why is clear and maps to the code changes.
  • Recommendation: None; good to keep as-is. (If you want, you can add a one-line TL;DR at the very top for quick scanning.)

Impact of Change

  • The PR documents impacts for Users, Developers, System.
  • Recommendation: Good. A small suggestion: add any link to an API/manifest doc or a follow-up task if any backend service/contract needs coordination.
    • Users: New "Foundry Models (Preview)" option; corrected model versions.
    • Developers: Constants renamed and new constants added; helper/API changes noted.
    • System: No architectural changes; manifest updates called out.

Test Plan

  • Test plan lists unit tests added/updated and manual verification steps.
  • I checked the diff: many unit tests have been added/updated across libs/designer-v2, libs/designer, and libs/logic-apps-shared (e.g., deploymentModelResource.spec.tsx, helpers.spec.ts, Utils.test.ts, openAIConnector.spec.tsx, and more). The code changes include the test files mentioned in the PR body — unit test coverage additions are present and consistent with the PR claims.
  • Recommendation: Ensure CI runs these new/updated tests and resolves any flaky behavior before merge.

⚠️ Contributors

  • Assessment: Contributors section is blank in the PR body.
  • Recommendation: Consider adding a short contributors list (reviewers, PM, design, co-authors) so credit is recorded. This is optional but recommended for larger changes.

Screenshots/Videos

  • A screenshot / attachment URL and img tag are included in the PR body. Good for visual changes.
  • Recommendation: If this introduces further UI flows, consider adding a short caption for the image describing what it demonstrates.

Summary Table

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

📊 Coverage Check

The following changed files need attention:

⚠️ libs/designer-v2/src/lib/core/actions/bjsworkflow/connections.ts - 40% covered (needs improvement)
⚠️ libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/helpers.ts - 78% covered (needs improvement)
⚠️ libs/designer/src/lib/core/actions/bjsworkflow/connections.ts - 40% covered (needs improvement)
⚠️ libs/designer-v2/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx - 69% covered (needs improvement)
⚠️ libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/connectionInline.tsx - 4% covered (needs improvement)
⚠️ libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/createConnection.tsx - 69% covered (needs improvement)
⚠️ libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/connectionInline.tsx - 3% covered (needs improvement)

Please add tests for the uncovered files before merging.

Elaina-Lee and others added 2 commits March 26, 2026 16:53
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>
@Elaina-Lee Elaina-Lee marked this pull request as ready for review March 27, 2026 18:13
Copilot AI review requested due to automatic review settings March 27, 2026 18:13
@Elaina-Lee Elaina-Lee added the risk:medium Medium risk change with potential impact label Mar 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MicrosoftFoundry option in the Agent Loop manifest and updated model version defaults.
  • Expanded AGENT_MODEL_CONFIG and introduced split model lists: SUPPORTED_AGENT_OPENAI_MODELS (curated) vs SUPPORTED_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 with value: 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 use value: 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 option value (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})` : ''}`,
      }));

- 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>
Elaina-Lee and others added 2 commits March 30, 2026 08:55
… 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>
Copy link
Copy Markdown
Contributor

@takyyon takyyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

- 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>
Elaina-Lee and others added 3 commits March 30, 2026 12:34
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>
@Elaina-Lee Elaina-Lee requested a review from takyyon March 30, 2026 21:43
@Elaina-Lee Elaina-Lee enabled auto-merge (squash) March 30, 2026 22:08
@Elaina-Lee Elaina-Lee disabled auto-merge March 30, 2026 23:38
@Elaina-Lee Elaina-Lee merged commit 33e8a2c into main Mar 30, 2026
13 of 14 checks passed
@Elaina-Lee Elaina-Lee deleted the hyehwalee/add-foundry-models-agent-source branch March 30, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:medium Medium risk change with potential impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants