From 29174b34943138cb74ba089f82fd9492cc8c0429 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 25 Aug 2025 00:05:02 +0000 Subject: [PATCH] docs: add clarifying comment for URL construction logic --- src/api/providers/fetchers/requesty.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/providers/fetchers/requesty.ts b/src/api/providers/fetchers/requesty.ts index 7d73519a94..2fa8c1bdb5 100644 --- a/src/api/providers/fetchers/requesty.ts +++ b/src/api/providers/fetchers/requesty.ts @@ -17,6 +17,8 @@ export async function getRequestyModels(baseUrl?: string, apiKey?: string): Prom const resolvedBaseUrl = toRequestyServiceUrl(baseUrl) // Ensure the base URL ends with a slash so "models" is appended correctly + // Without this, new URL("models", "https://custom.requesty.ai/v1") would incorrectly + // resolve to "https://custom.requesty.ai/models" instead of "https://custom.requesty.ai/v1/models" const baseWithSlash = resolvedBaseUrl.endsWith("/") ? resolvedBaseUrl : `${resolvedBaseUrl}/` const modelsUrl = new URL("models", baseWithSlash)