@meridianlabs/log-viewer 0.3.280 → 0.3.282
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.
|
@@ -2165,6 +2165,7 @@ export declare function makeSampleLog(taskName: string): {
|
|
|
2165
2165
|
} | null;
|
|
2166
2166
|
model: string;
|
|
2167
2167
|
} | null;
|
|
2168
|
+
input_context_tokens?: number | null;
|
|
2168
2169
|
metadata?: {
|
|
2169
2170
|
[key: string]: unknown;
|
|
2170
2171
|
} | null;
|
|
@@ -3979,6 +3980,7 @@ export declare function makeSampleLog(taskName: string): {
|
|
|
3979
3980
|
} | null;
|
|
3980
3981
|
model: string;
|
|
3981
3982
|
} | null;
|
|
3983
|
+
input_context_tokens?: number | null;
|
|
3982
3984
|
metadata?: {
|
|
3983
3985
|
[key: string]: unknown;
|
|
3984
3986
|
} | null;
|
|
@@ -5961,6 +5963,7 @@ export declare function makeSampleLog(taskName: string): {
|
|
|
5961
5963
|
} | null;
|
|
5962
5964
|
model: string;
|
|
5963
5965
|
} | null;
|
|
5966
|
+
input_context_tokens?: number | null;
|
|
5964
5967
|
metadata?: {
|
|
5965
5968
|
[key: string]: unknown;
|
|
5966
5969
|
} | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-list-scenario.d.ts","sourceRoot":"","sources":["../../../e2e/fixtures/log-list-scenario.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAO7C,eAAO,MAAM,OAAO,oBAAoB,CAAC;AAEzC,eAAO,MAAM,SAAS;;;;GAgBrB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;GAUrB,CAAC;AAEJ,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"log-list-scenario.d.ts","sourceRoot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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB7C;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,QA6B3D;AAKD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sCAEnD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sCAEhD;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,IAAI,iBAG3C;AAKD,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sCAIrD"}
|
package/lib/index.js
CHANGED
|
@@ -73536,11 +73536,22 @@ var scoreText = (score) => {
|
|
|
73536
73536
|
* this bound (or non-finite / negative) a count is corrupt and reads as
|
|
73537
73537
|
* missing — the call renders without curves, like one with no usage. */ var kMaxTokenCount = Number.MAX_SAFE_INTEGER;
|
|
73538
73538
|
/** A token count that is safe to accumulate and divide by, else undefined. */ var tokenCount = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0 && value <= kMaxTokenCount ? value : void 0;
|
|
73539
|
-
/**
|
|
73540
|
-
*
|
|
73541
|
-
*
|
|
73542
|
-
|
|
73543
|
-
|
|
73539
|
+
/** The call's recorded input_context_tokens, when it is a valid count. Zero
|
|
73540
|
+
* reads as unknown: no request has an empty input, so it only reports a
|
|
73541
|
+
* usage that said 0. */ var recordedContextTokens = (event) => {
|
|
73542
|
+
const context = tokenCount(event.output.input_context_tokens);
|
|
73543
|
+
return context === 0 ? void 0 : context;
|
|
73544
|
+
};
|
|
73545
|
+
/** Input-side tokens for one model call (context occupancy). Prefers the
|
|
73546
|
+
* recorded input_context_tokens: usage is billed, and for a call that made
|
|
73547
|
+
* several requests it sums them. When it is null, absent, zero or invalid
|
|
73548
|
+
* (not known, or a log from before the field) this falls back to the
|
|
73549
|
+
* shared total minus the output side: summing
|
|
73550
|
+
* input + cache categories directly would double-count on providers whose
|
|
73551
|
+
* input_tokens already includes cached reads (OpenAI), and deriving from
|
|
73552
|
+
* usageTotal keeps this surface consistent with the Usage tab. */ var inputSideTokens = (event) => {
|
|
73553
|
+
const context = recordedContextTokens(event);
|
|
73554
|
+
if (context !== void 0) return context;
|
|
73544
73555
|
const usage = event.output.usage;
|
|
73545
73556
|
if (!usage) return void 0;
|
|
73546
73557
|
const total = tokenCount(usageTotal(usage));
|
|
@@ -73787,8 +73798,8 @@ var inertData = (inputs) => ({
|
|
|
73787
73798
|
working: Math.min(workingTime ?? end - t, end - t),
|
|
73788
73799
|
retries: event.retries ?? void 0,
|
|
73789
73800
|
uuid,
|
|
73790
|
-
inputTokens:
|
|
73791
|
-
cachedTokens: tokenCount(usage?.input_tokens_cache_read),
|
|
73801
|
+
inputTokens: inputSideTokens(event),
|
|
73802
|
+
cachedTokens: recordedContextTokens(event) !== void 0 ? void 0 : tokenCount(usage?.input_tokens_cache_read),
|
|
73792
73803
|
outputTokens: tokenCount(usage?.output_tokens),
|
|
73793
73804
|
stopReason,
|
|
73794
73805
|
toolCalls
|