Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created May 8, 2026 20:01
Show Gist options
  • Select an option

  • Save wullemsb/f7195e67bbc8bc6a8191efc2b7cbbbdf to your computer and use it in GitHub Desktop.

Select an option

Save wullemsb/f7195e67bbc8bc6a8191efc2b7cbbbdf to your computer and use it in GitHub Desktop.
wait using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-5.2-codex", // Your deployment name
Provider = new ProviderConfig
{
Type = "openai",
BaseUrl = "https://your-resource.openai.azure.com/openai/v1/",
WireApi = "responses", // Use "completions" for older models
ApiKey = Environment.GetEnvironmentVariable("FOUNDRY_API_KEY"),
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment