-
Notifications
You must be signed in to change notification settings - Fork 961
Fix openrouter custom base url Issue [#2181] #2188
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
base: main
Are you sure you want to change the base?
Changes from all commits
1acf5da
64b7e23
4812986
9a13ac7
84b4cd2
7077ad6
44462a3
fbbe0ec
653b887
b87b0d5
c1a1b00
cf9b796
77091e8
64fb474
f4c5be5
8d6390e
86b5575
1bb7620
cd85365
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 |
---|---|---|
|
@@ -79,8 +79,12 @@ export const useModelProviders = (kilocodeDefaultModel: string, apiConfiguration | |
: provider === "openrouter" | ||
? (apiConfiguration?.openRouterModelId ?? openRouterDefaultModelId) | ||
: undefined, | ||
provider === "openrouter" ? apiConfiguration?.openRouterBaseUrl : undefined, | ||
apiConfiguration?.apiKey, | ||
provider === "openrouter" || provider === "kilocode" ? apiConfiguration?.openRouterBaseUrl : undefined, | ||
provider === "openrouter" | ||
? apiConfiguration?.apiKey | ||
: provider === "kilocode" | ||
? apiConfiguration?.kilocodeToken | ||
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. Why was this change made? I don't think it is correct, because the Kilo Code provider doesn't have this endpoint (yet at least). 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. yes want to reuse max code but i guess it's not good because kilo code provider don't need custom ! sorry |
||
: undefined, | ||
apiConfiguration?.kilocodeOrganizationId ?? "personal", | ||
) | ||
} | ||
|
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.
Should the api key also be specified here?
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.
not for openrouter who don't need apikey to fetch model list => https://openrouter.ai/api/v1/models work on browser
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.
ok, but the same is true for getModelEndpoints isn't it?
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.
yes ! https://openrouter.ai/api/v1/models/deepseek/deepseek-r1/endpoints answer without apikey