UNPKG

vibe-tools

Version:
50 lines (49 loc) 1.89 kB
import { z } from 'zod'; export declare const availableModels: z.ZodEnum<["claude-3-7-sonnet-latest", "o3", "o3-mini", "o4-mini", "gpt-4o", "gpt-4.1", "gpt-4.1-mini", "gemini-2.5-flash-preview-04-17", "groq-llama-3.3-70b-versatile", "anthropic/claude-sonnet-4-20250514"]>; export type AvailableModel = z.infer<typeof availableModels>; export interface StagehandConfig { provider: 'anthropic' | 'openai' | 'gemini' | 'openrouter'; headless: boolean; verbose: boolean; debugDom: boolean; enableCaching: boolean; timeout?: number; model?: string; } interface BrowserConfig { headless?: boolean; defaultViewport?: string; timeout?: number; stagehand?: { provider?: string; headless?: boolean; verbose?: boolean; debugDom?: boolean; enableCaching?: boolean; timeout?: number; model?: string; }; } interface Config { browser?: BrowserConfig; } export declare function loadStagehandConfig(config: Config): StagehandConfig; export declare function validateStagehandConfig(config: StagehandConfig): void; export declare function getStagehandApiKey(config: Pick<StagehandConfig, 'provider'>): string; /** * Get the Stagehand model to use based on the following precedence: * 1. Command line option (--model) * 2. Configuration file (vibe-tools.config.json) * 3. Default model based on provider (claude-sonnet-4-20250514 for Anthropic, o3-mini for OpenAI) * * If both command line and config models are invalid, falls back to the default model for the provider. * * @param config The Stagehand configuration * @param options Optional command line options * @returns The model to use */ export declare function getStagehandModel(config: StagehandConfig, options?: { model: string | undefined; provider: StagehandConfig['provider'] | undefined; }): AvailableModel; export {};