@leaflow/sdk 0.0.0-dev.445.gdb652b7 → 0.0.0-dev.449.gb0894d4
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/dist/canopy/v1/generated/models.d.ts +27 -6
- package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +6 -5
- package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +6 -5
- package/dist/canopy/v1/generated/validators/requestResource.zod.js +22 -5
- package/package.json +1 -1
|
@@ -647,9 +647,16 @@ export interface RequestResource {
|
|
|
647
647
|
* @nullable
|
|
648
648
|
*/
|
|
649
649
|
api_key_id: string | null;
|
|
650
|
-
/**
|
|
651
|
-
|
|
652
|
-
|
|
650
|
+
/**
|
|
651
|
+
* The portion served from the upstream prefix cache, which costs an order of magnitude less than ordinary input. Null on a request billed on a non-token meter.
|
|
652
|
+
* @nullable
|
|
653
|
+
*/
|
|
654
|
+
cache_read_tokens: number | null;
|
|
655
|
+
/**
|
|
656
|
+
* Tokens written to the provider's prompt cache. Null on a request billed on a non-token meter.
|
|
657
|
+
* @nullable
|
|
658
|
+
*/
|
|
659
|
+
cache_write_tokens: number | null;
|
|
653
660
|
/** The error code on failure. Empty on success */
|
|
654
661
|
error_code: string;
|
|
655
662
|
/** @nullable */
|
|
@@ -658,11 +665,25 @@ export interface RequestResource {
|
|
|
658
665
|
first_token_at: string | null;
|
|
659
666
|
/** A typed request id such as `req_01j...`. Legacy rows may still be returned as a bare UUID. */
|
|
660
667
|
id: string;
|
|
661
|
-
|
|
668
|
+
/**
|
|
669
|
+
* Input tokens the provider billed for. Null on a request billed on a non-token meter, such as image generation, video generation or speech.
|
|
670
|
+
* @nullable
|
|
671
|
+
*/
|
|
672
|
+
input_tokens: number | null;
|
|
662
673
|
/** The model named in the request */
|
|
663
674
|
model_id: string;
|
|
664
|
-
|
|
665
|
-
|
|
675
|
+
/** The request operation, such as video_create or video_retrieve. Absent for historical requests where it was not recorded. */
|
|
676
|
+
operation?: string;
|
|
677
|
+
/**
|
|
678
|
+
* Output tokens the provider billed for. Null on a request billed on a non-token meter, such as image generation, video generation or speech.
|
|
679
|
+
* @nullable
|
|
680
|
+
*/
|
|
681
|
+
output_tokens: number | null;
|
|
682
|
+
/**
|
|
683
|
+
* Reasoning tokens the provider reports separately. Null on a request billed on a non-token meter.
|
|
684
|
+
* @nullable
|
|
685
|
+
*/
|
|
686
|
+
reasoning_tokens: number | null;
|
|
666
687
|
retries: number;
|
|
667
688
|
/**
|
|
668
689
|
* Who made the request. `api_key` means one of the project's API keys and `project_token` a project access token on the OpenAI-compatible endpoints; any other value names the Leaflow service that made it on the project's behalf, such as `assistant`, and more services may appear. Null for requests recorded before sources were tracked
|
|
@@ -42,16 +42,17 @@ import * as zod from "zod";
|
|
|
42
42
|
export declare const CursorPageRequestResource: zod.ZodObject<{
|
|
43
43
|
items: zod.ZodArray<zod.ZodObject<{
|
|
44
44
|
api_key_id: zod.ZodNullable<zod.ZodUUID>;
|
|
45
|
-
cache_read_tokens: zod.ZodInt
|
|
46
|
-
cache_write_tokens: zod.ZodInt
|
|
45
|
+
cache_read_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
46
|
+
cache_write_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
47
47
|
error_code: zod.ZodString;
|
|
48
48
|
finished_at: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
49
49
|
first_token_at: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
50
50
|
id: zod.ZodString;
|
|
51
|
-
input_tokens: zod.ZodInt
|
|
51
|
+
input_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
52
52
|
model_id: zod.ZodString;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
operation: zod.ZodOptional<zod.ZodString>;
|
|
54
|
+
output_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
55
|
+
reasoning_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
55
56
|
retries: zod.ZodInt;
|
|
56
57
|
source: zod.ZodNullable<zod.ZodString>;
|
|
57
58
|
started_at: zod.z.ZodISODateTime;
|
|
@@ -42,16 +42,17 @@ import * as zod from "zod";
|
|
|
42
42
|
export declare const requestResourceSourceMax = 64;
|
|
43
43
|
export declare const RequestResource: zod.ZodObject<{
|
|
44
44
|
api_key_id: zod.ZodNullable<zod.ZodUUID>;
|
|
45
|
-
cache_read_tokens: zod.ZodInt
|
|
46
|
-
cache_write_tokens: zod.ZodInt
|
|
45
|
+
cache_read_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
46
|
+
cache_write_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
47
47
|
error_code: zod.ZodString;
|
|
48
48
|
finished_at: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
49
49
|
first_token_at: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
50
50
|
id: zod.ZodString;
|
|
51
|
-
input_tokens: zod.ZodInt
|
|
51
|
+
input_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
52
52
|
model_id: zod.ZodString;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
operation: zod.ZodOptional<zod.ZodString>;
|
|
54
|
+
output_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
55
|
+
reasoning_tokens: zod.ZodNullable<zod.ZodInt>;
|
|
55
56
|
retries: zod.ZodInt;
|
|
56
57
|
source: zod.ZodNullable<zod.ZodString>;
|
|
57
58
|
started_at: zod.z.ZodISODateTime;
|
|
@@ -49,18 +49,35 @@ export const RequestResource = zod.strictObject({
|
|
|
49
49
|
.describe("Null for a request that did not come through one of the project's API keys."),
|
|
50
50
|
cache_read_tokens: zod
|
|
51
51
|
.int()
|
|
52
|
-
.
|
|
53
|
-
|
|
52
|
+
.nullable()
|
|
53
|
+
.describe("The portion served from the upstream prefix cache, which costs an order of magnitude less than ordinary input. Null on a request billed on a non-token meter."),
|
|
54
|
+
cache_write_tokens: zod
|
|
55
|
+
.int()
|
|
56
|
+
.nullable()
|
|
57
|
+
.describe("Tokens written to the provider's prompt cache. Null on a request billed on a non-token meter."),
|
|
54
58
|
error_code: zod.string().describe("The error code on failure. Empty on success"),
|
|
55
59
|
finished_at: zod.iso.datetime({ offset: true }).nullable(),
|
|
56
60
|
first_token_at: zod.iso.datetime({ offset: true }).nullable(),
|
|
57
61
|
id: zod
|
|
58
62
|
.string()
|
|
59
63
|
.describe("A typed request id such as `req_01j...`. Legacy rows may still be returned as a bare UUID."),
|
|
60
|
-
input_tokens: zod
|
|
64
|
+
input_tokens: zod
|
|
65
|
+
.int()
|
|
66
|
+
.nullable()
|
|
67
|
+
.describe("Input tokens the provider billed for. Null on a request billed on a non-token meter, such as image generation, video generation or speech."),
|
|
61
68
|
model_id: zod.string().describe("The model named in the request"),
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
operation: zod
|
|
70
|
+
.string()
|
|
71
|
+
.optional()
|
|
72
|
+
.describe("The request operation, such as video_create or video_retrieve. Absent for historical requests where it was not recorded."),
|
|
73
|
+
output_tokens: zod
|
|
74
|
+
.int()
|
|
75
|
+
.nullable()
|
|
76
|
+
.describe("Output tokens the provider billed for. Null on a request billed on a non-token meter, such as image generation, video generation or speech."),
|
|
77
|
+
reasoning_tokens: zod
|
|
78
|
+
.int()
|
|
79
|
+
.nullable()
|
|
80
|
+
.describe("Reasoning tokens the provider reports separately. Null on a request billed on a non-token meter."),
|
|
64
81
|
retries: zod.int(),
|
|
65
82
|
source: zod
|
|
66
83
|
.string()
|