@flop-labs/contracts 0.1.1 → 0.1.2
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/CHANGELOG.md +7 -0
- package/README.md +10 -0
- package/dist/generated/schemas.d.ts +2508 -24
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +133 -0
- package/dist/generated/schemas.js.map +1 -1
- package/dist/generated/types.d.ts +51 -1
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/generated/validators.d.ts +18 -0
- package/dist/generated/validators.d.ts.map +1 -1
- package/dist/generated/validators.js +348 -0
- package/dist/generated/validators.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/validation.d.ts +4 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +13 -1
- package/dist/validation.js.map +1 -1
- package/package.json +1 -1
|
@@ -531,6 +531,77 @@ export declare const ModelSchema: {
|
|
|
531
531
|
};
|
|
532
532
|
};
|
|
533
533
|
};
|
|
534
|
+
readonly CredentialReceipt: {
|
|
535
|
+
readonly type: "object";
|
|
536
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
537
|
+
readonly properties: {
|
|
538
|
+
readonly request_id: {
|
|
539
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
540
|
+
};
|
|
541
|
+
readonly correlation_id: {
|
|
542
|
+
readonly type: "string";
|
|
543
|
+
readonly description: "Original task/session correlation ID.";
|
|
544
|
+
};
|
|
545
|
+
readonly model: {
|
|
546
|
+
readonly type: "string";
|
|
547
|
+
};
|
|
548
|
+
readonly reserved_spend: {
|
|
549
|
+
readonly type: "number";
|
|
550
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
551
|
+
};
|
|
552
|
+
readonly settled_spend: {
|
|
553
|
+
readonly type: readonly ["number", "null"];
|
|
554
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
555
|
+
};
|
|
556
|
+
readonly settled_spend_raw: {
|
|
557
|
+
readonly type: readonly ["string", "null"];
|
|
558
|
+
readonly pattern: "^[0-9]+$";
|
|
559
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
560
|
+
};
|
|
561
|
+
readonly terminal_event: {
|
|
562
|
+
readonly type: readonly ["string", "null"];
|
|
563
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
564
|
+
};
|
|
565
|
+
readonly channel_id: {
|
|
566
|
+
readonly type: readonly ["string", "null"];
|
|
567
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
568
|
+
};
|
|
569
|
+
readonly created_at: {
|
|
570
|
+
readonly type: "integer";
|
|
571
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
572
|
+
};
|
|
573
|
+
readonly state: {
|
|
574
|
+
readonly type: "string";
|
|
575
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
576
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
577
|
+
};
|
|
578
|
+
readonly response_status: {
|
|
579
|
+
readonly type: readonly ["integer", "null"];
|
|
580
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
readonly CredentialReceiptRequestId: {
|
|
585
|
+
readonly type: "string";
|
|
586
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
587
|
+
readonly not: {
|
|
588
|
+
readonly enum: readonly [".", ".."];
|
|
589
|
+
};
|
|
590
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
591
|
+
};
|
|
592
|
+
readonly CredentialReceiptError: {
|
|
593
|
+
readonly type: "object";
|
|
594
|
+
readonly required: readonly ["error", "message"];
|
|
595
|
+
readonly properties: {
|
|
596
|
+
readonly error: {
|
|
597
|
+
readonly type: "string";
|
|
598
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
599
|
+
};
|
|
600
|
+
readonly message: {
|
|
601
|
+
readonly type: "string";
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
534
605
|
readonly ModelResponse: {
|
|
535
606
|
readonly type: "object";
|
|
536
607
|
readonly required: readonly ["data"];
|
|
@@ -1075,6 +1146,77 @@ export declare const ModelListSchema: {
|
|
|
1075
1146
|
};
|
|
1076
1147
|
};
|
|
1077
1148
|
};
|
|
1149
|
+
readonly CredentialReceipt: {
|
|
1150
|
+
readonly type: "object";
|
|
1151
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
1152
|
+
readonly properties: {
|
|
1153
|
+
readonly request_id: {
|
|
1154
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
1155
|
+
};
|
|
1156
|
+
readonly correlation_id: {
|
|
1157
|
+
readonly type: "string";
|
|
1158
|
+
readonly description: "Original task/session correlation ID.";
|
|
1159
|
+
};
|
|
1160
|
+
readonly model: {
|
|
1161
|
+
readonly type: "string";
|
|
1162
|
+
};
|
|
1163
|
+
readonly reserved_spend: {
|
|
1164
|
+
readonly type: "number";
|
|
1165
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
1166
|
+
};
|
|
1167
|
+
readonly settled_spend: {
|
|
1168
|
+
readonly type: readonly ["number", "null"];
|
|
1169
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
1170
|
+
};
|
|
1171
|
+
readonly settled_spend_raw: {
|
|
1172
|
+
readonly type: readonly ["string", "null"];
|
|
1173
|
+
readonly pattern: "^[0-9]+$";
|
|
1174
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
1175
|
+
};
|
|
1176
|
+
readonly terminal_event: {
|
|
1177
|
+
readonly type: readonly ["string", "null"];
|
|
1178
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
1179
|
+
};
|
|
1180
|
+
readonly channel_id: {
|
|
1181
|
+
readonly type: readonly ["string", "null"];
|
|
1182
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
1183
|
+
};
|
|
1184
|
+
readonly created_at: {
|
|
1185
|
+
readonly type: "integer";
|
|
1186
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
1187
|
+
};
|
|
1188
|
+
readonly state: {
|
|
1189
|
+
readonly type: "string";
|
|
1190
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
1191
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
1192
|
+
};
|
|
1193
|
+
readonly response_status: {
|
|
1194
|
+
readonly type: readonly ["integer", "null"];
|
|
1195
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
1196
|
+
};
|
|
1197
|
+
};
|
|
1198
|
+
};
|
|
1199
|
+
readonly CredentialReceiptRequestId: {
|
|
1200
|
+
readonly type: "string";
|
|
1201
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
1202
|
+
readonly not: {
|
|
1203
|
+
readonly enum: readonly [".", ".."];
|
|
1204
|
+
};
|
|
1205
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
1206
|
+
};
|
|
1207
|
+
readonly CredentialReceiptError: {
|
|
1208
|
+
readonly type: "object";
|
|
1209
|
+
readonly required: readonly ["error", "message"];
|
|
1210
|
+
readonly properties: {
|
|
1211
|
+
readonly error: {
|
|
1212
|
+
readonly type: "string";
|
|
1213
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
1214
|
+
};
|
|
1215
|
+
readonly message: {
|
|
1216
|
+
readonly type: "string";
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1078
1220
|
readonly ModelResponse: {
|
|
1079
1221
|
readonly type: "object";
|
|
1080
1222
|
readonly required: readonly ["data"];
|
|
@@ -1619,6 +1761,77 @@ export declare const ModelResponseSchema: {
|
|
|
1619
1761
|
};
|
|
1620
1762
|
};
|
|
1621
1763
|
};
|
|
1764
|
+
readonly CredentialReceipt: {
|
|
1765
|
+
readonly type: "object";
|
|
1766
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
1767
|
+
readonly properties: {
|
|
1768
|
+
readonly request_id: {
|
|
1769
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
1770
|
+
};
|
|
1771
|
+
readonly correlation_id: {
|
|
1772
|
+
readonly type: "string";
|
|
1773
|
+
readonly description: "Original task/session correlation ID.";
|
|
1774
|
+
};
|
|
1775
|
+
readonly model: {
|
|
1776
|
+
readonly type: "string";
|
|
1777
|
+
};
|
|
1778
|
+
readonly reserved_spend: {
|
|
1779
|
+
readonly type: "number";
|
|
1780
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
1781
|
+
};
|
|
1782
|
+
readonly settled_spend: {
|
|
1783
|
+
readonly type: readonly ["number", "null"];
|
|
1784
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
1785
|
+
};
|
|
1786
|
+
readonly settled_spend_raw: {
|
|
1787
|
+
readonly type: readonly ["string", "null"];
|
|
1788
|
+
readonly pattern: "^[0-9]+$";
|
|
1789
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
1790
|
+
};
|
|
1791
|
+
readonly terminal_event: {
|
|
1792
|
+
readonly type: readonly ["string", "null"];
|
|
1793
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
1794
|
+
};
|
|
1795
|
+
readonly channel_id: {
|
|
1796
|
+
readonly type: readonly ["string", "null"];
|
|
1797
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
1798
|
+
};
|
|
1799
|
+
readonly created_at: {
|
|
1800
|
+
readonly type: "integer";
|
|
1801
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
1802
|
+
};
|
|
1803
|
+
readonly state: {
|
|
1804
|
+
readonly type: "string";
|
|
1805
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
1806
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
1807
|
+
};
|
|
1808
|
+
readonly response_status: {
|
|
1809
|
+
readonly type: readonly ["integer", "null"];
|
|
1810
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
1811
|
+
};
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
readonly CredentialReceiptRequestId: {
|
|
1815
|
+
readonly type: "string";
|
|
1816
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
1817
|
+
readonly not: {
|
|
1818
|
+
readonly enum: readonly [".", ".."];
|
|
1819
|
+
};
|
|
1820
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
1821
|
+
};
|
|
1822
|
+
readonly CredentialReceiptError: {
|
|
1823
|
+
readonly type: "object";
|
|
1824
|
+
readonly required: readonly ["error", "message"];
|
|
1825
|
+
readonly properties: {
|
|
1826
|
+
readonly error: {
|
|
1827
|
+
readonly type: "string";
|
|
1828
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
1829
|
+
};
|
|
1830
|
+
readonly message: {
|
|
1831
|
+
readonly type: "string";
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1834
|
+
};
|
|
1622
1835
|
readonly ModelResponse: {
|
|
1623
1836
|
readonly type: "object";
|
|
1624
1837
|
readonly required: readonly ["data"];
|
|
@@ -2163,6 +2376,77 @@ export declare const ChatCompletionRequestSchema: {
|
|
|
2163
2376
|
};
|
|
2164
2377
|
};
|
|
2165
2378
|
};
|
|
2379
|
+
readonly CredentialReceipt: {
|
|
2380
|
+
readonly type: "object";
|
|
2381
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
2382
|
+
readonly properties: {
|
|
2383
|
+
readonly request_id: {
|
|
2384
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
2385
|
+
};
|
|
2386
|
+
readonly correlation_id: {
|
|
2387
|
+
readonly type: "string";
|
|
2388
|
+
readonly description: "Original task/session correlation ID.";
|
|
2389
|
+
};
|
|
2390
|
+
readonly model: {
|
|
2391
|
+
readonly type: "string";
|
|
2392
|
+
};
|
|
2393
|
+
readonly reserved_spend: {
|
|
2394
|
+
readonly type: "number";
|
|
2395
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
2396
|
+
};
|
|
2397
|
+
readonly settled_spend: {
|
|
2398
|
+
readonly type: readonly ["number", "null"];
|
|
2399
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
2400
|
+
};
|
|
2401
|
+
readonly settled_spend_raw: {
|
|
2402
|
+
readonly type: readonly ["string", "null"];
|
|
2403
|
+
readonly pattern: "^[0-9]+$";
|
|
2404
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
2405
|
+
};
|
|
2406
|
+
readonly terminal_event: {
|
|
2407
|
+
readonly type: readonly ["string", "null"];
|
|
2408
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
2409
|
+
};
|
|
2410
|
+
readonly channel_id: {
|
|
2411
|
+
readonly type: readonly ["string", "null"];
|
|
2412
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
2413
|
+
};
|
|
2414
|
+
readonly created_at: {
|
|
2415
|
+
readonly type: "integer";
|
|
2416
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
2417
|
+
};
|
|
2418
|
+
readonly state: {
|
|
2419
|
+
readonly type: "string";
|
|
2420
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
2421
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
2422
|
+
};
|
|
2423
|
+
readonly response_status: {
|
|
2424
|
+
readonly type: readonly ["integer", "null"];
|
|
2425
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
};
|
|
2429
|
+
readonly CredentialReceiptRequestId: {
|
|
2430
|
+
readonly type: "string";
|
|
2431
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
2432
|
+
readonly not: {
|
|
2433
|
+
readonly enum: readonly [".", ".."];
|
|
2434
|
+
};
|
|
2435
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
2436
|
+
};
|
|
2437
|
+
readonly CredentialReceiptError: {
|
|
2438
|
+
readonly type: "object";
|
|
2439
|
+
readonly required: readonly ["error", "message"];
|
|
2440
|
+
readonly properties: {
|
|
2441
|
+
readonly error: {
|
|
2442
|
+
readonly type: "string";
|
|
2443
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
2444
|
+
};
|
|
2445
|
+
readonly message: {
|
|
2446
|
+
readonly type: "string";
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
};
|
|
2166
2450
|
readonly ModelResponse: {
|
|
2167
2451
|
readonly type: "object";
|
|
2168
2452
|
readonly required: readonly ["data"];
|
|
@@ -2707,6 +2991,77 @@ export declare const ChatCompletionResponseSchema: {
|
|
|
2707
2991
|
};
|
|
2708
2992
|
};
|
|
2709
2993
|
};
|
|
2994
|
+
readonly CredentialReceipt: {
|
|
2995
|
+
readonly type: "object";
|
|
2996
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
2997
|
+
readonly properties: {
|
|
2998
|
+
readonly request_id: {
|
|
2999
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
3000
|
+
};
|
|
3001
|
+
readonly correlation_id: {
|
|
3002
|
+
readonly type: "string";
|
|
3003
|
+
readonly description: "Original task/session correlation ID.";
|
|
3004
|
+
};
|
|
3005
|
+
readonly model: {
|
|
3006
|
+
readonly type: "string";
|
|
3007
|
+
};
|
|
3008
|
+
readonly reserved_spend: {
|
|
3009
|
+
readonly type: "number";
|
|
3010
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
3011
|
+
};
|
|
3012
|
+
readonly settled_spend: {
|
|
3013
|
+
readonly type: readonly ["number", "null"];
|
|
3014
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
3015
|
+
};
|
|
3016
|
+
readonly settled_spend_raw: {
|
|
3017
|
+
readonly type: readonly ["string", "null"];
|
|
3018
|
+
readonly pattern: "^[0-9]+$";
|
|
3019
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
3020
|
+
};
|
|
3021
|
+
readonly terminal_event: {
|
|
3022
|
+
readonly type: readonly ["string", "null"];
|
|
3023
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
3024
|
+
};
|
|
3025
|
+
readonly channel_id: {
|
|
3026
|
+
readonly type: readonly ["string", "null"];
|
|
3027
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
3028
|
+
};
|
|
3029
|
+
readonly created_at: {
|
|
3030
|
+
readonly type: "integer";
|
|
3031
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
3032
|
+
};
|
|
3033
|
+
readonly state: {
|
|
3034
|
+
readonly type: "string";
|
|
3035
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
3036
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
3037
|
+
};
|
|
3038
|
+
readonly response_status: {
|
|
3039
|
+
readonly type: readonly ["integer", "null"];
|
|
3040
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
3041
|
+
};
|
|
3042
|
+
};
|
|
3043
|
+
};
|
|
3044
|
+
readonly CredentialReceiptRequestId: {
|
|
3045
|
+
readonly type: "string";
|
|
3046
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
3047
|
+
readonly not: {
|
|
3048
|
+
readonly enum: readonly [".", ".."];
|
|
3049
|
+
};
|
|
3050
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
3051
|
+
};
|
|
3052
|
+
readonly CredentialReceiptError: {
|
|
3053
|
+
readonly type: "object";
|
|
3054
|
+
readonly required: readonly ["error", "message"];
|
|
3055
|
+
readonly properties: {
|
|
3056
|
+
readonly error: {
|
|
3057
|
+
readonly type: "string";
|
|
3058
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
3059
|
+
};
|
|
3060
|
+
readonly message: {
|
|
3061
|
+
readonly type: "string";
|
|
3062
|
+
};
|
|
3063
|
+
};
|
|
3064
|
+
};
|
|
2710
3065
|
readonly ModelResponse: {
|
|
2711
3066
|
readonly type: "object";
|
|
2712
3067
|
readonly required: readonly ["data"];
|
|
@@ -3251,6 +3606,77 @@ export declare const ChatCompletionChunkSchema: {
|
|
|
3251
3606
|
};
|
|
3252
3607
|
};
|
|
3253
3608
|
};
|
|
3609
|
+
readonly CredentialReceipt: {
|
|
3610
|
+
readonly type: "object";
|
|
3611
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
3612
|
+
readonly properties: {
|
|
3613
|
+
readonly request_id: {
|
|
3614
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
3615
|
+
};
|
|
3616
|
+
readonly correlation_id: {
|
|
3617
|
+
readonly type: "string";
|
|
3618
|
+
readonly description: "Original task/session correlation ID.";
|
|
3619
|
+
};
|
|
3620
|
+
readonly model: {
|
|
3621
|
+
readonly type: "string";
|
|
3622
|
+
};
|
|
3623
|
+
readonly reserved_spend: {
|
|
3624
|
+
readonly type: "number";
|
|
3625
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
3626
|
+
};
|
|
3627
|
+
readonly settled_spend: {
|
|
3628
|
+
readonly type: readonly ["number", "null"];
|
|
3629
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
3630
|
+
};
|
|
3631
|
+
readonly settled_spend_raw: {
|
|
3632
|
+
readonly type: readonly ["string", "null"];
|
|
3633
|
+
readonly pattern: "^[0-9]+$";
|
|
3634
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
3635
|
+
};
|
|
3636
|
+
readonly terminal_event: {
|
|
3637
|
+
readonly type: readonly ["string", "null"];
|
|
3638
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
3639
|
+
};
|
|
3640
|
+
readonly channel_id: {
|
|
3641
|
+
readonly type: readonly ["string", "null"];
|
|
3642
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
3643
|
+
};
|
|
3644
|
+
readonly created_at: {
|
|
3645
|
+
readonly type: "integer";
|
|
3646
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
3647
|
+
};
|
|
3648
|
+
readonly state: {
|
|
3649
|
+
readonly type: "string";
|
|
3650
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
3651
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
3652
|
+
};
|
|
3653
|
+
readonly response_status: {
|
|
3654
|
+
readonly type: readonly ["integer", "null"];
|
|
3655
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
3656
|
+
};
|
|
3657
|
+
};
|
|
3658
|
+
};
|
|
3659
|
+
readonly CredentialReceiptRequestId: {
|
|
3660
|
+
readonly type: "string";
|
|
3661
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
3662
|
+
readonly not: {
|
|
3663
|
+
readonly enum: readonly [".", ".."];
|
|
3664
|
+
};
|
|
3665
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
3666
|
+
};
|
|
3667
|
+
readonly CredentialReceiptError: {
|
|
3668
|
+
readonly type: "object";
|
|
3669
|
+
readonly required: readonly ["error", "message"];
|
|
3670
|
+
readonly properties: {
|
|
3671
|
+
readonly error: {
|
|
3672
|
+
readonly type: "string";
|
|
3673
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
3674
|
+
};
|
|
3675
|
+
readonly message: {
|
|
3676
|
+
readonly type: "string";
|
|
3677
|
+
};
|
|
3678
|
+
};
|
|
3679
|
+
};
|
|
3254
3680
|
readonly ModelResponse: {
|
|
3255
3681
|
readonly type: "object";
|
|
3256
3682
|
readonly required: readonly ["data"];
|
|
@@ -3795,42 +4221,113 @@ export declare const ChatCompletionStreamErrorSchema: {
|
|
|
3795
4221
|
};
|
|
3796
4222
|
};
|
|
3797
4223
|
};
|
|
3798
|
-
readonly
|
|
4224
|
+
readonly CredentialReceipt: {
|
|
3799
4225
|
readonly type: "object";
|
|
3800
|
-
readonly required: readonly ["
|
|
4226
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
3801
4227
|
readonly properties: {
|
|
3802
|
-
readonly
|
|
3803
|
-
readonly $ref: "#/$defs/
|
|
4228
|
+
readonly request_id: {
|
|
4229
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
3804
4230
|
};
|
|
3805
|
-
|
|
3806
|
-
};
|
|
3807
|
-
};
|
|
3808
|
-
};
|
|
3809
|
-
export declare const ChatCompletionToolCallFragmentSchema: {
|
|
3810
|
-
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3811
|
-
readonly $ref: "#/$defs/ChatCompletionToolCallFragment";
|
|
3812
|
-
readonly $defs: {
|
|
3813
|
-
readonly Model: {
|
|
3814
|
-
readonly type: "object";
|
|
3815
|
-
readonly required: readonly ["id", "canonical_slug", "name", "created", "context_length", "architecture", "pricing", "top_provider", "supported_parameters"];
|
|
3816
|
-
readonly properties: {
|
|
3817
|
-
readonly id: {
|
|
4231
|
+
readonly correlation_id: {
|
|
3818
4232
|
readonly type: "string";
|
|
4233
|
+
readonly description: "Original task/session correlation ID.";
|
|
3819
4234
|
};
|
|
3820
|
-
readonly
|
|
4235
|
+
readonly model: {
|
|
3821
4236
|
readonly type: "string";
|
|
3822
4237
|
};
|
|
3823
|
-
readonly
|
|
3824
|
-
readonly type: "
|
|
4238
|
+
readonly reserved_spend: {
|
|
4239
|
+
readonly type: "number";
|
|
4240
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
3825
4241
|
};
|
|
3826
|
-
readonly
|
|
4242
|
+
readonly settled_spend: {
|
|
4243
|
+
readonly type: readonly ["number", "null"];
|
|
4244
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
4245
|
+
};
|
|
4246
|
+
readonly settled_spend_raw: {
|
|
4247
|
+
readonly type: readonly ["string", "null"];
|
|
4248
|
+
readonly pattern: "^[0-9]+$";
|
|
4249
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
4250
|
+
};
|
|
4251
|
+
readonly terminal_event: {
|
|
4252
|
+
readonly type: readonly ["string", "null"];
|
|
4253
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
4254
|
+
};
|
|
4255
|
+
readonly channel_id: {
|
|
4256
|
+
readonly type: readonly ["string", "null"];
|
|
4257
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
4258
|
+
};
|
|
4259
|
+
readonly created_at: {
|
|
3827
4260
|
readonly type: "integer";
|
|
4261
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
3828
4262
|
};
|
|
3829
|
-
readonly
|
|
4263
|
+
readonly state: {
|
|
3830
4264
|
readonly type: "string";
|
|
4265
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
4266
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
3831
4267
|
};
|
|
3832
|
-
readonly
|
|
3833
|
-
readonly type: "integer";
|
|
4268
|
+
readonly response_status: {
|
|
4269
|
+
readonly type: readonly ["integer", "null"];
|
|
4270
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
4271
|
+
};
|
|
4272
|
+
};
|
|
4273
|
+
};
|
|
4274
|
+
readonly CredentialReceiptRequestId: {
|
|
4275
|
+
readonly type: "string";
|
|
4276
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
4277
|
+
readonly not: {
|
|
4278
|
+
readonly enum: readonly [".", ".."];
|
|
4279
|
+
};
|
|
4280
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
4281
|
+
};
|
|
4282
|
+
readonly CredentialReceiptError: {
|
|
4283
|
+
readonly type: "object";
|
|
4284
|
+
readonly required: readonly ["error", "message"];
|
|
4285
|
+
readonly properties: {
|
|
4286
|
+
readonly error: {
|
|
4287
|
+
readonly type: "string";
|
|
4288
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
4289
|
+
};
|
|
4290
|
+
readonly message: {
|
|
4291
|
+
readonly type: "string";
|
|
4292
|
+
};
|
|
4293
|
+
};
|
|
4294
|
+
};
|
|
4295
|
+
readonly ModelResponse: {
|
|
4296
|
+
readonly type: "object";
|
|
4297
|
+
readonly required: readonly ["data"];
|
|
4298
|
+
readonly properties: {
|
|
4299
|
+
readonly data: {
|
|
4300
|
+
readonly $ref: "#/$defs/Model";
|
|
4301
|
+
};
|
|
4302
|
+
};
|
|
4303
|
+
};
|
|
4304
|
+
};
|
|
4305
|
+
};
|
|
4306
|
+
export declare const ChatCompletionToolCallFragmentSchema: {
|
|
4307
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
4308
|
+
readonly $ref: "#/$defs/ChatCompletionToolCallFragment";
|
|
4309
|
+
readonly $defs: {
|
|
4310
|
+
readonly Model: {
|
|
4311
|
+
readonly type: "object";
|
|
4312
|
+
readonly required: readonly ["id", "canonical_slug", "name", "created", "context_length", "architecture", "pricing", "top_provider", "supported_parameters"];
|
|
4313
|
+
readonly properties: {
|
|
4314
|
+
readonly id: {
|
|
4315
|
+
readonly type: "string";
|
|
4316
|
+
};
|
|
4317
|
+
readonly canonical_slug: {
|
|
4318
|
+
readonly type: "string";
|
|
4319
|
+
};
|
|
4320
|
+
readonly name: {
|
|
4321
|
+
readonly type: "string";
|
|
4322
|
+
};
|
|
4323
|
+
readonly created: {
|
|
4324
|
+
readonly type: "integer";
|
|
4325
|
+
};
|
|
4326
|
+
readonly description: {
|
|
4327
|
+
readonly type: "string";
|
|
4328
|
+
};
|
|
4329
|
+
readonly context_length: {
|
|
4330
|
+
readonly type: "integer";
|
|
3834
4331
|
};
|
|
3835
4332
|
readonly architecture: {
|
|
3836
4333
|
readonly type: "object";
|
|
@@ -4339,6 +4836,77 @@ export declare const ChatCompletionToolCallFragmentSchema: {
|
|
|
4339
4836
|
};
|
|
4340
4837
|
};
|
|
4341
4838
|
};
|
|
4839
|
+
readonly CredentialReceipt: {
|
|
4840
|
+
readonly type: "object";
|
|
4841
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
4842
|
+
readonly properties: {
|
|
4843
|
+
readonly request_id: {
|
|
4844
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
4845
|
+
};
|
|
4846
|
+
readonly correlation_id: {
|
|
4847
|
+
readonly type: "string";
|
|
4848
|
+
readonly description: "Original task/session correlation ID.";
|
|
4849
|
+
};
|
|
4850
|
+
readonly model: {
|
|
4851
|
+
readonly type: "string";
|
|
4852
|
+
};
|
|
4853
|
+
readonly reserved_spend: {
|
|
4854
|
+
readonly type: "number";
|
|
4855
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
4856
|
+
};
|
|
4857
|
+
readonly settled_spend: {
|
|
4858
|
+
readonly type: readonly ["number", "null"];
|
|
4859
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
4860
|
+
};
|
|
4861
|
+
readonly settled_spend_raw: {
|
|
4862
|
+
readonly type: readonly ["string", "null"];
|
|
4863
|
+
readonly pattern: "^[0-9]+$";
|
|
4864
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
4865
|
+
};
|
|
4866
|
+
readonly terminal_event: {
|
|
4867
|
+
readonly type: readonly ["string", "null"];
|
|
4868
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
4869
|
+
};
|
|
4870
|
+
readonly channel_id: {
|
|
4871
|
+
readonly type: readonly ["string", "null"];
|
|
4872
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
4873
|
+
};
|
|
4874
|
+
readonly created_at: {
|
|
4875
|
+
readonly type: "integer";
|
|
4876
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
4877
|
+
};
|
|
4878
|
+
readonly state: {
|
|
4879
|
+
readonly type: "string";
|
|
4880
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
4881
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
4882
|
+
};
|
|
4883
|
+
readonly response_status: {
|
|
4884
|
+
readonly type: readonly ["integer", "null"];
|
|
4885
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
4886
|
+
};
|
|
4887
|
+
};
|
|
4888
|
+
};
|
|
4889
|
+
readonly CredentialReceiptRequestId: {
|
|
4890
|
+
readonly type: "string";
|
|
4891
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
4892
|
+
readonly not: {
|
|
4893
|
+
readonly enum: readonly [".", ".."];
|
|
4894
|
+
};
|
|
4895
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
4896
|
+
};
|
|
4897
|
+
readonly CredentialReceiptError: {
|
|
4898
|
+
readonly type: "object";
|
|
4899
|
+
readonly required: readonly ["error", "message"];
|
|
4900
|
+
readonly properties: {
|
|
4901
|
+
readonly error: {
|
|
4902
|
+
readonly type: "string";
|
|
4903
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
4904
|
+
};
|
|
4905
|
+
readonly message: {
|
|
4906
|
+
readonly type: "string";
|
|
4907
|
+
};
|
|
4908
|
+
};
|
|
4909
|
+
};
|
|
4342
4910
|
readonly ModelResponse: {
|
|
4343
4911
|
readonly type: "object";
|
|
4344
4912
|
readonly required: readonly ["data"];
|
|
@@ -4883,6 +5451,1922 @@ export declare const ChatCompletionStreamUsageSchema: {
|
|
|
4883
5451
|
};
|
|
4884
5452
|
};
|
|
4885
5453
|
};
|
|
5454
|
+
readonly CredentialReceipt: {
|
|
5455
|
+
readonly type: "object";
|
|
5456
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
5457
|
+
readonly properties: {
|
|
5458
|
+
readonly request_id: {
|
|
5459
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
5460
|
+
};
|
|
5461
|
+
readonly correlation_id: {
|
|
5462
|
+
readonly type: "string";
|
|
5463
|
+
readonly description: "Original task/session correlation ID.";
|
|
5464
|
+
};
|
|
5465
|
+
readonly model: {
|
|
5466
|
+
readonly type: "string";
|
|
5467
|
+
};
|
|
5468
|
+
readonly reserved_spend: {
|
|
5469
|
+
readonly type: "number";
|
|
5470
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
5471
|
+
};
|
|
5472
|
+
readonly settled_spend: {
|
|
5473
|
+
readonly type: readonly ["number", "null"];
|
|
5474
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
5475
|
+
};
|
|
5476
|
+
readonly settled_spend_raw: {
|
|
5477
|
+
readonly type: readonly ["string", "null"];
|
|
5478
|
+
readonly pattern: "^[0-9]+$";
|
|
5479
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
5480
|
+
};
|
|
5481
|
+
readonly terminal_event: {
|
|
5482
|
+
readonly type: readonly ["string", "null"];
|
|
5483
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
5484
|
+
};
|
|
5485
|
+
readonly channel_id: {
|
|
5486
|
+
readonly type: readonly ["string", "null"];
|
|
5487
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
5488
|
+
};
|
|
5489
|
+
readonly created_at: {
|
|
5490
|
+
readonly type: "integer";
|
|
5491
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
5492
|
+
};
|
|
5493
|
+
readonly state: {
|
|
5494
|
+
readonly type: "string";
|
|
5495
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
5496
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
5497
|
+
};
|
|
5498
|
+
readonly response_status: {
|
|
5499
|
+
readonly type: readonly ["integer", "null"];
|
|
5500
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
5501
|
+
};
|
|
5502
|
+
};
|
|
5503
|
+
};
|
|
5504
|
+
readonly CredentialReceiptRequestId: {
|
|
5505
|
+
readonly type: "string";
|
|
5506
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
5507
|
+
readonly not: {
|
|
5508
|
+
readonly enum: readonly [".", ".."];
|
|
5509
|
+
};
|
|
5510
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
5511
|
+
};
|
|
5512
|
+
readonly CredentialReceiptError: {
|
|
5513
|
+
readonly type: "object";
|
|
5514
|
+
readonly required: readonly ["error", "message"];
|
|
5515
|
+
readonly properties: {
|
|
5516
|
+
readonly error: {
|
|
5517
|
+
readonly type: "string";
|
|
5518
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
5519
|
+
};
|
|
5520
|
+
readonly message: {
|
|
5521
|
+
readonly type: "string";
|
|
5522
|
+
};
|
|
5523
|
+
};
|
|
5524
|
+
};
|
|
5525
|
+
readonly ModelResponse: {
|
|
5526
|
+
readonly type: "object";
|
|
5527
|
+
readonly required: readonly ["data"];
|
|
5528
|
+
readonly properties: {
|
|
5529
|
+
readonly data: {
|
|
5530
|
+
readonly $ref: "#/$defs/Model";
|
|
5531
|
+
};
|
|
5532
|
+
};
|
|
5533
|
+
};
|
|
5534
|
+
};
|
|
5535
|
+
};
|
|
5536
|
+
export declare const CredentialReceiptSchema: {
|
|
5537
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
5538
|
+
readonly $ref: "#/$defs/CredentialReceipt";
|
|
5539
|
+
readonly $defs: {
|
|
5540
|
+
readonly Model: {
|
|
5541
|
+
readonly type: "object";
|
|
5542
|
+
readonly required: readonly ["id", "canonical_slug", "name", "created", "context_length", "architecture", "pricing", "top_provider", "supported_parameters"];
|
|
5543
|
+
readonly properties: {
|
|
5544
|
+
readonly id: {
|
|
5545
|
+
readonly type: "string";
|
|
5546
|
+
};
|
|
5547
|
+
readonly canonical_slug: {
|
|
5548
|
+
readonly type: "string";
|
|
5549
|
+
};
|
|
5550
|
+
readonly name: {
|
|
5551
|
+
readonly type: "string";
|
|
5552
|
+
};
|
|
5553
|
+
readonly created: {
|
|
5554
|
+
readonly type: "integer";
|
|
5555
|
+
};
|
|
5556
|
+
readonly description: {
|
|
5557
|
+
readonly type: "string";
|
|
5558
|
+
};
|
|
5559
|
+
readonly context_length: {
|
|
5560
|
+
readonly type: "integer";
|
|
5561
|
+
};
|
|
5562
|
+
readonly architecture: {
|
|
5563
|
+
readonly type: "object";
|
|
5564
|
+
readonly required: readonly ["input_modalities", "output_modalities"];
|
|
5565
|
+
readonly properties: {
|
|
5566
|
+
readonly input_modalities: {
|
|
5567
|
+
readonly type: "array";
|
|
5568
|
+
readonly items: {
|
|
5569
|
+
readonly type: "string";
|
|
5570
|
+
};
|
|
5571
|
+
};
|
|
5572
|
+
readonly output_modalities: {
|
|
5573
|
+
readonly type: "array";
|
|
5574
|
+
readonly items: {
|
|
5575
|
+
readonly type: "string";
|
|
5576
|
+
};
|
|
5577
|
+
};
|
|
5578
|
+
readonly tokenizer: {
|
|
5579
|
+
readonly type: "string";
|
|
5580
|
+
};
|
|
5581
|
+
readonly instruct_type: {
|
|
5582
|
+
readonly type: readonly ["string", "null"];
|
|
5583
|
+
};
|
|
5584
|
+
};
|
|
5585
|
+
};
|
|
5586
|
+
readonly pricing: {
|
|
5587
|
+
readonly type: "object";
|
|
5588
|
+
readonly required: readonly ["prompt", "completion"];
|
|
5589
|
+
readonly properties: {
|
|
5590
|
+
readonly prompt: {
|
|
5591
|
+
readonly type: "string";
|
|
5592
|
+
};
|
|
5593
|
+
readonly completion: {
|
|
5594
|
+
readonly type: "string";
|
|
5595
|
+
};
|
|
5596
|
+
readonly request: {
|
|
5597
|
+
readonly type: "string";
|
|
5598
|
+
};
|
|
5599
|
+
readonly image: {
|
|
5600
|
+
readonly type: "string";
|
|
5601
|
+
};
|
|
5602
|
+
readonly input_cache_read: {
|
|
5603
|
+
readonly type: "string";
|
|
5604
|
+
};
|
|
5605
|
+
readonly internal_reasoning: {
|
|
5606
|
+
readonly type: "string";
|
|
5607
|
+
};
|
|
5608
|
+
};
|
|
5609
|
+
};
|
|
5610
|
+
readonly top_provider: {
|
|
5611
|
+
readonly type: "object";
|
|
5612
|
+
readonly required: readonly ["context_length", "max_completion_tokens", "is_moderated"];
|
|
5613
|
+
readonly properties: {
|
|
5614
|
+
readonly context_length: {
|
|
5615
|
+
readonly type: "integer";
|
|
5616
|
+
};
|
|
5617
|
+
readonly max_completion_tokens: {
|
|
5618
|
+
readonly type: "integer";
|
|
5619
|
+
};
|
|
5620
|
+
readonly is_moderated: {
|
|
5621
|
+
readonly type: "boolean";
|
|
5622
|
+
};
|
|
5623
|
+
};
|
|
5624
|
+
};
|
|
5625
|
+
readonly supported_parameters: {
|
|
5626
|
+
readonly type: "array";
|
|
5627
|
+
readonly items: {
|
|
5628
|
+
readonly type: "string";
|
|
5629
|
+
};
|
|
5630
|
+
};
|
|
5631
|
+
};
|
|
5632
|
+
};
|
|
5633
|
+
readonly ModelList: {
|
|
5634
|
+
readonly type: "object";
|
|
5635
|
+
readonly required: readonly ["data", "total_count", "links"];
|
|
5636
|
+
readonly properties: {
|
|
5637
|
+
readonly data: {
|
|
5638
|
+
readonly type: "array";
|
|
5639
|
+
readonly items: {
|
|
5640
|
+
readonly $ref: "#/$defs/Model";
|
|
5641
|
+
};
|
|
5642
|
+
};
|
|
5643
|
+
readonly total_count: {
|
|
5644
|
+
readonly type: "integer";
|
|
5645
|
+
};
|
|
5646
|
+
readonly links: {
|
|
5647
|
+
readonly type: "object";
|
|
5648
|
+
readonly required: readonly ["next"];
|
|
5649
|
+
readonly properties: {
|
|
5650
|
+
readonly next: {
|
|
5651
|
+
readonly type: readonly ["string", "null"];
|
|
5652
|
+
};
|
|
5653
|
+
};
|
|
5654
|
+
};
|
|
5655
|
+
};
|
|
5656
|
+
};
|
|
5657
|
+
readonly ChatCompletionRequest: {
|
|
5658
|
+
readonly type: "object";
|
|
5659
|
+
readonly dependentRequired: {
|
|
5660
|
+
readonly max_wait_ms: readonly ["max_cost_flop"];
|
|
5661
|
+
};
|
|
5662
|
+
readonly required: readonly ["model", "messages"];
|
|
5663
|
+
readonly additionalProperties: false;
|
|
5664
|
+
readonly properties: {
|
|
5665
|
+
readonly model: {
|
|
5666
|
+
readonly type: "string";
|
|
5667
|
+
};
|
|
5668
|
+
readonly messages: {
|
|
5669
|
+
readonly type: "array";
|
|
5670
|
+
readonly minItems: 1;
|
|
5671
|
+
readonly items: {
|
|
5672
|
+
readonly type: "object";
|
|
5673
|
+
readonly required: readonly ["role", "content"];
|
|
5674
|
+
readonly properties: {
|
|
5675
|
+
readonly role: {
|
|
5676
|
+
readonly type: "string";
|
|
5677
|
+
readonly enum: readonly ["developer", "system", "user", "assistant", "tool"];
|
|
5678
|
+
};
|
|
5679
|
+
readonly content: {
|
|
5680
|
+
readonly oneOf: readonly [{
|
|
5681
|
+
readonly type: "string";
|
|
5682
|
+
}, {
|
|
5683
|
+
readonly type: "null";
|
|
5684
|
+
}, {
|
|
5685
|
+
readonly type: "array";
|
|
5686
|
+
readonly items: {
|
|
5687
|
+
readonly type: "object";
|
|
5688
|
+
};
|
|
5689
|
+
}];
|
|
5690
|
+
readonly description: "Structured parts are preserved; modalities are capability-gated.";
|
|
5691
|
+
};
|
|
5692
|
+
};
|
|
5693
|
+
};
|
|
5694
|
+
};
|
|
5695
|
+
readonly max_tokens: {
|
|
5696
|
+
readonly type: "integer";
|
|
5697
|
+
readonly default: 256;
|
|
5698
|
+
};
|
|
5699
|
+
readonly temperature: {
|
|
5700
|
+
readonly type: "number";
|
|
5701
|
+
readonly default: 0.7;
|
|
5702
|
+
};
|
|
5703
|
+
readonly top_p: {
|
|
5704
|
+
readonly type: "number";
|
|
5705
|
+
};
|
|
5706
|
+
readonly seed: {
|
|
5707
|
+
readonly type: "integer";
|
|
5708
|
+
};
|
|
5709
|
+
readonly stop: {
|
|
5710
|
+
readonly oneOf: readonly [{
|
|
5711
|
+
readonly type: "string";
|
|
5712
|
+
}, {
|
|
5713
|
+
readonly type: "array";
|
|
5714
|
+
readonly items: {
|
|
5715
|
+
readonly type: "string";
|
|
5716
|
+
};
|
|
5717
|
+
}];
|
|
5718
|
+
};
|
|
5719
|
+
readonly presence_penalty: {
|
|
5720
|
+
readonly type: "number";
|
|
5721
|
+
};
|
|
5722
|
+
readonly frequency_penalty: {
|
|
5723
|
+
readonly type: "number";
|
|
5724
|
+
};
|
|
5725
|
+
readonly logit_bias: {
|
|
5726
|
+
readonly type: "object";
|
|
5727
|
+
readonly additionalProperties: {
|
|
5728
|
+
readonly type: "number";
|
|
5729
|
+
};
|
|
5730
|
+
};
|
|
5731
|
+
readonly tools: {
|
|
5732
|
+
readonly type: "array";
|
|
5733
|
+
readonly items: {
|
|
5734
|
+
readonly type: "object";
|
|
5735
|
+
};
|
|
5736
|
+
};
|
|
5737
|
+
readonly tool_choice: {};
|
|
5738
|
+
readonly parallel_tool_calls: {
|
|
5739
|
+
readonly type: "boolean";
|
|
5740
|
+
};
|
|
5741
|
+
readonly response_format: {
|
|
5742
|
+
readonly type: "object";
|
|
5743
|
+
};
|
|
5744
|
+
readonly stream: {
|
|
5745
|
+
readonly type: "boolean";
|
|
5746
|
+
readonly default: false;
|
|
5747
|
+
};
|
|
5748
|
+
readonly stream_options: {
|
|
5749
|
+
readonly type: "object";
|
|
5750
|
+
readonly properties: {
|
|
5751
|
+
readonly include_usage: {
|
|
5752
|
+
readonly const: true;
|
|
5753
|
+
};
|
|
5754
|
+
};
|
|
5755
|
+
readonly required: readonly ["include_usage"];
|
|
5756
|
+
readonly additionalProperties: false;
|
|
5757
|
+
};
|
|
5758
|
+
readonly max_cost_flop: {
|
|
5759
|
+
readonly type: "number";
|
|
5760
|
+
readonly exclusiveMinimum: 0;
|
|
5761
|
+
};
|
|
5762
|
+
readonly max_wait_ms: {
|
|
5763
|
+
readonly type: "integer";
|
|
5764
|
+
readonly minimum: 1;
|
|
5765
|
+
readonly maximum: 3600000;
|
|
5766
|
+
readonly description: "Opt-in total wait and execution deadline in milliseconds for public completions. Requires max_cost_flop; no ready worker probe is required.";
|
|
5767
|
+
};
|
|
5768
|
+
};
|
|
5769
|
+
};
|
|
5770
|
+
readonly ChatCompletionResponse: {
|
|
5771
|
+
readonly type: "object";
|
|
5772
|
+
readonly required: readonly ["id", "object", "created", "model", "choices", "usage"];
|
|
5773
|
+
readonly properties: {
|
|
5774
|
+
readonly id: {
|
|
5775
|
+
readonly type: "string";
|
|
5776
|
+
};
|
|
5777
|
+
readonly object: {
|
|
5778
|
+
readonly type: "string";
|
|
5779
|
+
readonly const: "chat.completion";
|
|
5780
|
+
};
|
|
5781
|
+
readonly created: {
|
|
5782
|
+
readonly type: "integer";
|
|
5783
|
+
};
|
|
5784
|
+
readonly model: {
|
|
5785
|
+
readonly type: "string";
|
|
5786
|
+
};
|
|
5787
|
+
readonly system_fingerprint: {
|
|
5788
|
+
readonly type: readonly ["string", "null"];
|
|
5789
|
+
};
|
|
5790
|
+
readonly choices: {
|
|
5791
|
+
readonly type: "array";
|
|
5792
|
+
readonly items: {
|
|
5793
|
+
readonly type: "object";
|
|
5794
|
+
readonly required: readonly ["index", "message", "finish_reason"];
|
|
5795
|
+
readonly properties: {
|
|
5796
|
+
readonly index: {
|
|
5797
|
+
readonly type: "integer";
|
|
5798
|
+
};
|
|
5799
|
+
readonly message: {
|
|
5800
|
+
readonly type: "object";
|
|
5801
|
+
readonly required: readonly ["role", "content"];
|
|
5802
|
+
readonly properties: {
|
|
5803
|
+
readonly role: {
|
|
5804
|
+
readonly type: "string";
|
|
5805
|
+
readonly const: "assistant";
|
|
5806
|
+
};
|
|
5807
|
+
readonly content: {
|
|
5808
|
+
readonly type: readonly ["string", "null"];
|
|
5809
|
+
};
|
|
5810
|
+
};
|
|
5811
|
+
};
|
|
5812
|
+
readonly finish_reason: {
|
|
5813
|
+
readonly type: "string";
|
|
5814
|
+
};
|
|
5815
|
+
};
|
|
5816
|
+
};
|
|
5817
|
+
};
|
|
5818
|
+
readonly usage: {
|
|
5819
|
+
readonly type: "object";
|
|
5820
|
+
readonly required: readonly ["prompt_tokens", "completion_tokens", "total_tokens"];
|
|
5821
|
+
readonly properties: {
|
|
5822
|
+
readonly prompt_tokens: {
|
|
5823
|
+
readonly type: "integer";
|
|
5824
|
+
};
|
|
5825
|
+
readonly completion_tokens: {
|
|
5826
|
+
readonly type: "integer";
|
|
5827
|
+
};
|
|
5828
|
+
readonly total_tokens: {
|
|
5829
|
+
readonly type: "integer";
|
|
5830
|
+
};
|
|
5831
|
+
readonly gflops_used: {
|
|
5832
|
+
readonly type: "number";
|
|
5833
|
+
};
|
|
5834
|
+
readonly cost_flop: {
|
|
5835
|
+
readonly type: "number";
|
|
5836
|
+
};
|
|
5837
|
+
};
|
|
5838
|
+
};
|
|
5839
|
+
};
|
|
5840
|
+
};
|
|
5841
|
+
readonly ChatCompletionChunk: {
|
|
5842
|
+
readonly type: "object";
|
|
5843
|
+
readonly required: readonly ["id", "object", "created", "model", "choices"];
|
|
5844
|
+
readonly description: "One decoded SSE JSON payload. All chunks share id, model and created.\nThe first delta is role assistant with empty content. Content precedes\ntool calls; the gateway currently emits all calls in one delta after\nsettlement. A finish delta is empty with a non-null finish_reason.\nSuccess always includes one final choices-empty usage/receipt chunk,\nregardless of stream_options, followed by the literal [DONE].\nA finish_reason of error instead requires a stream error then [DONE].\n";
|
|
5845
|
+
readonly properties: {
|
|
5846
|
+
readonly id: {
|
|
5847
|
+
readonly type: "string";
|
|
5848
|
+
readonly pattern: "[\\s\\S]";
|
|
5849
|
+
};
|
|
5850
|
+
readonly object: {
|
|
5851
|
+
readonly type: "string";
|
|
5852
|
+
readonly const: "chat.completion.chunk";
|
|
5853
|
+
};
|
|
5854
|
+
readonly created: {
|
|
5855
|
+
readonly type: "integer";
|
|
5856
|
+
};
|
|
5857
|
+
readonly model: {
|
|
5858
|
+
readonly type: "string";
|
|
5859
|
+
readonly pattern: "[\\s\\S]";
|
|
5860
|
+
};
|
|
5861
|
+
readonly choices: {
|
|
5862
|
+
readonly type: "array";
|
|
5863
|
+
readonly maxItems: 1;
|
|
5864
|
+
readonly items: {
|
|
5865
|
+
readonly type: "object";
|
|
5866
|
+
readonly required: readonly ["index", "delta", "finish_reason"];
|
|
5867
|
+
readonly properties: {
|
|
5868
|
+
readonly index: {
|
|
5869
|
+
readonly type: "integer";
|
|
5870
|
+
readonly const: 0;
|
|
5871
|
+
};
|
|
5872
|
+
readonly delta: {
|
|
5873
|
+
readonly type: "object";
|
|
5874
|
+
readonly additionalProperties: false;
|
|
5875
|
+
readonly properties: {
|
|
5876
|
+
readonly role: {
|
|
5877
|
+
readonly type: "string";
|
|
5878
|
+
readonly const: "assistant";
|
|
5879
|
+
};
|
|
5880
|
+
readonly content: {
|
|
5881
|
+
readonly type: "string";
|
|
5882
|
+
};
|
|
5883
|
+
readonly tool_calls: {
|
|
5884
|
+
readonly type: "array";
|
|
5885
|
+
readonly minItems: 1;
|
|
5886
|
+
readonly items: {
|
|
5887
|
+
readonly $ref: "#/$defs/ChatCompletionToolCallFragment";
|
|
5888
|
+
};
|
|
5889
|
+
};
|
|
5890
|
+
};
|
|
5891
|
+
};
|
|
5892
|
+
readonly finish_reason: {
|
|
5893
|
+
readonly type: readonly ["string", "null"];
|
|
5894
|
+
readonly pattern: "[\\s\\S]";
|
|
5895
|
+
};
|
|
5896
|
+
};
|
|
5897
|
+
};
|
|
5898
|
+
};
|
|
5899
|
+
readonly usage: {
|
|
5900
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
5901
|
+
};
|
|
5902
|
+
readonly x_flop_receipt: {
|
|
5903
|
+
readonly type: "object";
|
|
5904
|
+
readonly description: "Gateway-reported receipt data, without independent verification.";
|
|
5905
|
+
};
|
|
5906
|
+
};
|
|
5907
|
+
readonly oneOf: readonly [{
|
|
5908
|
+
readonly properties: {
|
|
5909
|
+
readonly choices: {
|
|
5910
|
+
readonly type: "array";
|
|
5911
|
+
readonly minItems: 1;
|
|
5912
|
+
};
|
|
5913
|
+
readonly usage: false;
|
|
5914
|
+
readonly x_flop_receipt: false;
|
|
5915
|
+
};
|
|
5916
|
+
}, {
|
|
5917
|
+
readonly required: readonly ["usage", "x_flop_receipt"];
|
|
5918
|
+
readonly properties: {
|
|
5919
|
+
readonly choices: {
|
|
5920
|
+
readonly type: "array";
|
|
5921
|
+
readonly maxItems: 0;
|
|
5922
|
+
};
|
|
5923
|
+
readonly usage: {
|
|
5924
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
5925
|
+
};
|
|
5926
|
+
readonly x_flop_receipt: {
|
|
5927
|
+
readonly type: "object";
|
|
5928
|
+
};
|
|
5929
|
+
};
|
|
5930
|
+
}];
|
|
5931
|
+
};
|
|
5932
|
+
readonly ChatCompletionToolCallFragment: {
|
|
5933
|
+
readonly type: "object";
|
|
5934
|
+
readonly required: readonly ["index"];
|
|
5935
|
+
readonly description: "Index selects a call. Its first fragment supplies id and type function;\nsubsequent id/type values must agree. Concatenate function.name and\nfunction.arguments fragments in arrival order for that index. Completed\ncalls require a nonempty name and an arguments string. The gateway today\nsends complete calls in one frame; clients may also assemble fragments.\n";
|
|
5936
|
+
readonly properties: {
|
|
5937
|
+
readonly index: {
|
|
5938
|
+
readonly type: "integer";
|
|
5939
|
+
readonly minimum: 0;
|
|
5940
|
+
};
|
|
5941
|
+
readonly id: {
|
|
5942
|
+
readonly type: "string";
|
|
5943
|
+
readonly pattern: "[\\s\\S]";
|
|
5944
|
+
};
|
|
5945
|
+
readonly type: {
|
|
5946
|
+
readonly type: "string";
|
|
5947
|
+
readonly const: "function";
|
|
5948
|
+
};
|
|
5949
|
+
readonly function: {
|
|
5950
|
+
readonly type: "object";
|
|
5951
|
+
readonly additionalProperties: false;
|
|
5952
|
+
readonly properties: {
|
|
5953
|
+
readonly name: {
|
|
5954
|
+
readonly type: "string";
|
|
5955
|
+
};
|
|
5956
|
+
readonly arguments: {
|
|
5957
|
+
readonly type: "string";
|
|
5958
|
+
};
|
|
5959
|
+
};
|
|
5960
|
+
readonly anyOf: readonly [{
|
|
5961
|
+
readonly required: readonly ["name"];
|
|
5962
|
+
readonly properties: {
|
|
5963
|
+
readonly name: {};
|
|
5964
|
+
};
|
|
5965
|
+
}, {
|
|
5966
|
+
readonly required: readonly ["arguments"];
|
|
5967
|
+
readonly properties: {
|
|
5968
|
+
readonly arguments: {};
|
|
5969
|
+
};
|
|
5970
|
+
}];
|
|
5971
|
+
};
|
|
5972
|
+
};
|
|
5973
|
+
readonly anyOf: readonly [{
|
|
5974
|
+
readonly required: readonly ["id"];
|
|
5975
|
+
readonly properties: {
|
|
5976
|
+
readonly id: {};
|
|
5977
|
+
};
|
|
5978
|
+
}, {
|
|
5979
|
+
readonly required: readonly ["type"];
|
|
5980
|
+
readonly properties: {
|
|
5981
|
+
readonly type: {};
|
|
5982
|
+
};
|
|
5983
|
+
}, {
|
|
5984
|
+
readonly required: readonly ["function"];
|
|
5985
|
+
readonly properties: {
|
|
5986
|
+
readonly function: {};
|
|
5987
|
+
};
|
|
5988
|
+
}];
|
|
5989
|
+
};
|
|
5990
|
+
readonly ChatCompletionStreamUsage: {
|
|
5991
|
+
readonly type: "object";
|
|
5992
|
+
readonly required: readonly ["prompt_tokens", "completion_tokens", "total_tokens"];
|
|
5993
|
+
readonly properties: {
|
|
5994
|
+
readonly prompt_tokens: {
|
|
5995
|
+
readonly type: "integer";
|
|
5996
|
+
readonly minimum: 0;
|
|
5997
|
+
};
|
|
5998
|
+
readonly completion_tokens: {
|
|
5999
|
+
readonly type: "integer";
|
|
6000
|
+
readonly minimum: 0;
|
|
6001
|
+
};
|
|
6002
|
+
readonly total_tokens: {
|
|
6003
|
+
readonly type: "integer";
|
|
6004
|
+
readonly minimum: 0;
|
|
6005
|
+
};
|
|
6006
|
+
};
|
|
6007
|
+
};
|
|
6008
|
+
readonly ChatCompletionStreamError: {
|
|
6009
|
+
readonly type: "object";
|
|
6010
|
+
readonly required: readonly ["error"];
|
|
6011
|
+
readonly description: "In-band failure following an empty delta with finish_reason error.\nBroker failures carry estimated usage and x_flop_usage_source estimated,\noptionally retry_after (seconds). Expiry/reconciliation at settlement\nmay omit usage. No error frame is a successful usage/receipt outcome.\n";
|
|
6012
|
+
readonly properties: {
|
|
6013
|
+
readonly error: {
|
|
6014
|
+
readonly oneOf: readonly [{
|
|
6015
|
+
readonly type: "object";
|
|
6016
|
+
readonly required: readonly ["code", "message", "type"];
|
|
6017
|
+
readonly properties: {
|
|
6018
|
+
readonly code: {
|
|
6019
|
+
readonly type: "string";
|
|
6020
|
+
};
|
|
6021
|
+
readonly message: {
|
|
6022
|
+
readonly type: "string";
|
|
6023
|
+
};
|
|
6024
|
+
readonly type: {
|
|
6025
|
+
readonly type: "string";
|
|
6026
|
+
};
|
|
6027
|
+
};
|
|
6028
|
+
}, {
|
|
6029
|
+
readonly type: "string";
|
|
6030
|
+
readonly const: "ephemeral_session_expired";
|
|
6031
|
+
}];
|
|
6032
|
+
};
|
|
6033
|
+
readonly message: {
|
|
6034
|
+
readonly type: "string";
|
|
6035
|
+
};
|
|
6036
|
+
readonly request_id: {
|
|
6037
|
+
readonly type: "string";
|
|
6038
|
+
};
|
|
6039
|
+
readonly retry_after: {
|
|
6040
|
+
readonly type: "integer";
|
|
6041
|
+
readonly minimum: 0;
|
|
6042
|
+
};
|
|
6043
|
+
readonly usage: {
|
|
6044
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
6045
|
+
};
|
|
6046
|
+
readonly x_flop_usage_source: {
|
|
6047
|
+
readonly type: "string";
|
|
6048
|
+
readonly const: "estimated";
|
|
6049
|
+
};
|
|
6050
|
+
};
|
|
6051
|
+
readonly dependentRequired: {
|
|
6052
|
+
readonly usage: readonly ["x_flop_usage_source"];
|
|
6053
|
+
readonly x_flop_usage_source: readonly ["usage"];
|
|
6054
|
+
};
|
|
6055
|
+
readonly if: {
|
|
6056
|
+
readonly properties: {
|
|
6057
|
+
readonly error: {
|
|
6058
|
+
readonly type: "string";
|
|
6059
|
+
};
|
|
6060
|
+
};
|
|
6061
|
+
};
|
|
6062
|
+
readonly then: {
|
|
6063
|
+
readonly required: readonly ["message"];
|
|
6064
|
+
readonly properties: {
|
|
6065
|
+
readonly message: {};
|
|
6066
|
+
};
|
|
6067
|
+
};
|
|
6068
|
+
};
|
|
6069
|
+
readonly CredentialReceipt: {
|
|
6070
|
+
readonly type: "object";
|
|
6071
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
6072
|
+
readonly properties: {
|
|
6073
|
+
readonly request_id: {
|
|
6074
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
6075
|
+
};
|
|
6076
|
+
readonly correlation_id: {
|
|
6077
|
+
readonly type: "string";
|
|
6078
|
+
readonly description: "Original task/session correlation ID.";
|
|
6079
|
+
};
|
|
6080
|
+
readonly model: {
|
|
6081
|
+
readonly type: "string";
|
|
6082
|
+
};
|
|
6083
|
+
readonly reserved_spend: {
|
|
6084
|
+
readonly type: "number";
|
|
6085
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
6086
|
+
};
|
|
6087
|
+
readonly settled_spend: {
|
|
6088
|
+
readonly type: readonly ["number", "null"];
|
|
6089
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
6090
|
+
};
|
|
6091
|
+
readonly settled_spend_raw: {
|
|
6092
|
+
readonly type: readonly ["string", "null"];
|
|
6093
|
+
readonly pattern: "^[0-9]+$";
|
|
6094
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
6095
|
+
};
|
|
6096
|
+
readonly terminal_event: {
|
|
6097
|
+
readonly type: readonly ["string", "null"];
|
|
6098
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
6099
|
+
};
|
|
6100
|
+
readonly channel_id: {
|
|
6101
|
+
readonly type: readonly ["string", "null"];
|
|
6102
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
6103
|
+
};
|
|
6104
|
+
readonly created_at: {
|
|
6105
|
+
readonly type: "integer";
|
|
6106
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
6107
|
+
};
|
|
6108
|
+
readonly state: {
|
|
6109
|
+
readonly type: "string";
|
|
6110
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
6111
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
6112
|
+
};
|
|
6113
|
+
readonly response_status: {
|
|
6114
|
+
readonly type: readonly ["integer", "null"];
|
|
6115
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
6116
|
+
};
|
|
6117
|
+
};
|
|
6118
|
+
};
|
|
6119
|
+
readonly CredentialReceiptRequestId: {
|
|
6120
|
+
readonly type: "string";
|
|
6121
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
6122
|
+
readonly not: {
|
|
6123
|
+
readonly enum: readonly [".", ".."];
|
|
6124
|
+
};
|
|
6125
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
6126
|
+
};
|
|
6127
|
+
readonly CredentialReceiptError: {
|
|
6128
|
+
readonly type: "object";
|
|
6129
|
+
readonly required: readonly ["error", "message"];
|
|
6130
|
+
readonly properties: {
|
|
6131
|
+
readonly error: {
|
|
6132
|
+
readonly type: "string";
|
|
6133
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
6134
|
+
};
|
|
6135
|
+
readonly message: {
|
|
6136
|
+
readonly type: "string";
|
|
6137
|
+
};
|
|
6138
|
+
};
|
|
6139
|
+
};
|
|
6140
|
+
readonly ModelResponse: {
|
|
6141
|
+
readonly type: "object";
|
|
6142
|
+
readonly required: readonly ["data"];
|
|
6143
|
+
readonly properties: {
|
|
6144
|
+
readonly data: {
|
|
6145
|
+
readonly $ref: "#/$defs/Model";
|
|
6146
|
+
};
|
|
6147
|
+
};
|
|
6148
|
+
};
|
|
6149
|
+
};
|
|
6150
|
+
};
|
|
6151
|
+
export declare const CredentialReceiptErrorSchema: {
|
|
6152
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
6153
|
+
readonly $ref: "#/$defs/CredentialReceiptError";
|
|
6154
|
+
readonly $defs: {
|
|
6155
|
+
readonly Model: {
|
|
6156
|
+
readonly type: "object";
|
|
6157
|
+
readonly required: readonly ["id", "canonical_slug", "name", "created", "context_length", "architecture", "pricing", "top_provider", "supported_parameters"];
|
|
6158
|
+
readonly properties: {
|
|
6159
|
+
readonly id: {
|
|
6160
|
+
readonly type: "string";
|
|
6161
|
+
};
|
|
6162
|
+
readonly canonical_slug: {
|
|
6163
|
+
readonly type: "string";
|
|
6164
|
+
};
|
|
6165
|
+
readonly name: {
|
|
6166
|
+
readonly type: "string";
|
|
6167
|
+
};
|
|
6168
|
+
readonly created: {
|
|
6169
|
+
readonly type: "integer";
|
|
6170
|
+
};
|
|
6171
|
+
readonly description: {
|
|
6172
|
+
readonly type: "string";
|
|
6173
|
+
};
|
|
6174
|
+
readonly context_length: {
|
|
6175
|
+
readonly type: "integer";
|
|
6176
|
+
};
|
|
6177
|
+
readonly architecture: {
|
|
6178
|
+
readonly type: "object";
|
|
6179
|
+
readonly required: readonly ["input_modalities", "output_modalities"];
|
|
6180
|
+
readonly properties: {
|
|
6181
|
+
readonly input_modalities: {
|
|
6182
|
+
readonly type: "array";
|
|
6183
|
+
readonly items: {
|
|
6184
|
+
readonly type: "string";
|
|
6185
|
+
};
|
|
6186
|
+
};
|
|
6187
|
+
readonly output_modalities: {
|
|
6188
|
+
readonly type: "array";
|
|
6189
|
+
readonly items: {
|
|
6190
|
+
readonly type: "string";
|
|
6191
|
+
};
|
|
6192
|
+
};
|
|
6193
|
+
readonly tokenizer: {
|
|
6194
|
+
readonly type: "string";
|
|
6195
|
+
};
|
|
6196
|
+
readonly instruct_type: {
|
|
6197
|
+
readonly type: readonly ["string", "null"];
|
|
6198
|
+
};
|
|
6199
|
+
};
|
|
6200
|
+
};
|
|
6201
|
+
readonly pricing: {
|
|
6202
|
+
readonly type: "object";
|
|
6203
|
+
readonly required: readonly ["prompt", "completion"];
|
|
6204
|
+
readonly properties: {
|
|
6205
|
+
readonly prompt: {
|
|
6206
|
+
readonly type: "string";
|
|
6207
|
+
};
|
|
6208
|
+
readonly completion: {
|
|
6209
|
+
readonly type: "string";
|
|
6210
|
+
};
|
|
6211
|
+
readonly request: {
|
|
6212
|
+
readonly type: "string";
|
|
6213
|
+
};
|
|
6214
|
+
readonly image: {
|
|
6215
|
+
readonly type: "string";
|
|
6216
|
+
};
|
|
6217
|
+
readonly input_cache_read: {
|
|
6218
|
+
readonly type: "string";
|
|
6219
|
+
};
|
|
6220
|
+
readonly internal_reasoning: {
|
|
6221
|
+
readonly type: "string";
|
|
6222
|
+
};
|
|
6223
|
+
};
|
|
6224
|
+
};
|
|
6225
|
+
readonly top_provider: {
|
|
6226
|
+
readonly type: "object";
|
|
6227
|
+
readonly required: readonly ["context_length", "max_completion_tokens", "is_moderated"];
|
|
6228
|
+
readonly properties: {
|
|
6229
|
+
readonly context_length: {
|
|
6230
|
+
readonly type: "integer";
|
|
6231
|
+
};
|
|
6232
|
+
readonly max_completion_tokens: {
|
|
6233
|
+
readonly type: "integer";
|
|
6234
|
+
};
|
|
6235
|
+
readonly is_moderated: {
|
|
6236
|
+
readonly type: "boolean";
|
|
6237
|
+
};
|
|
6238
|
+
};
|
|
6239
|
+
};
|
|
6240
|
+
readonly supported_parameters: {
|
|
6241
|
+
readonly type: "array";
|
|
6242
|
+
readonly items: {
|
|
6243
|
+
readonly type: "string";
|
|
6244
|
+
};
|
|
6245
|
+
};
|
|
6246
|
+
};
|
|
6247
|
+
};
|
|
6248
|
+
readonly ModelList: {
|
|
6249
|
+
readonly type: "object";
|
|
6250
|
+
readonly required: readonly ["data", "total_count", "links"];
|
|
6251
|
+
readonly properties: {
|
|
6252
|
+
readonly data: {
|
|
6253
|
+
readonly type: "array";
|
|
6254
|
+
readonly items: {
|
|
6255
|
+
readonly $ref: "#/$defs/Model";
|
|
6256
|
+
};
|
|
6257
|
+
};
|
|
6258
|
+
readonly total_count: {
|
|
6259
|
+
readonly type: "integer";
|
|
6260
|
+
};
|
|
6261
|
+
readonly links: {
|
|
6262
|
+
readonly type: "object";
|
|
6263
|
+
readonly required: readonly ["next"];
|
|
6264
|
+
readonly properties: {
|
|
6265
|
+
readonly next: {
|
|
6266
|
+
readonly type: readonly ["string", "null"];
|
|
6267
|
+
};
|
|
6268
|
+
};
|
|
6269
|
+
};
|
|
6270
|
+
};
|
|
6271
|
+
};
|
|
6272
|
+
readonly ChatCompletionRequest: {
|
|
6273
|
+
readonly type: "object";
|
|
6274
|
+
readonly dependentRequired: {
|
|
6275
|
+
readonly max_wait_ms: readonly ["max_cost_flop"];
|
|
6276
|
+
};
|
|
6277
|
+
readonly required: readonly ["model", "messages"];
|
|
6278
|
+
readonly additionalProperties: false;
|
|
6279
|
+
readonly properties: {
|
|
6280
|
+
readonly model: {
|
|
6281
|
+
readonly type: "string";
|
|
6282
|
+
};
|
|
6283
|
+
readonly messages: {
|
|
6284
|
+
readonly type: "array";
|
|
6285
|
+
readonly minItems: 1;
|
|
6286
|
+
readonly items: {
|
|
6287
|
+
readonly type: "object";
|
|
6288
|
+
readonly required: readonly ["role", "content"];
|
|
6289
|
+
readonly properties: {
|
|
6290
|
+
readonly role: {
|
|
6291
|
+
readonly type: "string";
|
|
6292
|
+
readonly enum: readonly ["developer", "system", "user", "assistant", "tool"];
|
|
6293
|
+
};
|
|
6294
|
+
readonly content: {
|
|
6295
|
+
readonly oneOf: readonly [{
|
|
6296
|
+
readonly type: "string";
|
|
6297
|
+
}, {
|
|
6298
|
+
readonly type: "null";
|
|
6299
|
+
}, {
|
|
6300
|
+
readonly type: "array";
|
|
6301
|
+
readonly items: {
|
|
6302
|
+
readonly type: "object";
|
|
6303
|
+
};
|
|
6304
|
+
}];
|
|
6305
|
+
readonly description: "Structured parts are preserved; modalities are capability-gated.";
|
|
6306
|
+
};
|
|
6307
|
+
};
|
|
6308
|
+
};
|
|
6309
|
+
};
|
|
6310
|
+
readonly max_tokens: {
|
|
6311
|
+
readonly type: "integer";
|
|
6312
|
+
readonly default: 256;
|
|
6313
|
+
};
|
|
6314
|
+
readonly temperature: {
|
|
6315
|
+
readonly type: "number";
|
|
6316
|
+
readonly default: 0.7;
|
|
6317
|
+
};
|
|
6318
|
+
readonly top_p: {
|
|
6319
|
+
readonly type: "number";
|
|
6320
|
+
};
|
|
6321
|
+
readonly seed: {
|
|
6322
|
+
readonly type: "integer";
|
|
6323
|
+
};
|
|
6324
|
+
readonly stop: {
|
|
6325
|
+
readonly oneOf: readonly [{
|
|
6326
|
+
readonly type: "string";
|
|
6327
|
+
}, {
|
|
6328
|
+
readonly type: "array";
|
|
6329
|
+
readonly items: {
|
|
6330
|
+
readonly type: "string";
|
|
6331
|
+
};
|
|
6332
|
+
}];
|
|
6333
|
+
};
|
|
6334
|
+
readonly presence_penalty: {
|
|
6335
|
+
readonly type: "number";
|
|
6336
|
+
};
|
|
6337
|
+
readonly frequency_penalty: {
|
|
6338
|
+
readonly type: "number";
|
|
6339
|
+
};
|
|
6340
|
+
readonly logit_bias: {
|
|
6341
|
+
readonly type: "object";
|
|
6342
|
+
readonly additionalProperties: {
|
|
6343
|
+
readonly type: "number";
|
|
6344
|
+
};
|
|
6345
|
+
};
|
|
6346
|
+
readonly tools: {
|
|
6347
|
+
readonly type: "array";
|
|
6348
|
+
readonly items: {
|
|
6349
|
+
readonly type: "object";
|
|
6350
|
+
};
|
|
6351
|
+
};
|
|
6352
|
+
readonly tool_choice: {};
|
|
6353
|
+
readonly parallel_tool_calls: {
|
|
6354
|
+
readonly type: "boolean";
|
|
6355
|
+
};
|
|
6356
|
+
readonly response_format: {
|
|
6357
|
+
readonly type: "object";
|
|
6358
|
+
};
|
|
6359
|
+
readonly stream: {
|
|
6360
|
+
readonly type: "boolean";
|
|
6361
|
+
readonly default: false;
|
|
6362
|
+
};
|
|
6363
|
+
readonly stream_options: {
|
|
6364
|
+
readonly type: "object";
|
|
6365
|
+
readonly properties: {
|
|
6366
|
+
readonly include_usage: {
|
|
6367
|
+
readonly const: true;
|
|
6368
|
+
};
|
|
6369
|
+
};
|
|
6370
|
+
readonly required: readonly ["include_usage"];
|
|
6371
|
+
readonly additionalProperties: false;
|
|
6372
|
+
};
|
|
6373
|
+
readonly max_cost_flop: {
|
|
6374
|
+
readonly type: "number";
|
|
6375
|
+
readonly exclusiveMinimum: 0;
|
|
6376
|
+
};
|
|
6377
|
+
readonly max_wait_ms: {
|
|
6378
|
+
readonly type: "integer";
|
|
6379
|
+
readonly minimum: 1;
|
|
6380
|
+
readonly maximum: 3600000;
|
|
6381
|
+
readonly description: "Opt-in total wait and execution deadline in milliseconds for public completions. Requires max_cost_flop; no ready worker probe is required.";
|
|
6382
|
+
};
|
|
6383
|
+
};
|
|
6384
|
+
};
|
|
6385
|
+
readonly ChatCompletionResponse: {
|
|
6386
|
+
readonly type: "object";
|
|
6387
|
+
readonly required: readonly ["id", "object", "created", "model", "choices", "usage"];
|
|
6388
|
+
readonly properties: {
|
|
6389
|
+
readonly id: {
|
|
6390
|
+
readonly type: "string";
|
|
6391
|
+
};
|
|
6392
|
+
readonly object: {
|
|
6393
|
+
readonly type: "string";
|
|
6394
|
+
readonly const: "chat.completion";
|
|
6395
|
+
};
|
|
6396
|
+
readonly created: {
|
|
6397
|
+
readonly type: "integer";
|
|
6398
|
+
};
|
|
6399
|
+
readonly model: {
|
|
6400
|
+
readonly type: "string";
|
|
6401
|
+
};
|
|
6402
|
+
readonly system_fingerprint: {
|
|
6403
|
+
readonly type: readonly ["string", "null"];
|
|
6404
|
+
};
|
|
6405
|
+
readonly choices: {
|
|
6406
|
+
readonly type: "array";
|
|
6407
|
+
readonly items: {
|
|
6408
|
+
readonly type: "object";
|
|
6409
|
+
readonly required: readonly ["index", "message", "finish_reason"];
|
|
6410
|
+
readonly properties: {
|
|
6411
|
+
readonly index: {
|
|
6412
|
+
readonly type: "integer";
|
|
6413
|
+
};
|
|
6414
|
+
readonly message: {
|
|
6415
|
+
readonly type: "object";
|
|
6416
|
+
readonly required: readonly ["role", "content"];
|
|
6417
|
+
readonly properties: {
|
|
6418
|
+
readonly role: {
|
|
6419
|
+
readonly type: "string";
|
|
6420
|
+
readonly const: "assistant";
|
|
6421
|
+
};
|
|
6422
|
+
readonly content: {
|
|
6423
|
+
readonly type: readonly ["string", "null"];
|
|
6424
|
+
};
|
|
6425
|
+
};
|
|
6426
|
+
};
|
|
6427
|
+
readonly finish_reason: {
|
|
6428
|
+
readonly type: "string";
|
|
6429
|
+
};
|
|
6430
|
+
};
|
|
6431
|
+
};
|
|
6432
|
+
};
|
|
6433
|
+
readonly usage: {
|
|
6434
|
+
readonly type: "object";
|
|
6435
|
+
readonly required: readonly ["prompt_tokens", "completion_tokens", "total_tokens"];
|
|
6436
|
+
readonly properties: {
|
|
6437
|
+
readonly prompt_tokens: {
|
|
6438
|
+
readonly type: "integer";
|
|
6439
|
+
};
|
|
6440
|
+
readonly completion_tokens: {
|
|
6441
|
+
readonly type: "integer";
|
|
6442
|
+
};
|
|
6443
|
+
readonly total_tokens: {
|
|
6444
|
+
readonly type: "integer";
|
|
6445
|
+
};
|
|
6446
|
+
readonly gflops_used: {
|
|
6447
|
+
readonly type: "number";
|
|
6448
|
+
};
|
|
6449
|
+
readonly cost_flop: {
|
|
6450
|
+
readonly type: "number";
|
|
6451
|
+
};
|
|
6452
|
+
};
|
|
6453
|
+
};
|
|
6454
|
+
};
|
|
6455
|
+
};
|
|
6456
|
+
readonly ChatCompletionChunk: {
|
|
6457
|
+
readonly type: "object";
|
|
6458
|
+
readonly required: readonly ["id", "object", "created", "model", "choices"];
|
|
6459
|
+
readonly description: "One decoded SSE JSON payload. All chunks share id, model and created.\nThe first delta is role assistant with empty content. Content precedes\ntool calls; the gateway currently emits all calls in one delta after\nsettlement. A finish delta is empty with a non-null finish_reason.\nSuccess always includes one final choices-empty usage/receipt chunk,\nregardless of stream_options, followed by the literal [DONE].\nA finish_reason of error instead requires a stream error then [DONE].\n";
|
|
6460
|
+
readonly properties: {
|
|
6461
|
+
readonly id: {
|
|
6462
|
+
readonly type: "string";
|
|
6463
|
+
readonly pattern: "[\\s\\S]";
|
|
6464
|
+
};
|
|
6465
|
+
readonly object: {
|
|
6466
|
+
readonly type: "string";
|
|
6467
|
+
readonly const: "chat.completion.chunk";
|
|
6468
|
+
};
|
|
6469
|
+
readonly created: {
|
|
6470
|
+
readonly type: "integer";
|
|
6471
|
+
};
|
|
6472
|
+
readonly model: {
|
|
6473
|
+
readonly type: "string";
|
|
6474
|
+
readonly pattern: "[\\s\\S]";
|
|
6475
|
+
};
|
|
6476
|
+
readonly choices: {
|
|
6477
|
+
readonly type: "array";
|
|
6478
|
+
readonly maxItems: 1;
|
|
6479
|
+
readonly items: {
|
|
6480
|
+
readonly type: "object";
|
|
6481
|
+
readonly required: readonly ["index", "delta", "finish_reason"];
|
|
6482
|
+
readonly properties: {
|
|
6483
|
+
readonly index: {
|
|
6484
|
+
readonly type: "integer";
|
|
6485
|
+
readonly const: 0;
|
|
6486
|
+
};
|
|
6487
|
+
readonly delta: {
|
|
6488
|
+
readonly type: "object";
|
|
6489
|
+
readonly additionalProperties: false;
|
|
6490
|
+
readonly properties: {
|
|
6491
|
+
readonly role: {
|
|
6492
|
+
readonly type: "string";
|
|
6493
|
+
readonly const: "assistant";
|
|
6494
|
+
};
|
|
6495
|
+
readonly content: {
|
|
6496
|
+
readonly type: "string";
|
|
6497
|
+
};
|
|
6498
|
+
readonly tool_calls: {
|
|
6499
|
+
readonly type: "array";
|
|
6500
|
+
readonly minItems: 1;
|
|
6501
|
+
readonly items: {
|
|
6502
|
+
readonly $ref: "#/$defs/ChatCompletionToolCallFragment";
|
|
6503
|
+
};
|
|
6504
|
+
};
|
|
6505
|
+
};
|
|
6506
|
+
};
|
|
6507
|
+
readonly finish_reason: {
|
|
6508
|
+
readonly type: readonly ["string", "null"];
|
|
6509
|
+
readonly pattern: "[\\s\\S]";
|
|
6510
|
+
};
|
|
6511
|
+
};
|
|
6512
|
+
};
|
|
6513
|
+
};
|
|
6514
|
+
readonly usage: {
|
|
6515
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
6516
|
+
};
|
|
6517
|
+
readonly x_flop_receipt: {
|
|
6518
|
+
readonly type: "object";
|
|
6519
|
+
readonly description: "Gateway-reported receipt data, without independent verification.";
|
|
6520
|
+
};
|
|
6521
|
+
};
|
|
6522
|
+
readonly oneOf: readonly [{
|
|
6523
|
+
readonly properties: {
|
|
6524
|
+
readonly choices: {
|
|
6525
|
+
readonly type: "array";
|
|
6526
|
+
readonly minItems: 1;
|
|
6527
|
+
};
|
|
6528
|
+
readonly usage: false;
|
|
6529
|
+
readonly x_flop_receipt: false;
|
|
6530
|
+
};
|
|
6531
|
+
}, {
|
|
6532
|
+
readonly required: readonly ["usage", "x_flop_receipt"];
|
|
6533
|
+
readonly properties: {
|
|
6534
|
+
readonly choices: {
|
|
6535
|
+
readonly type: "array";
|
|
6536
|
+
readonly maxItems: 0;
|
|
6537
|
+
};
|
|
6538
|
+
readonly usage: {
|
|
6539
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
6540
|
+
};
|
|
6541
|
+
readonly x_flop_receipt: {
|
|
6542
|
+
readonly type: "object";
|
|
6543
|
+
};
|
|
6544
|
+
};
|
|
6545
|
+
}];
|
|
6546
|
+
};
|
|
6547
|
+
readonly ChatCompletionToolCallFragment: {
|
|
6548
|
+
readonly type: "object";
|
|
6549
|
+
readonly required: readonly ["index"];
|
|
6550
|
+
readonly description: "Index selects a call. Its first fragment supplies id and type function;\nsubsequent id/type values must agree. Concatenate function.name and\nfunction.arguments fragments in arrival order for that index. Completed\ncalls require a nonempty name and an arguments string. The gateway today\nsends complete calls in one frame; clients may also assemble fragments.\n";
|
|
6551
|
+
readonly properties: {
|
|
6552
|
+
readonly index: {
|
|
6553
|
+
readonly type: "integer";
|
|
6554
|
+
readonly minimum: 0;
|
|
6555
|
+
};
|
|
6556
|
+
readonly id: {
|
|
6557
|
+
readonly type: "string";
|
|
6558
|
+
readonly pattern: "[\\s\\S]";
|
|
6559
|
+
};
|
|
6560
|
+
readonly type: {
|
|
6561
|
+
readonly type: "string";
|
|
6562
|
+
readonly const: "function";
|
|
6563
|
+
};
|
|
6564
|
+
readonly function: {
|
|
6565
|
+
readonly type: "object";
|
|
6566
|
+
readonly additionalProperties: false;
|
|
6567
|
+
readonly properties: {
|
|
6568
|
+
readonly name: {
|
|
6569
|
+
readonly type: "string";
|
|
6570
|
+
};
|
|
6571
|
+
readonly arguments: {
|
|
6572
|
+
readonly type: "string";
|
|
6573
|
+
};
|
|
6574
|
+
};
|
|
6575
|
+
readonly anyOf: readonly [{
|
|
6576
|
+
readonly required: readonly ["name"];
|
|
6577
|
+
readonly properties: {
|
|
6578
|
+
readonly name: {};
|
|
6579
|
+
};
|
|
6580
|
+
}, {
|
|
6581
|
+
readonly required: readonly ["arguments"];
|
|
6582
|
+
readonly properties: {
|
|
6583
|
+
readonly arguments: {};
|
|
6584
|
+
};
|
|
6585
|
+
}];
|
|
6586
|
+
};
|
|
6587
|
+
};
|
|
6588
|
+
readonly anyOf: readonly [{
|
|
6589
|
+
readonly required: readonly ["id"];
|
|
6590
|
+
readonly properties: {
|
|
6591
|
+
readonly id: {};
|
|
6592
|
+
};
|
|
6593
|
+
}, {
|
|
6594
|
+
readonly required: readonly ["type"];
|
|
6595
|
+
readonly properties: {
|
|
6596
|
+
readonly type: {};
|
|
6597
|
+
};
|
|
6598
|
+
}, {
|
|
6599
|
+
readonly required: readonly ["function"];
|
|
6600
|
+
readonly properties: {
|
|
6601
|
+
readonly function: {};
|
|
6602
|
+
};
|
|
6603
|
+
}];
|
|
6604
|
+
};
|
|
6605
|
+
readonly ChatCompletionStreamUsage: {
|
|
6606
|
+
readonly type: "object";
|
|
6607
|
+
readonly required: readonly ["prompt_tokens", "completion_tokens", "total_tokens"];
|
|
6608
|
+
readonly properties: {
|
|
6609
|
+
readonly prompt_tokens: {
|
|
6610
|
+
readonly type: "integer";
|
|
6611
|
+
readonly minimum: 0;
|
|
6612
|
+
};
|
|
6613
|
+
readonly completion_tokens: {
|
|
6614
|
+
readonly type: "integer";
|
|
6615
|
+
readonly minimum: 0;
|
|
6616
|
+
};
|
|
6617
|
+
readonly total_tokens: {
|
|
6618
|
+
readonly type: "integer";
|
|
6619
|
+
readonly minimum: 0;
|
|
6620
|
+
};
|
|
6621
|
+
};
|
|
6622
|
+
};
|
|
6623
|
+
readonly ChatCompletionStreamError: {
|
|
6624
|
+
readonly type: "object";
|
|
6625
|
+
readonly required: readonly ["error"];
|
|
6626
|
+
readonly description: "In-band failure following an empty delta with finish_reason error.\nBroker failures carry estimated usage and x_flop_usage_source estimated,\noptionally retry_after (seconds). Expiry/reconciliation at settlement\nmay omit usage. No error frame is a successful usage/receipt outcome.\n";
|
|
6627
|
+
readonly properties: {
|
|
6628
|
+
readonly error: {
|
|
6629
|
+
readonly oneOf: readonly [{
|
|
6630
|
+
readonly type: "object";
|
|
6631
|
+
readonly required: readonly ["code", "message", "type"];
|
|
6632
|
+
readonly properties: {
|
|
6633
|
+
readonly code: {
|
|
6634
|
+
readonly type: "string";
|
|
6635
|
+
};
|
|
6636
|
+
readonly message: {
|
|
6637
|
+
readonly type: "string";
|
|
6638
|
+
};
|
|
6639
|
+
readonly type: {
|
|
6640
|
+
readonly type: "string";
|
|
6641
|
+
};
|
|
6642
|
+
};
|
|
6643
|
+
}, {
|
|
6644
|
+
readonly type: "string";
|
|
6645
|
+
readonly const: "ephemeral_session_expired";
|
|
6646
|
+
}];
|
|
6647
|
+
};
|
|
6648
|
+
readonly message: {
|
|
6649
|
+
readonly type: "string";
|
|
6650
|
+
};
|
|
6651
|
+
readonly request_id: {
|
|
6652
|
+
readonly type: "string";
|
|
6653
|
+
};
|
|
6654
|
+
readonly retry_after: {
|
|
6655
|
+
readonly type: "integer";
|
|
6656
|
+
readonly minimum: 0;
|
|
6657
|
+
};
|
|
6658
|
+
readonly usage: {
|
|
6659
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
6660
|
+
};
|
|
6661
|
+
readonly x_flop_usage_source: {
|
|
6662
|
+
readonly type: "string";
|
|
6663
|
+
readonly const: "estimated";
|
|
6664
|
+
};
|
|
6665
|
+
};
|
|
6666
|
+
readonly dependentRequired: {
|
|
6667
|
+
readonly usage: readonly ["x_flop_usage_source"];
|
|
6668
|
+
readonly x_flop_usage_source: readonly ["usage"];
|
|
6669
|
+
};
|
|
6670
|
+
readonly if: {
|
|
6671
|
+
readonly properties: {
|
|
6672
|
+
readonly error: {
|
|
6673
|
+
readonly type: "string";
|
|
6674
|
+
};
|
|
6675
|
+
};
|
|
6676
|
+
};
|
|
6677
|
+
readonly then: {
|
|
6678
|
+
readonly required: readonly ["message"];
|
|
6679
|
+
readonly properties: {
|
|
6680
|
+
readonly message: {};
|
|
6681
|
+
};
|
|
6682
|
+
};
|
|
6683
|
+
};
|
|
6684
|
+
readonly CredentialReceipt: {
|
|
6685
|
+
readonly type: "object";
|
|
6686
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
6687
|
+
readonly properties: {
|
|
6688
|
+
readonly request_id: {
|
|
6689
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
6690
|
+
};
|
|
6691
|
+
readonly correlation_id: {
|
|
6692
|
+
readonly type: "string";
|
|
6693
|
+
readonly description: "Original task/session correlation ID.";
|
|
6694
|
+
};
|
|
6695
|
+
readonly model: {
|
|
6696
|
+
readonly type: "string";
|
|
6697
|
+
};
|
|
6698
|
+
readonly reserved_spend: {
|
|
6699
|
+
readonly type: "number";
|
|
6700
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
6701
|
+
};
|
|
6702
|
+
readonly settled_spend: {
|
|
6703
|
+
readonly type: readonly ["number", "null"];
|
|
6704
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
6705
|
+
};
|
|
6706
|
+
readonly settled_spend_raw: {
|
|
6707
|
+
readonly type: readonly ["string", "null"];
|
|
6708
|
+
readonly pattern: "^[0-9]+$";
|
|
6709
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
6710
|
+
};
|
|
6711
|
+
readonly terminal_event: {
|
|
6712
|
+
readonly type: readonly ["string", "null"];
|
|
6713
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
6714
|
+
};
|
|
6715
|
+
readonly channel_id: {
|
|
6716
|
+
readonly type: readonly ["string", "null"];
|
|
6717
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
6718
|
+
};
|
|
6719
|
+
readonly created_at: {
|
|
6720
|
+
readonly type: "integer";
|
|
6721
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
6722
|
+
};
|
|
6723
|
+
readonly state: {
|
|
6724
|
+
readonly type: "string";
|
|
6725
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
6726
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
6727
|
+
};
|
|
6728
|
+
readonly response_status: {
|
|
6729
|
+
readonly type: readonly ["integer", "null"];
|
|
6730
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
6731
|
+
};
|
|
6732
|
+
};
|
|
6733
|
+
};
|
|
6734
|
+
readonly CredentialReceiptRequestId: {
|
|
6735
|
+
readonly type: "string";
|
|
6736
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
6737
|
+
readonly not: {
|
|
6738
|
+
readonly enum: readonly [".", ".."];
|
|
6739
|
+
};
|
|
6740
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
6741
|
+
};
|
|
6742
|
+
readonly CredentialReceiptError: {
|
|
6743
|
+
readonly type: "object";
|
|
6744
|
+
readonly required: readonly ["error", "message"];
|
|
6745
|
+
readonly properties: {
|
|
6746
|
+
readonly error: {
|
|
6747
|
+
readonly type: "string";
|
|
6748
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
6749
|
+
};
|
|
6750
|
+
readonly message: {
|
|
6751
|
+
readonly type: "string";
|
|
6752
|
+
};
|
|
6753
|
+
};
|
|
6754
|
+
};
|
|
6755
|
+
readonly ModelResponse: {
|
|
6756
|
+
readonly type: "object";
|
|
6757
|
+
readonly required: readonly ["data"];
|
|
6758
|
+
readonly properties: {
|
|
6759
|
+
readonly data: {
|
|
6760
|
+
readonly $ref: "#/$defs/Model";
|
|
6761
|
+
};
|
|
6762
|
+
};
|
|
6763
|
+
};
|
|
6764
|
+
};
|
|
6765
|
+
};
|
|
6766
|
+
export declare const CredentialReceiptRequestIdSchema: {
|
|
6767
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
6768
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
6769
|
+
readonly $defs: {
|
|
6770
|
+
readonly Model: {
|
|
6771
|
+
readonly type: "object";
|
|
6772
|
+
readonly required: readonly ["id", "canonical_slug", "name", "created", "context_length", "architecture", "pricing", "top_provider", "supported_parameters"];
|
|
6773
|
+
readonly properties: {
|
|
6774
|
+
readonly id: {
|
|
6775
|
+
readonly type: "string";
|
|
6776
|
+
};
|
|
6777
|
+
readonly canonical_slug: {
|
|
6778
|
+
readonly type: "string";
|
|
6779
|
+
};
|
|
6780
|
+
readonly name: {
|
|
6781
|
+
readonly type: "string";
|
|
6782
|
+
};
|
|
6783
|
+
readonly created: {
|
|
6784
|
+
readonly type: "integer";
|
|
6785
|
+
};
|
|
6786
|
+
readonly description: {
|
|
6787
|
+
readonly type: "string";
|
|
6788
|
+
};
|
|
6789
|
+
readonly context_length: {
|
|
6790
|
+
readonly type: "integer";
|
|
6791
|
+
};
|
|
6792
|
+
readonly architecture: {
|
|
6793
|
+
readonly type: "object";
|
|
6794
|
+
readonly required: readonly ["input_modalities", "output_modalities"];
|
|
6795
|
+
readonly properties: {
|
|
6796
|
+
readonly input_modalities: {
|
|
6797
|
+
readonly type: "array";
|
|
6798
|
+
readonly items: {
|
|
6799
|
+
readonly type: "string";
|
|
6800
|
+
};
|
|
6801
|
+
};
|
|
6802
|
+
readonly output_modalities: {
|
|
6803
|
+
readonly type: "array";
|
|
6804
|
+
readonly items: {
|
|
6805
|
+
readonly type: "string";
|
|
6806
|
+
};
|
|
6807
|
+
};
|
|
6808
|
+
readonly tokenizer: {
|
|
6809
|
+
readonly type: "string";
|
|
6810
|
+
};
|
|
6811
|
+
readonly instruct_type: {
|
|
6812
|
+
readonly type: readonly ["string", "null"];
|
|
6813
|
+
};
|
|
6814
|
+
};
|
|
6815
|
+
};
|
|
6816
|
+
readonly pricing: {
|
|
6817
|
+
readonly type: "object";
|
|
6818
|
+
readonly required: readonly ["prompt", "completion"];
|
|
6819
|
+
readonly properties: {
|
|
6820
|
+
readonly prompt: {
|
|
6821
|
+
readonly type: "string";
|
|
6822
|
+
};
|
|
6823
|
+
readonly completion: {
|
|
6824
|
+
readonly type: "string";
|
|
6825
|
+
};
|
|
6826
|
+
readonly request: {
|
|
6827
|
+
readonly type: "string";
|
|
6828
|
+
};
|
|
6829
|
+
readonly image: {
|
|
6830
|
+
readonly type: "string";
|
|
6831
|
+
};
|
|
6832
|
+
readonly input_cache_read: {
|
|
6833
|
+
readonly type: "string";
|
|
6834
|
+
};
|
|
6835
|
+
readonly internal_reasoning: {
|
|
6836
|
+
readonly type: "string";
|
|
6837
|
+
};
|
|
6838
|
+
};
|
|
6839
|
+
};
|
|
6840
|
+
readonly top_provider: {
|
|
6841
|
+
readonly type: "object";
|
|
6842
|
+
readonly required: readonly ["context_length", "max_completion_tokens", "is_moderated"];
|
|
6843
|
+
readonly properties: {
|
|
6844
|
+
readonly context_length: {
|
|
6845
|
+
readonly type: "integer";
|
|
6846
|
+
};
|
|
6847
|
+
readonly max_completion_tokens: {
|
|
6848
|
+
readonly type: "integer";
|
|
6849
|
+
};
|
|
6850
|
+
readonly is_moderated: {
|
|
6851
|
+
readonly type: "boolean";
|
|
6852
|
+
};
|
|
6853
|
+
};
|
|
6854
|
+
};
|
|
6855
|
+
readonly supported_parameters: {
|
|
6856
|
+
readonly type: "array";
|
|
6857
|
+
readonly items: {
|
|
6858
|
+
readonly type: "string";
|
|
6859
|
+
};
|
|
6860
|
+
};
|
|
6861
|
+
};
|
|
6862
|
+
};
|
|
6863
|
+
readonly ModelList: {
|
|
6864
|
+
readonly type: "object";
|
|
6865
|
+
readonly required: readonly ["data", "total_count", "links"];
|
|
6866
|
+
readonly properties: {
|
|
6867
|
+
readonly data: {
|
|
6868
|
+
readonly type: "array";
|
|
6869
|
+
readonly items: {
|
|
6870
|
+
readonly $ref: "#/$defs/Model";
|
|
6871
|
+
};
|
|
6872
|
+
};
|
|
6873
|
+
readonly total_count: {
|
|
6874
|
+
readonly type: "integer";
|
|
6875
|
+
};
|
|
6876
|
+
readonly links: {
|
|
6877
|
+
readonly type: "object";
|
|
6878
|
+
readonly required: readonly ["next"];
|
|
6879
|
+
readonly properties: {
|
|
6880
|
+
readonly next: {
|
|
6881
|
+
readonly type: readonly ["string", "null"];
|
|
6882
|
+
};
|
|
6883
|
+
};
|
|
6884
|
+
};
|
|
6885
|
+
};
|
|
6886
|
+
};
|
|
6887
|
+
readonly ChatCompletionRequest: {
|
|
6888
|
+
readonly type: "object";
|
|
6889
|
+
readonly dependentRequired: {
|
|
6890
|
+
readonly max_wait_ms: readonly ["max_cost_flop"];
|
|
6891
|
+
};
|
|
6892
|
+
readonly required: readonly ["model", "messages"];
|
|
6893
|
+
readonly additionalProperties: false;
|
|
6894
|
+
readonly properties: {
|
|
6895
|
+
readonly model: {
|
|
6896
|
+
readonly type: "string";
|
|
6897
|
+
};
|
|
6898
|
+
readonly messages: {
|
|
6899
|
+
readonly type: "array";
|
|
6900
|
+
readonly minItems: 1;
|
|
6901
|
+
readonly items: {
|
|
6902
|
+
readonly type: "object";
|
|
6903
|
+
readonly required: readonly ["role", "content"];
|
|
6904
|
+
readonly properties: {
|
|
6905
|
+
readonly role: {
|
|
6906
|
+
readonly type: "string";
|
|
6907
|
+
readonly enum: readonly ["developer", "system", "user", "assistant", "tool"];
|
|
6908
|
+
};
|
|
6909
|
+
readonly content: {
|
|
6910
|
+
readonly oneOf: readonly [{
|
|
6911
|
+
readonly type: "string";
|
|
6912
|
+
}, {
|
|
6913
|
+
readonly type: "null";
|
|
6914
|
+
}, {
|
|
6915
|
+
readonly type: "array";
|
|
6916
|
+
readonly items: {
|
|
6917
|
+
readonly type: "object";
|
|
6918
|
+
};
|
|
6919
|
+
}];
|
|
6920
|
+
readonly description: "Structured parts are preserved; modalities are capability-gated.";
|
|
6921
|
+
};
|
|
6922
|
+
};
|
|
6923
|
+
};
|
|
6924
|
+
};
|
|
6925
|
+
readonly max_tokens: {
|
|
6926
|
+
readonly type: "integer";
|
|
6927
|
+
readonly default: 256;
|
|
6928
|
+
};
|
|
6929
|
+
readonly temperature: {
|
|
6930
|
+
readonly type: "number";
|
|
6931
|
+
readonly default: 0.7;
|
|
6932
|
+
};
|
|
6933
|
+
readonly top_p: {
|
|
6934
|
+
readonly type: "number";
|
|
6935
|
+
};
|
|
6936
|
+
readonly seed: {
|
|
6937
|
+
readonly type: "integer";
|
|
6938
|
+
};
|
|
6939
|
+
readonly stop: {
|
|
6940
|
+
readonly oneOf: readonly [{
|
|
6941
|
+
readonly type: "string";
|
|
6942
|
+
}, {
|
|
6943
|
+
readonly type: "array";
|
|
6944
|
+
readonly items: {
|
|
6945
|
+
readonly type: "string";
|
|
6946
|
+
};
|
|
6947
|
+
}];
|
|
6948
|
+
};
|
|
6949
|
+
readonly presence_penalty: {
|
|
6950
|
+
readonly type: "number";
|
|
6951
|
+
};
|
|
6952
|
+
readonly frequency_penalty: {
|
|
6953
|
+
readonly type: "number";
|
|
6954
|
+
};
|
|
6955
|
+
readonly logit_bias: {
|
|
6956
|
+
readonly type: "object";
|
|
6957
|
+
readonly additionalProperties: {
|
|
6958
|
+
readonly type: "number";
|
|
6959
|
+
};
|
|
6960
|
+
};
|
|
6961
|
+
readonly tools: {
|
|
6962
|
+
readonly type: "array";
|
|
6963
|
+
readonly items: {
|
|
6964
|
+
readonly type: "object";
|
|
6965
|
+
};
|
|
6966
|
+
};
|
|
6967
|
+
readonly tool_choice: {};
|
|
6968
|
+
readonly parallel_tool_calls: {
|
|
6969
|
+
readonly type: "boolean";
|
|
6970
|
+
};
|
|
6971
|
+
readonly response_format: {
|
|
6972
|
+
readonly type: "object";
|
|
6973
|
+
};
|
|
6974
|
+
readonly stream: {
|
|
6975
|
+
readonly type: "boolean";
|
|
6976
|
+
readonly default: false;
|
|
6977
|
+
};
|
|
6978
|
+
readonly stream_options: {
|
|
6979
|
+
readonly type: "object";
|
|
6980
|
+
readonly properties: {
|
|
6981
|
+
readonly include_usage: {
|
|
6982
|
+
readonly const: true;
|
|
6983
|
+
};
|
|
6984
|
+
};
|
|
6985
|
+
readonly required: readonly ["include_usage"];
|
|
6986
|
+
readonly additionalProperties: false;
|
|
6987
|
+
};
|
|
6988
|
+
readonly max_cost_flop: {
|
|
6989
|
+
readonly type: "number";
|
|
6990
|
+
readonly exclusiveMinimum: 0;
|
|
6991
|
+
};
|
|
6992
|
+
readonly max_wait_ms: {
|
|
6993
|
+
readonly type: "integer";
|
|
6994
|
+
readonly minimum: 1;
|
|
6995
|
+
readonly maximum: 3600000;
|
|
6996
|
+
readonly description: "Opt-in total wait and execution deadline in milliseconds for public completions. Requires max_cost_flop; no ready worker probe is required.";
|
|
6997
|
+
};
|
|
6998
|
+
};
|
|
6999
|
+
};
|
|
7000
|
+
readonly ChatCompletionResponse: {
|
|
7001
|
+
readonly type: "object";
|
|
7002
|
+
readonly required: readonly ["id", "object", "created", "model", "choices", "usage"];
|
|
7003
|
+
readonly properties: {
|
|
7004
|
+
readonly id: {
|
|
7005
|
+
readonly type: "string";
|
|
7006
|
+
};
|
|
7007
|
+
readonly object: {
|
|
7008
|
+
readonly type: "string";
|
|
7009
|
+
readonly const: "chat.completion";
|
|
7010
|
+
};
|
|
7011
|
+
readonly created: {
|
|
7012
|
+
readonly type: "integer";
|
|
7013
|
+
};
|
|
7014
|
+
readonly model: {
|
|
7015
|
+
readonly type: "string";
|
|
7016
|
+
};
|
|
7017
|
+
readonly system_fingerprint: {
|
|
7018
|
+
readonly type: readonly ["string", "null"];
|
|
7019
|
+
};
|
|
7020
|
+
readonly choices: {
|
|
7021
|
+
readonly type: "array";
|
|
7022
|
+
readonly items: {
|
|
7023
|
+
readonly type: "object";
|
|
7024
|
+
readonly required: readonly ["index", "message", "finish_reason"];
|
|
7025
|
+
readonly properties: {
|
|
7026
|
+
readonly index: {
|
|
7027
|
+
readonly type: "integer";
|
|
7028
|
+
};
|
|
7029
|
+
readonly message: {
|
|
7030
|
+
readonly type: "object";
|
|
7031
|
+
readonly required: readonly ["role", "content"];
|
|
7032
|
+
readonly properties: {
|
|
7033
|
+
readonly role: {
|
|
7034
|
+
readonly type: "string";
|
|
7035
|
+
readonly const: "assistant";
|
|
7036
|
+
};
|
|
7037
|
+
readonly content: {
|
|
7038
|
+
readonly type: readonly ["string", "null"];
|
|
7039
|
+
};
|
|
7040
|
+
};
|
|
7041
|
+
};
|
|
7042
|
+
readonly finish_reason: {
|
|
7043
|
+
readonly type: "string";
|
|
7044
|
+
};
|
|
7045
|
+
};
|
|
7046
|
+
};
|
|
7047
|
+
};
|
|
7048
|
+
readonly usage: {
|
|
7049
|
+
readonly type: "object";
|
|
7050
|
+
readonly required: readonly ["prompt_tokens", "completion_tokens", "total_tokens"];
|
|
7051
|
+
readonly properties: {
|
|
7052
|
+
readonly prompt_tokens: {
|
|
7053
|
+
readonly type: "integer";
|
|
7054
|
+
};
|
|
7055
|
+
readonly completion_tokens: {
|
|
7056
|
+
readonly type: "integer";
|
|
7057
|
+
};
|
|
7058
|
+
readonly total_tokens: {
|
|
7059
|
+
readonly type: "integer";
|
|
7060
|
+
};
|
|
7061
|
+
readonly gflops_used: {
|
|
7062
|
+
readonly type: "number";
|
|
7063
|
+
};
|
|
7064
|
+
readonly cost_flop: {
|
|
7065
|
+
readonly type: "number";
|
|
7066
|
+
};
|
|
7067
|
+
};
|
|
7068
|
+
};
|
|
7069
|
+
};
|
|
7070
|
+
};
|
|
7071
|
+
readonly ChatCompletionChunk: {
|
|
7072
|
+
readonly type: "object";
|
|
7073
|
+
readonly required: readonly ["id", "object", "created", "model", "choices"];
|
|
7074
|
+
readonly description: "One decoded SSE JSON payload. All chunks share id, model and created.\nThe first delta is role assistant with empty content. Content precedes\ntool calls; the gateway currently emits all calls in one delta after\nsettlement. A finish delta is empty with a non-null finish_reason.\nSuccess always includes one final choices-empty usage/receipt chunk,\nregardless of stream_options, followed by the literal [DONE].\nA finish_reason of error instead requires a stream error then [DONE].\n";
|
|
7075
|
+
readonly properties: {
|
|
7076
|
+
readonly id: {
|
|
7077
|
+
readonly type: "string";
|
|
7078
|
+
readonly pattern: "[\\s\\S]";
|
|
7079
|
+
};
|
|
7080
|
+
readonly object: {
|
|
7081
|
+
readonly type: "string";
|
|
7082
|
+
readonly const: "chat.completion.chunk";
|
|
7083
|
+
};
|
|
7084
|
+
readonly created: {
|
|
7085
|
+
readonly type: "integer";
|
|
7086
|
+
};
|
|
7087
|
+
readonly model: {
|
|
7088
|
+
readonly type: "string";
|
|
7089
|
+
readonly pattern: "[\\s\\S]";
|
|
7090
|
+
};
|
|
7091
|
+
readonly choices: {
|
|
7092
|
+
readonly type: "array";
|
|
7093
|
+
readonly maxItems: 1;
|
|
7094
|
+
readonly items: {
|
|
7095
|
+
readonly type: "object";
|
|
7096
|
+
readonly required: readonly ["index", "delta", "finish_reason"];
|
|
7097
|
+
readonly properties: {
|
|
7098
|
+
readonly index: {
|
|
7099
|
+
readonly type: "integer";
|
|
7100
|
+
readonly const: 0;
|
|
7101
|
+
};
|
|
7102
|
+
readonly delta: {
|
|
7103
|
+
readonly type: "object";
|
|
7104
|
+
readonly additionalProperties: false;
|
|
7105
|
+
readonly properties: {
|
|
7106
|
+
readonly role: {
|
|
7107
|
+
readonly type: "string";
|
|
7108
|
+
readonly const: "assistant";
|
|
7109
|
+
};
|
|
7110
|
+
readonly content: {
|
|
7111
|
+
readonly type: "string";
|
|
7112
|
+
};
|
|
7113
|
+
readonly tool_calls: {
|
|
7114
|
+
readonly type: "array";
|
|
7115
|
+
readonly minItems: 1;
|
|
7116
|
+
readonly items: {
|
|
7117
|
+
readonly $ref: "#/$defs/ChatCompletionToolCallFragment";
|
|
7118
|
+
};
|
|
7119
|
+
};
|
|
7120
|
+
};
|
|
7121
|
+
};
|
|
7122
|
+
readonly finish_reason: {
|
|
7123
|
+
readonly type: readonly ["string", "null"];
|
|
7124
|
+
readonly pattern: "[\\s\\S]";
|
|
7125
|
+
};
|
|
7126
|
+
};
|
|
7127
|
+
};
|
|
7128
|
+
};
|
|
7129
|
+
readonly usage: {
|
|
7130
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
7131
|
+
};
|
|
7132
|
+
readonly x_flop_receipt: {
|
|
7133
|
+
readonly type: "object";
|
|
7134
|
+
readonly description: "Gateway-reported receipt data, without independent verification.";
|
|
7135
|
+
};
|
|
7136
|
+
};
|
|
7137
|
+
readonly oneOf: readonly [{
|
|
7138
|
+
readonly properties: {
|
|
7139
|
+
readonly choices: {
|
|
7140
|
+
readonly type: "array";
|
|
7141
|
+
readonly minItems: 1;
|
|
7142
|
+
};
|
|
7143
|
+
readonly usage: false;
|
|
7144
|
+
readonly x_flop_receipt: false;
|
|
7145
|
+
};
|
|
7146
|
+
}, {
|
|
7147
|
+
readonly required: readonly ["usage", "x_flop_receipt"];
|
|
7148
|
+
readonly properties: {
|
|
7149
|
+
readonly choices: {
|
|
7150
|
+
readonly type: "array";
|
|
7151
|
+
readonly maxItems: 0;
|
|
7152
|
+
};
|
|
7153
|
+
readonly usage: {
|
|
7154
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
7155
|
+
};
|
|
7156
|
+
readonly x_flop_receipt: {
|
|
7157
|
+
readonly type: "object";
|
|
7158
|
+
};
|
|
7159
|
+
};
|
|
7160
|
+
}];
|
|
7161
|
+
};
|
|
7162
|
+
readonly ChatCompletionToolCallFragment: {
|
|
7163
|
+
readonly type: "object";
|
|
7164
|
+
readonly required: readonly ["index"];
|
|
7165
|
+
readonly description: "Index selects a call. Its first fragment supplies id and type function;\nsubsequent id/type values must agree. Concatenate function.name and\nfunction.arguments fragments in arrival order for that index. Completed\ncalls require a nonempty name and an arguments string. The gateway today\nsends complete calls in one frame; clients may also assemble fragments.\n";
|
|
7166
|
+
readonly properties: {
|
|
7167
|
+
readonly index: {
|
|
7168
|
+
readonly type: "integer";
|
|
7169
|
+
readonly minimum: 0;
|
|
7170
|
+
};
|
|
7171
|
+
readonly id: {
|
|
7172
|
+
readonly type: "string";
|
|
7173
|
+
readonly pattern: "[\\s\\S]";
|
|
7174
|
+
};
|
|
7175
|
+
readonly type: {
|
|
7176
|
+
readonly type: "string";
|
|
7177
|
+
readonly const: "function";
|
|
7178
|
+
};
|
|
7179
|
+
readonly function: {
|
|
7180
|
+
readonly type: "object";
|
|
7181
|
+
readonly additionalProperties: false;
|
|
7182
|
+
readonly properties: {
|
|
7183
|
+
readonly name: {
|
|
7184
|
+
readonly type: "string";
|
|
7185
|
+
};
|
|
7186
|
+
readonly arguments: {
|
|
7187
|
+
readonly type: "string";
|
|
7188
|
+
};
|
|
7189
|
+
};
|
|
7190
|
+
readonly anyOf: readonly [{
|
|
7191
|
+
readonly required: readonly ["name"];
|
|
7192
|
+
readonly properties: {
|
|
7193
|
+
readonly name: {};
|
|
7194
|
+
};
|
|
7195
|
+
}, {
|
|
7196
|
+
readonly required: readonly ["arguments"];
|
|
7197
|
+
readonly properties: {
|
|
7198
|
+
readonly arguments: {};
|
|
7199
|
+
};
|
|
7200
|
+
}];
|
|
7201
|
+
};
|
|
7202
|
+
};
|
|
7203
|
+
readonly anyOf: readonly [{
|
|
7204
|
+
readonly required: readonly ["id"];
|
|
7205
|
+
readonly properties: {
|
|
7206
|
+
readonly id: {};
|
|
7207
|
+
};
|
|
7208
|
+
}, {
|
|
7209
|
+
readonly required: readonly ["type"];
|
|
7210
|
+
readonly properties: {
|
|
7211
|
+
readonly type: {};
|
|
7212
|
+
};
|
|
7213
|
+
}, {
|
|
7214
|
+
readonly required: readonly ["function"];
|
|
7215
|
+
readonly properties: {
|
|
7216
|
+
readonly function: {};
|
|
7217
|
+
};
|
|
7218
|
+
}];
|
|
7219
|
+
};
|
|
7220
|
+
readonly ChatCompletionStreamUsage: {
|
|
7221
|
+
readonly type: "object";
|
|
7222
|
+
readonly required: readonly ["prompt_tokens", "completion_tokens", "total_tokens"];
|
|
7223
|
+
readonly properties: {
|
|
7224
|
+
readonly prompt_tokens: {
|
|
7225
|
+
readonly type: "integer";
|
|
7226
|
+
readonly minimum: 0;
|
|
7227
|
+
};
|
|
7228
|
+
readonly completion_tokens: {
|
|
7229
|
+
readonly type: "integer";
|
|
7230
|
+
readonly minimum: 0;
|
|
7231
|
+
};
|
|
7232
|
+
readonly total_tokens: {
|
|
7233
|
+
readonly type: "integer";
|
|
7234
|
+
readonly minimum: 0;
|
|
7235
|
+
};
|
|
7236
|
+
};
|
|
7237
|
+
};
|
|
7238
|
+
readonly ChatCompletionStreamError: {
|
|
7239
|
+
readonly type: "object";
|
|
7240
|
+
readonly required: readonly ["error"];
|
|
7241
|
+
readonly description: "In-band failure following an empty delta with finish_reason error.\nBroker failures carry estimated usage and x_flop_usage_source estimated,\noptionally retry_after (seconds). Expiry/reconciliation at settlement\nmay omit usage. No error frame is a successful usage/receipt outcome.\n";
|
|
7242
|
+
readonly properties: {
|
|
7243
|
+
readonly error: {
|
|
7244
|
+
readonly oneOf: readonly [{
|
|
7245
|
+
readonly type: "object";
|
|
7246
|
+
readonly required: readonly ["code", "message", "type"];
|
|
7247
|
+
readonly properties: {
|
|
7248
|
+
readonly code: {
|
|
7249
|
+
readonly type: "string";
|
|
7250
|
+
};
|
|
7251
|
+
readonly message: {
|
|
7252
|
+
readonly type: "string";
|
|
7253
|
+
};
|
|
7254
|
+
readonly type: {
|
|
7255
|
+
readonly type: "string";
|
|
7256
|
+
};
|
|
7257
|
+
};
|
|
7258
|
+
}, {
|
|
7259
|
+
readonly type: "string";
|
|
7260
|
+
readonly const: "ephemeral_session_expired";
|
|
7261
|
+
}];
|
|
7262
|
+
};
|
|
7263
|
+
readonly message: {
|
|
7264
|
+
readonly type: "string";
|
|
7265
|
+
};
|
|
7266
|
+
readonly request_id: {
|
|
7267
|
+
readonly type: "string";
|
|
7268
|
+
};
|
|
7269
|
+
readonly retry_after: {
|
|
7270
|
+
readonly type: "integer";
|
|
7271
|
+
readonly minimum: 0;
|
|
7272
|
+
};
|
|
7273
|
+
readonly usage: {
|
|
7274
|
+
readonly $ref: "#/$defs/ChatCompletionStreamUsage";
|
|
7275
|
+
};
|
|
7276
|
+
readonly x_flop_usage_source: {
|
|
7277
|
+
readonly type: "string";
|
|
7278
|
+
readonly const: "estimated";
|
|
7279
|
+
};
|
|
7280
|
+
};
|
|
7281
|
+
readonly dependentRequired: {
|
|
7282
|
+
readonly usage: readonly ["x_flop_usage_source"];
|
|
7283
|
+
readonly x_flop_usage_source: readonly ["usage"];
|
|
7284
|
+
};
|
|
7285
|
+
readonly if: {
|
|
7286
|
+
readonly properties: {
|
|
7287
|
+
readonly error: {
|
|
7288
|
+
readonly type: "string";
|
|
7289
|
+
};
|
|
7290
|
+
};
|
|
7291
|
+
};
|
|
7292
|
+
readonly then: {
|
|
7293
|
+
readonly required: readonly ["message"];
|
|
7294
|
+
readonly properties: {
|
|
7295
|
+
readonly message: {};
|
|
7296
|
+
};
|
|
7297
|
+
};
|
|
7298
|
+
};
|
|
7299
|
+
readonly CredentialReceipt: {
|
|
7300
|
+
readonly type: "object";
|
|
7301
|
+
readonly required: readonly ["request_id", "correlation_id", "model", "reserved_spend", "settled_spend", "settled_spend_raw", "terminal_event", "channel_id", "created_at", "state", "response_status"];
|
|
7302
|
+
readonly properties: {
|
|
7303
|
+
readonly request_id: {
|
|
7304
|
+
readonly $ref: "#/$defs/CredentialReceiptRequestId";
|
|
7305
|
+
};
|
|
7306
|
+
readonly correlation_id: {
|
|
7307
|
+
readonly type: "string";
|
|
7308
|
+
readonly description: "Original task/session correlation ID.";
|
|
7309
|
+
};
|
|
7310
|
+
readonly model: {
|
|
7311
|
+
readonly type: "string";
|
|
7312
|
+
};
|
|
7313
|
+
readonly reserved_spend: {
|
|
7314
|
+
readonly type: "number";
|
|
7315
|
+
readonly description: "Original reservation in FLOP, from the legacy floating-point quota ledger; not an exact raw amount.";
|
|
7316
|
+
};
|
|
7317
|
+
readonly settled_spend: {
|
|
7318
|
+
readonly type: readonly ["number", "null"];
|
|
7319
|
+
readonly description: "Reconciled spend in FLOP from the legacy floating-point ledger; null means unknown, including released reservations.";
|
|
7320
|
+
};
|
|
7321
|
+
readonly settled_spend_raw: {
|
|
7322
|
+
readonly type: readonly ["string", "null"];
|
|
7323
|
+
readonly pattern: "^[0-9]+$";
|
|
7324
|
+
readonly description: "Exact request allocation in raw FLOP base units (10^18 raw units = 1 FLOP) from terminal channel reconciliation; null means unavailable, never an inferred zero.";
|
|
7325
|
+
};
|
|
7326
|
+
readonly terminal_event: {
|
|
7327
|
+
readonly type: readonly ["string", "null"];
|
|
7328
|
+
readonly description: "Available terminal channel event ID; a pooled event may cover multiple requests. Not a per-request payment/burn transaction hash.";
|
|
7329
|
+
};
|
|
7330
|
+
readonly channel_id: {
|
|
7331
|
+
readonly type: readonly ["string", "null"];
|
|
7332
|
+
readonly description: "Associated compute channel, or null if not yet known.";
|
|
7333
|
+
};
|
|
7334
|
+
readonly created_at: {
|
|
7335
|
+
readonly type: "integer";
|
|
7336
|
+
readonly description: "Reservation timestamp in Unix epoch milliseconds.";
|
|
7337
|
+
};
|
|
7338
|
+
readonly state: {
|
|
7339
|
+
readonly type: "string";
|
|
7340
|
+
readonly enum: readonly ["reserved", "estimated", "settled", "released"];
|
|
7341
|
+
readonly description: "reserved holds quota with no completion checkpoint; estimated retains the reservation after completion without reconciled actual spend; settled has reconciled spend; released returned the reservation to quota. State does not rewrite cached completion evidence.";
|
|
7342
|
+
};
|
|
7343
|
+
readonly response_status: {
|
|
7344
|
+
readonly type: readonly ["integer", "null"];
|
|
7345
|
+
readonly description: "Original cached HTTP response status, or null if no checkpoint was recorded; independent of settlement state.";
|
|
7346
|
+
};
|
|
7347
|
+
};
|
|
7348
|
+
};
|
|
7349
|
+
readonly CredentialReceiptRequestId: {
|
|
7350
|
+
readonly type: "string";
|
|
7351
|
+
readonly pattern: "^[\\x21-\\x7e]{1,128}$";
|
|
7352
|
+
readonly not: {
|
|
7353
|
+
readonly enum: readonly [".", ".."];
|
|
7354
|
+
};
|
|
7355
|
+
readonly description: "1-128 printable ASCII characters without whitespace; dot path segments are invalid.";
|
|
7356
|
+
};
|
|
7357
|
+
readonly CredentialReceiptError: {
|
|
7358
|
+
readonly type: "object";
|
|
7359
|
+
readonly required: readonly ["error", "message"];
|
|
7360
|
+
readonly properties: {
|
|
7361
|
+
readonly error: {
|
|
7362
|
+
readonly type: "string";
|
|
7363
|
+
readonly enum: readonly ["invalid_request_id", "api_key_required", "invalid_api_key", "api_key_expired", "api_key_revoked", "ephemeral_token_revoked", "ephemeral_session_expired", "receipt_not_found"];
|
|
7364
|
+
};
|
|
7365
|
+
readonly message: {
|
|
7366
|
+
readonly type: "string";
|
|
7367
|
+
};
|
|
7368
|
+
};
|
|
7369
|
+
};
|
|
4886
7370
|
readonly ModelResponse: {
|
|
4887
7371
|
readonly type: "object";
|
|
4888
7372
|
readonly required: readonly ["data"];
|