@@ -68,18 +68,44 @@ export function modelAcceptsXhighResponsesEffort(modelId: string): boolean {
6868 return / ^ g p t - 5 \. [ 5 6 ] / i. test ( modelId ) ;
6969}
7070
71+ /**
72+ * Responses-API models whose `reasoning.effort` accepts `'max'` — the tier
73+ * ABOVE `xhigh`, and a Responses-API-only surface (Chat Completions rejects
74+ * `max` for the same family; see {@link CHAT_MAX_EFFORT_MODELS} below).
75+ * Live-probed per entry — record request shape, status, response summary,
76+ * date, and the exact model alias in this comment when adding one.
77+ *
78+ * 2026-08-06 probe (POST /v1/responses, `reasoning: {effort: 'max'}`,
79+ * max_output_tokens 2000): HTTP 200 `status: completed` on `gpt-5.6` (bare
80+ * alias), on `gpt-5.6-sol`, and on `gpt-5.6-sol` WITH function tools
81+ * attached (the agentic shape). Boundary probes the same day: `'ultra'` is
82+ * rejected on both aliases (`Invalid value: 'ultra'. Supported values are:
83+ * 'none', 'minimal', 'low', 'medium', 'high', 'xhigh', and 'max'.`), and
84+ * chat.completions still 400s on `max` for the family. Widen only after a
85+ * fresh Responses probe returns HTTP 200 on the new id.
86+ */
87+ const RESPONSES_MAX_EFFORT_MODELS : readonly string [ ] = [ 'gpt-5.6' ] ;
88+
89+ /** Whether `modelId` is on the probe-verified Responses `max` allow-list. */
90+ export function modelAcceptsMaxResponsesEffort ( modelId : string ) : boolean {
91+ return RESPONSES_MAX_EFFORT_MODELS . some ( ( f ) => modelId . toLowerCase ( ) . startsWith ( f ) ) ;
92+ }
93+
7194/**
7295 * Map the agentos effort scale onto OpenAI's `/v1/responses` `reasoning.effort`
73- * for `modelId`. Identical to {@link mapEffortToOpenAiReasoningEffort} EXCEPT it
74- * caps `xhigh` → `high` for any model NOT on
75- * {@link modelAcceptsXhighResponsesEffort} — a model-aware guard so a request
96+ * for `modelId`. Identical to {@link mapEffortToOpenAiReasoningEffort} EXCEPT:
97+ * `max` passes through as the real `'max'` tier on models probe-verified via
98+ * {@link modelAcceptsMaxResponsesEffort} (elsewhere it clamps to `'xhigh'` as
99+ * before), and `xhigh` caps to `high` for any model NOT on
100+ * {@link modelAcceptsXhighResponsesEffort} — model-aware guards so a request
76101 * for maximum depth degrades one step instead of 400ing the whole Responses
77- * call on a model that rejects `xhigh` .
102+ * call on a model that rejects the tier .
78103 */
79104export function mapEffortToOpenAiResponsesEffort (
80105 modelId : string ,
81106 effort : unknown ,
82107) : string | undefined {
108+ if ( effort === 'max' && modelAcceptsMaxResponsesEffort ( modelId ) ) return 'max' ;
83109 const base = mapEffortToOpenAiReasoningEffort ( effort ) ;
84110 if ( base === undefined ) return undefined ;
85111 return base === 'xhigh' && ! modelAcceptsXhighResponsesEffort ( modelId ) ? 'high' : base ;
0 commit comments