File tree Expand file tree Collapse file tree
packages/provider-acp-registry/src/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,42 @@ describe("acpRegistrySnapshotReadiness", () => {
177177 } ) ;
178178 } ) ;
179179
180+ it ( "keeps probed models when a loaded session advertises none" , ( ) => {
181+ const provider = buildCheckedAcpRegistrySnapshot ( {
182+ ...identity ,
183+ settings : decodeSettings ( { agentId : "test-agent" } ) ,
184+ checkedAt : "2026-08-13T10:00:00.000Z" ,
185+ inspection : {
186+ status : "ready" ,
187+ agentId : "test-agent" ,
188+ version : "1.0.0" ,
189+ distribution : "npx" ,
190+ } ,
191+ probe : {
192+ probe : {
193+ instanceId : identity . instanceId ,
194+ ready : true ,
195+ icon : null ,
196+ authMethods : [ ] ,
197+ models : [ { id : "probe-model" , name : "Probe model" , description : null } ] ,
198+ currentModelId : "probe-model" ,
199+ configOptions : [ ] ,
200+ sessionManagement : noSessionManagement ,
201+ } ,
202+ slashCommands : [ ] ,
203+ skills : [ ] ,
204+ } ,
205+ } ) ;
206+
207+ expect (
208+ applyAcpRegistryLiveConfiguration (
209+ provider ,
210+ { models : [ ] , currentModelId : null , configOptions : [ ] } ,
211+ [ ] ,
212+ ) . models ,
213+ ) . toEqual ( provider . models ) ;
214+ } ) ;
215+
180216 it ( "projects discovery without claiming authentication when no login methods are advertised" , ( ) => {
181217 const snapshot = buildCheckedAcpRegistrySnapshot ( {
182218 ...identity ,
Original file line number Diff line number Diff line change @@ -261,7 +261,11 @@ export function applyAcpRegistryLiveConfiguration(
261261 return {
262262 ...snapshot ,
263263 status : provider . enabled ? "ready" : provider . status ,
264- models : modelsFromDiscovery ( configuration , customModels ) ,
264+ // session/load may omit models (Kimi returns `{}`); keep the probed list.
265+ models :
266+ configuration . models . length === 0
267+ ? provider . models
268+ : modelsFromDiscovery ( configuration , customModels ) ,
265269 } ;
266270}
267271
You can’t perform that action at this time.
0 commit comments