vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Add support for Custom Model to OpenAI settings

Open cmgriffing opened this issue 1 year ago • 4 comments


Description

This PR adds a new setting to VSCode in the AI section for a custom model name to be sent to an OpenAI-compatible API. A larger PR was in the works until I realized that the existing custom URL functionality would work.

Closes #3223

Checklist

  • [x] I have followed the guidelines in the Contributing document
  • [x] My changes follow the coding style of this project
  • [x] My changes build without any errors or warnings
  • [x] My changes have been formatted and linted
  • [ ] My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • [x] My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • [x] My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

cmgriffing avatar Apr 10 '24 01:04 cmgriffing

I have not made any changes to the CHANGELOG or README, yet. I am happy to do so after we have agreed on the approach in this PR.

I have a different version of this PR that adds a CustomProvider class, but after some thought, it might not be necessary since the custom URL for OpenAI is very close to working with any server (not just Azure).

cmgriffing avatar Apr 10 '24 01:04 cmgriffing

@SpaceMerlin33 Do you mind taking a look at this?

cmgriffing-at-gitkraken avatar May 06 '24 19:05 cmgriffing-at-gitkraken

@trevor-polidore Let me know what you think.

cmgriffing-at-gitkraken avatar May 17 '24 19:05 cmgriffing-at-gitkraken

@cmgriffing There have been significant changes to the AI providers, can you adapt this to the new model?

eamodio avatar May 18 '24 18:05 eamodio