Vgbvcf's picture
download
raw
1.17 kB
import { useSettingsStore } from '@/lib/store/settings';
import {
getThinkingConfigKey,
normalizeThinkingConfig,
supportsConfigurableThinking,
} from '@/lib/ai/thinking-config';
/**
* Get current model configuration from settings store
*/
export function getCurrentModelConfig() {
const { providerId, modelId, providersConfig, thinkingConfigs } = useSettingsStore.getState();
const modelString = `${providerId}:${modelId}`;
// Get current provider's config
const providerConfig = providersConfig[providerId];
const modelInfo = providerConfig?.models.find((model) => model.id === modelId);
const thinking = modelInfo?.capabilities?.thinking;
const thinkingConfig = supportsConfigurableThinking(thinking)
? normalizeThinkingConfig(thinking, thinkingConfigs[getThinkingConfigKey(providerId, modelId)])
: undefined;
return {
providerId,
modelId,
modelString,
apiKey: providerConfig?.apiKey || '',
baseUrl: providerConfig?.baseUrl || '',
providerType: providerConfig?.type,
requiresApiKey: providerConfig?.requiresApiKey,
isServerConfigured: providerConfig?.isServerConfigured,
thinkingConfig,
};
}

Xet Storage Details

Size:
1.17 kB
·
Xet hash:
2388db848149357e2809049367afedd1ded69a9d1598afb726a167713ddb6ee6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.