@@ -2,6 +2,8 @@ import {afterEach, beforeEach, expect, it} from "vitest";
22import { createAuthenticatedFixture , describeE2E , type SpawnedAgentFixture , } from "./acp-e2e-test-utils" ;
33import { ModelId } from "../../../ModelId" ;
44
5+ const DEFAULT_MODEL_ID = ModelId . create ( "gpt-5.6-sol" , "medium" )
6+
57describeE2E ( "Models availability" , ( ) => {
68 let fixture : SpawnedAgentFixture ;
79
@@ -15,22 +17,7 @@ describeE2E("Models availability", () => {
1517
1618 it ( `default model is available` , async ( ) => {
1719 const session = await fixture . createSession ( ) ;
18- const models = session . models ;
19- const availableModelIds = models ?. availableModels ?. map ( m => m . modelId ) ?? [ ] ;
20- expect ( availableModelIds . length ) . toBeGreaterThan ( 0 ) ;
21-
22- // Codex's advertised catalog changes as it is upgraded, so assert the
23- // invariant that survives those bumps instead of pinning a specific
24- // model id: the session's current (default) model must be one of the
25- // advertised models. Compare on the base model id because
26- // availableModels enumerate model x reasoning-effort pairs while the
27- // current model may carry an effort (e.g. "none") that is not itself
28- // enumerated.
29- const currentModelId = models ?. currentModelId ;
30- expect ( currentModelId ) . toBeDefined ( ) ;
31-
32- const currentBaseModel = ModelId . fromString ( currentModelId ! ) . model ;
33- const availableBaseModels = availableModelIds . map ( id => ModelId . fromString ( id ) . model ) ;
34- expect ( availableBaseModels ) . toContain ( currentBaseModel ) ;
20+ const models = session . models ?. availableModels ?. map ( m => m . modelId ) ;
21+ expect ( models ) . toContain ( DEFAULT_MODEL_ID . toString ( ) )
3522 } ) ;
3623} ) ;
0 commit comments