@@ -26,6 +26,12 @@ const provider = {
2626 isCustom : false ,
2727 capabilities : {
2828 optionDescriptors : [
29+ {
30+ id : "reasoningEffort" ,
31+ label : "Effort" ,
32+ type : "select" as const ,
33+ options : [ { id : "high" , label : "High" } ] ,
34+ } ,
2935 {
3036 id : "serviceTier" ,
3137 label : "Speed" ,
@@ -44,8 +50,32 @@ const provider = {
4450} ;
4551
4652describe ( "subagent traits" , ( ) => {
53+ it ( "does not match two models that are absent from the catalog" , ( ) => {
54+ expect (
55+ resolveSubagentTraits ( {
56+ subagent : {
57+ ...subagent ,
58+ model : "missing-agent-model" ,
59+ modelSelection : { ...selection , model : "missing-selection-model" } ,
60+ } ,
61+ provider,
62+ } ) ,
63+ ) . toBe ( "" ) ;
64+ } ) ;
65+
66+ it ( "hides an obsolete saved effort value" , ( ) => {
67+ expect (
68+ resolveSubagentTraits ( {
69+ subagent : {
70+ ...subagent ,
71+ modelSelection : { ...selection , options : [ { id : "reasoningEffort" , value : "removed" } ] } ,
72+ } ,
73+ provider,
74+ } ) ,
75+ ) . toBe ( "" ) ;
76+ } ) ;
4777 it ( "shows the agent's saved effort and speed, including model display names" , ( ) => {
48- expect ( resolveSubagentTraits ( { subagent, provider } ) ) . toBe ( "high · Fast" ) ;
78+ expect ( resolveSubagentTraits ( { subagent, provider } ) ) . toBe ( "High · Fast" ) ;
4979 } ) ;
5080
5181 it ( "uses an app-owned child's selection when the agent has no saved selection" , ( ) => {
@@ -55,7 +85,7 @@ describe("subagent traits", () => {
5585 provider,
5686 childThread : { modelSelection : selection } ,
5787 } ) ,
58- ) . toBe ( "high · Fast" ) ;
88+ ) . toBe ( "High · Fast" ) ;
5989 } ) ;
6090
6191 it ( "does not use a provider-managed child's selection" , ( ) => {
@@ -93,7 +123,7 @@ describe("subagent traits", () => {
93123 modelSelection : { ...selection , options : [ { id : "reasoningEffort" , value : "low" } ] } ,
94124 } ,
95125 } ) ,
96- ) . toBe ( "high · Fast" ) ;
126+ ) . toBe ( "High · Fast" ) ;
97127 } ) ;
98128
99129 it ( "shows Claude effort and boolean fast mode" , ( ) => {
@@ -117,14 +147,20 @@ describe("subagent traits", () => {
117147 ...provider . models [ 0 ] ! ,
118148 capabilities : {
119149 optionDescriptors : [
150+ {
151+ id : "effort" ,
152+ label : "Effort" ,
153+ type : "select" ,
154+ options : [ { id : "max" , label : "Max" } ] ,
155+ } ,
120156 { id : "fastMode" , label : "Fast" , type : "boolean" , currentValue : false } ,
121157 ] ,
122158 } ,
123159 } ,
124160 ] ,
125161 } ,
126162 } ) ,
127- ) . toBe ( "max · Fast" ) ;
163+ ) . toBe ( "Max · Fast" ) ;
128164 } ) ;
129165
130166 it . each ( [
0 commit comments