Skip to content

Enable Azure OpenAI during setup#12

Merged
PatrickRuddiman merged 2 commits intomainfrom
codex/add-user-choice-for-azure-openai-service
Jul 20, 2025
Merged

Enable Azure OpenAI during setup#12
PatrickRuddiman merged 2 commits intomainfrom
codex/add-user-choice-for-azure-openai-service

Conversation

@PatrickRuddiman
Copy link
Owner

Summary

  • add Azure.AI.OpenAI dependency
  • allow choosing Azure OpenAI in the setup wizard
  • store UseAzureOpenAI flag in configuration
  • support Azure OpenAI endpoints in the service
  • mention Azure setup in README
  • clarify CLI help text for Azure usage

Testing

  • dotnet build WriteCommit.csproj
  • dotnet test Write-Commit.sln
  • attempted a live call with provided Azure endpoint, but it returned HTTP 404 (DeploymentNotFound)

https://chatgpt.com/codex/tasks/task_e_687a849a9208832a8784af6aa57b22c1

This comment was marked as outdated.

@PatrickRuddiman PatrickRuddiman requested a review from Copilot July 19, 2025 18:23
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 adds Azure OpenAI support to the WriteCommit tool, enabling users to choose between standard OpenAI and Azure OpenAI services during setup. The changes maintain backward compatibility while extending the tool's flexibility for enterprise users who prefer Azure's OpenAI implementation.

Key changes:

  • Added Azure OpenAI SDK dependency and configuration support
  • Enhanced setup wizard to allow choosing between OpenAI and Azure OpenAI
  • Updated service layer to handle both OpenAI and Azure OpenAI clients

Reviewed Changes

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

Show a summary per file
File Description
WriteCommit.csproj Adds Azure.AI.OpenAI package dependency
Services/OpenAIService.cs Implements Azure OpenAI client support with factory method
Services/ConfigurationService.cs Extends setup wizard and configuration to support Azure OpenAI
README.md Updates documentation to mention Azure OpenAI support
Program.cs Updates CLI help text to reflect Azure OpenAI support
Models/AppConfiguration.cs Adds UseAzureOpenAI configuration property
Comments suppressed due to low confidence (1)

Services/ConfigurationService.cs:37

  • The line has formatting issues with inconsistent spacing and alignment. Run dotnet csharpier format Services/ConfigurationService.cs to fix the formatting.
        catch

ChatClient testClient;
if (useAzure)
{
var azureClient = new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(endpoint), new ApiKeyCredential(apiKey));
Copy link

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

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

The line has formatting issues with inconsistent spacing and alignment. Run dotnet csharpier format Services/ConfigurationService.cs to fix the formatting.

Copilot generated this review using guidance from repository custom instructions.
{
if (_useAzure)
{
var azureClient = new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(_endpoint), new ApiKeyCredential(_apiKey));
Copy link

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

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

The line has formatting issues with inconsistent spacing and alignment. Run dotnet csharpier format Services/OpenAIService.cs to fix the formatting.

Copilot generated this review using guidance from repository custom instructions.
@PatrickRuddiman PatrickRuddiman merged commit 82412c5 into main Jul 20, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments