fix: add model display name

This commit is contained in:
wolfkill
2026-05-28 18:36:38 +08:00
committed by lyingbug
parent 4e58dd42cc
commit 43565c5d1b
21 changed files with 187 additions and 46 deletions
+4 -2
View File
@@ -11,8 +11,9 @@ import (
func TestModelResponse_OmitsSecrets(t *testing.T) {
m := &types.Model{
ID: "m-1",
Name: "gpt-x",
ID: "m-1",
Name: "gpt-x",
DisplayName: "Support QA",
Parameters: types.ModelParameters{
APIKey: "sk-real-api-key-do-not-leak",
AppSecret: "app-real-secret-do-not-leak",
@@ -39,6 +40,7 @@ func TestModelResponse_OmitsSecrets(t *testing.T) {
// Non-secret fields pass through.
assert.Contains(t, s, "appid-public-ok-to-show")
assert.Contains(t, s, "api.example.com")
assert.Contains(t, s, `"display_name":"Support QA"`)
}
func TestModelResponse_BuiltinStripsTenantConfig(t *testing.T) {