feat: add custom model names and option descriptors - #423
Merged
Conversation
A custom model entry could only be a bare slug, so it showed up in the picker under its raw slug and borrowed whatever option descriptors the driver defaulted to. An entry can now carry a display name and its own capabilities, while a bare slug keeps working exactly as before. Adopted from T3 Code: - 5a433244d0b827176df8b76a05959cd1a7a98ce2 (#9807) Pylon adaptations: upstream's version of this change was authored after its Antigravity provider landed, so its diff carries `driverKind === "antigravity"` guards and, in CodexProvider, a copy of `probeCodexAppServerProvider` that predates Pylon's own refactor in #417. The Antigravity guards are left out — they belong with the Antigravity port, not here — and Pylon's existing probe is kept, with only the `CustomModelSetting` typing applied to it. Upstream's rename of the redacted-email test is taken as-is.
Widening `customModels` to `CustomModelSetting` broke Prime, which upstream never had to update because Prime is Pylon-only. The shared `providerModelsFromSettings` already accepts the wider type and honours entry names and capabilities, so widening Prime's wrapper both fixes the break and gives Prime custom model names and per-model option descriptors.
knip flagged four exports the port left dangling. `readCustomModelSlugs` is superseded by `readCustomModelEntries` and has no callers; upstream does not have it at all. `newEditorKey`, `descriptorToEditor" and `normalizeCustomModelEntries` are module-private upstream — #9807's snapshot exported them for consumers that arrived later.
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A custom model could only be a bare slug, so it appeared in the picker under its raw slug
and borrowed whatever option descriptors its driver defaulted to. An entry can now carry a
display name and its own capabilities; a bare slug keeps working exactly as before.
This is a prerequisite for the Antigravity port — Antigravity's settings schema references
CustomModelSetting, which this introduces.Adopted from T3 Code
5a433244d0b827176df8b76a05959cd1a7a98ce2(#9807) add custom model names and option descriptorsPylon adaptations
Upstream authored this after its Antigravity provider landed, so its diff carries context
that does not belong here:
driverKind === "antigravity"short-circuits inmodelSelection.tsandProviderInstanceCard.tsxare left out. They come back with theAntigravity port; adding them now would reference a provider Pylon does not have.
probeCodexAppServerProviderthat predates Pylon's refactor in fix(codex): keep subscription capacity through a missed usage read #417 and would have duplicated the existing function. Pylon's
is kept, with only the
CustomModelSettingtyping applied.customModelsbrokeprimeAgentModelsFromSettingsin four places, because Prime is Pylon-only. The sharedproviderModelsFromSettingsalready accepts the wider type and honours entry names andcapabilities, so widening Prime's wrapper both fixes the break and gives Prime custom model
names and per-model option descriptors.
Upstream's rename of the redacted-email test is taken as-is.
Verification
and provider snapshot coverage because this changes Prime.
@t3tools/contracts,@t3tools/shared,@t3tools/webandt3typecheck clean.Worth noting: the Prime break did not fail any test — only typecheck caught it. Anything
reviewing this on test results alone would have missed it.
No contract-breaking change (
CustomModelSettingis a union that still accepts a bare string),no dependency change, no migration.
Model and harness: Claude Opus 5 via Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.