@@ -175,7 +175,6 @@ describe("Antigravity model catalog", () => {
175175
176176 it ( "uses legacy session models only when model config is absent" , ( ) => {
177177 const fromLegacy = buildAntigravityModelsFromSession ( {
178- sessionId : "legacy-session" ,
179178 models : sessionSetupResult . models ,
180179 } ) ;
181180 expect ( fromLegacy ) . toEqual ( buildAntigravityModelsFromSession ( sessionSetupResult ) ) ;
@@ -189,7 +188,6 @@ describe("Antigravity model catalog", () => {
189188
190189 it ( "flattens native option groups without combining distinct model IDs" , ( ) => {
191190 const models = buildAntigravityModelsFromSession ( {
192- sessionId : "grouped-session" ,
193191 configOptions : [
194192 {
195193 ...modelConfig ,
@@ -356,7 +354,9 @@ it.layer(testLayer)("Antigravity provider snapshots", (it) => {
356354 supportsTextGeneration : false ,
357355 } ) ;
358356 yield * harness . provider . onAvailableCommands ( commands , "/workspace" ) ;
357+ yield * harness . provider . onConfigOptionsUpdated ( [ modelConfig ] ) ;
359358 expect ( ( yield * harness . provider . snapshotForCwd ( "/workspace" ) ) . slashCommands ) . toEqual ( [ ] ) ;
359+ expect ( ( yield * harness . provider . snapshot . getSnapshot ) . models ) . toEqual ( [ ] ) ;
360360 }
361361 const refreshed = yield * harness . provider . snapshot . refresh ;
362362 expect ( refreshed . auth . status ) . toBe ( "unauthenticated" ) ;
@@ -365,6 +365,39 @@ it.layer(testLayer)("Antigravity provider snapshots", (it) => {
365365 ) ,
366366 ) ;
367367
368+ it . effect ( "replaces live model choices and accepts an empty catalog" , ( ) =>
369+ Effect . scoped (
370+ Effect . gen ( function * ( ) {
371+ const harness = yield * makeHarness ( ) ;
372+ yield * harness . initialize ;
373+ yield * harness . provider . onSessionStarted ( started , "/workspace" ) ;
374+ yield * harness . provider . onAvailableCommands ( commands , "/workspace" ) ;
375+ const before = yield * harness . provider . snapshot . getSnapshot ;
376+ const configOptions = [
377+ {
378+ ...modelConfig ,
379+ currentValue : "gemini-3.8-flash-high" ,
380+ options : modelOptions . slice ( 0 , 3 ) ,
381+ } ,
382+ ] ;
383+ const nextSnapshot = yield * Stream . toPull (
384+ harness . provider . snapshot . streamChanges . pipe (
385+ Stream . filter ( ( snapshot ) => snapshot . models . length === 3 ) ,
386+ ) ,
387+ ) ;
388+ yield * harness . provider . onConfigOptionsUpdated ( configOptions ) ;
389+ expect ( ( yield * nextSnapshot ) [ 0 ] ) . toMatchObject ( {
390+ models : buildAntigravityModelsFromSession ( { configOptions } ) ,
391+ auth : before . auth ,
392+ workspaceSnapshots : before . workspaceSnapshots ,
393+ slashCommands : commands ,
394+ } ) ;
395+ yield * harness . provider . onConfigOptionsUpdated ( [ ] ) ;
396+ expect ( ( yield * harness . provider . snapshot . getSnapshot ) . models ) . toEqual ( [ ] ) ;
397+ } ) ,
398+ ) ,
399+ ) ;
400+
368401 it . effect ( "replaces one account's catalog instead of combining accounts" , ( ) =>
369402 Effect . scoped (
370403 Effect . gen ( function * ( ) {
0 commit comments