Skip to content

Commit ba5bef5

Browse files
authored
Models availability e2e test fix - new default model gpt-5.6-sol/medium (agentclientprotocol#335)
1 parent 307d810 commit ba5bef5

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

src/__tests__/CodexACPAgent/e2e/acp-e2e-models-availability.test.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import {afterEach, beforeEach, expect, it} from "vitest";
22
import {createAuthenticatedFixture, describeE2E, type SpawnedAgentFixture,} from "./acp-e2e-test-utils";
33
import {ModelId} from "../../../ModelId";
44

5+
const DEFAULT_MODEL_ID = ModelId.create("gpt-5.6-sol", "medium")
6+
57
describeE2E("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

Comments
 (0)