Spaces:
No application file
No application file
File size: 686 Bytes
c20f20c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import { useSettingsStore } from '@/lib/store/settings';
/**
* Get current model configuration from settings store
*/
export function getCurrentModelConfig() {
const { providerId, modelId, providersConfig } = useSettingsStore.getState();
const modelString = `${providerId}:${modelId}`;
// Get current provider's config
const providerConfig = providersConfig[providerId];
return {
providerId,
modelId,
modelString,
apiKey: providerConfig?.apiKey || '',
baseUrl: providerConfig?.baseUrl || '',
providerType: providerConfig?.type,
requiresApiKey: providerConfig?.requiresApiKey,
isServerConfigured: providerConfig?.isServerConfigured,
};
}
|