diff --git a/sdk/ai/azopenai/client_chat_completions_test.go b/sdk/ai/azopenai/client_chat_completions_test.go index 743f884b8d..2fafb15b69 100644 --- a/sdk/ai/azopenai/client_chat_completions_test.go +++ b/sdk/ai/azopenai/client_chat_completions_test.go @@ -300,25 +300,6 @@ func TestClient_GetChatCompletionsStream(t *testing.T) { }) } -func TestClient_GetChatCompletions_InvalidModel(t *testing.T) { - client := newTestClient(t, azureOpenAI.ChatCompletions.Endpoint) - - _, err := client.GetChatCompletions(context.Background(), azopenai.ChatCompletionsOptions{ - Messages: []azopenai.ChatRequestMessageClassification{ - &azopenai.ChatRequestUserMessage{ - Content: azopenai.NewChatRequestUserMessageContent("Count to 100, with a comma between each number and no newlines. E.g., 1, 2, 3, ..."), - }, - }, - MaxTokens: to.Ptr(int32(1024)), - Temperature: to.Ptr(float32(0.0)), - DeploymentName: to.Ptr("invalid model name"), - }, nil) - - var respErr *azcore.ResponseError - require.ErrorAs(t, err, &respErr) - require.Equal(t, "DeploymentNotFound", respErr.ErrorCode) -} - func TestClient_GetChatCompletionsStream_Error(t *testing.T) { if recording.GetRecordMode() == recording.PlaybackMode { t.Skip() diff --git a/sdk/ai/azopenai/client_embeddings_test.go b/sdk/ai/azopenai/client_embeddings_test.go index aae58c156b..e3de190150 100644 --- a/sdk/ai/azopenai/client_embeddings_test.go +++ b/sdk/ai/azopenai/client_embeddings_test.go @@ -12,23 +12,10 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/stretchr/testify/require" ) -func TestClient_GetEmbeddings_InvalidModel(t *testing.T) { - client := newTestClient(t, azureOpenAI.Embeddings.Endpoint) - - _, err := client.GetEmbeddings(context.Background(), azopenai.EmbeddingsOptions{ - DeploymentName: to.Ptr("thisdoesntexist"), - }, nil) - - var respErr *azcore.ResponseError - require.ErrorAs(t, err, &respErr) - require.Equal(t, "DeploymentNotFound", respErr.ErrorCode) -} - func TestClient_GetEmbeddings(t *testing.T) { testFn := func(t *testing.T, epm endpointWithModel) { client := newTestClient(t, epm.Endpoint)