@devries-cameron20 / t3code Mirror · read-only / commits / c280e640c1
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 13:15 UTC

fix(server): searching delegate models by provider name no longer shows only dead models (#26448)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Theo Browne committed Oct 28, 2026 at 05:14 UTC c280e640c1191d056ca45bd4d20917770a21ec60
2 files changed +18 -5
apps/server/src/mcp/OrchestratorMcpService.test.ts
+10
@@ -1431,6 +1431,16 @@ describe("OrchestratorMcpService provider resolution", () => {
1431 models: ["oc/m12", "oc/m01", "oc/m03", "oc/m04", "oc/m05", "oc/m06", "oc/m07", "oc/m08"],
1432 omitted: 3,
1433 });
1434 + // A word naming the provider matches all its models, so legacy ones stay out.
1435 + assert.deepEqual(listing(yield* capabilitiesWith("Codex")), [
1436 + { id: codexInstanceId, models: ["gpt-6", "gpt-4", "gpt-3", "my-alpha"], omitted: 1 },
1437 + { id: opencodeInstanceId, models: [], omitted: 0 },
1438 + ]);
1439 + assert.deepEqual(listing(yield* capabilitiesWith("codex gpt 5"))[0], {
1440 + id: codexInstanceId,
1441 + models: ["gpt-5"],
1442 + omitted: 0,
1443 + });
1444 }),
1445 );
1446
apps/server/src/mcp/OrchestratorMcpService.ts
+8 -5
@@ -287,9 +287,9 @@ const FULL_CATALOG_DRIVERS: ReadonlySet<string> = new Set(["codex", "claudeAgent
287 const LISTED_MODEL_LIMIT = 8;
288
289 /**
290 - * Picks the models orchestrator_capabilities shows for one provider. Hidden
291 - * models never appear. With search terms, lists matches; otherwise lists pinned
292 - * models (custom, favorite, the caller's own) plus the provider's non-legacy
290 + * Picks the models orchestrator_capabilities shows for one provider. Hidden models never
291 + * appear. Search words naming the provider are dropped; other words list matches. With no
292 + * words left, lists pinned models (custom, favorite, the caller's own) plus non-legacy
293 * models, or only the first few in the user's model order for large catalogs.
294 */
295 function listCapabilityModels(input: {
@@ -304,10 +304,13 @@ function listCapabilityModels(input: {
304 const visible = input.provider.models
305 .filter((model) => model.isCustom || !input.preferences?.hiddenModels.includes(model.slug))
306 .toSorted((a, b) => (rank.get(a.slug) ?? rank.size) - (rank.get(b.slug) ?? rank.size));
307 - if (input.searchTerms.length > 0) {
307 + const { instanceId, driver, displayName } = input.provider;
308 + const providerText = `${instanceId} ${driver} ${displayName ?? ""}`.toLowerCase();
309 + const modelTerms = input.searchTerms.filter((term) => !providerText.includes(term));
310 + if (modelTerms.length > 0) {
311 const matches = visible.filter((model) => {
312 const text = `${model.slug} ${model.name} ${model.subProvider ?? ""}`.toLowerCase();
310 - return input.searchTerms.every((term) => text.includes(term));
313 + return modelTerms.every((term) => text.includes(term));
314 });
315 const listed = matches.slice(0, LISTED_MODEL_LIMIT);
316 return { listed, omitted: matches.length - listed.length };