Skip to content

Commit a43e78f

Browse files
committed
test(claude): preserve newer model choices during fallback
1 parent 9d6d843 commit a43e78f

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎apps/server/src/orchestration-v2/ProviderEventIngestor.test.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,6 +2327,27 @@ layer("ProviderEventIngestorV2", (it) => {
23272327
assert.lengthOf(repeated, 0);
23282328
assert.lengthOf(otherInstance, 0);
23292329
assert.deepEqual((yield* projectionStore.getThread(threadId)).modelSelection, switched);
2330+
for (const newer of [
2331+
{ ...modelSelection, model: "user-selected-model" },
2332+
{ ...modelSelection, options: [{ id: "reasoningEffort", value: "low" }] },
2333+
]) {
2334+
yield* eventSink.write({
2335+
events: [
2336+
{
2337+
...rootEvent,
2338+
id: yield* idAllocator.allocate.event({ threadId }),
2339+
type: "thread.model-selection-updated",
2340+
payload: {
2341+
...(yield* projectionStore.getThread(threadId)),
2342+
modelSelection: newer,
2343+
updatedAt: now,
2344+
},
2345+
},
2346+
],
2347+
});
2348+
assert.lengthOf(yield* reportModel(switched), 0);
2349+
assert.deepEqual((yield* projectionStore.getThread(threadId)).modelSelection, newer);
2350+
}
23302351
}),
23312352
);
23322353
});

0 commit comments

Comments
 (0)