From 2dca9aa627c898fd8c65072738d1c20b764c70f8 Mon Sep 17 00:00:00 2001 From: phamnazage-jpg Date: Thu, 14 May 2026 09:29:28 +0800 Subject: [PATCH] feat(import): upgrade release evidence for key families --- scripts/import_phase2_data.go | 7 ++++--- scripts/import_phase2_data_test.go | 19 ++++++++++++++++++- scripts/import_zhipu_data.go | 5 +++-- scripts/import_zhipu_data_test.go | 16 +++++++++++++++- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/scripts/import_phase2_data.go b/scripts/import_phase2_data.go index 17cffff..56d5787 100644 --- a/scripts/import_phase2_data.go +++ b/scripts/import_phase2_data.go @@ -93,9 +93,10 @@ var baiduModelMetadataRules = []baiduModelMetadata{ }, { Prefix: "baidu-ernie-5.1", - ModelSourceURL: "https://cloud.baidu.com/product/wenxinworkshop.html", - DateConfidence: "unknown", - DateSourceKind: "official_product_page", + ReleaseDate: "2026-05-09", + ModelSourceURL: "https://ernie.baidu.com/blog/posts/ernie-5.1-0508-release/", + DateConfidence: "official_primary", + DateSourceKind: "official_announcement", }, { Prefix: "baidu-ernie-4.5-turbo-vl", diff --git a/scripts/import_phase2_data_test.go b/scripts/import_phase2_data_test.go index 4e45ab1..025ccd8 100644 --- a/scripts/import_phase2_data_test.go +++ b/scripts/import_phase2_data_test.go @@ -103,7 +103,7 @@ func TestEnrichBaiduModelMetadataFallsBackToPricingSource(t *testing.T) { func TestEnrichBaiduModelMetadataSupportsSourceOnlyRules(t *testing.T) { enriched := enrichBaiduModelMetadata(ModelPricing{ - ModelID: "baidu-ernie-5.1", + ModelID: "baidu-ernie-4.5-turbo-vl", SourceURL: "https://cloud.baidu.com/doc/qianfan/s/wmh4sv6ya", }) @@ -118,6 +118,23 @@ func TestEnrichBaiduModelMetadataSupportsSourceOnlyRules(t *testing.T) { } } +func TestEnrichBaiduModelMetadataSupportsOfficialPrimaryRules(t *testing.T) { + enriched := enrichBaiduModelMetadata(ModelPricing{ + ModelID: "baidu-ernie-5.1", + SourceURL: "https://cloud.baidu.com/doc/qianfan/s/wmh4sv6ya", + }) + + if enriched.ReleaseDate != "2026-05-09" { + t.Fatalf("release date = %q, want %q", enriched.ReleaseDate, "2026-05-09") + } + if enriched.ModelSourceURL != "https://ernie.baidu.com/blog/posts/ernie-5.1-0508-release/" { + t.Fatalf("model source url = %q, want official announcement", enriched.ModelSourceURL) + } + if enriched.DateConfidence != "official_primary" || enriched.DateSourceKind != "official_announcement" { + t.Fatalf("unexpected official metadata: confidence=%q kind=%q", enriched.DateConfidence, enriched.DateSourceKind) + } +} + func TestEnrichBaiduModelMetadataSupportsCatalogBackfillRules(t *testing.T) { enriched := enrichBaiduModelMetadata(ModelPricing{ ModelID: "baidu-qianfan-vl-70b", diff --git a/scripts/import_zhipu_data.go b/scripts/import_zhipu_data.go index ba0076c..57f4f94 100644 --- a/scripts/import_zhipu_data.go +++ b/scripts/import_zhipu_data.go @@ -140,8 +140,9 @@ var zhipuModelMetadataRules = []zhipuModelMetadata{ }, { Prefix: "glm-4-0520", - DateConfidence: "unknown", - DateSourceKind: "catalog_backfill", + ReleaseDate: "2024-06-05", + DateConfidence: "secondary_authoritative", + DateSourceKind: "secondary_authoritative_report", }, { Prefix: "glm-realtime", diff --git a/scripts/import_zhipu_data_test.go b/scripts/import_zhipu_data_test.go index 680de8d..0bcdc49 100644 --- a/scripts/import_zhipu_data_test.go +++ b/scripts/import_zhipu_data_test.go @@ -110,7 +110,7 @@ func TestEnrichZhipuModelMetadataSupportsCatalogBackfillRules(t *testing.T) { func TestEnrichZhipuModelMetadataSupportsLegacyCatalogBackfillRules(t *testing.T) { enriched := enrichZhipuModelMetadata(ModelPricing{ - ModelID: "glm-4-0520", + ModelID: "glm-4-long", SourceURL: "https://open.bigmodel.cn/pricing", }) @@ -122,6 +122,20 @@ func TestEnrichZhipuModelMetadataSupportsLegacyCatalogBackfillRules(t *testing.T } } +func TestEnrichZhipuModelMetadataSupportsSecondaryAuthoritativeLegacyRules(t *testing.T) { + enriched := enrichZhipuModelMetadata(ModelPricing{ + ModelID: "glm-4-0520", + SourceURL: "https://open.bigmodel.cn/pricing", + }) + + if enriched.ReleaseDate != "2024-06-05" { + t.Fatalf("release date = %q, want %q", enriched.ReleaseDate, "2024-06-05") + } + if enriched.DateConfidence != "secondary_authoritative" || enriched.DateSourceKind != "secondary_authoritative_report" { + t.Fatalf("unexpected legacy secondary metadata: confidence=%q kind=%q", enriched.DateConfidence, enriched.DateSourceKind) + } +} + func TestEnrichZhipuModelMetadataSupportsSecondaryAuthoritativeRules(t *testing.T) { enriched := enrichZhipuModelMetadata(ModelPricing{ ModelID: "glm-4-voice",