Skip to content

[Feature] Relay model ids with a month-day date suffix (deepseek-ai/deepseek-v4-pro-0813) miss the built-in catalog #794

Description

@L4XB

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions