修复模型引用与账单展示
This commit is contained in:
@@ -9,7 +9,7 @@ func TestNormalizeModelMatchKeyRemovesWhitespace(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestTaskBillingModelIdentityPrefersSystemAlias(t *testing.T) {
|
||||
func TestTaskBillingModelIdentityKeepsRequestedModelPrimary(t *testing.T) {
|
||||
identity := taskBillingModelIdentity(GatewayTask{
|
||||
Model: "doubao-5.0 图像编辑",
|
||||
RequestedModel: "doubao-5.0 图像编辑",
|
||||
@@ -21,11 +21,11 @@ func TestTaskBillingModelIdentityPrefersSystemAlias(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
if identity.Model != "doubao-5.0图像编辑" || identity.ResolvedModel != "doubao-5.0图像编辑" {
|
||||
t.Fatalf("expected persisted model to use system alias, got %+v", identity)
|
||||
if identity.Model != "doubao-5.0 图像编辑" || identity.RequestedModel != "doubao-5.0 图像编辑" {
|
||||
t.Fatalf("expected persisted model to keep requested model, got %+v", identity)
|
||||
}
|
||||
if identity.RequestedModel != "doubao-5.0 图像编辑" {
|
||||
t.Fatalf("expected requested model to preserve original request, got %+v", identity)
|
||||
if identity.ResolvedModel != "doubao-5.0图像编辑" {
|
||||
t.Fatalf("expected resolved model to keep system alias, got %+v", identity)
|
||||
}
|
||||
if identity.ModelName != "doubao-image-real" || identity.ProviderModelName != "doubao-provider-image" {
|
||||
t.Fatalf("expected model name/provider model to stay available, got %+v", identity)
|
||||
@@ -43,7 +43,7 @@ func TestTaskBillingModelIdentityFallsBackToBillingLines(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
if identity.Model != "System Model Alias" || identity.ModelName != "system-model-name" {
|
||||
if identity.Model != "front end alias" || identity.ModelName != "system-model-name" || identity.ResolvedModel != "System Model Alias" {
|
||||
t.Fatalf("expected billing lines to provide system model identity, got %+v", identity)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user