@@ -277,30 +277,29 @@ fn official_claude_section() -> AgentModelSection {
277277 options : vec ! [
278278 // Fable 5 leads the list as the most capable pick, but it burns
279279 // limits ~2x faster than Opus — `useEnsureDefaultModel` therefore
280- // pins the app default to the `default` ( Opus) entry below, NOT
280+ // pins the app default to the Opus 4.8 entry below, NOT
281281 // to options[0]. No fast mode (Opus 4.6+ only).
282282 claude_model(
283283 "claude-fable-5[1m]" ,
284284 "Fable 5 1M" ,
285285 & [ "low" , "medium" , "high" , "xhigh" , "max" ] ,
286286 false ,
287287 ) ,
288- // `default` resolves to the newest Opus the bundled claude-code
289- // knows about — 2.1.170 maps it to Opus 4.8 (1M context, adaptive
290- // thinking, default high effort, fast mode at 2x rate / 2.5x
291- // speed). Kept as `default` so it stays the auto-latest pick and
292- // remains the app's default selection (see
293- // `useEnsureDefaultModel`, which prefers id == "default"). MUST
294- // stay in sync with `sidecar/src/model-catalog.ts`.
288+ // App default selection (see `useEnsureDefaultModel`, which pins
289+ // this id). Pinned to the explicit `claude-opus-4-8[1m]` wire id —
290+ // the `[1m]` suffix selects the 1M-context variant, matching the
291+ // label. We do NOT use the CLI's `default` sentinel: it resolves to
292+ // whatever the bundled claude-code decides (non-deterministic
293+ // across CLI bumps), whereas a pinned id is stable. Bump when a
294+ // newer Opus ships. MUST stay in sync with
295+ // `sidecar/src/model-catalog.ts`.
295296 claude_model(
296- "default " ,
297+ "claude-opus-4-8[1m] " ,
297298 "Opus 4.8 1M" ,
298299 & [ "low" , "medium" , "high" , "xhigh" , "max" ] ,
299300 true ,
300301 ) ,
301- // Explicit 4.7 pin — this slot used to BE `default`; now that
302- // `default` advanced to 4.8 we surface 4.7 as its own selectable
303- // entry, above 4.6.
302+ // Explicit 4.7 pin, above 4.6.
304303 claude_model(
305304 "claude-opus-4-7[1m]" ,
306305 "Opus 4.7 1M" ,
@@ -900,7 +899,7 @@ mod tests {
900899 . collect:: <Vec <_>>( ) ,
901900 vec![
902901 "claude-fable-5[1m]" ,
903- "default " ,
902+ "claude-opus-4-8[1m] " ,
904903 "claude-opus-4-7[1m]" ,
905904 "claude-opus-4-6[1m]" ,
906905 "sonnet" ,
@@ -970,7 +969,7 @@ mod tests {
970969 . collect:: <Vec <_>>( ) ,
971970 vec![
972971 "claude-fable-5[1m]" ,
973- "default " ,
972+ "claude-opus-4-8[1m] " ,
974973 "claude-opus-4-7[1m]" ,
975974 "claude-opus-4-6[1m]" ,
976975 "sonnet" ,
@@ -993,10 +992,11 @@ mod tests {
993992 #[ test]
994993 fn resolve_claude_model ( ) {
995994 let _env = crate :: testkit:: TestEnv :: new ( "resolve-claude-model" ) ;
996- let m = resolve_model ( "default" , None ) ;
995+ // The pinned Opus 4.8 1M id resolves to itself.
996+ let m = resolve_model ( "claude-opus-4-8[1m]" , None ) ;
997997 assert_eq ! ( m. provider, "claude" ) ;
998- assert_eq ! ( m. cli_model, "default " ) ;
999- assert_eq ! ( m. id, "default " ) ;
998+ assert_eq ! ( m. cli_model, "claude-opus-4-8[1m] " ) ;
999+ assert_eq ! ( m. id, "claude-opus-4-8[1m] " ) ;
10001000 assert ! ( m. supports_effort) ;
10011001 }
10021002
@@ -1441,15 +1441,15 @@ mod tests {
14411441 & ids[ ..4 ] ,
14421442 & [
14431443 "claude-fable-5[1m]" ,
1444- "default " ,
1444+ "claude-opus-4-8[1m] " ,
14451445 "claude-opus-4-7[1m]" ,
14461446 "claude-opus-4-6[1m]"
14471447 ] ,
14481448 "Fable 5 must lead, with Opus 4.8 (default) / 4.7 / 4.6 beneath it"
14491449 ) ;
14501450
14511451 // Fable 5: most capable, leads the list, but is NOT the app default
1452- // (too expensive) — `useEnsureDefaultModel` pins to id == "default" .
1452+ // (too expensive) — `useEnsureDefaultModel` pins to the Opus 4.8 id .
14531453 // No fast mode (Opus 4.6+ only); full effort tiers incl. xhigh.
14541454 let fable = & claude. options [ 0 ] ;
14551455 assert_eq ! ( fable. label, "Fable 5 1M" ) ;
@@ -1460,11 +1460,11 @@ mod tests {
14601460 vec![ "low" , "medium" , "high" , "xhigh" , "max" ]
14611461 ) ;
14621462
1463- // `default` → Opus 4.8: stays the app default selection, supports
1464- // fast mode, and keeps the xhigh effort tier.
1463+ // Opus 4.8: the app default selection, supports fast mode, and keeps
1464+ // the xhigh effort tier. Pinned to its explicit `[1m]` wire id .
14651465 let default = & claude. options [ 1 ] ;
14661466 assert_eq ! ( default . label, "Opus 4.8 1M" ) ;
1467- assert_eq ! ( default . cli_model, "default " ) ;
1467+ assert_eq ! ( default . cli_model, "claude-opus-4-8[1m] " ) ;
14681468 assert ! ( default . supports_fast_mode, "Opus 4.8 supports fast mode" ) ;
14691469 assert_eq ! (
14701470 default . effort_levels,
@@ -1490,10 +1490,12 @@ mod tests {
14901490 #[ test]
14911491 fn claude_default_no_longer_collides_with_cursor_auto ( ) {
14921492 let _env = crate :: testkit:: TestEnv :: new ( "claude-default-no-longer-collides-with-c" ) ;
1493- // `default` belongs to Claude (Opus 4.8 1M). Cursor's Auto is
1494- // `cursor-default`. They MUST resolve to different providers
1495- // even when the picker / persistence flow doesn't pass a hint —
1496- // this is the regression the namespace prefix exists to prevent.
1493+ // A hint-less bare `default` still infers to claude; cursor's Auto is
1494+ // the namespaced `cursor-default`. They MUST resolve to different
1495+ // providers even without a hint — the regression the namespace prefix
1496+ // exists to prevent. (Claude no longer ships a `default` model id; any
1497+ // legacy occurrence is normalized by the DB migration before it gets
1498+ // here, so resolve_model just passes it through.)
14971499 let claude = resolve_model ( "default" , None ) ;
14981500 assert_eq ! ( claude. provider, "claude" ) ;
14991501 assert_eq ! ( claude. cli_model, "default" ) ;
0 commit comments