Skip to content

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

Open
Elaina-Lee wants to merge 4 commits intomainfrom
hyehwalee/add-foundry-models-agent-source
Open

feat(designer): Add Foundry Models (Preview) agent model source#8965
Elaina-Lee wants to merge 4 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-25.173655.mp4

…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: Title is clear and follows conventional commit format and succinctly summarizes the change.
  • Recommendation: None — good job using conventional commit style and a concise description.

Commit Type

  • Properly selected (feature)
  • Only one commit type selected, which is correct.

Risk Level

  • Risk label in the PR body is Medium and the repo labels include risk:medium.
  • Assessment: The change set modifies multiple modules across designer v1/v2, shared libs, and adds many models and tests. This is consistent with a medium risk classification (additive + config changes) and the label is accurate.

What & Why

  • Current: Add Foundry Models (Preview) as a new agent model source, rename/adjust supported model constants, fix model versions in AGENT_MODEL_CONFIG, and mirror changes across designer v1/v2.
  • Issue: None; the section is concise and explains why the change is needed.
  • Recommendation: Consider adding a brief note about any required coordination with backend/service teams (if the model IDs/versions require server-side support or feature flags) so reviewers know whether rollout needs cross-team coordination.

Impact of Change

  • Impact is described for Users, Developers, and System.
  • Recommendation:
    • Users: New "Foundry Models (Preview)" option — good.
    • Developers: You already call out constant renames and API changes. Consider briefly listing files or modules that must be updated downstream if any (if applicable).
    • System: Marked as additive. If there are any runtime or telemetry implications (e.g., increased model list size), note them here.

Test Plan

  • Unit tests added/updated — verified in the diff (multiple test files added/updated across libs/designer and libs/designer-v2). Good coverage for the change surface.
  • Manual testing checklist present (not yet completed) — acceptable since unit tests were added.
  • Recommendation: When marking manual testing completed, ensure the steps in the checklist have corresponding screenshots/confirmation in the PR or follow-up validation.

⚠️ Contributors

  • Contributors section is blank in the PR body.
  • Recommendation: Tag teammates, reviewers, PMs, or designers who contributed (if any). This helps track contributions and gives credit. Leaving it blank is allowed, but adding names helps future traceability.

Screenshots/Videos

  • A screenshot/video link is provided in the body. Good to have for UI changes.
  • Recommendation: Ensure the link is accessible to reviewers and shows the Foundry Models option and the Create New Deployment modal behavior.

Summary Table

Section Status Recommendation
Title Title is good and follows conventional commit style.
Commit Type feature selected correctly.
Risk Level risk:medium matches the scope of changes (many files, but additive + tests).
What & Why Clear explanation provided; consider adding backend coordination note if needed.
Impact of Change Impact described; consider adding any downstream update notes.
Test Plan Unit tests present in diff; manual checklist provided.
Contributors ⚠️ Add contributor tags if applicable for credit and traceability.
Screenshots/Videos Screenshot link provided — ensure it demonstrates behavior change.

Final Message:
The PR title and body follow the required template and standards. The risk label risk:medium is appropriate given the breadth of changes (constants, model config, UI manifest, new model source, tests). Unit tests were added and are present in the diff, which supports the claim in the Test Plan.

Before merging, please consider the small recommendations above:

  • Add any cross-team coordination notes if model IDs/versions require server-side support or deployment dependencies.
  • Add contributors (optional but recommended) to acknowledge reviewers/implementers.
  • If you intend to mark Manual testing as completed, add a short note or screenshots confirming the verification steps.

Otherwise this PR's title and body meet the repository guidelines — good work. Please address/acknowledge the minor suggestions and then proceed with code reviews/CI checks as usual. Thank you!


Last updated: Fri, 27 Mar 2026 18:33:33 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 - 41% 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 - 41% 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})` : ''}`,
      }));

model: {
name: config?.name ?? model,
version: config?.version ?? '2025-04-14',
// version: config?.version ?? '2025-04-14',
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Please remove the commented-out legacy default version line. Leaving commented code here adds noise and makes it harder to tell what the intended fallback behavior is.

Suggested change
// version: config?.version ?? '2025-04-14',

Copilot uses AI. Check for mistakes.
- 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>
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.

2 participants