mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 04:31:27 +08:00
fix(logger): enhance cache check for available providers
This commit is contained in:
parent
7bd6c92f43
commit
759f8518b2
@ -104,9 +104,7 @@ const router = express
|
||||
|
||||
logger.info('Models response ready', {
|
||||
filter,
|
||||
total: response.total
|
||||
})
|
||||
logger.debug('Model IDs returned', {
|
||||
total: response.total,
|
||||
modelIds: response.data.map((m) => m.id)
|
||||
})
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ export async function getAvailableProviders(): Promise<Provider[]> {
|
||||
try {
|
||||
// Try to get from cache first (faster)
|
||||
const cachedSupportedProviders = CacheService.get<Provider[]>(PROVIDERS_CACHE_KEY)
|
||||
if (cachedSupportedProviders) {
|
||||
if (cachedSupportedProviders && cachedSupportedProviders.length > 0) {
|
||||
logger.debug('Providers resolved from cache', {
|
||||
count: cachedSupportedProviders.length
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user