refactor(utils): hide usage pricing types · openclaw/openclaw@08e0b8c
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,10 +18,10 @@ import {
|
18 | 18 | formatUsd, |
19 | 19 | resolveModelCostConfig, |
20 | 20 | resolveModelCostConfigFingerprint, |
21 | | -type PricingTier, |
22 | 21 | } from "./usage-format.js"; |
23 | 22 | |
24 | 23 | type ModelCostConfig = NonNullable<ReturnType<typeof resolveModelCostConfig>>; |
| 24 | +type PricingTier = NonNullable<ModelCostConfig["tieredPricing"]>[number]; |
25 | 25 | |
26 | 26 | function requireCostConfig( |
27 | 27 | cost: ReturnType<typeof resolveModelCostConfig>, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -22,7 +22,7 @@ export { formatTokenCount } from "./token-format.js";
|
22 | 22 | * token counts. The tiers MUST be sorted in ascending `range[0]` order |
23 | 23 | * with no gaps. |
24 | 24 | */ |
25 | | -export type PricingTier = { |
| 25 | +type PricingTier = { |
26 | 26 | input: number; |
27 | 27 | output: number; |
28 | 28 | cacheRead: number; |
@@ -52,7 +52,7 @@ export type ModelCostConfig = {
|
52 | 52 | tieredPricing?: PricingTier[]; |
53 | 53 | }; |
54 | 54 | |
55 | | -export type UsageTotals = { |
| 55 | +type UsageTotals = { |
56 | 56 | input?: number; |
57 | 57 | output?: number; |
58 | 58 | cacheRead?: number; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。