@devries-cameron20 / t3code-1 / commits / c3f0a6cf43
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(provider-acp-registry): reopening a Kimi thread no longer collapses its model picker to Default (#25786)

Co-authored-by: maria-rcks <maria@kuuro.net>

AKolenda committed Oct 31, 2026 at 20:33 UTC c3f0a6cf43e627db7ccbc129730b44b5689d86cb
2 files changed +50 -1
packages/provider-acp-registry/src/server/driver.test.ts
+31
@@ -175,6 +175,37 @@ describe("acpRegistrySnapshotReadiness", () => {
175 nativeSessions: { canList: true, canLoad: true, canResume: true },
176 models: [{ slug: "live-model", isDefault: true }],
177 });
178 +
179 + expect(
180 + applyAcpRegistryLiveConfiguration(
181 + provider,
182 + { models: [], currentModelId: null, configOptions: [] },
183 + [],
184 + ).models,
185 + ).toEqual(provider.models);
186 +
187 + const liveOptions = [
188 + {
189 + id: "effort",
190 + label: "Effort",
191 + type: "select" as const,
192 + options: [{ id: "high", label: "High" }],
193 + currentValue: "high",
194 + },
195 + ];
196 + expect(
197 + applyAcpRegistryLiveConfiguration(
198 + provider,
199 + { models: [], currentModelId: null, configOptions: liveOptions },
200 + [],
201 + ).models,
202 + ).toMatchObject([
203 + {
204 + slug: "probe-model",
205 + isDefault: true,
206 + capabilities: { optionDescriptors: [{ id: "effort", currentValue: "high" }] },
207 + },
208 + ]);
209 });
210
211 it("projects discovery without claiming authentication when no login methods are advertised", () => {
packages/provider-acp-registry/src/server/driver.ts
+19 -1
@@ -258,10 +258,28 @@ export function applyAcpRegistryLiveConfiguration(
258 customModels: ReadonlyArray<string>,
259 ): ServerProvider {
260 const { message: _staleProbeMessage, ...snapshot } = provider;
261 + // session/load may omit models (Kimi returns `{}`); keep the probed list
262 + // and apply any live option descriptors to it.
263 + const probedModels = provider.models.filter((model) => !model.isCustom);
264 + const discovery =
265 + configuration.models.length > 0
266 + ? configuration
267 + : {
268 + ...configuration,
269 + models: probedModels.map((model) => ({
270 + id: model.slug,
271 + name: model.name,
272 + description: null,
273 + })),
274 + currentModelId: probedModels.find((model) => model.isDefault)?.slug ?? null,
275 + };
276 return {
277 ...snapshot,
278 status: provider.enabled ? "ready" : provider.status,
264 - models: modelsFromDiscovery(configuration, customModels),
279 + models:
280 + configuration.models.length === 0 && configuration.configOptions.length === 0
281 + ? provider.models
282 + : modelsFromDiscovery(discovery, customModels),
283 };
284 }
285