Split out of #786 (part 2 of that report) so it can be closed by a focused change; part 1 (a configurable auto-compaction threshold) stays tracked in #786.
Problem
Relays expose official models as <vendor>/<id>-MMDD, for example deepseek-ai/deepseek-v4-pro-0813. normalizeModelIdCandidates in crates/agent-ui/src/lib/models/modelCatalog.ts strips the vendor prefix and a full -YYYYMMDD date, but not the four-digit month-day form, so the id misses deepseek-v4-pro (contextWindow 1,000,000 / maxOutputToken 384,000) and getProviderModelDefaults falls back to the provider defaults (400,000 / 142,000). The context window is undercounted by about half and auto-compaction fires far too early.
Proposed behavior
Also strip a trailing -MMDD (valid month and day only, and only when no full date is present) for the raw id and its last path segment, so deepseek-ai/deepseek-v4-pro-0813 resolves to deepseek-v4-pro. Ids that exist in the catalog with their date (deepseek-r1-0528) keep matching themselves first.
Scope
crates/agent-ui/src/lib/models/modelCatalog.ts (candidate chain) and crates/agent-gui/test/models/model-catalog.test.mjs. No UI change.
Split out of #786 (part 2 of that report) so it can be closed by a focused change; part 1 (a configurable auto-compaction threshold) stays tracked in #786.
Problem
Relays expose official models as
<vendor>/<id>-MMDD, for exampledeepseek-ai/deepseek-v4-pro-0813.normalizeModelIdCandidatesincrates/agent-ui/src/lib/models/modelCatalog.tsstrips the vendor prefix and a full-YYYYMMDDdate, but not the four-digit month-day form, so the id missesdeepseek-v4-pro(contextWindow 1,000,000 / maxOutputToken 384,000) andgetProviderModelDefaultsfalls back to the provider defaults (400,000 / 142,000). The context window is undercounted by about half and auto-compaction fires far too early.Proposed behavior
Also strip a trailing
-MMDD(valid month and day only, and only when no full date is present) for the raw id and its last path segment, sodeepseek-ai/deepseek-v4-pro-0813resolves todeepseek-v4-pro. Ids that exist in the catalog with their date (deepseek-r1-0528) keep matching themselves first.Scope
crates/agent-ui/src/lib/models/modelCatalog.ts(candidate chain) andcrates/agent-gui/test/models/model-catalog.test.mjs. No UI change.