修复模型引用与账单展示

This commit is contained in:
2026-06-15 00:17:20 +08:00
parent 10ec25d87b
commit 02ba5d3cdd
6 changed files with 146 additions and 47 deletions
@@ -37,6 +37,18 @@ func TestRequestAssetFromValueDetectsDataURLAndRawBase64(t *testing.T) {
}
}
func TestRequestModelNameSupportsObjectModelReference(t *testing.T) {
got := requestModelName(map[string]any{
"model": map[string]any{
"providerId": "easyai",
"modelId": "doubao-seedream-5-0-lite-260128",
},
})
if got != "doubao-seedream-5-0-lite-260128" {
t.Fatalf("expected modelId from object model reference, got %q", got)
}
}
func TestRequestAssetFromValueDetectsGeminiInlineData(t *testing.T) {
payload := base64.StdEncoding.EncodeToString([]byte("inline gemini image"))
decoded, ok, err := requestAssetFromValue(