import { BestAgentError } from "@best-agent/foundation";
import { AnthropicSdkProvider } from "./anthropic-provider.js";
import { GoogleSdkProvider } from "./google-provider.js";
import { OpenAiSdkProvider } from "./openai-provider.js";
import { getProviderCapabilities, getProviderFamily, normalizeProviderConfig, } from "./provider-metadata.js";
export * from "./provider-core.js";
export * from "./provider-action-controls.js";
export { AnthropicSdkProvider, GoogleSdkProvider, OpenAiSdkProvider };
export { getProviderCapabilities };
export function createModelProvider(config) {
    const normalizedConfig = normalizeProviderConfig(config);
    switch (getProviderFamily(normalizedConfig.kind)) {
        case "openai-compatible":
            return new OpenAiSdkProvider(normalizedConfig);
        case "anthropic":
            return new AnthropicSdkProvider(normalizedConfig);
        case "google":
            return new GoogleSdkProvider(normalizedConfig);
        default:
            throw new BestAgentError("PROVIDER_NOT_SUPPORTED", `Provider ${String(normalizedConfig.kind)} is not supported.`);
    }
}
//# sourceMappingURL=model-provider.js.map