You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "rbalachandar (via GitHub)" <gi...@apache.org> on 2026/08/22 12:47:41 UTC
[PR] fix(cli): show model display names in picker [maka]
rbalachandar opened a new pull request, #3493:
URL: https://github.com/apache/maka/pull/3493
## Summary
The cross-connection TUI `/model` picker now prefers each catalog model’s human-readable `displayName`, while retaining the raw model id when no display name is available. Search matches both model ids and display names.
Fixes #3482
## Verification
- `npm --workspace maka-agent test` (372 tests passed)
- `npm --workspace maka-agent run typecheck`
- `npx biome lint packages/cli/src/pi-tui-contracts.ts packages/cli/src/runtime-host-onboarding.ts packages/cli/src/pi-tui-pickers.ts packages/cli/src/__tests__/runtime-host-onboarding.test.ts packages/cli/src/__tests__/pi-tui-runner.test.ts`
- `npx biome format packages/cli/src/pi-tui-contracts.ts packages/cli/src/runtime-host-onboarding.ts packages/cli/src/pi-tui-pickers.ts packages/cli/src/__tests__/runtime-host-onboarding.test.ts packages/cli/src/__tests__/pi-tui-runner.test.ts`
The TUI runner test covers display-name rendering, id fallback, and searching by the displayed model name.
## AI use
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: OpenCode made the code and test changes, reviewed the implementation, and ran the verification commands.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(cli): show model display names in picker [maka]
Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks commented on PR #3493:
URL: https://github.com/apache/maka/pull/3493#issuecomment-5380746009
Nice cleanup — the projection via `modelsById`, the `displayName?.trim() || model` label rule and the stale-comment updates all look right to me.
One substantive nit before merge: **the model-id match criterion lost its dedicated test case**, so one line of `matchesModelChoice` is no longer pinned by any test.
The five-case list previously isolated each match criterion one-by-one; `query: 'gpt'` was the case that exercised **matching by model id**:
```ts
- { query: 'gpt', keep: 'gpt-5.5', drop: ['glm-max', 'text-unicorn'] },
+ { query: 'preview', keep: 'GPT 5.5 Preview', drop: ['GLM Max', 'text-unicorn'] },
```
After the swap, every remaining query is satisfied by other lines:
```ts
function matchesModelChoice(choice: ModelChoice, query: string): boolean {
if (choice.model.toLowerCase().includes(query)) return true; // ← now unpinned
if (choice.displayName?.toLowerCase().includes(query)) return true; // 'preview' hits here
if (choice.connectionName.toLowerCase().includes(query)) return true; // 'aurora'
if (choice.connectionSlug.toLowerCase().includes(query)) return true; // 'alpha'
if (choice.providerType.toLowerCase().includes(query)) return true; // 'zai'
const providerLabel = PROVIDER_DEFAULTS[choice.providerType]?.label; // 'gemini'
...
}
```
Deleting the `choice.model` line would keep this suite green. That matters because models without catalog metadata (minimal hosts, custom relay ids) are exactly the ones users must still be able to find by raw id.
Suggested fix — add an id-only query whose substring does not occur in any display name:
```ts
// 'glm-max' occurs in the model id but not in the display name ('GLM Max'),
// so this case can only pass through the model-id criterion.
{ query: 'glm-max', keep: 'GLM Max', drop: ['GPT 5.5 Preview', 'text-unicorn'] },
```
(Optionally also assert the inverse rendering invariant somewhere — that a choice with a `displayName` no longer shows its raw id — but the implicit fallback via `text-unicorn` already covers the happy path.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(cli): show model display names in picker [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #3493:
URL: https://github.com/apache/maka/pull/3493#issuecomment-5384628088
LGTM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(cli): show model display names in picker [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #3493:
URL: https://github.com/apache/maka/pull/3493
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org