//#region src/utils/providers.ts
const PROVIDER_PATTERNS = [
	[/^gpt-|^o[1-9]|^dall-e|^text-embedding|^whisper|^tts/i, "openai"],
	[/^claude/i, "anthropic"],
	[/^gemini|^palm/i, "gemini"],
	[/^mistral|^codestral|^open-mistral|^pixtral/i, "mistral"],
	[/^command|^embed-/i, "cohere"],
	[/^amazon\.|^titan/i, "amazon"],
	[/^llama|^meta\./i, "meta"],
	[/^jamba|^ai21\./i, "ai21"],
	[/^deepseek/i, "deepseek"]
];
/**
* Try to infer provider from model name patterns.
* Returns undefined if no pattern matches (unlike the public API which defaults to 'openai').
*/
function tryInferProviderFromModel(modelName) {
	for (const [pattern, provider] of PROVIDER_PATTERNS) if (pattern.test(modelName)) return provider;
}
function inferProviderFromModel(modelName) {
	return tryInferProviderFromModel(modelName) ?? "openai";
}

//#endregion
export { inferProviderFromModel, tryInferProviderFromModel };
//# sourceMappingURL=providers.js.map