feat: use custom Base URL for OpenRouter model list fetch (#11154)

Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
roomote[bot] 2026-02-02 23:03:47 -05:00 committed by GitHub
parent c5874fc764
commit 67fb150727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ async function fetchModelsFromProvider(options: GetModelsOptions): Promise<Model
switch (provider) {
case "openrouter":
models = await getOpenRouterModels()
models = await getOpenRouterModels({ openRouterBaseUrl: options.baseUrl })
break
case "requesty":
// Requesty models endpoint requires an API key for per-user custom policies.

View file

@ -894,7 +894,7 @@ export const webviewMessageHandler = async (
// Base candidates (only those handled by this aggregate fetcher)
const candidates: { key: RouterName; options: GetModelsOptions }[] = [
{ key: "openrouter", options: { provider: "openrouter" } },
{ key: "openrouter", options: { provider: "openrouter", baseUrl: apiConfiguration.openRouterBaseUrl } },
{
key: "requesty",
options: {