Skip to content

fix(designer): Default agent connection type to MicrosoftFoundry#9028

Open
Elaina-Lee wants to merge 1 commit intomainfrom
hyehwalee/deprecate-azureopenai-default-to-foundry
Open

fix(designer): Default agent connection type to MicrosoftFoundry#9028
Elaina-Lee wants to merge 1 commit intomainfrom
hyehwalee/deprecate-azureopenai-default-to-foundry

Conversation

@Elaina-Lee
Copy link
Copy Markdown
Contributor

@Elaina-Lee Elaina-Lee commented Apr 7, 2026

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Changes the default agentModelType from AzureOpenAI to MicrosoftFoundry across the agent loop manifest, connection tagging, and connection update logic (both designer v1 and v2). Since the underlying connection is the same for both types, this reclassifies connections with a cognitiveResourceId (that aren't Foundry Service or APIM) as MicrosoftFoundry. Completes the deprecation started in PR #9012.

Also renames the connection picker display label from "Foundry Models" to "MicrosoftFoundry (OpenAI)".

Backward compatibility: preserves AzureOpenAI for existing workflows that lack deploymentModelProperties.

Impact of Change

  • Users: New agent workflows default to MicrosoftFoundry. Connection picker shows "MicrosoftFoundry (OpenAI)" tag. Existing AzureOpenAI workflows without deploymentModelProperties are preserved.
  • Developers: Default agentModelType changed in manifest and connection logic.
  • System: No architectural changes. Same physical connections, different classification.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: pnpm run build:lib (9/9 success), pnpm run test:lib (3548+ tests passed)

Contributors

Screenshots/Videos

Recording.2026-04-07.163829.mp4

…ead of AzureOpenAI

Since the underlying connection is the same, reclassify agent connections
with a cognitiveResourceId (that aren't Foundry Service or APIM) as
MicrosoftFoundry instead of AzureOpenAI. Preserves AzureOpenAI for
backward compatibility when deploymentModelProperties is absent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 7, 2026 23:34
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 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: fix(designer): Default agent connection type to MicrosoftFoundry
  • Issue: None — title is concise and follows the conventional format (scope and short description).
  • Recommendation: Keep as-is. If you want even more specificity, you could append a short note (e.g., ... to MicrosoftFoundry (preserve AzureOpenAI for legacy workflows)), but that is optional.

Commit Type

  • Properly selected (fix).
  • Only one option selected which is correct.

⚠️ Risk Level

  • Assessment: The PR body and label both mark this as Low and there is a risk:low label on the PR.
  • Note: Based on the code diff, this change alters the default agentModelType in the manifest and changes classification/filtering behavior for connections/UI (and touchpoint for A2A filtering). That is a user-facing default behavior change that may impact newly created workflows and UI visibility of connections. Because of those potential user impacts, I advise raising the risk to Medium.
  • Recommendation: Update the PR Risk Level checkbox and label to Medium (and ensure the GitHub PR labels are updated to risk:medium). Add a short justification in the PR body explaining why it's medium (default change + UI/selection behavior + backward-compatibility considerations).

What & Why

  • Current: "Changes the default agentModelType from AzureOpenAI to MicrosoftFoundry across the agent loop manifest, connection tagging, and connection update logic (both designer v1 and v2)..." (includes backward compatibility note and rename of connection picker label).
  • Issue: None significant — description is clear and explains intent and backward compatibility.
  • Recommendation: Optionally include a one-line migration note: who to notify and whether existing saved workflows require any action (you already note backward compatibility, but a short explicit sentence about whether any migrations/telemetry or release notes are needed would help reviewers).

Impact of Change

  • The PR body includes Users / Developers / System sections and they are reasonable.
  • Recommendation:
    • Users: Clarify whether any newly created flows will observe different defaults in the UI, and whether that may change runtime behavior (e.g., billing/endpoint differences). If not, explicitly state "no runtime change, only classification/display change".
    • Developers: Call out specific modules changed (manifest default, updateAgentParametersForConnection logic, selectConnection filtering) — you already mention defaults & connection logic; consider listing the files changed for quick reference.
    • System: If there are no architecture changes, state explicitly that there is no backend migration required.

Test Plan

  • Assessment: Unit tests were updated (I verified changes to Utils.test.ts files). Manual testing was performed and build/test numbers provided.
  • Issue: No E2E tests were added.
  • Recommendation: Prefer adding an E2E test or integration test that validates the end-to-end behavior for the new default selection and the A2A filtering behavior (selectConnection path) — at minimum add a brief justification in the Test Plan explaining why E2E is not required for this change (e.g., covered by unit tests + manual validation + no backend change). Also explicitly call out which unit tests were added/updated and what scenarios they cover (e.g., manifest display name mapping, fallback preservation of AzureOpenAI when deploymentModelProperties missing, A2A filtering logic).

⚠️ Contributors

  • Assessment: The Contributors section is blank.
  • Recommendation: Add any contributors (PMs, designers, reviewers) who provided input. If none to list, consider adding a short line "No additional contributors" or leave blank — this will not fail the PR, but it's good for attribution.

Screenshots/Videos

  • Assessment: A link is present in the PR body.
  • Recommendation: Ensure the attached media demonstrates the renamed picker label and any UI filtering behavior changes (A2A). If you changed text in multiple places, short screenshots of the updated picker and a sample manifest default would help reviewers.

Summary Table

Section Status Recommendation
Title Keep as-is or optionally append brief context
Commit Type No change needed
Risk Level ⚠️ Change to Medium and update PR label + justification
What & Why Add a short migration/communication note (optional)
Impact of Change Clarify user-visible runtime impact (if any)
Test Plan Add E2E or justify absence; describe new unit tests coverage
Contributors ⚠️ Add contributors or a one-line note if none
Screenshots/Videos Ensure screenshots show UI text changes

Final Recommendation
Please update the PR to set Risk Level to Medium (update the checklist and the GitHub label), and either add an E2E/integration test for the end-to-end connection classification/filtering behavior or include a short explanation of why E2E tests are not required. Also add a short migration/release-note sentence in "What & Why" about the impact on newly created workflows and the backward compatibility approach you implemented.

Suggested text snippets you can paste into the PR body:

  • Risk level update (checkbox):
    • - [ ] Low - Minor changes, limited scope -> uncheck
    • - [x] Medium - Moderate changes, some user impact -> check
  • Risk label justification (to add near the Risk Level):
    • "Justification: This PR changes the default agentModelType used for new agent workflows and modifies UI connection filtering/display labels. Although it preserves backward compatibility for existing workflows, the default behavior for new workflows will change and may affect user experience, therefore risk is Medium."
  • Test plan note if skipping E2E:
    • "We did not add E2E tests because the changes are limited to client-side classification and manifest defaults; unit tests cover the mapping logic and the fallback/backwards-compatibility paths. Manual testing validated the UI behavior. If maintainers prefer, we can add an integration test simulating the selectConnection flow."

Once you update the Risk Level and add the small clarifications above, this PR should be in great shape to merge. Thank you for the thorough description and for preserving backward compatibility by checking deploymentModelProperties. 👍


Last updated: Tue, 07 Apr 2026 23:41:29 GMT

@Elaina-Lee Elaina-Lee added risk:low Low risk change with minimal impact and removed needs-pr-update labels Apr 7, 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

Updates the Logic Apps Designer agent workflow experience to default agent connections/model selection to MicrosoftFoundry (instead of AzureOpenAI) across manifests and Designer v1/v2 connection handling, while keeping a backward-compat path for older AzureOpenAI workflows.

Changes:

  • Changed the agent loop manifest default agentModelType to MicrosoftFoundry.
  • Updated Designer v1/v2 connection picker tagging/filtering to treat MicrosoftFoundry as the default model type and renamed the display label to MicrosoftFoundry (OpenAI).
  • Updated Designer v1/v2 connection update logic to preserve AzureOpenAI for older workflows when deploymentModelProperties is absent.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/agentloop.ts Switches default agent model source in the standard agent loop manifest to MicrosoftFoundry.
libs/designer/src/lib/ui/panel/connectionsPanel/selectConnection/selectConnection.tsx Tags agent connections with model type and adjusts A2A filtering for the new default.
libs/designer/src/lib/core/actions/bjsworkflow/connections.ts Defaults agent model type to MicrosoftFoundry during connection updates with a compatibility exception for older AzureOpenAI workflows.
libs/designer/src/lib/common/utilities/Utils.ts Renames the MicrosoftFoundry model type display string used in the connection picker/tagging.
libs/designer/src/lib/common/utilities/test/Utils.test.ts Updates unit tests to match the updated MicrosoftFoundry display string.
libs/designer-v2/src/lib/ui/panel/connectionsPanel/selectConnection/selectConnection.tsx Same as Designer v1: tagging/filtering updates for MicrosoftFoundry default.
libs/designer-v2/src/lib/core/actions/bjsworkflow/connections.ts Same as Designer v1: connection update defaults + AzureOpenAI back-compat logic.
libs/designer-v2/src/lib/common/utilities/Utils.ts Same as Designer v1: updates MicrosoftFoundry display string.
libs/designer-v2/src/lib/common/utilities/test/Utils.test.ts Same as Designer v1: updates unit tests for the new display string.

@@ -88,7 +88,9 @@ export const SelectConnectionWrapper = () => {
};

// For A2A, hide the foundry connection from the list
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The inline comment says "hide the foundry connection", but the filter condition is now allowing MicrosoftFoundry connections for A2A and still hiding FoundryService/APIM. Please update the comment to reflect what is actually being filtered (e.g., hide Foundry project/APIM connections for A2A).

Suggested change
// For A2A, hide the foundry connection from the list
// For A2A, hide Foundry project/service and APIM connections from the list.

Copilot uses AI. Check for mistakes.
@@ -88,7 +88,9 @@ export const SelectConnectionWrapper = () => {
};

// For A2A, hide the foundry connection from the list
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The inline comment says "hide the foundry connection", but the filter condition is now allowing MicrosoftFoundry connections for A2A and still hiding FoundryService/APIM. Please update the comment to reflect what is actually being filtered (e.g., hide Foundry project/APIM connections for A2A).

Suggested change
// For A2A, hide the foundry connection from the list
// For A2A, hide Foundry project/APIM connections from the list

Copilot uses AI. Check for mistakes.
Comment on lines 128 to 135
// Fallback: detect Foundry connections by cognitiveServiceAccountId resource pattern
if (!agentModelTypeValue) {
const cognitiveServiceId = connection.properties.connectionParameters?.cognitiveServiceAccountId?.metadata?.value ?? '';
if (foundryServiceConnectionRegex.test(cognitiveServiceId)) {
agentModelTypeValue = 'FoundryAgentService';
} else {
agentModelTypeValue = 'AzureOpenAI';
agentModelTypeValue = 'MicrosoftFoundry';
}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

agentModelTypeValue fallback logic only checks foundryServiceConnectionRegex and otherwise defaults to 'MicrosoftFoundry'. This becomes incorrect when the incoming connection already carries a manifest-style model type (e.g. 'APIMGenAIGateway') or when the connection is an APIM/V1 connection but DisplayNameToManifest mapping fails.

To make this robust:

  • If rawModelType is already a known manifest value (e.g. present in AgentUtils.ManifestToDisplayName), treat it as the manifest value directly (skip display-name mapping).
  • Extend the fallback detection to match the picker logic (detect APIM via apimanagementRegex, detect V1 when no cognitiveServiceAccountId is present) before defaulting to 'MicrosoftFoundry'.

Copilot uses AI. Check for mistakes.
Comment on lines 128 to 135
// Fallback: detect Foundry connections by cognitiveServiceAccountId resource pattern
if (!agentModelTypeValue) {
const cognitiveServiceId = connection.properties.connectionParameters?.cognitiveServiceAccountId?.metadata?.value ?? '';
if (foundryServiceConnectionRegex.test(cognitiveServiceId)) {
agentModelTypeValue = 'FoundryAgentService';
} else {
agentModelTypeValue = 'AzureOpenAI';
agentModelTypeValue = 'MicrosoftFoundry';
}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

agentModelTypeValue fallback logic only checks foundryServiceConnectionRegex and otherwise defaults to 'MicrosoftFoundry'. This becomes incorrect when the incoming connection already carries a manifest-style model type (e.g. 'APIMGenAIGateway') or when the connection is an APIM/V1 connection but DisplayNameToManifest mapping fails.

To make this robust:

  • If rawModelType is already a known manifest value (e.g. present in AgentUtils.ManifestToDisplayName), treat it as the manifest value directly (skip display-name mapping).
  • Extend the fallback detection to match the picker logic (detect APIM via apimanagementRegex, detect V1 when no cognitiveServiceAccountId is present) before defaulting to 'MicrosoftFoundry'.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

📊 Coverage Check

The following changed files need attention:

⚠️ libs/designer-v2/src/lib/core/actions/bjsworkflow/connections.ts - 39% covered (needs improvement)
⚠️ libs/designer/src/lib/core/actions/bjsworkflow/connections.ts - 39% covered (needs improvement)
⚠️ libs/designer-v2/src/lib/ui/panel/connectionsPanel/selectConnection/selectConnection.tsx - 12% covered (needs improvement)
⚠️ libs/designer/src/lib/ui/panel/connectionsPanel/selectConnection/selectConnection.tsx - 2% covered (needs improvement)

Please add tests for the uncovered files before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:low Low risk change with minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants