feat(import): refine official release metadata backfill
This commit is contained in:
@@ -10,6 +10,16 @@ func TestEnrichBytedanceModelMetadataUsesSpecificFamilyRules(t *testing.T) {
|
||||
wantReleaseDate string
|
||||
wantSourceURL string
|
||||
}{
|
||||
{
|
||||
modelID: "bytedance-doubao-1.5-pro-32k",
|
||||
wantReleaseDate: "2025-01-22",
|
||||
wantSourceURL: "https://developer.volcengine.com/articles/7462939272262189083",
|
||||
},
|
||||
{
|
||||
modelID: "bytedance-doubao-1.5-vision-pro",
|
||||
wantReleaseDate: "2025-01-22",
|
||||
wantSourceURL: "https://developer.volcengine.com/articles/7462939272262189083",
|
||||
},
|
||||
{
|
||||
modelID: "bytedance-doubao-seed-1.6-thinking",
|
||||
wantReleaseDate: "2025-06-11",
|
||||
@@ -25,6 +35,11 @@ func TestEnrichBytedanceModelMetadataUsesSpecificFamilyRules(t *testing.T) {
|
||||
wantReleaseDate: "2025-05-13",
|
||||
wantSourceURL: "https://developer.volcengine.com/articles/7504284064976502823",
|
||||
},
|
||||
{
|
||||
modelID: "bytedance-doubao-seed-code-256k",
|
||||
wantReleaseDate: "2024-06-26",
|
||||
wantSourceURL: "https://developer.volcengine.com/articles/7383101327527641125",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
@@ -56,6 +71,20 @@ func TestEnrichBytedanceModelMetadataFallsBackToPricingSource(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestEnrichBytedanceModelMetadataSupportsSourceOnlyRules(t *testing.T) {
|
||||
enriched := enrichBytedanceModelMetadata(ModelPricing{
|
||||
ModelID: "bytedance-doubao-seed-2.0-pro-256k",
|
||||
SourceURL: "https://www.volcengine.com/docs/82379/1099320",
|
||||
})
|
||||
|
||||
if enriched.ReleaseDate != "" {
|
||||
t.Fatalf("unexpected release date: %q", enriched.ReleaseDate)
|
||||
}
|
||||
if enriched.ModelSourceURL != "https://developer.volcengine.com/articles/7610285824933445675" {
|
||||
t.Fatalf("model source url = %q, want 2.0 source", enriched.ModelSourceURL)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBytedanceReleaseDateValueReturnsNilForUnknownDate(t *testing.T) {
|
||||
if value := releaseDateValue(""); value != nil {
|
||||
t.Fatalf("blank release date should stay nil, got %v", value)
|
||||
|
||||
Reference in New Issue
Block a user