fix(billing): improve quota handling and error reporting for pre-consume operations

This commit is contained in:
CaIon
2026-07-11 13:14:22 +08:00
parent 621927f710
commit d9595831bf
12 changed files with 246 additions and 61 deletions
+2 -1
View File
@@ -26,7 +26,8 @@ type TokenCountMeta struct {
Files []*FileMeta `json:"files,omitempty"` // List of files, each with type and content
MaxTokens int `json:"max_tokens,omitempty"` // Maximum tokens allowed in the request
ImagePriceRatio float64 `json:"image_ratio,omitempty"` // Ratio for image size, if applicable
ImagePriceRatio float64 `json:"image_ratio,omitempty"` // Ratio for image size, if applicable
BillingRatios map[string]float64 `json:"billing_ratios,omitempty"` // Validated request multipliers used by pre-consume billing
//IsStreaming bool `json:"is_streaming,omitempty"` // Indicates if the request is streaming
}