1- // OpenAI reasoning-effort is a provider- native request knob carried through
1+ // Provider- native request knob carried via
22// InferenceSource.defaults.providerOptions.reasoning_effort: same model,
3- // different latency/cost vs reasoning depth — not a variant or separate model.
3+ // different latency/cost vs reasoning depth, not a variant or separate model.
44
55// Canonical literal set lives in the agent profile contract so schema and
6- // runtime cannot drift; re-exported for callers that already import from here .
6+ // runtime cannot drift; re-exported for existing callers .
77import { REASONING_EFFORTS as CANONICAL_EFFORTS } from "../agent/profile-types.js" ;
88import {
99 DEEPSEEK_V4_EFFORTS ,
@@ -39,7 +39,7 @@ export function normalizeProviderEfforts(
3939 return out ;
4040}
4141
42- // Levels common OpenAI reasoning models (gpt-5, o-series) accept; none/xhigh
42+ // Levels OpenAI reasoning models (gpt-5, o-series) accept; none/xhigh
4343// are gpt-5.1-family-only (see below).
4444const DEFAULT_EFFORTS : readonly ReasoningEffort [ ] = [
4545 "minimal" ,
@@ -49,7 +49,7 @@ const DEFAULT_EFFORTS: readonly ReasoningEffort[] = [
4949] ;
5050
5151// gpt-5.1 family adds `none` (disable reasoning) and `xhigh`; neither is
52- // universal, so an unknown model must not be assumed to take them.
52+ // universal; unknown models are not assumed to take them.
5353const FULL_EFFORT_MODELS : readonly string [ ] = [
5454 "gpt-5.1" ,
5555 "gpt-5.1-codex" ,
@@ -81,12 +81,12 @@ const UNKNOWN_MODEL_EFFORTS: readonly ReasoningEffort[] = [
8181] ;
8282
8383// Muse Spark (Responses protocol) takes minimal–high — DEFAULT_EFFORTS without
84- // `none` (the gateway rejects `reasoning.effort: none` with HTTP 400 ).
84+ // `none` (the gateway 400s `reasoning.effort: none`).
8585const MUSE_SPARK_EFFORTS : readonly ReasoningEffort [ ] = DEFAULT_EFFORTS ;
8686
8787// Prefix match, not an id list: the family ships under ids across two catalogs
88- // and nothing normalizes the model string first. Mirrors the grok/kimi prefix
89- // checks in src/subagent/provider-family.ts.
88+ // and nothing normalizes the model string first. Mirrors the grok/kimi checks
89+ // in src/subagent/provider-family.ts.
9090function isMuseSparkModel ( model : string ) : boolean {
9191 return / ^ m u s e - s p a r k / i. test ( model . trim ( ) ) ;
9292}
@@ -210,9 +210,9 @@ export function validateEffort(
210210
211211/**
212212 * Next effort on the model's ladder (wraps around); undefined when the model
213- * supports none. Walks from resolveSessionEffort: unset or unsupported current
214- * sits on the family default, then the next rung; no default with a non-empty
215- * ladder starts at supported[0].
213+ * supports none. Current effort resolves via resolveSessionEffort (configured
214+ * when accepted, else family default) , then advances one rung; unresolvable
215+ * starts at supported[0].
216216 */
217217export function cycleReasoningEffort (
218218 model : string ,
@@ -246,9 +246,7 @@ export function cycleReasoningEffort(
246246 * Product default effort for a live session model — what the prompt shows and
247247 * Shift+Tab advances from. Distinct from role defaults.
248248 *
249- * Family table: grok* → high; glm-5.3* → max; muse-spark* → low; Codex →
250- * medium; gpt-5.1 chat → none; gpt-5/gpt-6/o1/o3/o4 → medium. Unknown models
251- * stay undefined so we do not invent a family default.
249+ * Unknown models stay undefined so we do not invent a family default.
252250 */
253251export function defaultEffortForModel (
254252 model : string ,
@@ -281,7 +279,7 @@ export function defaultEffortForModel(
281279
282280/**
283281 * Effort the session is on: the configured level when accepted, else the
284- * family default. Read-only — display and request wiring read this .
282+ * family default. Read-only; display and request wiring read it .
285283 */
286284export function resolveSessionEffort (
287285 model : string ,
@@ -351,7 +349,9 @@ export interface ResolveEffortForRoleOpts {
351349 orchestrator : boolean ;
352350 /** Explicit profile inference leg or task-tier pin — highest precedence. */
353351 pin ?: ReasoningEffort ;
354- /** Package modelRole default: replaces the binary orchestrator/leaf default. */
352+ /**
353+ * Package modelRole default: replaces the binary orchestrator/leaf default.
354+ */
355355 roleDefault ?: ReasoningEffort ;
356356 /** Parent session effort, used only when the role default is unsupported. */
357357 parentEffort ?: ReasoningEffort ;
@@ -363,7 +363,7 @@ export interface ResolveEffortForRoleOpts {
363363}
364364
365365/**
366- * Pure cascade used by `resolveEffortForRole`; exported so tests can pin the
366+ * Pure cascade behind `resolveEffortForRole`; exported so tests can pin the
367367 * precedence without per-model supported sets.
368368 *
369369 * Precedence (first match wins):
0 commit comments