-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix requesty model listing #7378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fix looks good! Changing to However, I noticed there are no dedicated unit tests for the |
||
|
|
||
| const response = await axios.get(modelsUrl.toString(), { headers }) | ||
| const rawModels = response.data.data | ||
|
|
||
There was a problem hiding this comment.
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.