File tree Expand file tree Collapse file tree
webview-ui/src/components/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ const ApiOptions = ({
118118 )
119119
120120 const { selectedProvider, selectedModelId, selectedModelInfo } = useMemo ( ( ) => {
121- const result = normalizeApiConfiguration ( apiConfiguration )
121+ const result = normalizeApiConfiguration ( apiConfiguration , pearAiModels )
122122 if ( result . selectedProvider === "pearai" ) {
123123 return {
124124 ...result ,
@@ -1503,7 +1503,10 @@ export function getOpenRouterAuthUrl(uriScheme?: string) {
15031503 return `https://openrouter.ai/auth?callback_url=${ uriScheme || "vscode" } ://rooveterinaryinc.roo-cline/openrouter`
15041504}
15051505
1506- export function normalizeApiConfiguration ( apiConfiguration ?: ApiConfiguration ) {
1506+ export function normalizeApiConfiguration (
1507+ apiConfiguration ?: ApiConfiguration ,
1508+ pearAiModelsQuery ?: Record < string , ModelInfo > ,
1509+ ) {
15071510 const provider = apiConfiguration ?. apiProvider || "anthropic"
15081511 const modelId = apiConfiguration ?. apiModelId
15091512
@@ -1591,7 +1594,7 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration) {
15911594 } ,
15921595 }
15931596 case "pearai" : {
1594- return getProviderData ( pearAiModels , pearAiDefaultModelId )
1597+ return getProviderData ( pearAiModelsQuery || pearAiModels , pearAiDefaultModelId )
15951598 }
15961599 default :
15971600 return getProviderData ( anthropicModels , anthropicDefaultModelId )
You can’t perform that action at this time.
0 commit comments