This commit is contained in:
shengsuan-cloud committed 2025-12-30 13:45:34 +08:00
commit f6032d9c87
676 files changed
+59829 -15880

No files matched your search

@@ -8,6 +8,7 @@ import { sendMcpMarketplaceCatalogEvent } from "../mcp/subscribeToMcpMarketplace
import { refreshBasetenModels } from "../models/refreshBasetenModels"
import { refreshGroqModels } from "../models/refreshGroqModels"
import { refreshHicapModels } from "../models/refreshHicapModels"
import { refreshLiteLlmModels } from "../models/refreshLiteLlmModels"
import { refreshOpenRouterModels } from "../models/refreshOpenRouterModels"
import { sendOpenRouterModelsEvent } from "../models/subscribeToOpenRouterModels"
@@ -194,6 +195,12 @@ export async function initializeWebview(controller: Controller, _request: EmptyR
}
})
const liteLlmBaseUrl = controller.stateManager.getGlobalSettingsKey("liteLlmBaseUrl")
const liteLlmApiKey = controller.stateManager.getSecretKey("liteLlmApiKey")
if (liteLlmBaseUrl && liteLlmApiKey) {
await refreshLiteLlmModels()
}
// GUI relies on model info to be up-to-date to provide the most accurate pricing, so we need to fetch the latest details on launch.
// We do this for all users since many users switch between api providers and if they were to switch back to openrouter it would be showing outdated model info if we hadn't retrieved the latest at this point
// (see normalizeApiConfiguration > openrouter)