feat(billing): highlight matched conditional multipliers in logs (#6561)
* feat(billing): highlight matched conditional multipliers in usage logs * fix(billing): make request rule tracing stable and type-safe
This commit is contained in:
@@ -1078,6 +1078,7 @@ export function DetailsDialog(props: DetailsDialogProps) {
|
||||
compact
|
||||
billingExpr={decodeBillingExprB64(other.expr_b64)}
|
||||
matchedTierLabel={other.matched_tier}
|
||||
requestRules={other.request_rules}
|
||||
hideCacheColumns={!hasAnyCacheTokens(other)}
|
||||
/>
|
||||
</DetailSection>
|
||||
|
||||
@@ -19,8 +19,9 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
/**
|
||||
* Type definitions for usage logs
|
||||
*/
|
||||
import type { UsageLog } from './data/schema'
|
||||
import type { RequestRuleTrace } from '@/features/pricing/lib/billing-expr'
|
||||
|
||||
import type { UsageLog } from './data/schema'
|
||||
// ============================================================================
|
||||
// Log Category Types
|
||||
// ============================================================================
|
||||
@@ -189,10 +190,12 @@ export interface LogOtherData {
|
||||
frt?: number
|
||||
// Tiered (expression-based) billing fields, set by backend when
|
||||
// billing_mode === 'tiered_expr'. expr_b64 is the base64-encoded billing
|
||||
// expression and matched_tier is the label of the tier that fired.
|
||||
// expression; the matched tier and request-rule traces come from the actual
|
||||
// settlement run.
|
||||
billing_mode?: string
|
||||
expr_b64?: string
|
||||
matched_tier?: string
|
||||
request_rules?: RequestRuleTrace[]
|
||||
reasoning_effort?: string
|
||||
image?: boolean
|
||||
image_ratio?: number
|
||||
|
||||
Reference in New Issue
Block a user