"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = require("../../src/types");
const pricing_1 = require("../../src/clients/pricing");
describe("Model Pricing Coverage", () => {
    const nonTextModels = new Set([
        ...types_1.GoogleImageModels,
        ...types_1.GoogleVideoModels,
        ...types_1.GoogleTTSModels,
        ...types_1.OpenAiImageModels,
        ...types_1.OpenAiVideoModels,
        ...types_1.OpenAiTTSModels,
        ...types_1.OpenAiTranscriptionModels,
        ...types_1.OpenAiRealtimeModels,
        ...types_1.XaiImageModels,
        ...types_1.XaiVideoModels,
        types_1.Models.google.Gemini_20_Flash_Live,
    ]);
    const allTextPricing = {
        ...pricing_1.OpenAiTextPricing,
        ...pricing_1.GeminiTextPricing,
        ...pricing_1.AnthropicTextPricing,
        ...pricing_1.XaiTextPricing,
    };
    describe("Text completion models have pricing", () => {
        for (const [provider, providerModels] of Object.entries(types_1.Models)) {
            for (const [modelKey, modelId] of Object.entries(providerModels)) {
                if (nonTextModels.has(modelId)) {
                    continue;
                }
                it(`${provider}.${modelKey} (${modelId}) has text pricing`, () => {
                    const entry = allTextPricing[modelId];
                    expect(entry).toBeDefined();
                    expect(entry).toEqual(expect.objectContaining({ input: expect.any(Number) }));
                });
            }
        }
    });
    describe("Embedding models have pricing", () => {
        const allEmbeddingPricing = {
            ...pricing_1.OpenAiTextPricing,
            ...pricing_1.GeminiTextPricing,
        };
        for (const [provider, providerModels] of Object.entries(types_1.EmbeddingModels)) {
            for (const [modelKey, modelId] of Object.entries(providerModels)) {
                it(`EmbeddingModels.${provider}.${modelKey} (${modelId}) has pricing`, () => {
                    const entry = allEmbeddingPricing[modelId];
                    expect(entry).toBeDefined();
                });
            }
        }
    });
    describe("XAI image models have image pricing", () => {
        const xaiImagePricing = pricing_1.XaiImagePricing;
        for (const modelId of types_1.XaiImageModels) {
            it(`XAI image model (${modelId}) has image pricing`, () => {
                const entry = xaiImagePricing[modelId];
                expect(entry).toBeDefined();
            });
        }
    });
    describe("XAI video models have video pricing", () => {
        const xaiVideoPricing = pricing_1.XaiVideoPricing;
        for (const modelId of types_1.XaiVideoModels) {
            it(`XAI video model (${modelId}) has video pricing`, () => {
                const entry = xaiVideoPricing[modelId];
                expect(entry).toBeDefined();
            });
        }
    });
    describe("Google image models have pricing", () => {
        const geminiPricing = pricing_1.GeminiTextPricing;
        for (const modelId of types_1.GoogleImageModels) {
            it(`Google image model (${modelId}) has pricing in GeminiTextPricing`, () => {
                const entry = geminiPricing[modelId];
                expect(entry).toBeDefined();
            });
        }
    });
    describe("Google video models have pricing", () => {
        const geminiPricing = pricing_1.GeminiTextPricing;
        for (const modelId of types_1.GoogleVideoModels) {
            it(`Google video model (${modelId}) has pricing in GeminiTextPricing`, () => {
                const entry = geminiPricing[modelId];
                expect(entry).toBeDefined();
            });
        }
        describe("Model Catalog Coverage", () => {
            const catalogIds = new Set(pricing_1.ALL_MODEL_CATALOG.map((m) => m.id));
            describe("All Models.* entries are in the catalog", () => {
                for (const [provider, providerModels] of Object.entries(types_1.Models)) {
                    for (const [modelKey, modelId] of Object.entries(providerModels)) {
                        it(`Models.${provider}.${modelKey} (${modelId}) is in ALL_MODEL_CATALOG`, () => {
                            expect(catalogIds.has(modelId)).toBe(true);
                        });
                    }
                }
            });
            describe("All EmbeddingModels.* entries are in the catalog", () => {
                for (const [provider, providerModels] of Object.entries(types_1.EmbeddingModels)) {
                    for (const [modelKey, modelId] of Object.entries(providerModels)) {
                        it(`EmbeddingModels.${provider}.${modelKey} (${modelId}) is in ALL_MODEL_CATALOG`, () => {
                            expect(catalogIds.has(modelId)).toBe(true);
                        });
                    }
                }
            });
        });
    });
});
//# sourceMappingURL=pricing.test.js.map