Skip to content

Commit ae8fa3b

Browse files
committed
fix(models): limit change to astra and fable medium defaults
1 parent 4d9db1b commit ae8fa3b

7 files changed

Lines changed: 17 additions & 20 deletions

File tree

‎apps/server/src/provider/CodexDeveloperInstructions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ ${browserToolInstructions(browserToolsAvailable)}
194194

195195
export interface CodexRuntimeInfo {
196196
readonly model: string;
197-
readonly reasoningEffort?: string;
197+
readonly reasoningEffort: string;
198198
}
199199

200200
export function buildCodexDeveloperInstructions(

‎apps/server/src/provider/Layers/CodexProvider.test.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,13 @@ it("marks the most preferred available model as default", () => {
118118
);
119119
});
120120

121-
it("prefers astra over sol and terra when available", () => {
121+
it("prefers sol over terra when both are available", () => {
122122
const models = applyPreferredCodexDefaultModel([
123123
{ slug: "gpt-5.6-terra", name: "GPT-5.6-Terra", isCustom: false, capabilities: null },
124124
{ slug: "gpt-5.6-sol", name: "GPT-5.6-Sol", isCustom: false, capabilities: null },
125-
{ slug: "gpt-6-astra", name: "GPT-6-Astra", isCustom: false, capabilities: null },
126125
]);
127126

128-
assert.deepStrictEqual(models.find((model) => model.isDefault)?.slug, "gpt-6-astra");
127+
assert.deepStrictEqual(models.find((model) => model.isDefault)?.slug, "gpt-5.6-sol");
129128
});
130129

131130
it("ranks qualified Codex models while preserving their wire ids", () => {
@@ -137,11 +136,11 @@ it("ranks qualified Codex models while preserving their wire ids", () => {
137136
isDefault: true,
138137
capabilities: null,
139138
},
140-
{ slug: "openai.gpt-6-astra", name: "Astra", isCustom: false, capabilities: null },
139+
{ slug: "openai.gpt-5.6-sol", name: "Sol", isCustom: false, capabilities: null },
141140
]);
142141
assert.deepStrictEqual(
143142
models.filter((model) => model.isDefault).map((model) => model.slug),
144-
["openai.gpt-6-astra"],
143+
["openai.gpt-5.6-sol"],
145144
);
146145
});
147146

‎apps/server/src/provider/Layers/CodexProvider.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ export function mapCodexModelCapabilities(
146146
model: CodexSchema.V2ModelListResponse__Model,
147147
): ModelCapabilities {
148148
const reasoningOptions = model.supportedReasoningEfforts.map(({ reasoningEffort }) =>
149-
reasoningEffort === model.defaultReasoningEffort
149+
reasoningEffort ===
150+
(codexModelFamily(model.model) === "gpt-6-astra" ? "medium" : model.defaultReasoningEffort)
150151
? {
151152
id: reasoningEffort,
152153
label: reasoningEffortLabel(reasoningEffort),

‎apps/server/src/provider/Layers/CodexSessionRuntime.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,17 @@ describe("buildTurnStartParams", () => {
169169
mode: "default",
170170
settings: {
171171
model: "gpt-5.3-codex",
172-
reasoning_effort: null,
172+
reasoning_effort: "medium",
173173
developer_instructions: buildCodexDeveloperInstructions("default", {
174174
model: "gpt-5.3-codex",
175+
reasoningEffort: "medium",
175176
}),
176177
},
177178
},
178179
});
179180
});
180181

181-
it("reports the fallback model without inventing a reasoning effort", () => {
182+
it("reports the same fallback model and effort in settings and instructions", () => {
182183
const params = Effect.runSync(
183184
buildTurnStartParams({
184185
threadId: "provider-thread-1",
@@ -190,9 +191,8 @@ describe("buildTurnStartParams", () => {
190191

191192
const settings = params.collaborationMode?.settings;
192193
NodeAssert.equal(settings?.model, DEFAULT_MODEL);
193-
NodeAssert.equal(settings?.reasoning_effort, null);
194-
NodeAssert.ok(settings?.developer_instructions?.includes(`as ${DEFAULT_MODEL}`));
195-
NodeAssert.ok(!settings?.developer_instructions?.includes("with medium reasoning effort"));
194+
NodeAssert.equal(settings?.reasoning_effort, "medium");
195+
NodeAssert.ok(settings?.developer_instructions?.includes(`as ${DEFAULT_MODEL} with medium`));
196196
});
197197

198198
it.effect("routes approvals to the auto reviewer in auto mode", () =>

‎apps/server/src/provider/Layers/CodexSessionRuntime.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,15 +590,15 @@ function buildCodexCollaborationMode(input: {
590590
return undefined;
591591
}
592592
const model = normalizeCodexModelSlug(input.model) ?? DEFAULT_MODEL;
593-
const reasoningEffort = input.effort;
593+
const reasoningEffort = input.effort ?? "medium";
594594
return {
595595
mode: input.interactionMode,
596596
settings: {
597597
model,
598-
reasoning_effort: reasoningEffort ?? null,
598+
reasoning_effort: reasoningEffort,
599599
developer_instructions: buildCodexDeveloperInstructions(
600600
input.interactionMode,
601-
{ model, ...(reasoningEffort ? { reasoningEffort } : {}) },
601+
{ model, reasoningEffort },
602602
input.browserToolsAvailable ?? true,
603603
),
604604
},

‎apps/server/src/provider/ModelManifest.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,6 @@ export const make = Effect.gen(function* () {
399399
);
400400
if (fetched === null) return manifest;
401401

402-
if (manifestUpdatedAtMs(fetched) < manifestUpdatedAtMs(manifest)) {
403-
fetchedAtMs = now;
404-
return manifest;
405-
}
406402
manifest = fetched;
407403
fetchedAtMs = now;
408404
yield* encodeManifestCache({ fetchedAtMs: now, manifest: fetched }).pipe(

‎apps/server/src/provider/model-manifest.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
},
3434
{
3535
"id": "medium",
36-
"label": "Medium"
36+
"label": "Medium",
37+
"isDefault": true
3738
},
3839
{
3940
"id": "high",

0 commit comments

Comments
 (0)