Skip to content

Add endpoint defaults and optional key#9

Merged
PatrickRuddiman merged 1 commit intomainfrom
codex/remove-cli-pattern-config-and-add-openai-endpoint/model
Jul 1, 2025
Merged

Add endpoint defaults and optional key#9
PatrickRuddiman merged 1 commit intomainfrom
codex/remove-cli-pattern-config-and-add-openai-endpoint/model

Conversation

@PatrickRuddiman
Copy link
Owner

Summary

  • allow the API key to be empty and remove strict sk- validation
  • document that API keys are optional and setup config handles endpoint/model

Testing

  • dotnet build Write-Commit.sln --no-restore

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

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 introduces changes to support an optional API key and configurable endpoint for the OpenAI integration. Key updates include:

  • Updating the OpenAIService and ConfigurationService to accept an optional API key and allow endpoint/default model configuration.
  • Adjusting the command-line interface in Program.cs and documentation in README.md to reflect the new behavior.
  • Adding a new property for the API endpoint in the AppConfiguration model.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Services/OpenAIService.cs Updates to accept an optional API key and use a configurable endpoint.
Services/ConfigurationService.cs Adjustments to prompts and saving configuration for endpoint/model.
README.md Documentation changes reflecting the optional API key and new settings.
Program.cs Removal of the pattern option and integration of new configuration.
Models/AppConfiguration.cs Addition of a new property for the OpenAI endpoint.
Comments suppressed due to low confidence (1)

Services/OpenAIService.cs:18

  • The PR description states that the API key should be optional, but the constructor still throws an exception when the API key is null or empty. Consider updating or removing this check to align with the intended behavior.
        if (string.IsNullOrEmpty(apiKey))

@PatrickRuddiman PatrickRuddiman merged commit 7f59127 into main Jul 1, 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