Merge pull request #555 from dairui1/feat/openrouter_base_url

feat: Add openRouterBaseUrl option
This commit is contained in:
Matt Rubens
2025-01-26 00:35:11 -05:00
committed by GitHub
4 changed files with 41 additions and 7 deletions

View File

@@ -27,7 +27,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 || "https://openrouter.ai/api/v1",
apiKey: this.options.openRouterApiKey,
defaultHeaders: {
"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",