feat(openai): Add Config Option to Overwrite OpenAI's API Base#3066
Conversation
|
| onInput={handleInputChange("openAiNativeBaseUrl")} | ||
| placeholder={t("settings:placeholders.baseUrl")} | ||
| className="w-full"> | ||
| <label className="block font-medium mb-1">{t("settings:providers.openAiBaseUrl")}</label> |
There was a problem hiding this comment.
For the openai-native provider, the text field uses the translation key settings:providers.openAiBaseUrl which is also used by the regular OpenAI provider. Consider using a more specific key (e.g., settings:providers.openAiNativeBaseUrl) to clearly differentiate the native API base URL from the standard one.
| <label className="block font-medium mb-1">{t("settings:providers.openAiBaseUrl")}</label> | |
| <label className="block font-medium mb-1">{t("settings:providers.openAiNativeBaseUrl")}</label> |
This comment was generated because it violated a code review rule: mrule_JLtLS6tLppVEv8iV.
|
|
||
| {selectedProvider === "openai-native" && ( | ||
| <> | ||
| <VSCodeTextField |
There was a problem hiding this comment.
Can we make this behind a checkbox like we do for Anthropic, OpenRouter, etc?
There was a problem hiding this comment.
Okay, I believe it will be more user-friendly.
|
There is an API Provider name 'OpenAI Compatible' which allows custom base URL. Doesn't that solve this use case? |
I don't want to speak for @GOODBOY008, but in some cases it's hard to support different native OpenAI models like o1, o3, and o4-mini with the checkboxes that are provided in the OpenAI-compatible provider. |
…deInc#3066) * feat(openai): Add Config Option to Overwrite OpenAI's API Base * feat(openai): Add option to use custom base URL for OpenAI native API
Context
Add Config Option to Overwrite OpenAI's API Base #3052
Description:
It would be beneficial to add a configuration option that allows users to overwrite the OpenAI API base.
Use Case:
Users facing issues with OpenAI's regional restrictions, where the default API base may not be accessible due to geo-blocking or other limitations.
Screenshots
|
How to Test
Get in Touch
Important
Adds
openAiNativeBaseUrlconfiguration option to overwrite OpenAI's API base URL, updating relevant schemas, models, and UI components.openAiNativeBaseUrltoproviderSettingsSchemainroo-code.tsandschemas/index.ts.OpenAiNativeHandlerinopenai-native.tsto useopenAiNativeBaseUrlfor API client initialization.ApiOptionsinApiOptions.tsxto include a text field foropenAiNativeBaseUrlwhenopenai-nativeis selected.openAiNativeBaseUrltoProviderSettingsinroo-code.d.tsandtypes.ts.providerSettingsRecordinroo-code.tsandschemas/index.tsto includeopenAiNativeBaseUrl.This description was created by
for b3c7be7. You can customize this summary. It will automatically update as commits are pushed.