@@ -61,6 +61,30 @@ const UNKNOWN_MODEL_EFFORTS: readonly ReasoningEffort[] = [
6161 "high" ,
6262] ;
6363
64+ // Muse Spark (Responses protocol) accepts minimal through high. Not `none` —
65+ // the gateway rejects it with HTTP 400 on `reasoning.effort`. Measured on
66+ // muse-spark-1.3-contributor and muse-spark-1.2-contributor via the Go
67+ // endpoint and muse-spark-1.3-contributor-free via Zen: `minimal` returns 200
68+ // and `none` returns 400 on all three. See CL-7867.
69+ const MUSE_SPARK_EFFORTS : readonly ReasoningEffort [ ] = [
70+ "minimal" ,
71+ "low" ,
72+ "medium" ,
73+ "high" ,
74+ ] ;
75+
76+ // Matched by prefix, not by an id list. The family ships under five ids across
77+ // two catalogs — `muse-spark-1.3-contributor` / `-1.2-contributor` in
78+ // packages/opencode-go, and `muse-spark-1.3` / `-1.2` /
79+ // `-1.3-contributor-free` in packages/zen — and nothing normalizes the model
80+ // string before it reaches here. An exact list silently missed three of them
81+ // and left the ladder at the unknown-model default. The `/^.../i` + `trim()`
82+ // shape mirrors the grok/kimi prefix checks in
83+ // src/subagent/provider-family.ts.
84+ function isMuseSparkModel ( model : string ) : boolean {
85+ return / ^ m u s e - s p a r k / i. test ( model . trim ( ) ) ;
86+ }
87+
6488// grok-4.6 accepts xhigh; grok-4.5 and composer stay on the unknown-model subset.
6589const GROK_46_EFFORTS : readonly ReasoningEffort [ ] = [
6690 "low" ,
@@ -143,6 +167,9 @@ export function supportedEfforts(
143167 if ( GLM_53_MODELS . includes ( model ) ) {
144168 return [ ...GLM_53_EFFORTS ] ;
145169 }
170+ if ( isMuseSparkModel ( model ) ) {
171+ return [ ...MUSE_SPARK_EFFORTS ] ;
172+ }
146173 return [ ...UNKNOWN_MODEL_EFFORTS ] ;
147174}
148175
@@ -196,7 +223,7 @@ export function cycleReasoningEffort(
196223 * (`defaultEffortForDirector`): this is what the prompt shows and what Shift+Tab
197224 * advances from when the operator has not picked a level.
198225 *
199- * Family table: grok* → high; glm-5.3* → max; Codex → medium; gpt-5.1 chat (`none` on the
226+ * Family table: grok* → high; glm-5.3* → max; muse-spark* → low; Codex → medium; gpt-5.1 chat (`none` on the
200227 * ladder, not Codex) → none; gpt-5/gpt-6/o1/o3/o4 → medium. Unknown models with a
201228 * conservative rung set stay undefined so we do not invent a family default.
202229 */
@@ -210,6 +237,7 @@ export function defaultEffortForModel(
210237 supported . includes ( desired ) ? desired : undefined ;
211238 if ( model . startsWith ( "grok" ) ) return pick ( "high" ) ;
212239 if ( GLM_53_MODELS . includes ( model ) ) return pick ( "max" ) ;
240+ if ( isMuseSparkModel ( model ) ) return pick ( "low" ) ;
213241 if ( ! isCodex && supported . includes ( "none" ) ) return "none" ;
214242 if ( isCodex || isKnownOpenAIReasoningModel ( model ) ) return pick ( "medium" ) ;
215243 return undefined ;
0 commit comments