Skip to content

feat: support custom OpenAI endpoint and model#35

Open
ITsPro-CN wants to merge 2 commits intoCrystal-Spider:mainfrom
ITsPro-CN:feat/openai-config-support
Open

feat: support custom OpenAI endpoint and model#35
ITsPro-CN wants to merge 2 commits intoCrystal-Spider:mainfrom
ITsPro-CN:feat/openai-config-support

Conversation

@ITsPro-CN
Copy link

No description provided.

Copy link

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

Adds configuration options to allow using a custom OpenAI-compatible endpoint and specifying a custom model ID for AI-generated JSDoc descriptions.

Changes:

  • Extends configuration schema to include generativeEndpoint and generativeModelCustom settings.
  • Updates OpenAI client initialization to accept a configurable baseURL.
  • Allows selecting a “custom” model option and resolving the actual model name from a separate setting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.

File Description
src/extension.ts Relaxes Model typing and extends the configuration interface to include endpoint + custom model fields.
src/GenerativeAPI.ts Introduces baseURL getter and custom model resolution; passes baseURL into the OpenAI SDK client.
package.json Adds VS Code settings for generativeEndpoint and generativeModelCustom, and adds custom to the model enum.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Support other OpenAI endpoint

2 participants

Comments