This commit is contained in:
Matt Rubens
2025-01-26 00:31:53 -05:00
parent 4a75f85eac
commit 3d5780f44e
2 changed files with 2 additions and 2 deletions

View File

@@ -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",

View File

@@ -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")}