A utility to determine agent model capabilities and infer default operating modes. Use this to configure AI agent behavior based on model features.
// Source: https://github.com/browserbase/stagehand | License: MIT | Copyright 2024 Browserbase Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { AVAILABLE_CUA_MODELS, type AgentToolMode } from "stagehand-v3";
// Mirrors packages/core/lib/v3/types/private/agent.ts. Keep this local until
// core exposes a public model-capability helper.
const HYBRID_CAPABLE_MODEL_PATTERNS = [
"gemini-3",
"claude",
"gpt-5.4",
"gpt-5.5",
"gpt-5.6",
] as const;
export function isCuaCapableModel(modelName: string): boolean {
return (AVAILABLE_CUA_MODELS as readonly string[]).includes(modelName);
}
export function isHybridCapableModel(modelName: string): boolean {
return HYBRID_CAPABLE_MODEL_PATTERNS.some((pattern) => modelName.includes(pattern));
}
export function i
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key