fix: miscellaneous quick fixes from CodeRabbit review
- log_info_generate.go: add nil guard in InjectTieredBillingInfo - billing_expr_request.go: merge headers instead of replacing - go.mod: remove incorrect // indirect on expr-lang/expr - ToolPriceSettings.jsx: add null check in syncToVisual - tool_billing.go: fix PricePer1K for image_generation (per-call, not per-1K) - utils.jsx: add minute() to time condition regex - useUsageLogsData.jsx: pass displayMode to renderTieredModelPrice - AGENTS.md, CLAUDE.md: fix Rule 6/7 ordering - relay-gemini.go: add TEXT modality case in CandidatesTokensDetails
This commit is contained in:
@@ -269,6 +269,9 @@ func GenerateMjOtherInfo(relayInfo *relaycommon.RelayInfo, priceData types.Price
|
||||
// module-specific other map. Call this after GenerateTextOtherInfo /
|
||||
// GenerateClaudeOtherInfo / etc. when the request used tiered_expr billing.
|
||||
func InjectTieredBillingInfo(other map[string]interface{}, relayInfo *relaycommon.RelayInfo, result *billingexpr.TieredResult) {
|
||||
if relayInfo == nil || other == nil {
|
||||
return
|
||||
}
|
||||
snap := relayInfo.TieredBillingSnapshot
|
||||
if snap == nil {
|
||||
return
|
||||
|
||||
@@ -74,7 +74,7 @@ func ComputeToolCallQuota(usage ToolCallUsage, groupRatio float64) ToolCallResul
|
||||
items = append(items, ToolCallItem{
|
||||
Name: "image_generation",
|
||||
CallCount: 1,
|
||||
PricePer1K: price * 1000,
|
||||
PricePer1K: price,
|
||||
TotalPrice: price,
|
||||
Quota: quota,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user