Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: arm-cognitiveservices creates service endpoint using location instead of resource name #29605

Closed
1 of 6 tasks
polinaouk opened this issue May 7, 2024 · 5 comments
Closed
1 of 6 tasks
Assignees
Labels
Cognitive Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@polinaouk
Copy link

  • Package Name: @azure/arm-cognitiveservices
  • Package Version: 7.5.0
  • Operating system:
  • nodejs
    • version: v20.11.1
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug
A clear and concise description of what the bug is.

I am using arm-cognitiveservices sdk to create an Open AI service. When I call beginCreateAndWait method, it automatically creates an endpoint with location name rather than using service name.

It works fine if I do it manually in azure portal.

To Reproduce
Steps to reproduce the behavior:

import { Account, CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";

 const cognitiveServicesManagementClient = new CognitiveServicesManagementClient(
            myTokenCredential,
          mySubscriptionId,
        );

const account: Account = {
                kind:  "OpenAI",
                location: "swedencentral",
                sku: { name: "S0" },
            };

            const openAiAccount = await cognitiveServicesManagementClient.accounts.beginCreateAndWait(
                "myFakeRGName",
                "testMondayoai",
                account,
            );

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Additional context
Add any other context about the problem here.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 7, 2024
@jeremymeng jeremymeng added Mgmt This issue is related to a management-plane library. Cognitive Services and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 7, 2024
@github-actions github-actions bot added the needs-team-attention This issue needs attention from Azure service team or SDK team label May 7, 2024
@kazrael2119
Copy link
Contributor

will check

@kazrael2119
Copy link
Contributor

kazrael2119 commented May 9, 2024

Hi @polinaouk ,
Here is the swagger example provided by the service team, we can see all the endpoints from response are created with location, I will try to test whether we can create the endpoint with service name

And you said "It works fine if I do it manually in azure portal." I don't know the steps to create any open ai resources as I have no permission to do that. You can give some screenshot of the endpoint creation in portal. I will ask @MaryGao whether we need add "Service Atthention" label to make service team aware this issue.

@kazrael2119 kazrael2119 assigned MaryGao and unassigned qiaozha May 9, 2024
@polinaouk
Copy link
Author

Hello @kazrael2119
Thank you for your response.
I see your point about the swagger. It is just quite unexpected behaviour as all other services in Azure which expose endpoints for example like App service, they create endpoints based on service name.

Additionally, why then is it different through Azure portal? Would really appreciate more clarity on this please.

Please find attached the prt screens below with portal experience:
image

image

@kazrael2119
Copy link
Contributor

kazrael2119 commented May 10, 2024

@polinaouk
In sdk code there's a optional parameter name customSubDomainName
So could you try to use the following code to create a account?

const account: Account = {
                kind:  "OpenAI",
                location: "swedencentral",
                sku: { name: "S0" },
                properties:{
                    customSubDomainName:""
                }
            };

            const openAiAccount = await cognitiveServicesManagementClient.accounts.beginCreateAndWait(
                "myFakeRGName",
                "testMondayoai",
                account,
            );

@polinaouk
Copy link
Author

@kazrael2119 thank you so much for your help! it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cognitive Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants