chore(model-bank): backfill knowledgeCutoff + family/generation data (#15642)

*  feat(model-bank): backfill knowledgeCutoff for OpenAI/Claude/Llama/Phi families (batch 1)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

*  feat(model-bank): add family/generation fields with rule-derived data for chat models

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

*  feat(model-bank): add canonical knowledge-cutoff map with build-time backfill

Adds MODEL_KNOWLEDGE_CUTOFFS (canonical id → YYYY-MM, all values verified
against official provider docs) plus normalizeModelIdForCutoff, which reduces
provider-specific spellings (openrouter/bedrock prefixes, dated snapshots,
-thinking/-fast/-latest/-preview variants, claude dot-versions) to canonical
ids. buildDefaultModelList backfills knowledgeCutoff from the map when a model
card has no inline value, so all aggregator providers inherit cutoffs
automatically; inline values always win.

Covers Anthropic (incl. legacy 3.x), OpenAI, Google Gemini/Gemma, xAI Grok,
Meta Llama, Amazon Nova, and Cohere. DeepSeek/Qwen/GLM/Kimi/MiniMax/Mistral
publish no official cutoffs and are intentionally absent. Anthropic inline
PoC entries migrate into the map (single source of truth).

Cross-checked against the batch-1 inline backfill: 0 value mismatches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* 🐛 fix(model-bank): correct Claude Sonnet 4.6 cutoff

*  test(model-bank): sync metadata expectations

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Arvin Xu
2026-06-10 22:59:36 +08:00
committed by GitHub
parent 09e6f02e45
commit 87eba86514
81 changed files with 3603 additions and 11 deletions
@@ -31,7 +31,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "The latest GPT-4 Turbo model includes vision. Vision requests can use JSON mode and function calling. GPT-4 Turbo is an enhanced version that balances accuracy and efficiency for cost-effective multimodal tasks and real-time interactions.",
"displayName": "gpt-4-32k",
"enabled": true,
"family": "gpt",
"generation": "gpt-4",
"id": "gpt-4-0125-preview",
"knowledgeCutoff": undefined,
"pricing": {
"units": [
{
@@ -66,7 +69,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "GPT 3.5 Turbo for text generation and understanding; currently points to gpt-3.5-turbo-0125.",
"displayName": "GPT-3.5 Turbo 1106",
"enabled": true,
"family": "gpt",
"generation": "gpt-3.5",
"id": "gpt-3.5-turbo-1106",
"knowledgeCutoff": undefined,
"pricing": {
"units": [
{
@@ -96,7 +102,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "GPT 3.5 Turbo for text generation and understanding; currently points to gpt-3.5-turbo-0125.",
"displayName": "GPT-3.5 Turbo",
"enabled": true,
"family": "gpt",
"generation": "gpt-3.5",
"id": "gpt-3.5-turbo",
"knowledgeCutoff": "2021-09",
"pricing": {
"units": [
{
@@ -125,7 +134,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "GPT-4 provides a larger context window to handle longer inputs, suitable for broad information synthesis and data analysis.",
"displayName": "GPT-4",
"enabled": true,
"family": "gpt",
"generation": "gpt-4",
"id": "gpt-4",
"knowledgeCutoff": "2023-12",
"pricing": {
"units": [
{
@@ -154,7 +166,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "GPT-4 provides a larger context window to handle longer inputs for scenarios needing broad information integration and data analysis.",
"displayName": "GPT-4 32K",
"enabled": true,
"family": "gpt",
"generation": "gpt-4",
"id": "gpt-4-32k",
"knowledgeCutoff": undefined,
"pricing": {
"units": [
{
@@ -183,7 +198,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "The latest GPT-4 Turbo model includes vision. Vision requests can use JSON mode and function calling. GPT-4 Turbo is an enhanced version that balances accuracy and efficiency for cost-effective multimodal tasks and real-time interactions.",
"displayName": "GPT-4 Turbo Preview 1106",
"enabled": true,
"family": "gpt",
"generation": "gpt-4",
"id": "gpt-4-1106-preview",
"knowledgeCutoff": undefined,
"pricing": {
"units": [
{
@@ -223,7 +241,10 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST
"description": "The latest GPT-4 Turbo model includes vision. Vision requests can use JSON mode and function calling. GPT-4 Turbo is an enhanced version that balances accuracy and efficiency for cost-effective multimodal tasks and real-time interactions.",
"displayName": "GPT-4 Turbo Preview 1106",
"enabled": true,
"family": "gpt",
"generation": "gpt-4",
"id": "gpt-4-1106-preview",
"knowledgeCutoff": undefined,
"pricing": {
"units": [
{