vibe-tools
Version:
CLI tools for AI agents
61 lines (60 loc) • 2.1 kB
TypeScript
import { z } from 'zod';
export declare const availableModels: z.ZodEnum<{
"gpt-4.1": "gpt-4.1";
o3: "o3";
"gpt-4.1-mini": "gpt-4.1-mini";
"o4-mini": "o4-mini";
"o3-mini": "o3-mini";
"gpt-4o": "gpt-4o";
"claude-3-7-sonnet-latest": "claude-3-7-sonnet-latest";
"gemini-2.5-flash": "gemini-2.5-flash";
"groq-llama-3.3-70b-versatile": "groq-llama-3.3-70b-versatile";
"anthropic/claude-sonnet-4-20250514": "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 {};