Utility functions determining if an Anthropic Claude model requires budget thinking or accepts sampling params.
// Source: https://github.com/open-multi-agent/open-multi-agent | License: MIT | Copyright Shenzhen YuanASI Technology Co., Ltd. and open-multi-agent contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
* @fileoverview Claude model-generation checks shared by the Anthropic adapter
* and framework-internal calls. Kept free of the SDK import so callers outside
* the adapter do not load it.
*
* Both lists are closed: they name model generations that will not grow, so a
* model ID they do not recognise is treated as current.
*/
/** Models from before adaptive thinking (Sonnet 3.7 through the 4.5 generation). */
const BUDGET_ONLY_THINKING_MODEL =
/^claude-(?:3-7-sonnet|sonnet-4(?:-0|-5)?|opus-4(?:-0|-1|-5)?|haiku-4-5)(?:-\d{8}|-latest)?$/
/** Models up to
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key