import { getRegisteredModelDefinition, listModelDefinitions as listRegisteredModelDefinitions } from '../lib/providers';
const FALLBACK_MODEL_DEFINITIONS = {};
const resolveDefinition = (providerId) => {
    return getRegisteredModelDefinition(providerId) ?? FALLBACK_MODEL_DEFINITIONS[providerId];
};
export const listModelProviderDefinitions = () => {
    const registered = listRegisteredModelDefinitions();
    if (registered.length > 0) {
        return registered;
    }
    return Object.values(FALLBACK_MODEL_DEFINITIONS).filter(Boolean);
};
export const getProviderDefinition = (providerId) => {
    return resolveDefinition(providerId);
};
export const getProviderDisplayName = (providerId) => {
    return resolveDefinition(providerId)?.displayName ?? providerId;
};
export const getDefaultModelTemplate = (providerId) => {
    return resolveDefinition(providerId)?.defaultModelTemplate;
};
