import { describe, expect, expectTypeOf, it } from "vitest";
import * as Stagehand from "@browserbasehq/stagehand";
describe("LLM and Agents public API types", () => {
    describe("AISdkClient", () => {
        it("is exported", () => {
            expect(Stagehand.AISdkClient).toBeDefined();
        });
        it("extends LLMClient", () => {
            expectTypeOf().toExtend();
        });
        it("constructor accepts model parameter", () => {
            expectTypeOf().toEqualTypeOf();
        });
    });
    describe("AVAILABLE_CUA_MODELS", () => {
        const expectedModels = [
            "openai/computer-use-preview",
            "openai/computer-use-preview-2025-03-11",
            "anthropic/claude-3-7-sonnet-latest",
            "anthropic/claude-opus-4-5-20251101",
            "anthropic/claude-opus-4-6",
            "anthropic/claude-sonnet-4-6",
            "anthropic/claude-haiku-4-5-20251001",
            "anthropic/claude-sonnet-4-20250514",
            "anthropic/claude-sonnet-4-5-20250929",
            "google/gemini-2.5-computer-use-preview-10-2025",
            "google/gemini-3-flash-preview",
            "google/gemini-3-pro-preview",
            "microsoft/fara-7b",
        ];
        it("AvailableCuaModel matches the known literals", () => {
            expectTypeOf().toEqualTypeOf();
            void expectedModels; // Mark as used to satisfy ESLint
        });
    });
    describe("AgentProvider", () => {
        it("is exported", () => {
            expect(Stagehand.AgentProvider).toBeDefined();
        });
        it("has getClient method", () => {
            expectTypeOf().toBeCallableWith("test-model");
        });
        it("constructor accepts logger parameter", () => {
            expectTypeOf().toEqualTypeOf();
        });
    });
    describe("AnnotatedScreenshotText", () => {
        it("is a string literal", () => {
            expectTypeOf().toExtend();
        });
    });
    describe("ConsoleMessage", () => {
        it("has correct public interface shape", () => {
            expectTypeOf().toExtend();
        });
    });
    describe("AgentClient", () => {
        it("getClient returns object with expected methods", () => {
            expectTypeOf().toExtend();
        });
    });
    describe("LLMClient", () => {
        it("has correct public interface shape", () => {
            expectTypeOf().toExtend();
        });
        it("constructor parameters match expected signature", () => {
            expectTypeOf().toEqualTypeOf();
        });
        it("createChatCompletion can be called with basic options", () => {
            expectTypeOf().toBeCallableWith({
                options: {
                    messages: [
                        {
                            role: "user",
                            content: "Hello",
                        },
                    ],
                },
                logger: () => { },
            });
        });
        it("createChatCompletion can be called with response_model", () => {
            const mockSchema = {};
            expectTypeOf().toBeCallableWith({
                options: {
                    messages: [
                        {
                            role: "user",
                            content: "Extract data",
                        },
                    ],
                    response_model: {
                        name: "extracted",
                        schema: mockSchema,
                    },
                },
                logger: () => { },
            });
        });
        it("createChatCompletion supports generic return type", () => {
            expectTypeOf().toExtend();
        });
        it("has additional methods", () => {
            // These methods exist on LLMClient but have complex signatures from the 'ai' library
            // We verify they exist by checking they're functions
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
            expectTypeOf().toExtend();
        });
    });
    describe("modelToAgentProviderMap", () => {
        it("only stores valid provider types", () => {
            expectTypeOf().toExtend();
        });
    });
    describe("Response", () => {
        it("has correct public interface shape", () => {
            expectTypeOf().toExtend();
        });
    });
});
//# sourceMappingURL=llm-and-agents.test.js.map