ccusage 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -19
- package/dist/calculate-cost.d.ts +11 -8
- package/dist/{core-BgFXUe_h.js → core-B0ovMhJe.js} +4 -4
- package/dist/{data-loader-CDv0IYZx.js → data-loader-DP5qBPn6.js} +112 -92
- package/dist/{data-loader-aUOjeZ06.d.ts → data-loader-VdEcqJHc.d.ts} +15 -11
- package/dist/data-loader.d.ts +2 -4
- package/dist/data-loader.js +4 -4
- package/dist/{debug-Dk36WQTw.js → debug-C_5Qx11m.js} +13 -13
- package/dist/debug.d.ts +4 -4
- package/dist/debug.js +5 -5
- package/dist/{dist-FwNhpFrW.js → dist-C0-Tf5eD.js} +1 -92
- package/dist/{dist-C_i5I27w.js → dist-LwbOR2Yw.js} +5 -5
- package/dist/{effect-WSjEuzC9-BsxP11fz.js → effect-WSjEuzC9-CJfWUy0j.js} +1 -1
- package/dist/{esm-vjyZjnpZ.js → esm-Dqsc1zmX.js} +1 -1
- package/dist/{index-CISmcbXk-BotItq1T.js → index-CISmcbXk-DCA05NUL.js} +5 -5
- package/dist/index.js +117 -42
- package/dist/{logger-DhDyJEC5.js → logger-DsQC4OvA.js} +17 -17
- package/dist/logger.js +1 -1
- package/dist/{mcp-G-TIOcuj.js → mcp-BQdv12mr.js} +82 -73
- package/dist/mcp.d.ts +2 -4
- package/dist/mcp.js +7 -8
- package/dist/{pricing-fetcher-BCv1Vods.js → pricing-fetcher-BPUgMrB_.js} +9 -9
- package/dist/{index-BurjgCfW.d.ts → pricing-fetcher-CfEgfzSr.d.ts} +19 -249
- package/dist/pricing-fetcher.d.ts +1 -2
- package/dist/pricing-fetcher.js +3 -3
- package/dist/{prompt-IToGuko2.js → prompt-DljZqwMa.js} +4 -4
- package/dist/{sury-DmrZ3_Oj-DhGOjCNc.js → sury-DmrZ3_Oj-CCL_DlTt.js} +1 -1
- package/dist/{types-CFnCBr2I.js → types-DS8M8QF_.js} +4 -4
- package/dist/{valibot-CQk-M5rL-Cq5E7F3g.js → valibot-CQk-M5rL-CkjrLVu1.js} +2 -2
- package/dist/{zod-Db63SLXj-BWdcigdx.js → zod-Db63SLXj-Dyc_OWjq.js} +3 -3
- package/package.json +8 -11
- package/dist/pricing-fetcher-DygIroMj.d.ts +0 -21
- package/dist/shared-args-BtMSktLn.js +0 -68
- package/dist/shared-args.d.ts +0 -108
- package/dist/shared-args.js +0 -8
- package/dist/types-BcXIBMQk.js +0 -42
- package/dist/types-y1JQzaKZ.d.ts +0 -81
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -4
- package/dist/utils-C7kg8MXN.js +0 -10
- package/dist/utils.d.ts +0 -5
- package/dist/utils.js +0 -3
- /package/dist/{arktype-C-GObzDh-Dj1DVoqC.js → arktype-C-GObzDh-Bx7Fdrqj.js} +0 -0
package/dist/types-BcXIBMQk.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { boolean, number, object, optional, pipe, record, regex, string, union } from "./dist-FwNhpFrW.js";
|
|
2
|
-
|
|
3
|
-
//#region src/types.ts
|
|
4
|
-
const ModelSpecSchema = object({
|
|
5
|
-
max_tokens: optional(union([number(), string()])),
|
|
6
|
-
max_input_tokens: optional(union([number(), string()])),
|
|
7
|
-
max_output_tokens: optional(union([number(), string()])),
|
|
8
|
-
input_cost_per_token: optional(number()),
|
|
9
|
-
output_cost_per_token: optional(number()),
|
|
10
|
-
output_cost_per_reasoning_token: optional(number()),
|
|
11
|
-
cache_creation_input_token_cost: optional(number()),
|
|
12
|
-
cache_read_input_token_cost: optional(number()),
|
|
13
|
-
litellm_provider: optional(string()),
|
|
14
|
-
mode: optional(string()),
|
|
15
|
-
supports_function_calling: optional(boolean()),
|
|
16
|
-
supports_parallel_function_calling: optional(boolean()),
|
|
17
|
-
supports_vision: optional(boolean()),
|
|
18
|
-
supports_audio_input: optional(boolean()),
|
|
19
|
-
supports_audio_output: optional(boolean()),
|
|
20
|
-
supports_prompt_caching: optional(boolean()),
|
|
21
|
-
supports_response_schema: optional(boolean()),
|
|
22
|
-
supports_system_messages: optional(boolean()),
|
|
23
|
-
supports_reasoning: optional(boolean()),
|
|
24
|
-
supports_web_search: optional(boolean()),
|
|
25
|
-
search_context_cost_per_query: optional(object({
|
|
26
|
-
search_context_size_low: number(),
|
|
27
|
-
search_context_size_medium: number(),
|
|
28
|
-
search_context_size_high: number()
|
|
29
|
-
})),
|
|
30
|
-
deprecation_date: optional(string())
|
|
31
|
-
});
|
|
32
|
-
const LiteLLMModelPricesSchema = record(string(), ModelSpecSchema);
|
|
33
|
-
const dateSchema = pipe(string(), regex(/^\d{8}$/, "Date must be in YYYYMMDD format"));
|
|
34
|
-
const CostModes = [
|
|
35
|
-
"auto",
|
|
36
|
-
"calculate",
|
|
37
|
-
"display"
|
|
38
|
-
];
|
|
39
|
-
const SortOrders = ["desc", "asc"];
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, SortOrders, dateSchema };
|
package/dist/types-y1JQzaKZ.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { BooleanSchema, InferOutput, NumberSchema, ObjectSchema, OptionalSchema, RecordSchema, RegexAction, SchemaWithPipe, StringSchema, UnionSchema } from "./index-BurjgCfW.js";
|
|
2
|
-
|
|
3
|
-
//#region src/types.d.ts
|
|
4
|
-
declare const ModelSpecSchema: ObjectSchema<{
|
|
5
|
-
readonly max_tokens: OptionalSchema<UnionSchema<[NumberSchema<undefined>, StringSchema<undefined>], undefined>, undefined>;
|
|
6
|
-
readonly max_input_tokens: OptionalSchema<UnionSchema<[NumberSchema<undefined>, StringSchema<undefined>], undefined>, undefined>;
|
|
7
|
-
readonly max_output_tokens: OptionalSchema<UnionSchema<[NumberSchema<undefined>, StringSchema<undefined>], undefined>, undefined>;
|
|
8
|
-
readonly input_cost_per_token: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
9
|
-
readonly output_cost_per_token: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
10
|
-
readonly output_cost_per_reasoning_token: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
11
|
-
readonly cache_creation_input_token_cost: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
12
|
-
readonly cache_read_input_token_cost: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
13
|
-
readonly litellm_provider: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
14
|
-
readonly mode: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
15
|
-
readonly supports_function_calling: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
16
|
-
readonly supports_parallel_function_calling: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
17
|
-
readonly supports_vision: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
18
|
-
readonly supports_audio_input: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
19
|
-
readonly supports_audio_output: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
20
|
-
readonly supports_prompt_caching: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
21
|
-
readonly supports_response_schema: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
22
|
-
readonly supports_system_messages: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
23
|
-
readonly supports_reasoning: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
24
|
-
readonly supports_web_search: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
25
|
-
readonly search_context_cost_per_query: OptionalSchema<ObjectSchema<{
|
|
26
|
-
readonly search_context_size_low: NumberSchema<undefined>;
|
|
27
|
-
readonly search_context_size_medium: NumberSchema<undefined>;
|
|
28
|
-
readonly search_context_size_high: NumberSchema<undefined>;
|
|
29
|
-
}, undefined>, undefined>;
|
|
30
|
-
readonly deprecation_date: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
31
|
-
}, undefined>;
|
|
32
|
-
type ModelSpec = InferOutput<typeof ModelSpecSchema>;
|
|
33
|
-
declare const LiteLLMModelPricesSchema: RecordSchema<StringSchema<undefined>, ObjectSchema<{
|
|
34
|
-
readonly max_tokens: OptionalSchema<UnionSchema<[NumberSchema<undefined>, StringSchema<undefined>], undefined>, undefined>;
|
|
35
|
-
readonly max_input_tokens: OptionalSchema<UnionSchema<[NumberSchema<undefined>, StringSchema<undefined>], undefined>, undefined>;
|
|
36
|
-
readonly max_output_tokens: OptionalSchema<UnionSchema<[NumberSchema<undefined>, StringSchema<undefined>], undefined>, undefined>;
|
|
37
|
-
readonly input_cost_per_token: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
38
|
-
readonly output_cost_per_token: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
39
|
-
readonly output_cost_per_reasoning_token: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
40
|
-
readonly cache_creation_input_token_cost: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
41
|
-
readonly cache_read_input_token_cost: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
42
|
-
readonly litellm_provider: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
43
|
-
readonly mode: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
44
|
-
readonly supports_function_calling: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
45
|
-
readonly supports_parallel_function_calling: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
46
|
-
readonly supports_vision: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
47
|
-
readonly supports_audio_input: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
48
|
-
readonly supports_audio_output: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
49
|
-
readonly supports_prompt_caching: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
50
|
-
readonly supports_response_schema: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
51
|
-
readonly supports_system_messages: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
52
|
-
readonly supports_reasoning: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
53
|
-
readonly supports_web_search: OptionalSchema<BooleanSchema<undefined>, undefined>;
|
|
54
|
-
readonly search_context_cost_per_query: OptionalSchema<ObjectSchema<{
|
|
55
|
-
readonly search_context_size_low: NumberSchema<undefined>;
|
|
56
|
-
readonly search_context_size_medium: NumberSchema<undefined>;
|
|
57
|
-
readonly search_context_size_high: NumberSchema<undefined>;
|
|
58
|
-
}, undefined>, undefined>;
|
|
59
|
-
readonly deprecation_date: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
60
|
-
}, undefined>, undefined>;
|
|
61
|
-
type LiteLLMModelPrices = InferOutput<typeof LiteLLMModelPricesSchema>;
|
|
62
|
-
declare const dateSchema: SchemaWithPipe<readonly [StringSchema<undefined>, RegexAction<string, "Date must be in YYYYMMDD format">]>;
|
|
63
|
-
interface TokenTotals {
|
|
64
|
-
inputTokens: number;
|
|
65
|
-
outputTokens: number;
|
|
66
|
-
cacheCreationTokens: number;
|
|
67
|
-
cacheReadTokens: number;
|
|
68
|
-
totalCost: number;
|
|
69
|
-
}
|
|
70
|
-
interface TokenData {
|
|
71
|
-
inputTokens: number;
|
|
72
|
-
outputTokens: number;
|
|
73
|
-
cacheCreationTokens: number;
|
|
74
|
-
cacheReadTokens: number;
|
|
75
|
-
}
|
|
76
|
-
declare const CostModes: readonly ["auto", "calculate", "display"];
|
|
77
|
-
type CostMode = (typeof CostModes)[number];
|
|
78
|
-
declare const SortOrders: readonly ["desc", "asc"];
|
|
79
|
-
type SortOrder = (typeof SortOrders)[number];
|
|
80
|
-
//#endregion
|
|
81
|
-
export { CostMode, CostModes as CostModes$1, LiteLLMModelPrices, LiteLLMModelPricesSchema as LiteLLMModelPricesSchema$1, ModelSpec, ModelSpecSchema as ModelSpecSchema$1, SortOrder, SortOrders as SortOrders$1, TokenData, TokenTotals, dateSchema as dateSchema$1 };
|
package/dist/types.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "./index-BurjgCfW.js";
|
|
2
|
-
import { CostMode, CostModes$1 as CostModes, LiteLLMModelPrices, LiteLLMModelPricesSchema$1 as LiteLLMModelPricesSchema, ModelSpec, ModelSpecSchema$1 as ModelSpecSchema, SortOrder, SortOrders$1 as SortOrders, TokenData, TokenTotals, dateSchema$1 as dateSchema } from "./types-y1JQzaKZ.js";
|
|
3
|
-
export { CostMode, CostModes, LiteLLMModelPrices, LiteLLMModelPricesSchema, ModelSpec, ModelSpecSchema, SortOrder, SortOrders, TokenData, TokenTotals, dateSchema };
|
package/dist/types.js
DELETED
package/dist/utils-C7kg8MXN.js
DELETED
package/dist/utils.d.ts
DELETED
package/dist/utils.js
DELETED
|
File without changes
|