Skip to content

Commit 9cd8cab

Browse files
committed
fix(provider-acp-registry): reopening a Kimi thread no longer collapses its model picker to Default
1 parent c294d63 commit 9cd8cab

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

‎packages/provider-acp-registry/src/server/driver.test.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

‎packages/provider-acp-registry/src/server/driver.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)