import { a as normalizeLowercaseStringOrEmpty } from "./string-coerce-mnp54Vah.js";
import "./string-coerce-runtime-6HjB7EiL.js";
//#region extensions/openrouter/models.ts
const OPENROUTER_MISTRAL_MODEL_PREFIXES = [
	"mistralai/",
	"mistral/",
	"mistral-",
	"codestral-",
	"devstral-",
	"ministral-",
	"mixtral-",
	"pixtral-",
	"voxtral-"
];
const OPENROUTER_MODEL_PREFIX = "openrouter/";
function normalizeOpenRouterModelId(modelId) {
	if (typeof modelId !== "string") return;
	const normalized = normalizeLowercaseStringOrEmpty(modelId);
	return normalized.startsWith(OPENROUTER_MODEL_PREFIX) ? normalized.slice(11) : normalized;
}
function normalizeOpenRouterApiModelId(modelId) {
	if (typeof modelId !== "string") return;
	const normalized = normalizeLowercaseStringOrEmpty(modelId);
	if (!normalized.startsWith(OPENROUTER_MODEL_PREFIX)) return normalized;
	const unprefixed = normalized.slice(11);
	return unprefixed.includes("/") ? unprefixed : normalized;
}
function isOpenRouterMistralModelId(modelId) {
	const normalized = normalizeOpenRouterModelId(modelId);
	return Boolean(normalized && OPENROUTER_MISTRAL_MODEL_PREFIXES.some((prefix) => normalized.startsWith(prefix)));
}
function isOpenRouterDeepSeekV4ModelId(modelId) {
	const normalized = normalizeOpenRouterModelId(modelId);
	if (!normalized?.startsWith("deepseek/")) return false;
	const deepSeekModelId = normalized.slice(9).split(":", 1)[0];
	return deepSeekModelId === "deepseek-v4-flash" || deepSeekModelId === "deepseek-v4-pro";
}
//#endregion
export { normalizeOpenRouterModelId as i, isOpenRouterMistralModelId as n, normalizeOpenRouterApiModelId as r, isOpenRouterDeepSeekV4ModelId as t };
