@@ -22,12 +22,7 @@ import {
2222 backgroundWorkHoldsCompletion ,
2323 derivePendingBackgroundWork ,
2424} from "@t3tools/shared/orchestrationV2PendingBackgroundWork" ;
25- import {
26- getProviderOptionCurrentLabel ,
27- getProviderOptionCurrentValue ,
28- getProviderOptionDescriptors ,
29- isProviderOptionValueStated ,
30- } from "@t3tools/shared/model" ;
25+ import { getProviderOptionCurrentLabel , getProviderOptionStatedValue } from "@t3tools/shared/model" ;
3126import { formatDuration } from "@t3tools/shared/orchestrationTiming" ;
3227import * as DateTime from "effect/DateTime" ;
3328
@@ -165,20 +160,18 @@ export function formatModelSelectionEffort(
165160) : string | null {
166161 const caps = models . find ( ( model ) => model . slug === selection . model ) ?. capabilities ;
167162 if ( ! caps ) return null ;
168- const descriptors = getProviderOptionDescriptors ( { caps, selections : selection . options } ) ;
169163 for ( const id of REASONING_EFFORT_OPTION_IDS ) {
170- const descriptor = descriptors . find ( ( candidate ) => candidate . id === id ) ;
164+ const descriptor = caps . optionDescriptors ? .find ( ( candidate ) => candidate . id === id ) ;
171165 if ( descriptor ?. type !== "select" ) continue ;
172- // The adapter writes a subagent's selection from what the provider reported,
173- // so a missing option is unknown; the catalog's pick is not its effort. A
174- // resolver with no value at all yields "Unknown", which may still be named.
175- if (
176- ! isProviderOptionValueStated ( id , selection , reportedSelection ) &&
177- getProviderOptionCurrentValue ( descriptor , selection , reportedSelection ) !== undefined
178- ) {
179- continue ;
180- }
181- const label = getProviderOptionCurrentLabel ( descriptor , selection , reportedSelection ) ;
166+ const value = getProviderOptionStatedValue ( id , selection , reportedSelection ) ;
167+ if ( value === undefined && id !== "variant" ) continue ;
168+ if ( typeof value === "boolean" ) continue ;
169+ // Bypass picker normalization so an obsolete choice cannot become a catalog default.
170+ const label = getProviderOptionCurrentLabel (
171+ { ...descriptor , currentValue : value } ,
172+ selection ,
173+ reportedSelection ,
174+ ) ;
182175 if ( label ) return label ;
183176 }
184177 return null ;
0 commit comments