import { SubscriptionProviderBase } from './base.js';
import { ZhiPuSubscriptionProvider } from './zhipu.js';
import { MiniMaxSubscriptionProvider } from './minimax.js';
import { AiCodeSubscriptionProvider } from './aicode.js';
const providers = [
    new ZhiPuSubscriptionProvider(),
    new MiniMaxSubscriptionProvider(),
    new AiCodeSubscriptionProvider(),
];
function getProvider(provider) {
    const p = providers.find(p => p.provider === provider);
    if (!p)
        throw new Error(`Unknown subscription provider: ${provider}`);
    return p;
}
export async function fetchQuota(config) {
    return getProvider(config.provider).fetchQuota(config);
}
export { SubscriptionProviderBase, ZhiPuSubscriptionProvider };
//# sourceMappingURL=index.js.map