feat: Add openRouterBaseUrl option

This commit is contained in:
dairui1
2025-01-25 16:48:21 +08:00
parent 7b668277fa
commit 4a75f85eac
4 changed files with 41 additions and 7 deletions

View File

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