Skip to content

Conversation

@ccastrotrejo
Copy link
Contributor

@ccastrotrejo ccastrotrejo commented May 23, 2025

Type of Change

  • Bug fix
  • Feature
  • Other

Current Behavior

New Behavior

  • Open AI endpoint should have the following syntax https://${openAIResource}.services.ai.azure.com/api/projects/${projectName}

Impact of Change

Not a breaking change

Test Plan

Screenshots or Videos (if applicable)

@ccastrotrejo ccastrotrejo added the risk:low Low risk change with minimal impact label May 23, 2025
@ccastrotrejo ccastrotrejo requested a review from Copilot May 23, 2025 16:08
Copy link
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

This PR updates the OpenAI endpoint configuration for foundry connections in the designer module. It adjusts the connection parameters by deriving the endpoint URL from the selected project's name and the cognitive service account ID.

  • Added a "data" attribute to the combo box options to pass the project name.
  • Modified the logic to compute the endpoint URL using the service project name instead of its ID.
  • Renamed variable "serviceProjectKey" to "serviceProjectId" for improved clarity.

@ccastrotrejo ccastrotrejo requested a review from Copilot May 23, 2025 16:15
Copy link
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

This PR updates the logic for constructing the OpenAI endpoint URL when selecting a Foundry connection.

  • Add data field to combo box options to carry project name separately from ID
  • Compute the Azure OpenAI endpoint URL using the service account name and project name
  • Remove an obsolete localized string entry

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/custom/openAIConnector.tsx Changed onChange handler to build the full Azure OpenAI endpoint URL and added data to options
Localize/lang/strings.json Removed unused error message entry
Comments suppressed due to low confidence (2)

libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/custom/openAIConnector.tsx:297

  • The variable name cognitiveServiceAccounName appears to be misspelled (missing 't'). Consider renaming it to cognitiveServiceAccountName for clarity and consistency.
const cognitiveServiceAccounName = cognitiveServiceAccountId.split('/').pop();

libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/custom/openAIConnector.tsx:298

  • This new URL construction logic should be covered by unit tests to ensure correct endpoint formatting across different account and project names.
const openAIEndpoint = `https://${cognitiveServiceAccounName}.services.ai.azure.com/api/projects/${serviceProjectName}`;

@ccastrotrejo ccastrotrejo requested a review from Copilot May 23, 2025 16:15
Copy link
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

This PR fixes the OpenAI endpoint URL generation to use the correct Azure AI service pattern with project name.

  • Adds a data property to project options for retrieving the project name
  • Constructs the Azure OpenAI endpoint URL using cognitiveServiceAccountId and serviceProjectName
  • Updates setKeyValue to store the full endpoint URL instead of the raw project key
Comments suppressed due to low confidence (1)

libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/custom/openAIConnector.tsx:298

  • [nitpick] Consider adding unit tests for the endpoint URL generation to ensure openAIEndpoint is constructed correctly given various cognitiveServiceAccountId and serviceProjectName inputs.
const openAIEndpoint = `https://${cognitiveServiceAccounName}.services.ai.azure.com/api/projects/${serviceProjectName}`;

@ccastrotrejo ccastrotrejo requested a review from Copilot May 23, 2025 16:18
Copy link
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

This PR fixes the open AI endpoint construction for foundry connections by updating the endpoint string syntax and cleaning up outdated localization error message entries.

  • Updated the endpoint string to use the cognitive service account name and project name dynamically.
  • Removed obsolete localization entries for workflow-related error messages.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
libs/designer/src/lib/ui/panel/connectionsPanel/createConnection/custom/openAIConnector.tsx Constructs the open AI endpoint with updated syntax using the cognitive account.
Localize/lang/strings.json Removes outdated localization entries for workflow error messages.
Comments suppressed due to low confidence (1)

Localize/lang/strings.json:3434

  • Removal of the localized error message '_zMKxg9.comment' may lead to missing error feedback if the key is referenced elsewhere. Confirm that the removal is intentional and that all dependent references have been updated.
"_zMKxg9.comment": "Error message when the workflow name is invalid regex.",

@ccastrotrejo ccastrotrejo enabled auto-merge (squash) May 23, 2025 17:38
@ccastrotrejo ccastrotrejo merged commit 6c70ac4 into main May 23, 2025
14 checks passed
@ccastrotrejo ccastrotrejo deleted the ccastrotrejo/updateFoundrySourceUri branch May 23, 2025 18:57
ccastrotrejo added a commit that referenced this pull request May 23, 2025
* Update open ai endpoint for foundry connections

* Revert Localize

* Update endpoint string

* Revert Localize

* Fix typo

* Rever Localize
ccastrotrejo added a commit that referenced this pull request May 23, 2025
fix(designer): Update open AI endpoint for foundry connections (#7306)

* Update open ai endpoint for foundry connections

* Revert Localize

* Update endpoint string

* Revert Localize

* Fix typo

* Rever Localize
preetriti1 added a commit that referenced this pull request May 28, 2025
…7349)

* fix(Templates): Updating hotfix branch with three fixes (#7301)

* fix(templates): Adding info bubble support and text for workflow customization wizard (#7297)

* feat(templates): Adding created and last modified column in workflows and toaster

* fix(templates): Updating info text needed in wizard form

---------

Co-authored-by: Priti Sambandam <psamband@microsoft.com>

* fix(Templates): UI fixes to enforce consistency & Remove placeholder links (#7291)

* chnaged paramters name, displayName order & made name clickable

* removed workflow identifier from display view

* added aeritesk for required for publish fields

* added links for redirects

* added hints for display names & disabled save when not present

* changed links & fixed scrollbar

* added for publish for validation error messages

* fixed tests

* fix(Templates): Fixed connection name and type not showing up in review tab (#7300)

Fixed connection name and type not showing up in review tab

---------

Co-authored-by: preetriti1 <48265693+preetriti1@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>

* chore(release): 5.109.1

* fix(designer): Update open AI endpoint for foundry connections (#7307)

fix(designer): Update open AI endpoint for foundry connections (#7306)

* Update open ai endpoint for foundry connections

* Revert Localize

* Update endpoint string

* Revert Localize

* Fix typo

* Rever Localize

* fix(Designer): Variable/Hybrid Cherry picks (#7325)

* fix(designer): Agents in Hybrid not working (#7303)

* quick fix

* fix hybrid agent fetch

* fix(designer): Fix Variable Editor Causing Issues on Strings (#7302)

* quick fix

* my brain hurts

* fix changes

* fix test

* is it working?

* add logic to agent params and created tests

* fix test

* update code

* Revert "update code"

This reverts commit 7669b64.

* fix(templates): Fixing content updates in configure workflows panel

---------

Co-authored-by: Elaina Lee <144840522+Elaina-Lee@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>
Co-authored-by: release-automation-Elaina-Lee@microsoft.com <Elaina-Lee>
Co-authored-by: Carlos Emiliano Castro Trejo <102700317+ccastrotrejo@users.noreply.github.com>
Co-authored-by: Eric Wu <95886809+Eric-B-Wu@users.noreply.github.com>
Elaina-Lee added a commit that referenced this pull request May 28, 2025
…7349)

* fix(Templates): Updating hotfix branch with three fixes (#7301)

* fix(templates): Adding info bubble support and text for workflow customization wizard (#7297)

* feat(templates): Adding created and last modified column in workflows and toaster

* fix(templates): Updating info text needed in wizard form

---------

Co-authored-by: Priti Sambandam <psamband@microsoft.com>

* fix(Templates): UI fixes to enforce consistency & Remove placeholder links (#7291)

* chnaged paramters name, displayName order & made name clickable

* removed workflow identifier from display view

* added aeritesk for required for publish fields

* added links for redirects

* added hints for display names & disabled save when not present

* changed links & fixed scrollbar

* added for publish for validation error messages

* fixed tests

* fix(Templates): Fixed connection name and type not showing up in review tab (#7300)

Fixed connection name and type not showing up in review tab

---------

Co-authored-by: preetriti1 <48265693+preetriti1@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>

* chore(release): 5.109.1

* fix(designer): Update open AI endpoint for foundry connections (#7307)

fix(designer): Update open AI endpoint for foundry connections (#7306)

* Update open ai endpoint for foundry connections

* Revert Localize

* Update endpoint string

* Revert Localize

* Fix typo

* Rever Localize

* fix(Designer): Variable/Hybrid Cherry picks (#7325)

* fix(designer): Agents in Hybrid not working (#7303)

* quick fix

* fix hybrid agent fetch

* fix(designer): Fix Variable Editor Causing Issues on Strings (#7302)

* quick fix

* my brain hurts

* fix changes

* fix test

* is it working?

* add logic to agent params and created tests

* fix test

* update code

* Revert "update code"

This reverts commit 7669b64.

* fix(templates): Fixing content updates in configure workflows panel

---------

Co-authored-by: Elaina Lee <144840522+Elaina-Lee@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>
Co-authored-by: release-automation-Elaina-Lee@microsoft.com <Elaina-Lee>
Co-authored-by: Carlos Emiliano Castro Trejo <102700317+ccastrotrejo@users.noreply.github.com>
Co-authored-by: Eric Wu <95886809+Eric-B-Wu@users.noreply.github.com>
Elaina-Lee added a commit that referenced this pull request May 28, 2025
* fix(templates): Fixing content updates in configure workflows panel (#7349)

* fix(Templates): Updating hotfix branch with three fixes (#7301)

* fix(templates): Adding info bubble support and text for workflow customization wizard (#7297)

* feat(templates): Adding created and last modified column in workflows and toaster

* fix(templates): Updating info text needed in wizard form

---------

Co-authored-by: Priti Sambandam <psamband@microsoft.com>

* fix(Templates): UI fixes to enforce consistency & Remove placeholder links (#7291)

* chnaged paramters name, displayName order & made name clickable

* removed workflow identifier from display view

* added aeritesk for required for publish fields

* added links for redirects

* added hints for display names & disabled save when not present

* changed links & fixed scrollbar

* added for publish for validation error messages

* fixed tests

* fix(Templates): Fixed connection name and type not showing up in review tab (#7300)

Fixed connection name and type not showing up in review tab

---------

Co-authored-by: preetriti1 <48265693+preetriti1@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>

* chore(release): 5.109.1

* fix(designer): Update open AI endpoint for foundry connections (#7307)

fix(designer): Update open AI endpoint for foundry connections (#7306)

* Update open ai endpoint for foundry connections

* Revert Localize

* Update endpoint string

* Revert Localize

* Fix typo

* Rever Localize

* fix(Designer): Variable/Hybrid Cherry picks (#7325)

* fix(designer): Agents in Hybrid not working (#7303)

* quick fix

* fix hybrid agent fetch

* fix(designer): Fix Variable Editor Causing Issues on Strings (#7302)

* quick fix

* my brain hurts

* fix changes

* fix test

* is it working?

* add logic to agent params and created tests

* fix test

* update code

* Revert "update code"

This reverts commit 7669b64.

* fix(templates): Fixing content updates in configure workflows panel

---------

Co-authored-by: Elaina Lee <144840522+Elaina-Lee@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>
Co-authored-by: release-automation-Elaina-Lee@microsoft.com <Elaina-Lee>
Co-authored-by: Carlos Emiliano Castro Trejo <102700317+ccastrotrejo@users.noreply.github.com>
Co-authored-by: Eric Wu <95886809+Eric-B-Wu@users.noreply.github.com>

* fix(Templates): Popup delete modal for workflows & disable on non-selected (#7346)

* fixed delete not being disabled on nothing selected

* added modal and fixed delete button still consisting prev selectedWorkflow logic

* added back description link

* fix(Templates): Select all for workflows table not working (#7347)

* enabled select all for workflows tab

* fixed selection on workflow panel

* moved select all to checkbox only

* fix(Templates): Update parameter blocked on error (#7345)

* fixed disabling parameter value update when errors exist in state

* renamed display name explanations

* renamed workflows panel title

* changed worklfow name and display name props

* fixed breaking & changed description

---------

Co-authored-by: preetriti1 <48265693+preetriti1@users.noreply.github.com>
Co-authored-by: Priti Sambandam <psamband@microsoft.com>
Co-authored-by: Carlos Emiliano Castro Trejo <102700317+ccastrotrejo@users.noreply.github.com>
Co-authored-by: Eric Wu <95886809+Eric-B-Wu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Low risk change with minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants