mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
docs: add clarifying comment for URL construction logic
This commit is contained in:
parent
19625b49bb
commit
29174b3494
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue