Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/providers/fetchers/requesty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function getRequestyModels(baseUrl?: string, apiKey?: string): Prom
}

const resolvedBaseUrl = toRequestyServiceUrl(baseUrl)
const modelsUrl = new URL("models", resolvedBaseUrl)
const modelsUrl = new URL("v1/models", resolvedBaseUrl)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good! Changing to correctly ensures the proper URL construction.

However, I noticed there are no dedicated unit tests for the function. Would it be beneficial to add test coverage for this URL construction logic to prevent regression? This could help ensure the fix continues to work correctly with various base URL formats.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good! Changing to "v1/models" correctly ensures the proper URL construction.

However, I noticed there are no dedicated unit tests for the getRequestyModels function. Would it be beneficial to add test coverage for this URL construction logic to prevent regression? This could help ensure the fix continues to work correctly with various base URL formats.


const response = await axios.get(modelsUrl.toString(), { headers })
const rawModels = response.data.data
Expand Down
Loading