import { ModelRegistry } from "../../models/ModelRegistry.js";
export class OpenRouterCapabilities {
    static findModel(model) {
        return ModelRegistry.find(model, "openrouter");
    }
    static supportsVision(model) {
        const info = this.findModel(model);
        if (info)
            return info.capabilities.includes("vision") || info.modalities.input.includes("image");
        // Fallback heuristics
        return (model.includes("vision") ||
            model.includes("gpt-4o") ||
            model.includes("claude-3") ||
            model.includes("gemini-1.5") ||
            model.includes("gemini-2.0") ||
            model.includes("flash") ||
            model.includes("gemini-pro-vision"));
    }
    static supportsTools(model) {
        const info = this.findModel(model);
        if (info)
            return info.capabilities.includes("tools") || info.capabilities.includes("function_calling");
        // Fallback: Default to true for OpenRouter as most models support tools
        // but this is the "honest" check we wanted.
        return true;
    }
    static supportsStructuredOutput(model) {
        const info = this.findModel(model);
        if (info)
            return info.capabilities.includes("structured_output") || info.id.includes("gpt-4");
        // Fallback heuristics
        return model.includes("gpt-4") || model.includes("gpt-3.5") || model.includes("claude-3");
    }
    static supportsEmbeddings(model) {
        const info = this.findModel(model);
        if (info)
            return info.capabilities.includes("embeddings");
        // Fallback heuristics
        return model.includes("embedding") || model.includes("text-sdk");
    }
    static supportsImageGeneration(_model) {
        return false;
    }
    static supportsTranscription(_model) {
        return false;
    }
    static supportsModeration(_model) {
        return false;
    }
    static supportsReasoning(model) {
        const info = this.findModel(model);
        if (info)
            return info.capabilities.includes("reasoning");
        // Fallback heuristics
        return (model.includes("o1") ||
            model.includes("o3") ||
            model.includes("deepseek-r1") ||
            model.includes("qwq"));
    }
    static getContextWindow(model) {
        const info = this.findModel(model);
        return info?.context_window ?? null;
    }
}
