mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Fix
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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")}
|
||||||
|
|||||||
Reference in New Issue
Block a user