Commit 236858e
fix(catalog): recognize YYMMDD/MMDD/YYMM dated model id suffixes (#3024)
`isDatedVariantId` only accepted an 8-digit `YYYYMMDD` suffix, so the
dated-alias fold in `mergeConfiguredModelsIntoLiveCatalog` never fired for
providers that publish shorter release dates. On a real multi-provider
install the `\d{8}` rule matched none of the 26 numeric-suffixed ids
present, dropping DeepSeek, Kimi, Mistral, Qwen and Solar aliases into
`droppedConfiguredIds` even though a live row for the same model existed.
Widen the suffix to the formats upstreams actually publish -- `YYYYMMDD`,
`YYMMDD`, `MMDD` and `YYMM` -- behind a calendar guard so ordinary numeric
suffixes are not read as dates. `-2048`, `-4096` and `-8192` are rejected;
`YY` is `2\d` rather than `\d\d` so `1301` is rejected too. `-1024` is a
valid `MMDD` and is therefore accepted -- an irreducible collision, pinned
by a test so it stays a known cost.
The fold stays one-directional (`configured=base` -> `live=dated`). A
configured id the provider no longer lists must not be retained on the
strength of a format match alone; #1690 is the explicit opt-in for that.
Hyphenated ISO suffixes (`-2024-08-06`, `-05-06`) remain out of scope.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 0a6393d)
(cherry picked from commit 6dd0850)1 parent 15f92e3 commit 236858e
2 files changed
Lines changed: 117 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
939 | 1000 | | |
940 | 1001 | | |
941 | | - | |
| 1002 | + | |
942 | 1003 | | |
943 | 1004 | | |
944 | 1005 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3651 | 3651 | | |
3652 | 3652 | | |
3653 | 3653 | | |
3654 | | - | |
| 3654 | + | |
3655 | 3655 | | |
3656 | 3656 | | |
3657 | 3657 | | |
3658 | 3658 | | |
3659 | 3659 | | |
3660 | 3660 | | |
3661 | 3661 | | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
3662 | 3716 | | |
3663 | 3717 | | |
3664 | 3718 | | |
| |||
0 commit comments