LLMs: Anthropic: support for max effort. #962

This commit is contained in:
Enrico Ros
2026-02-06 14:59:08 -08:00
parent 5b9c6a2d0e
commit a498f28d14
6 changed files with 15 additions and 6 deletions
@@ -136,6 +136,14 @@ export const DModelParameterRegistry = {
// No initialValue - undefined means off (e.g. default 200K context window)
},
llmVndAntEffortMax: { // introduced with Claude Opus 4.6; this adds the 'max' level on top of llmVndAntEffort
label: 'Effort',
type: 'enum' as const,
description: 'Controls thinking depth. max = deepest reasoning with no constraints, high = default.',
values: ['low', 'medium', 'high', 'max'] as const,
// No initialValue - undefined means high effort (default)
} as const,
llmVndAntEffort: {
label: 'Effort',
type: 'enum' as const,
+2 -2
View File
@@ -49,7 +49,7 @@ export function aixCreateModelFromLLMOptions(
// destructure input with the overrides
const {
llmRef, llmTemperature, llmResponseTokens, llmTopP, llmForceNoStream,
llmVndAnt1MContext, llmVndAntSkills, llmVndAntThinkingBudget, llmVndAntWebFetch, llmVndAntWebSearch, llmVndAntEffort,
llmVndAnt1MContext, llmVndAntSkills, llmVndAntThinkingBudget, llmVndAntWebFetch, llmVndAntWebSearch, llmVndAntEffort, llmVndAntEffortMax,
llmVndGeminiAspectRatio, llmVndGeminiImageSize, llmVndGeminiCodeExecution, llmVndGeminiComputerUse, llmVndGeminiGoogleSearch, llmVndGeminiMediaResolution, llmVndGeminiShowThoughts, llmVndGeminiThinkingBudget, llmVndGeminiThinkingLevel, llmVndGeminiThinkingLevel4,
llmVndMoonReasoningEffort, // -> mapped to vndOaiReasoningEffort below
// llmVndMoonshotWebSearch,
@@ -110,7 +110,7 @@ export function aixCreateModelFromLLMOptions(
...(llmVndAntSkills ? { vndAntSkills: llmVndAntSkills } : {}),
...(llmVndAntWebFetch === 'auto' ? { vndAntWebFetch: llmVndAntWebFetch } : {}),
...(llmVndAntWebSearch === 'auto' ? { vndAntWebSearch: llmVndAntWebSearch } : {}),
...(llmVndAntEffort ? { vndAntEffort: llmVndAntEffort } : {}),
...((llmVndAntEffortMax || llmVndAntEffort) ? { vndAntEffort: llmVndAntEffortMax || llmVndAntEffort } : {}),
...(llmVndGeminiAspectRatio ? { vndGeminiAspectRatio: llmVndGeminiAspectRatio } : {}),
...(llmVndGeminiCodeExecution === 'auto' ? { vndGeminiCodeExecution: llmVndGeminiCodeExecution } : {}),
...(llmVndGeminiComputerUse ? { vndGeminiComputerUse: llmVndGeminiComputerUse } : {}),
+1 -1
View File
@@ -451,7 +451,7 @@ export namespace AixWire_API {
// Anthropic
vndAnt1MContext: z.boolean().optional(),
vndAntEffort: z.enum(['low', 'medium', 'high']).optional(),
vndAntEffort: z.enum(['low', 'medium', 'high', 'max']).optional(),
vndAntSkills: z.string().optional(),
vndAntThinkingBudget: z.number().or(z.literal('adaptive')).nullable().optional(),
vndAntToolSearch: z.enum(['regex', 'bm25']).optional(), // Tool Search Tool variant
@@ -847,7 +847,7 @@ export namespace AnthropicWire_API_Message_Create {
* Allows trading off response thoroughness for efficiency (Claude Opus 4.5+ only).
*/
output_config: z.object({
effort: z.enum(['low', 'medium', 'high']).optional(),
effort: z.enum(['low', 'medium', 'high', 'max']).optional(),
}).optional(),
/**
@@ -40,7 +40,7 @@ const _hardcodedAnthropicVariants: ModelVariantMap = {
label: 'Claude Opus 4.6 (Thinking)',
description: 'Claude Opus 4.6 with adaptive thinking mode for the most complex reasoning and agentic workflows',
interfaces: [...IF_4_R, LLM_IF_ANT_ToolsSearch],
parameterSpecs: [...ANT_TOOLS, { paramId: 'llmVndAntThinkingBudget', hidden: true, initialValue: -1 /* adaptive */ }, { paramId: 'llmVndAntEffort' }, { paramId: 'llmVndAnt1MContext' }],
parameterSpecs: [...ANT_TOOLS, { paramId: 'llmVndAntThinkingBudget', hidden: true, initialValue: -1 /* adaptive */ }, { paramId: 'llmVndAntEffortMax' }, { paramId: 'llmVndAnt1MContext' }],
// benchmark: { cbaElo: ... }, // TBD
maxCompletionTokens: 32000,
},
@@ -136,7 +136,7 @@ export const hardcodedAnthropicModels: (ModelDescriptionSchema & { isLegacy?: bo
contextWindow: 200000,
maxCompletionTokens: 128000,
interfaces: [...IF_4, LLM_IF_ANT_ToolsSearch],
parameterSpecs: [...ANT_TOOLS, { paramId: 'llmVndAntEffort' }, { paramId: 'llmVndAnt1MContext' }],
parameterSpecs: [...ANT_TOOLS, { paramId: 'llmVndAntEffortMax' }, { paramId: 'llmVndAnt1MContext' }],
// Note: Tiered pricing - ≤200K: $5/$25, >200K: $10/$37.50 (with 1M context enabled)
// Cache pricing also tiered: write 1.25× input, read 0.10× input
chatPrice: {
@@ -79,6 +79,7 @@ const ModelParameterSpec_schema = z.object({
// Anthropic
'llmVndAnt1MContext',
'llmVndAntEffort',
'llmVndAntEffortMax',
'llmVndAntSkills',
'llmVndAntThinkingBudget',
'llmVndAntWebFetch',