import { OpenAIModels } from "../openai/Models.js";
import { OllamaCapabilities } from "./Capabilities.js";
export class OllamaModels extends OpenAIModels {
    getProviderName() {
        return "ollama";
    }
    formatDisplayName(modelId) {
        const model = OllamaCapabilities.findModel(modelId);
        if (model?.name && model.name !== modelId)
            return model.name;
        const baseId = modelId.split(":")[0] || modelId;
        return baseId.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
    }
    getContextWindow(modelId) {
        return OllamaCapabilities.getContextWindow(modelId);
    }
    getCapabilities(modelId) {
        const model = OllamaCapabilities.findModel(modelId);
        if (model)
            return model.capabilities;
        // Fallback for custom pulled models
        const caps = ["streaming"];
        if (OllamaCapabilities.supportsTools(modelId))
            caps.push("tools");
        if (OllamaCapabilities.supportsVision(modelId))
            caps.push("vision");
        if (OllamaCapabilities.supportsEmbeddings(modelId))
            caps.push("embeddings");
        return caps;
    }
}
