@@ -2,6 +2,7 @@ import { EventId, TurnId, type OrchestrationThreadActivity } from "@t3tools/cont
22import { describe , expect , it } from "vitest" ;
33import {
44 deriveVisibleThreadWorkLogEntries ,
5+ orderCopilotBuiltInModelOptions ,
56 resolveProviderHealthBannerProvider ,
67} from "./ChatView.logic" ;
78
@@ -47,6 +48,29 @@ describe("resolveProviderHealthBannerProvider", () => {
4748 } ) ;
4849} ) ;
4950
51+ describe ( "orderCopilotBuiltInModelOptions" , ( ) => {
52+ it ( "reorders runtime copilot models to match the preferred built-in picker order" , ( ) => {
53+ expect (
54+ orderCopilotBuiltInModelOptions ( [
55+ { slug : "gpt-5.4" , name : "GPT-5.4" } ,
56+ { slug : "gpt-5.3-codex" , name : "GPT-5.3 Codex" } ,
57+ { slug : "gpt-5.4-mini" , name : "GPT-5.4 mini" } ,
58+ { slug : "gpt-5.2" , name : "GPT-5.2" } ,
59+ ] ) . map ( ( option ) => option . slug ) ,
60+ ) . toEqual ( [ "gpt-5.4" , "gpt-5.4-mini" , "gpt-5.3-codex" , "gpt-5.2" ] ) ;
61+ } ) ;
62+
63+ it ( "keeps unknown runtime-only models after the preferred built-in models" , ( ) => {
64+ expect (
65+ orderCopilotBuiltInModelOptions ( [
66+ { slug : "gpt-5.4" , name : "GPT-5.4" } ,
67+ { slug : "future-runtime-model" , name : "Future Runtime Model" } ,
68+ { slug : "gpt-5.4-mini" , name : "GPT-5.4 mini" } ,
69+ ] ) . map ( ( option ) => option . slug ) ,
70+ ) . toEqual ( [ "gpt-5.4" , "gpt-5.4-mini" , "future-runtime-model" ] ) ;
71+ } ) ;
72+ } ) ;
73+
5074describe ( "deriveVisibleThreadWorkLogEntries" , ( ) => {
5175 it ( "keeps completed tool calls from previous turns visible in the thread timeline" , ( ) => {
5276 const activities : OrchestrationThreadActivity [ ] = [
0 commit comments