@@ -17,12 +17,6 @@ type SessionModelSource =
1717 | 'remote-legacy-gateway'
1818 | 'remote-unavailable' ;
1919
20- export type SessionModelNotice = {
21- id : 'loading' | 'legacy' | 'error' | 'stale' | 'truncated' | 'unavailable' | 'local-provider' ;
22- message : string ;
23- retry : boolean ;
24- } ;
25-
2620export type SessionModelOption = {
2721 id : string ;
2822 name : string ;
@@ -56,7 +50,6 @@ type SessionModelOptions = {
5650 selectedVariant : string ;
5751 pickerDisabled : boolean ;
5852 isLoading : boolean ;
59- notices : SessionModelNotice [ ] ;
6053} ;
6154
6255export function useSessionModelOptions ( {
@@ -111,7 +104,6 @@ export function buildSessionModelOptions(
111104 selectedVariant : '' ,
112105 pickerDisabled : false ,
113106 isLoading : input . gatewayModelsLoading ,
114- notices : [ ] ,
115107 } ;
116108}
117109
@@ -129,26 +121,6 @@ function buildUnavailableRemoteOptions(input: BuildSessionModelOptionsInput): Se
129121 unavailable : true ,
130122 } satisfies SessionModelOption ) ;
131123 const loading = input . remoteModelState . refresh === 'loading' ;
132- const notices : SessionModelNotice [ ] = [
133- loading
134- ? {
135- id : 'loading' ,
136- message : 'Checking this CLI for available models.' ,
137- retry : true ,
138- }
139- : {
140- id : 'error' ,
141- message : "Models from this CLI couldn't be loaded. Sending still uses the session model." ,
142- retry : true ,
143- } ,
144- ] ;
145- if ( currentSelection ) {
146- notices . push ( {
147- id : 'unavailable' ,
148- message : `${ currentSelection . model . modelID } is the session model. It can't be changed until this CLI's models load.` ,
149- retry : false ,
150- } ) ;
151- }
152124
153125 return {
154126 source : 'remote-unavailable' ,
@@ -157,7 +129,6 @@ function buildUnavailableRemoteOptions(input: BuildSessionModelOptionsInput): Se
157129 selectedVariant : currentSelection ?. variant ?? '' ,
158130 pickerDisabled : true ,
159131 isLoading : loading ,
160- notices,
161132 } ;
162133}
163134
@@ -199,19 +170,10 @@ function buildLegacyGatewayOptions(input: BuildSessionModelOptionsInput): Sessio
199170 option => option . modelRef && modelRefsEqual ( option . modelRef , currentSelection . model )
200171 )
201172 : undefined ;
202- const notices : SessionModelNotice [ ] = [
203- {
204- id : 'legacy' ,
205- message :
206- 'This CLI uses Gateway model fallback. Upgrade Kilo CLI to use its configured providers and models.' ,
207- retry : false ,
208- } ,
209- ] ;
210173
211174 if ( currentSelection && ! selectedOption ) {
212175 selectedOption = createUnavailableOption ( currentSelection . model ) ;
213176 options . unshift ( selectedOption ) ;
214- notices . push ( createUnavailableNotice ( currentSelection . model ) ) ;
215177 }
216178
217179 const selectedVariant =
@@ -226,7 +188,6 @@ function buildLegacyGatewayOptions(input: BuildSessionModelOptionsInput): Sessio
226188 selectedVariant,
227189 pickerDisabled : input . gatewayModelsLoading ,
228190 isLoading : input . gatewayModelsLoading ,
229- notices,
230191 } ;
231192}
232193
@@ -263,35 +224,10 @@ function buildCliCatalogOptions(input: BuildSessionModelOptionsInput): SessionMo
263224 option => option . modelRef && modelRefsEqual ( option . modelRef , currentSelection . model )
264225 )
265226 : undefined ;
266- const notices : SessionModelNotice [ ] = [ ] ;
267227
268228 if ( currentSelection && ! selectedOption ) {
269229 selectedOption = createUnavailableOption ( currentSelection . model ) ;
270230 options . unshift ( selectedOption ) ;
271- notices . push ( createUnavailableNotice ( currentSelection . model ) ) ;
272- }
273- if ( input . remoteModelState . refresh === 'error' ) {
274- notices . unshift ( {
275- id : 'stale' ,
276- message : 'Showing the last model catalog because refresh failed.' ,
277- retry : true ,
278- } ) ;
279- }
280- if ( catalog . truncated ) {
281- notices . push ( {
282- id : 'truncated' ,
283- message : 'This CLI returned a partial model catalog. Some models or variants may be missing.' ,
284- retry : false ,
285- } ) ;
286- }
287- if ( currentSelection && currentSelection . model . providerID !== 'kilo' ) {
288- notices . push ( {
289- id : 'local-provider' ,
290- message : input . organizationId
291- ? "This model runs through your CLI provider, outside Kilo Gateway billing and this organization's model restrictions."
292- : 'This model runs through your CLI provider, outside Kilo Gateway billing.' ,
293- retry : false ,
294- } ) ;
295231 }
296232
297233 const selectedVariant =
@@ -306,7 +242,6 @@ function buildCliCatalogOptions(input: BuildSessionModelOptionsInput): SessionMo
306242 selectedVariant,
307243 pickerDisabled : false ,
308244 isLoading : false ,
309- notices,
310245 } ;
311246}
312247
@@ -324,14 +259,6 @@ function createUnavailableOption(modelRef: ModelRef): SessionModelOption {
324259 } ;
325260}
326261
327- function createUnavailableNotice ( modelRef : ModelRef ) : SessionModelNotice {
328- return {
329- id : 'unavailable' ,
330- message : `${ modelRef . modelID } is the session model but is not available in this catalog.` ,
331- retry : false ,
332- } ;
333- }
334-
335262function createGatewayOption ( model : ModelOption ) : SessionModelOption {
336263 return {
337264 ...model ,
0 commit comments