Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deploymen
export async function main(): Promise<void> {
// Create AI Project client
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
const openAIClient = await project.getOpenAIClient();
const openAIClient = await project.getAzureOpenAIClient();
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

This change introduces a bug. The AIProjectClient class does not have a getAzureOpenAIClient() method. The correct method is getOpenAIClient(), which is defined in sdk/ai/ai-projects/src/aiProjectClient.ts at line 127.

Other samples in the same directory (e.g., agentCodeInterpreter.ts, agentFunctionTool.ts) correctly use getOpenAIClient(). This change should be reverted to use await project.getOpenAIClient() instead.

Suggested change
const openAIClient = await project.getAzureOpenAIClient();
const openAIClient = await project.getOpenAIClient();

Copilot uses AI. Check for mistakes.

// Create agent
console.log("Creating agent...");
Expand Down
Loading