Matt Rubens 11 месяцев назад
Родитель
Сommit
3d5780f44e
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/api/providers/openrouter.ts
  2. 1 1
      webview-ui/src/components/settings/ApiOptions.tsx

+ 1 - 1
src/api/providers/openrouter.ts

@@ -26,7 +26,7 @@ export class OpenRouterHandler implements ApiHandler, SingleCompletionHandler {
 	constructor(options: ApiHandlerOptions) {
 	constructor(options: ApiHandlerOptions) {
 		this.options = options
 		this.options = options
 		this.client = new OpenAI({
 		this.client = new OpenAI({
-			baseURL: this.options.openRouterBaseUrl,
+			baseURL: this.options.openRouterBaseUrl || "https://openrouter.ai/api/v1",
 			apiKey: this.options.openRouterApiKey,
 			apiKey: this.options.openRouterApiKey,
 			defaultHeaders: {
 			defaultHeaders: {
 				"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",
 				"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",

+ 1 - 1
webview-ui/src/components/settings/ApiOptions.tsx

@@ -330,7 +330,7 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage }: ApiOptionsProps) =
 
 
 					{openRouterBaseUrlSelected && (
 					{openRouterBaseUrlSelected && (
 						<VSCodeTextField
 						<VSCodeTextField
-							value={apiConfiguration?.openRouterBaseUrl || "https://openrouter.ai/api/v1"}
+							value={apiConfiguration?.openRouterBaseUrl || ""}
 							style={{ width: "100%", marginTop: 3 }}
 							style={{ width: "100%", marginTop: 3 }}
 							type="url"
 							type="url"
 							onInput={handleInputChange("openRouterBaseUrl")}
 							onInput={handleInputChange("openRouterBaseUrl")}