archymedes-cli 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{archymedes-aj30app4.mjs → archymedes-06fh0z84.mjs} +370 -159
- package/dist/{archymedes-d5wqcmdr.mjs → archymedes-0jxzsh4z.mjs} +97 -97
- package/dist/archymedes-130jt0wr.mjs +1231 -0
- package/dist/{archymedes-twbks7g3.mjs → archymedes-138genyy.mjs} +214 -5
- package/dist/{archymedes-h13ap0za.mjs → archymedes-1g1y6q74.mjs} +1 -1
- package/dist/{archymedes-dz59nvw7.mjs → archymedes-2kvjaajw.mjs} +21 -11
- package/dist/{archymedes-g8y3rt6t.mjs → archymedes-5vhvv8kr.mjs} +332 -9
- package/dist/{archymedes-4kx65anz.mjs → archymedes-a3ms7jvr.mjs} +43 -12
- package/dist/{archymedes-tsne2m7p.mjs → archymedes-bmtdqqwt.mjs} +2 -2
- package/dist/{archymedes-sf9t1hz9.mjs → archymedes-d3azqkay.mjs} +176 -77
- package/dist/archymedes-main.mjs +31312 -28352
- package/dist/archymedes-w4bjfye7.mjs +280 -0
- package/dist/{editor-screen-g08zzt70.mjs → editor-screen-e01mn7dd.mjs} +49 -14
- package/dist/{factory-7vtm2fed.mjs → factory-hyv8agr0.mjs} +326 -326
- package/dist/{file-screen-ma9yxq2b.mjs → file-screen-stcxznwy.mjs} +11 -9
- package/dist/{guide-screen-gd129txd.mjs → guide-screen-w5nb9sry.mjs} +10 -8
- package/dist/{index-qvgcwsvm.mjs → index-teq1cta4.mjs} +1 -1
- package/dist/{node-mdgzx68h.mjs → node-0fh63p8z.mjs} +7 -7
- package/dist/pager-screen-aamt6xv0.mjs +155 -0
- package/dist/projection-x6x6hm9t.mjs +248 -0
- package/dist/{sandbox-templates-9jcjws23.mjs → sandbox-templates-8sd1psez.mjs} +2 -2
- package/dist/workspace-screen-62k6hnq7.mjs +70 -0
- package/package.json +2 -2
- package/dist/archymedes-a10k8yrk.mjs +0 -464
- package/dist/workspace-screen-8cwk6jz9.mjs +0 -241
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// packages/core/src/model-cost.ts
|
|
2
2
|
function utf8Length(codePoint) {
|
|
3
3
|
if (codePoint < 128)
|
|
4
4
|
return 1;
|
|
@@ -135,7 +135,7 @@ function modelPricesFromEnvironment(environment) {
|
|
|
135
135
|
return { inputRatePerMillion, outputRatePerMillion, ...cachedInputRatePerMillion !== undefined ? { cachedInputRatePerMillion } : {} };
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
//
|
|
138
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/tslib.mjs
|
|
139
139
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
140
140
|
if (kind === "m")
|
|
141
141
|
throw new TypeError("Private method is not writable");
|
|
@@ -153,7 +153,7 @@ function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
|
153
153
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
//
|
|
156
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/uuid.mjs
|
|
157
157
|
var uuid4 = function() {
|
|
158
158
|
const { crypto: crypto2 } = globalThis;
|
|
159
159
|
if (crypto2?.randomUUID) {
|
|
@@ -165,7 +165,7 @@ var uuid4 = function() {
|
|
|
165
165
|
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
//
|
|
168
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/errors.mjs
|
|
169
169
|
function isAbortError(err) {
|
|
170
170
|
return typeof err === "object" && err !== null && (("name" in err) && err.name === "AbortError" || ("message" in err) && String(err.message).includes("FetchRequestCanceledException"));
|
|
171
171
|
}
|
|
@@ -192,7 +192,7 @@ var castToError = (err) => {
|
|
|
192
192
|
return new Error(err);
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
//
|
|
195
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/core/error.mjs
|
|
196
196
|
class OpenAIError extends Error {
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -343,7 +343,7 @@ class SubjectTokenProviderError extends OpenAIError {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
//
|
|
346
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/values.mjs
|
|
347
347
|
var startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
348
348
|
var isAbsoluteURL = (url) => {
|
|
349
349
|
return startsWithSchemeRegexp.test(url);
|
|
@@ -386,13 +386,13 @@ var safeJSON = (text) => {
|
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
388
|
|
|
389
|
-
//
|
|
389
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/sleep.mjs
|
|
390
390
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
391
391
|
|
|
392
|
-
//
|
|
392
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/version.mjs
|
|
393
393
|
var VERSION = "6.49.0";
|
|
394
394
|
|
|
395
|
-
//
|
|
395
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/detect-platform.mjs
|
|
396
396
|
var isRunningInBrowser = () => {
|
|
397
397
|
return typeof window !== "undefined" && typeof window.document !== "undefined" && typeof navigator !== "undefined";
|
|
398
398
|
};
|
|
@@ -521,7 +521,7 @@ var getPlatformHeaders = () => {
|
|
|
521
521
|
return _platformHeaders ?? (_platformHeaders = getPlatformProperties());
|
|
522
522
|
};
|
|
523
523
|
|
|
524
|
-
//
|
|
524
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/shims.mjs
|
|
525
525
|
function getDefaultFetch() {
|
|
526
526
|
if (typeof fetch !== "undefined") {
|
|
527
527
|
return fetch;
|
|
@@ -592,7 +592,7 @@ async function CancelReadableStream(stream) {
|
|
|
592
592
|
await cancelPromise;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
-
//
|
|
595
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/request-options.mjs
|
|
596
596
|
var FallbackEncoder = ({ headers, body }) => {
|
|
597
597
|
return {
|
|
598
598
|
bodyHeaders: {
|
|
@@ -602,7 +602,7 @@ var FallbackEncoder = ({ headers, body }) => {
|
|
|
602
602
|
};
|
|
603
603
|
};
|
|
604
604
|
|
|
605
|
-
//
|
|
605
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/qs/formats.mjs
|
|
606
606
|
var default_format = "RFC3986";
|
|
607
607
|
var default_formatter = (v) => String(v);
|
|
608
608
|
var formatters = {
|
|
@@ -611,7 +611,7 @@ var formatters = {
|
|
|
611
611
|
};
|
|
612
612
|
var RFC1738 = "RFC1738";
|
|
613
613
|
|
|
614
|
-
//
|
|
614
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/qs/utils.mjs
|
|
615
615
|
var has = (obj, key) => (has = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty), has(obj, key));
|
|
616
616
|
var hex_table = /* @__PURE__ */ (() => {
|
|
617
617
|
const array = [];
|
|
@@ -683,7 +683,7 @@ function maybe_map(val, fn) {
|
|
|
683
683
|
return fn(val);
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
-
//
|
|
686
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/qs/stringify.mjs
|
|
687
687
|
var array_prefix_generators = {
|
|
688
688
|
brackets(prefix) {
|
|
689
689
|
return String(prefix) + "[]";
|
|
@@ -911,12 +911,12 @@ function stringify(object, opts = {}) {
|
|
|
911
911
|
return joined.length > 0 ? prefix + joined : "";
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
//
|
|
914
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/query.mjs
|
|
915
915
|
function stringifyQuery(query) {
|
|
916
916
|
return stringify(query, { arrayFormat: "brackets" });
|
|
917
917
|
}
|
|
918
918
|
|
|
919
|
-
//
|
|
919
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/bytes.mjs
|
|
920
920
|
function concatBytes(buffers) {
|
|
921
921
|
let length = 0;
|
|
922
922
|
for (const buffer of buffers) {
|
|
@@ -941,7 +941,7 @@ function decodeUTF8(bytes) {
|
|
|
941
941
|
return (decodeUTF8_ ?? (decoder = new globalThis.TextDecoder, decodeUTF8_ = decoder.decode.bind(decoder)))(bytes);
|
|
942
942
|
}
|
|
943
943
|
|
|
944
|
-
//
|
|
944
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/decoders/line.mjs
|
|
945
945
|
var _LineDecoder_buffer;
|
|
946
946
|
var _LineDecoder_carriageReturnIndex;
|
|
947
947
|
|
|
@@ -1021,7 +1021,7 @@ function findDoubleNewlineIndex(buffer) {
|
|
|
1021
1021
|
return -1;
|
|
1022
1022
|
}
|
|
1023
1023
|
|
|
1024
|
-
//
|
|
1024
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/log.mjs
|
|
1025
1025
|
var levelNumbers = {
|
|
1026
1026
|
off: 0,
|
|
1027
1027
|
error: 200,
|
|
@@ -1093,7 +1093,7 @@ var formatRequestDetails = (details) => {
|
|
|
1093
1093
|
return details;
|
|
1094
1094
|
};
|
|
1095
1095
|
|
|
1096
|
-
//
|
|
1096
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/core/streaming.mjs
|
|
1097
1097
|
var _Stream_client;
|
|
1098
1098
|
|
|
1099
1099
|
class Stream {
|
|
@@ -1373,7 +1373,7 @@ function partition(str, delimiter) {
|
|
|
1373
1373
|
return [str, "", ""];
|
|
1374
1374
|
}
|
|
1375
1375
|
|
|
1376
|
-
//
|
|
1376
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/parse.mjs
|
|
1377
1377
|
async function defaultParseResponse(client, props) {
|
|
1378
1378
|
const { response, requestLogID, retryOfRequestLogID, startTime } = props;
|
|
1379
1379
|
const body = await (async () => {
|
|
@@ -1423,7 +1423,7 @@ function addRequestID(value, response) {
|
|
|
1423
1423
|
});
|
|
1424
1424
|
}
|
|
1425
1425
|
|
|
1426
|
-
//
|
|
1426
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/core/api-promise.mjs
|
|
1427
1427
|
var _APIPromise_client;
|
|
1428
1428
|
|
|
1429
1429
|
class APIPromise extends Promise {
|
|
@@ -1464,7 +1464,7 @@ class APIPromise extends Promise {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
_APIPromise_client = new WeakMap;
|
|
1466
1466
|
|
|
1467
|
-
//
|
|
1467
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/core/pagination.mjs
|
|
1468
1468
|
var _AbstractPage_client;
|
|
1469
1469
|
|
|
1470
1470
|
class AbstractPage {
|
|
@@ -1624,7 +1624,7 @@ class NextCursorPage extends AbstractPage {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
|
|
1627
|
-
//
|
|
1627
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/auth/workload-identity-auth.mjs
|
|
1628
1628
|
var SUBJECT_TOKEN_TYPES = {
|
|
1629
1629
|
jwt: "urn:ietf:params:oauth:token-type:jwt",
|
|
1630
1630
|
id: "urn:ietf:params:oauth:token-type:id_token"
|
|
@@ -1716,7 +1716,7 @@ class WorkloadIdentityAuth {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
|
|
1719
|
-
//
|
|
1719
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/headers.mjs
|
|
1720
1720
|
var brand_privateNullableHeaders = /* @__PURE__ */ Symbol("brand.privateNullableHeaders");
|
|
1721
1721
|
var httpTokenHeaderName = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
1722
1722
|
function* iterateHeaders(headers) {
|
|
@@ -1783,7 +1783,7 @@ var buildHeaders = (newHeaders) => {
|
|
|
1783
1783
|
return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
|
|
1784
1784
|
};
|
|
1785
1785
|
|
|
1786
|
-
//
|
|
1786
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/uploads.mjs
|
|
1787
1787
|
var brand_privateStreamingFile = /* @__PURE__ */ Symbol("brand.privateStreamingFile");
|
|
1788
1788
|
function toStreamingFile(data, name, options) {
|
|
1789
1789
|
if (!name) {
|
|
@@ -2016,7 +2016,7 @@ var addFormValue = async (form, key, value) => {
|
|
|
2016
2016
|
throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`);
|
|
2017
2017
|
}
|
|
2018
2018
|
};
|
|
2019
|
-
//
|
|
2019
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/to-file.mjs
|
|
2020
2020
|
var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
|
|
2021
2021
|
var isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
2022
2022
|
var isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
|
|
@@ -2066,14 +2066,14 @@ function propsForError(value) {
|
|
|
2066
2066
|
const props = Object.getOwnPropertyNames(value);
|
|
2067
2067
|
return `; props: [${props.map((p) => `"${p}"`).join(", ")}]`;
|
|
2068
2068
|
}
|
|
2069
|
-
//
|
|
2069
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/core/resource.mjs
|
|
2070
2070
|
class APIResource {
|
|
2071
2071
|
constructor(client) {
|
|
2072
2072
|
this._client = client;
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
|
|
2076
|
-
//
|
|
2076
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/path.mjs
|
|
2077
2077
|
function encodeURIPath(str) {
|
|
2078
2078
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
2079
2079
|
}
|
|
@@ -2128,13 +2128,13 @@ ${underline}`);
|
|
|
2128
2128
|
};
|
|
2129
2129
|
var path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
2130
2130
|
|
|
2131
|
-
//
|
|
2131
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/chat/completions/messages.mjs
|
|
2132
2132
|
class Messages extends APIResource {
|
|
2133
2133
|
list(completionID, query = {}, options) {
|
|
2134
2134
|
return this._client.getAPIList(path`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options, __security: { bearerAuth: true } });
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
2137
|
-
//
|
|
2137
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/parser.mjs
|
|
2138
2138
|
function isChatCompletionFunctionTool(tool) {
|
|
2139
2139
|
return tool !== undefined && "function" in tool && tool.function !== undefined;
|
|
2140
2140
|
}
|
|
@@ -2255,7 +2255,7 @@ function validateInputTools(tools) {
|
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
2257
|
|
|
2258
|
-
//
|
|
2258
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/chatCompletionUtils.mjs
|
|
2259
2259
|
var isAssistantMessage = (message) => {
|
|
2260
2260
|
return message?.role === "assistant";
|
|
2261
2261
|
};
|
|
@@ -2263,7 +2263,7 @@ var isToolMessage = (message) => {
|
|
|
2263
2263
|
return message?.role === "tool";
|
|
2264
2264
|
};
|
|
2265
2265
|
|
|
2266
|
-
//
|
|
2266
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/EventStream.mjs
|
|
2267
2267
|
var _EventStream_instances;
|
|
2268
2268
|
var _EventStream_connectedPromise;
|
|
2269
2269
|
var _EventStream_resolveConnectedPromise;
|
|
@@ -2524,12 +2524,12 @@ _EventStream_connectedPromise = new WeakMap, _EventStream_resolveConnectedPromis
|
|
|
2524
2524
|
return this._emit("error", new OpenAIError(String(error2)));
|
|
2525
2525
|
};
|
|
2526
2526
|
|
|
2527
|
-
//
|
|
2527
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/RunnableFunction.mjs
|
|
2528
2528
|
function isRunnableFunctionWithParse(fn) {
|
|
2529
2529
|
return typeof fn.parse === "function";
|
|
2530
2530
|
}
|
|
2531
2531
|
|
|
2532
|
-
//
|
|
2532
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/AbstractChatCompletionRunner.mjs
|
|
2533
2533
|
var _AbstractChatCompletionRunner_instances;
|
|
2534
2534
|
var _AbstractChatCompletionRunner_getFinalContent;
|
|
2535
2535
|
var _AbstractChatCompletionRunner_getFinalMessage;
|
|
@@ -2857,7 +2857,7 @@ _AbstractChatCompletionRunner_instances = new WeakSet, _AbstractChatCompletionRu
|
|
|
2857
2857
|
return typeof rawContent === "string" ? rawContent : rawContent === undefined ? "undefined" : JSON.stringify(rawContent);
|
|
2858
2858
|
};
|
|
2859
2859
|
|
|
2860
|
-
//
|
|
2860
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/ChatCompletionRunner.mjs
|
|
2861
2861
|
class ChatCompletionRunner extends AbstractChatCompletionRunner {
|
|
2862
2862
|
static runTools(client, params, options) {
|
|
2863
2863
|
const runner = new ChatCompletionRunner;
|
|
@@ -2876,7 +2876,7 @@ class ChatCompletionRunner extends AbstractChatCompletionRunner {
|
|
|
2876
2876
|
}
|
|
2877
2877
|
}
|
|
2878
2878
|
|
|
2879
|
-
//
|
|
2879
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/_vendor/partial-json-parser/parser.mjs
|
|
2880
2880
|
var STR = 1;
|
|
2881
2881
|
var NUM = 2;
|
|
2882
2882
|
var ARR = 4;
|
|
@@ -3089,7 +3089,7 @@ var _parseJSON = (jsonString, allow) => {
|
|
|
3089
3089
|
return parseAny();
|
|
3090
3090
|
};
|
|
3091
3091
|
var partialParse = (input) => parseJSON(input, Allow.ALL ^ Allow.NUM);
|
|
3092
|
-
//
|
|
3092
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/ChatCompletionStream.mjs
|
|
3093
3093
|
var _ChatCompletionStream_instances;
|
|
3094
3094
|
var _ChatCompletionStream_params;
|
|
3095
3095
|
var _ChatCompletionStream_audioDoneChoiceIndexes;
|
|
@@ -3632,7 +3632,7 @@ function assertIsEmpty(obj) {
|
|
|
3632
3632
|
}
|
|
3633
3633
|
function assertNever(_x) {}
|
|
3634
3634
|
|
|
3635
|
-
//
|
|
3635
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs
|
|
3636
3636
|
class ChatCompletionStreamingRunner extends ChatCompletionStream {
|
|
3637
3637
|
static fromReadableStream(stream) {
|
|
3638
3638
|
const runner = new ChatCompletionStreamingRunner(null);
|
|
@@ -3723,7 +3723,7 @@ class ChatCompletionStreamingRunner extends ChatCompletionStream {
|
|
|
3723
3723
|
}
|
|
3724
3724
|
}
|
|
3725
3725
|
|
|
3726
|
-
//
|
|
3726
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/chat/completions/completions.mjs
|
|
3727
3727
|
class Completions extends APIResource {
|
|
3728
3728
|
constructor() {
|
|
3729
3729
|
super(...arguments);
|
|
@@ -3785,7 +3785,7 @@ class Completions extends APIResource {
|
|
|
3785
3785
|
}
|
|
3786
3786
|
Completions.Messages = Messages;
|
|
3787
3787
|
|
|
3788
|
-
//
|
|
3788
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/chat/chat.mjs
|
|
3789
3789
|
class Chat extends APIResource {
|
|
3790
3790
|
constructor() {
|
|
3791
3791
|
super(...arguments);
|
|
@@ -3793,7 +3793,7 @@ class Chat extends APIResource {
|
|
|
3793
3793
|
}
|
|
3794
3794
|
}
|
|
3795
3795
|
Chat.Completions = Completions;
|
|
3796
|
-
//
|
|
3796
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/admin-api-keys.mjs
|
|
3797
3797
|
class AdminAPIKeys extends APIResource {
|
|
3798
3798
|
create(body, options) {
|
|
3799
3799
|
return this._client.post("/organization/admin_api_keys", {
|
|
@@ -3823,7 +3823,7 @@ class AdminAPIKeys extends APIResource {
|
|
|
3823
3823
|
}
|
|
3824
3824
|
}
|
|
3825
3825
|
|
|
3826
|
-
//
|
|
3826
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/audit-logs.mjs
|
|
3827
3827
|
class AuditLogs extends APIResource {
|
|
3828
3828
|
list(query = {}, options) {
|
|
3829
3829
|
return this._client.getAPIList("/organization/audit_logs", ConversationCursorPage, {
|
|
@@ -3834,7 +3834,7 @@ class AuditLogs extends APIResource {
|
|
|
3834
3834
|
}
|
|
3835
3835
|
}
|
|
3836
3836
|
|
|
3837
|
-
//
|
|
3837
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/certificates.mjs
|
|
3838
3838
|
class Certificates extends APIResource {
|
|
3839
3839
|
create(body, options) {
|
|
3840
3840
|
return this._client.post("/organization/certificates", {
|
|
@@ -3879,7 +3879,7 @@ class Certificates extends APIResource {
|
|
|
3879
3879
|
}
|
|
3880
3880
|
}
|
|
3881
3881
|
|
|
3882
|
-
//
|
|
3882
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/data-retention.mjs
|
|
3883
3883
|
class DataRetention extends APIResource {
|
|
3884
3884
|
retrieve(options) {
|
|
3885
3885
|
return this._client.get("/organization/data_retention", {
|
|
@@ -3896,7 +3896,7 @@ class DataRetention extends APIResource {
|
|
|
3896
3896
|
}
|
|
3897
3897
|
}
|
|
3898
3898
|
|
|
3899
|
-
//
|
|
3899
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/invites.mjs
|
|
3900
3900
|
class Invites extends APIResource {
|
|
3901
3901
|
create(body, options) {
|
|
3902
3902
|
return this._client.post("/organization/invites", {
|
|
@@ -3926,7 +3926,7 @@ class Invites extends APIResource {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
3928
|
|
|
3929
|
-
//
|
|
3929
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/roles.mjs
|
|
3930
3930
|
class Roles extends APIResource {
|
|
3931
3931
|
create(body, options) {
|
|
3932
3932
|
return this._client.post("/organization/roles", {
|
|
@@ -3963,7 +3963,7 @@ class Roles extends APIResource {
|
|
|
3963
3963
|
}
|
|
3964
3964
|
}
|
|
3965
3965
|
|
|
3966
|
-
//
|
|
3966
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/spend-alerts.mjs
|
|
3967
3967
|
class SpendAlerts extends APIResource {
|
|
3968
3968
|
create(body, options) {
|
|
3969
3969
|
return this._client.post("/organization/spend_alerts", {
|
|
@@ -3996,7 +3996,7 @@ class SpendAlerts extends APIResource {
|
|
|
3996
3996
|
}
|
|
3997
3997
|
}
|
|
3998
3998
|
|
|
3999
|
-
//
|
|
3999
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/spend-limit.mjs
|
|
4000
4000
|
class SpendLimit extends APIResource {
|
|
4001
4001
|
retrieve(options) {
|
|
4002
4002
|
return this._client.get("/organization/spend_limit", {
|
|
@@ -4019,7 +4019,7 @@ class SpendLimit extends APIResource {
|
|
|
4019
4019
|
}
|
|
4020
4020
|
}
|
|
4021
4021
|
|
|
4022
|
-
//
|
|
4022
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/usage.mjs
|
|
4023
4023
|
class Usage extends APIResource {
|
|
4024
4024
|
audioSpeeches(query, options) {
|
|
4025
4025
|
return this._client.get("/organization/usage/audio_speeches", {
|
|
@@ -4100,7 +4100,7 @@ class Usage extends APIResource {
|
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
4102
|
|
|
4103
|
-
//
|
|
4103
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/groups/roles.mjs
|
|
4104
4104
|
class Roles2 extends APIResource {
|
|
4105
4105
|
create(groupID, body, options) {
|
|
4106
4106
|
return this._client.post(path`/organization/groups/${groupID}/roles`, {
|
|
@@ -4128,7 +4128,7 @@ class Roles2 extends APIResource {
|
|
|
4128
4128
|
}
|
|
4129
4129
|
}
|
|
4130
4130
|
|
|
4131
|
-
//
|
|
4131
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/groups/users.mjs
|
|
4132
4132
|
class Users extends APIResource {
|
|
4133
4133
|
create(groupID, body, options) {
|
|
4134
4134
|
return this._client.post(path`/organization/groups/${groupID}/users`, {
|
|
@@ -4156,7 +4156,7 @@ class Users extends APIResource {
|
|
|
4156
4156
|
}
|
|
4157
4157
|
}
|
|
4158
4158
|
|
|
4159
|
-
//
|
|
4159
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/groups/groups.mjs
|
|
4160
4160
|
class Groups extends APIResource {
|
|
4161
4161
|
constructor() {
|
|
4162
4162
|
super(...arguments);
|
|
@@ -4200,7 +4200,7 @@ class Groups extends APIResource {
|
|
|
4200
4200
|
Groups.Users = Users;
|
|
4201
4201
|
Groups.Roles = Roles2;
|
|
4202
4202
|
|
|
4203
|
-
//
|
|
4203
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/api-keys.mjs
|
|
4204
4204
|
class APIKeys extends APIResource {
|
|
4205
4205
|
retrieve(apiKeyID, params, options) {
|
|
4206
4206
|
const { project_id } = params;
|
|
@@ -4221,7 +4221,7 @@ class APIKeys extends APIResource {
|
|
|
4221
4221
|
}
|
|
4222
4222
|
}
|
|
4223
4223
|
|
|
4224
|
-
//
|
|
4224
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/certificates.mjs
|
|
4225
4225
|
class Certificates2 extends APIResource {
|
|
4226
4226
|
list(projectID, query = {}, options) {
|
|
4227
4227
|
return this._client.getAPIList(path`/organization/projects/${projectID}/certificates`, ConversationCursorPage, { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
@@ -4234,7 +4234,7 @@ class Certificates2 extends APIResource {
|
|
|
4234
4234
|
}
|
|
4235
4235
|
}
|
|
4236
4236
|
|
|
4237
|
-
//
|
|
4237
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/data-retention.mjs
|
|
4238
4238
|
class DataRetention2 extends APIResource {
|
|
4239
4239
|
retrieve(projectID, options) {
|
|
4240
4240
|
return this._client.get(path`/organization/projects/${projectID}/data_retention`, {
|
|
@@ -4251,7 +4251,7 @@ class DataRetention2 extends APIResource {
|
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
|
|
4254
|
-
//
|
|
4254
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs
|
|
4255
4255
|
class HostedToolPermissions extends APIResource {
|
|
4256
4256
|
retrieve(projectID, options) {
|
|
4257
4257
|
return this._client.get(path`/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
@@ -4268,7 +4268,7 @@ class HostedToolPermissions extends APIResource {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
}
|
|
4270
4270
|
|
|
4271
|
-
//
|
|
4271
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs
|
|
4272
4272
|
class ModelPermissions extends APIResource {
|
|
4273
4273
|
retrieve(projectID, options) {
|
|
4274
4274
|
return this._client.get(path`/organization/projects/${projectID}/model_permissions`, {
|
|
@@ -4291,7 +4291,7 @@ class ModelPermissions extends APIResource {
|
|
|
4291
4291
|
}
|
|
4292
4292
|
}
|
|
4293
4293
|
|
|
4294
|
-
//
|
|
4294
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs
|
|
4295
4295
|
class RateLimits extends APIResource {
|
|
4296
4296
|
listRateLimits(projectID, query = {}, options) {
|
|
4297
4297
|
return this._client.getAPIList(path`/organization/projects/${projectID}/rate_limits`, ConversationCursorPage, { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
@@ -4306,7 +4306,7 @@ class RateLimits extends APIResource {
|
|
|
4306
4306
|
}
|
|
4307
4307
|
}
|
|
4308
4308
|
|
|
4309
|
-
//
|
|
4309
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/roles.mjs
|
|
4310
4310
|
class Roles3 extends APIResource {
|
|
4311
4311
|
create(projectID, body, options) {
|
|
4312
4312
|
return this._client.post(path`/projects/${projectID}/roles`, {
|
|
@@ -4346,7 +4346,7 @@ class Roles3 extends APIResource {
|
|
|
4346
4346
|
}
|
|
4347
4347
|
}
|
|
4348
4348
|
|
|
4349
|
-
//
|
|
4349
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs
|
|
4350
4350
|
class SpendAlerts2 extends APIResource {
|
|
4351
4351
|
create(projectID, body, options) {
|
|
4352
4352
|
return this._client.post(path`/organization/projects/${projectID}/spend_alerts`, {
|
|
@@ -4382,7 +4382,7 @@ class SpendAlerts2 extends APIResource {
|
|
|
4382
4382
|
}
|
|
4383
4383
|
}
|
|
4384
4384
|
|
|
4385
|
-
//
|
|
4385
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs
|
|
4386
4386
|
class SpendLimit2 extends APIResource {
|
|
4387
4387
|
retrieve(projectID, options) {
|
|
4388
4388
|
return this._client.get(path`/organization/projects/${projectID}/spend_limit`, {
|
|
@@ -4405,7 +4405,7 @@ class SpendLimit2 extends APIResource {
|
|
|
4405
4405
|
}
|
|
4406
4406
|
}
|
|
4407
4407
|
|
|
4408
|
-
//
|
|
4408
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs
|
|
4409
4409
|
class Roles4 extends APIResource {
|
|
4410
4410
|
create(groupID, params, options) {
|
|
4411
4411
|
const { project_id, ...body } = params;
|
|
@@ -4435,7 +4435,7 @@ class Roles4 extends APIResource {
|
|
|
4435
4435
|
}
|
|
4436
4436
|
}
|
|
4437
4437
|
|
|
4438
|
-
//
|
|
4438
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs
|
|
4439
4439
|
class Groups2 extends APIResource {
|
|
4440
4440
|
constructor() {
|
|
4441
4441
|
super(...arguments);
|
|
@@ -4469,7 +4469,7 @@ class Groups2 extends APIResource {
|
|
|
4469
4469
|
}
|
|
4470
4470
|
Groups2.Roles = Roles4;
|
|
4471
4471
|
|
|
4472
|
-
//
|
|
4472
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.mjs
|
|
4473
4473
|
class APIKeys2 extends APIResource {
|
|
4474
4474
|
create(serviceAccountID, params, options) {
|
|
4475
4475
|
const { project_id, ...body } = params;
|
|
@@ -4477,7 +4477,7 @@ class APIKeys2 extends APIResource {
|
|
|
4477
4477
|
}
|
|
4478
4478
|
}
|
|
4479
4479
|
|
|
4480
|
-
//
|
|
4480
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.mjs
|
|
4481
4481
|
class ServiceAccounts extends APIResource {
|
|
4482
4482
|
constructor() {
|
|
4483
4483
|
super(...arguments);
|
|
@@ -4511,7 +4511,7 @@ class ServiceAccounts extends APIResource {
|
|
|
4511
4511
|
}
|
|
4512
4512
|
ServiceAccounts.APIKeys = APIKeys2;
|
|
4513
4513
|
|
|
4514
|
-
//
|
|
4514
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/users/roles.mjs
|
|
4515
4515
|
class Roles5 extends APIResource {
|
|
4516
4516
|
create(userID, params, options) {
|
|
4517
4517
|
const { project_id, ...body } = params;
|
|
@@ -4541,7 +4541,7 @@ class Roles5 extends APIResource {
|
|
|
4541
4541
|
}
|
|
4542
4542
|
}
|
|
4543
4543
|
|
|
4544
|
-
//
|
|
4544
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/users/users.mjs
|
|
4545
4545
|
class Users2 extends APIResource {
|
|
4546
4546
|
constructor() {
|
|
4547
4547
|
super(...arguments);
|
|
@@ -4582,7 +4582,7 @@ class Users2 extends APIResource {
|
|
|
4582
4582
|
}
|
|
4583
4583
|
Users2.Roles = Roles5;
|
|
4584
4584
|
|
|
4585
|
-
//
|
|
4585
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/projects/projects.mjs
|
|
4586
4586
|
class Projects extends APIResource {
|
|
4587
4587
|
constructor() {
|
|
4588
4588
|
super(...arguments);
|
|
@@ -4646,7 +4646,7 @@ Projects.SpendLimit = SpendLimit2;
|
|
|
4646
4646
|
Projects.SpendAlerts = SpendAlerts2;
|
|
4647
4647
|
Projects.Certificates = Certificates2;
|
|
4648
4648
|
|
|
4649
|
-
//
|
|
4649
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/users/roles.mjs
|
|
4650
4650
|
class Roles6 extends APIResource {
|
|
4651
4651
|
create(userID, body, options) {
|
|
4652
4652
|
return this._client.post(path`/organization/users/${userID}/roles`, {
|
|
@@ -4674,7 +4674,7 @@ class Roles6 extends APIResource {
|
|
|
4674
4674
|
}
|
|
4675
4675
|
}
|
|
4676
4676
|
|
|
4677
|
-
//
|
|
4677
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/users/users.mjs
|
|
4678
4678
|
class Users3 extends APIResource {
|
|
4679
4679
|
constructor() {
|
|
4680
4680
|
super(...arguments);
|
|
@@ -4709,7 +4709,7 @@ class Users3 extends APIResource {
|
|
|
4709
4709
|
}
|
|
4710
4710
|
Users3.Roles = Roles6;
|
|
4711
4711
|
|
|
4712
|
-
//
|
|
4712
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/organization/organization.mjs
|
|
4713
4713
|
class Organization extends APIResource {
|
|
4714
4714
|
constructor() {
|
|
4715
4715
|
super(...arguments);
|
|
@@ -4740,7 +4740,7 @@ Organization.SpendAlerts = SpendAlerts;
|
|
|
4740
4740
|
Organization.Certificates = Certificates;
|
|
4741
4741
|
Organization.Projects = Projects;
|
|
4742
4742
|
|
|
4743
|
-
//
|
|
4743
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/admin/admin.mjs
|
|
4744
4744
|
class Admin extends APIResource {
|
|
4745
4745
|
constructor() {
|
|
4746
4746
|
super(...arguments);
|
|
@@ -4748,7 +4748,7 @@ class Admin extends APIResource {
|
|
|
4748
4748
|
}
|
|
4749
4749
|
}
|
|
4750
4750
|
Admin.Organization = Organization;
|
|
4751
|
-
//
|
|
4751
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/audio/speech.mjs
|
|
4752
4752
|
class Speech extends APIResource {
|
|
4753
4753
|
create(body, options) {
|
|
4754
4754
|
return this._client.post("/audio/speech", {
|
|
@@ -4761,7 +4761,7 @@ class Speech extends APIResource {
|
|
|
4761
4761
|
}
|
|
4762
4762
|
}
|
|
4763
4763
|
|
|
4764
|
-
//
|
|
4764
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/audio/transcriptions.mjs
|
|
4765
4765
|
class Transcriptions extends APIResource {
|
|
4766
4766
|
create(body, options) {
|
|
4767
4767
|
return this._client.post("/audio/transcriptions", multipartFormRequestOptions({
|
|
@@ -4774,14 +4774,14 @@ class Transcriptions extends APIResource {
|
|
|
4774
4774
|
}
|
|
4775
4775
|
}
|
|
4776
4776
|
|
|
4777
|
-
//
|
|
4777
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/audio/translations.mjs
|
|
4778
4778
|
class Translations extends APIResource {
|
|
4779
4779
|
create(body, options) {
|
|
4780
4780
|
return this._client.post("/audio/translations", multipartFormRequestOptions({ body, ...options, __metadata: { model: body.model }, __security: { bearerAuth: true } }, this._client));
|
|
4781
4781
|
}
|
|
4782
4782
|
}
|
|
4783
4783
|
|
|
4784
|
-
//
|
|
4784
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/audio/audio.mjs
|
|
4785
4785
|
class Audio extends APIResource {
|
|
4786
4786
|
constructor() {
|
|
4787
4787
|
super(...arguments);
|
|
@@ -4793,7 +4793,7 @@ class Audio extends APIResource {
|
|
|
4793
4793
|
Audio.Transcriptions = Transcriptions;
|
|
4794
4794
|
Audio.Translations = Translations;
|
|
4795
4795
|
Audio.Speech = Speech;
|
|
4796
|
-
//
|
|
4796
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/batches.mjs
|
|
4797
4797
|
class Batches extends APIResource {
|
|
4798
4798
|
create(body, options) {
|
|
4799
4799
|
return this._client.post("/batches", { body, ...options, __security: { bearerAuth: true } });
|
|
@@ -4815,7 +4815,7 @@ class Batches extends APIResource {
|
|
|
4815
4815
|
});
|
|
4816
4816
|
}
|
|
4817
4817
|
}
|
|
4818
|
-
//
|
|
4818
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/assistants.mjs
|
|
4819
4819
|
class Assistants extends APIResource {
|
|
4820
4820
|
create(body, options) {
|
|
4821
4821
|
return this._client.post("/assistants", {
|
|
@@ -4857,7 +4857,7 @@ class Assistants extends APIResource {
|
|
|
4857
4857
|
}
|
|
4858
4858
|
}
|
|
4859
4859
|
|
|
4860
|
-
//
|
|
4860
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/realtime/sessions.mjs
|
|
4861
4861
|
class Sessions extends APIResource {
|
|
4862
4862
|
create(body, options) {
|
|
4863
4863
|
return this._client.post("/realtime/sessions", {
|
|
@@ -4869,7 +4869,7 @@ class Sessions extends APIResource {
|
|
|
4869
4869
|
}
|
|
4870
4870
|
}
|
|
4871
4871
|
|
|
4872
|
-
//
|
|
4872
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs
|
|
4873
4873
|
class TranscriptionSessions extends APIResource {
|
|
4874
4874
|
create(body, options) {
|
|
4875
4875
|
return this._client.post("/realtime/transcription_sessions", {
|
|
@@ -4881,7 +4881,7 @@ class TranscriptionSessions extends APIResource {
|
|
|
4881
4881
|
}
|
|
4882
4882
|
}
|
|
4883
4883
|
|
|
4884
|
-
//
|
|
4884
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/realtime/realtime.mjs
|
|
4885
4885
|
class Realtime extends APIResource {
|
|
4886
4886
|
constructor() {
|
|
4887
4887
|
super(...arguments);
|
|
@@ -4892,7 +4892,7 @@ class Realtime extends APIResource {
|
|
|
4892
4892
|
Realtime.Sessions = Sessions;
|
|
4893
4893
|
Realtime.TranscriptionSessions = TranscriptionSessions;
|
|
4894
4894
|
|
|
4895
|
-
//
|
|
4895
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/chatkit/sessions.mjs
|
|
4896
4896
|
class Sessions2 extends APIResource {
|
|
4897
4897
|
create(body, options) {
|
|
4898
4898
|
return this._client.post("/chatkit/sessions", {
|
|
@@ -4911,7 +4911,7 @@ class Sessions2 extends APIResource {
|
|
|
4911
4911
|
}
|
|
4912
4912
|
}
|
|
4913
4913
|
|
|
4914
|
-
//
|
|
4914
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/chatkit/threads.mjs
|
|
4915
4915
|
class Threads extends APIResource {
|
|
4916
4916
|
retrieve(threadID, options) {
|
|
4917
4917
|
return this._client.get(path`/chatkit/threads/${threadID}`, {
|
|
@@ -4945,7 +4945,7 @@ class Threads extends APIResource {
|
|
|
4945
4945
|
}
|
|
4946
4946
|
}
|
|
4947
4947
|
|
|
4948
|
-
//
|
|
4948
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/chatkit/chatkit.mjs
|
|
4949
4949
|
class ChatKit extends APIResource {
|
|
4950
4950
|
constructor() {
|
|
4951
4951
|
super(...arguments);
|
|
@@ -4956,7 +4956,7 @@ class ChatKit extends APIResource {
|
|
|
4956
4956
|
ChatKit.Sessions = Sessions2;
|
|
4957
4957
|
ChatKit.Threads = Threads;
|
|
4958
4958
|
|
|
4959
|
-
//
|
|
4959
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/responses/input-items.mjs
|
|
4960
4960
|
class InputItems extends APIResource {
|
|
4961
4961
|
list(responseID, params = {}, options) {
|
|
4962
4962
|
const { betas, ...query } = params ?? {};
|
|
@@ -4972,7 +4972,7 @@ class InputItems extends APIResource {
|
|
|
4972
4972
|
}
|
|
4973
4973
|
}
|
|
4974
4974
|
|
|
4975
|
-
//
|
|
4975
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/responses/input-tokens.mjs
|
|
4976
4976
|
class InputTokens extends APIResource {
|
|
4977
4977
|
count(params = {}, options) {
|
|
4978
4978
|
const { betas, ...body } = params ?? {};
|
|
@@ -4988,7 +4988,7 @@ class InputTokens extends APIResource {
|
|
|
4988
4988
|
}
|
|
4989
4989
|
}
|
|
4990
4990
|
|
|
4991
|
-
//
|
|
4991
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/responses/responses.mjs
|
|
4992
4992
|
class Responses extends APIResource {
|
|
4993
4993
|
constructor() {
|
|
4994
4994
|
super(...arguments);
|
|
@@ -5059,7 +5059,7 @@ class Responses extends APIResource {
|
|
|
5059
5059
|
Responses.InputItems = InputItems;
|
|
5060
5060
|
Responses.InputTokens = InputTokens;
|
|
5061
5061
|
|
|
5062
|
-
//
|
|
5062
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/threads/messages.mjs
|
|
5063
5063
|
class Messages2 extends APIResource {
|
|
5064
5064
|
create(threadID, body, options) {
|
|
5065
5065
|
return this._client.post(path`/threads/${threadID}/messages`, {
|
|
@@ -5104,7 +5104,7 @@ class Messages2 extends APIResource {
|
|
|
5104
5104
|
}
|
|
5105
5105
|
}
|
|
5106
5106
|
|
|
5107
|
-
//
|
|
5107
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/threads/runs/steps.mjs
|
|
5108
5108
|
class Steps extends APIResource {
|
|
5109
5109
|
retrieve(stepID, params, options) {
|
|
5110
5110
|
const { thread_id, run_id, ...query } = params;
|
|
@@ -5125,7 +5125,7 @@ class Steps extends APIResource {
|
|
|
5125
5125
|
});
|
|
5126
5126
|
}
|
|
5127
5127
|
}
|
|
5128
|
-
//
|
|
5128
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/base64.mjs
|
|
5129
5129
|
var toFloat32Array = (base64Str) => {
|
|
5130
5130
|
if (typeof Buffer !== "undefined") {
|
|
5131
5131
|
const buf = Buffer.from(base64Str, "base64");
|
|
@@ -5140,7 +5140,7 @@ var toFloat32Array = (base64Str) => {
|
|
|
5140
5140
|
return Array.from(new Float32Array(bytes.buffer));
|
|
5141
5141
|
}
|
|
5142
5142
|
};
|
|
5143
|
-
//
|
|
5143
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/utils/env.mjs
|
|
5144
5144
|
var readEnv = (env) => {
|
|
5145
5145
|
if (typeof globalThis.process !== "undefined") {
|
|
5146
5146
|
return globalThis.process.env?.[env]?.trim() || undefined;
|
|
@@ -5150,7 +5150,7 @@ var readEnv = (env) => {
|
|
|
5150
5150
|
}
|
|
5151
5151
|
return;
|
|
5152
5152
|
};
|
|
5153
|
-
//
|
|
5153
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/AssistantStream.mjs
|
|
5154
5154
|
var _AssistantStream_instances;
|
|
5155
5155
|
var _a;
|
|
5156
5156
|
var _AssistantStream_events;
|
|
@@ -5670,7 +5670,7 @@ _a = AssistantStream, _AssistantStream_addEvent = function _AssistantStream_addE
|
|
|
5670
5670
|
};
|
|
5671
5671
|
function assertNever2(_x) {}
|
|
5672
5672
|
|
|
5673
|
-
//
|
|
5673
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/threads/runs/runs.mjs
|
|
5674
5674
|
class Runs extends APIResource {
|
|
5675
5675
|
constructor() {
|
|
5676
5676
|
super(...arguments);
|
|
@@ -5793,7 +5793,7 @@ class Runs extends APIResource {
|
|
|
5793
5793
|
}
|
|
5794
5794
|
Runs.Steps = Steps;
|
|
5795
5795
|
|
|
5796
|
-
//
|
|
5796
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/threads/threads.mjs
|
|
5797
5797
|
class Threads2 extends APIResource {
|
|
5798
5798
|
constructor() {
|
|
5799
5799
|
super(...arguments);
|
|
@@ -5851,7 +5851,7 @@ class Threads2 extends APIResource {
|
|
|
5851
5851
|
Threads2.Runs = Runs;
|
|
5852
5852
|
Threads2.Messages = Messages2;
|
|
5853
5853
|
|
|
5854
|
-
//
|
|
5854
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/beta/beta.mjs
|
|
5855
5855
|
class Beta extends APIResource {
|
|
5856
5856
|
constructor() {
|
|
5857
5857
|
super(...arguments);
|
|
@@ -5867,7 +5867,7 @@ Beta.Responses = Responses;
|
|
|
5867
5867
|
Beta.ChatKit = ChatKit;
|
|
5868
5868
|
Beta.Assistants = Assistants;
|
|
5869
5869
|
Beta.Threads = Threads2;
|
|
5870
|
-
//
|
|
5870
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/completions.mjs
|
|
5871
5871
|
class Completions2 extends APIResource {
|
|
5872
5872
|
create(body, options) {
|
|
5873
5873
|
return this._client.post("/completions", {
|
|
@@ -5878,7 +5878,7 @@ class Completions2 extends APIResource {
|
|
|
5878
5878
|
});
|
|
5879
5879
|
}
|
|
5880
5880
|
}
|
|
5881
|
-
//
|
|
5881
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/containers/files/content.mjs
|
|
5882
5882
|
class Content extends APIResource {
|
|
5883
5883
|
retrieve(fileID, params, options) {
|
|
5884
5884
|
const { container_id } = params;
|
|
@@ -5891,7 +5891,7 @@ class Content extends APIResource {
|
|
|
5891
5891
|
}
|
|
5892
5892
|
}
|
|
5893
5893
|
|
|
5894
|
-
//
|
|
5894
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/containers/files/files.mjs
|
|
5895
5895
|
class Files extends APIResource {
|
|
5896
5896
|
constructor() {
|
|
5897
5897
|
super(...arguments);
|
|
@@ -5925,7 +5925,7 @@ class Files extends APIResource {
|
|
|
5925
5925
|
}
|
|
5926
5926
|
Files.Content = Content;
|
|
5927
5927
|
|
|
5928
|
-
//
|
|
5928
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/containers/containers.mjs
|
|
5929
5929
|
class Containers extends APIResource {
|
|
5930
5930
|
constructor() {
|
|
5931
5931
|
super(...arguments);
|
|
@@ -5956,7 +5956,7 @@ class Containers extends APIResource {
|
|
|
5956
5956
|
}
|
|
5957
5957
|
}
|
|
5958
5958
|
Containers.Files = Files;
|
|
5959
|
-
//
|
|
5959
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/conversations/items.mjs
|
|
5960
5960
|
class Items extends APIResource {
|
|
5961
5961
|
create(conversationID, params, options) {
|
|
5962
5962
|
const { include, ...body } = params;
|
|
@@ -5987,7 +5987,7 @@ class Items extends APIResource {
|
|
|
5987
5987
|
}
|
|
5988
5988
|
}
|
|
5989
5989
|
|
|
5990
|
-
//
|
|
5990
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/conversations/conversations.mjs
|
|
5991
5991
|
class Conversations extends APIResource {
|
|
5992
5992
|
constructor() {
|
|
5993
5993
|
super(...arguments);
|
|
@@ -6017,7 +6017,7 @@ class Conversations extends APIResource {
|
|
|
6017
6017
|
}
|
|
6018
6018
|
}
|
|
6019
6019
|
Conversations.Items = Items;
|
|
6020
|
-
//
|
|
6020
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/embeddings.mjs
|
|
6021
6021
|
class Embeddings extends APIResource {
|
|
6022
6022
|
create(body, options) {
|
|
6023
6023
|
const hasUserProvidedEncodingFormat = !!body.encoding_format;
|
|
@@ -6048,7 +6048,7 @@ class Embeddings extends APIResource {
|
|
|
6048
6048
|
});
|
|
6049
6049
|
}
|
|
6050
6050
|
}
|
|
6051
|
-
//
|
|
6051
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/evals/runs/output-items.mjs
|
|
6052
6052
|
class OutputItems extends APIResource {
|
|
6053
6053
|
retrieve(outputItemID, params, options) {
|
|
6054
6054
|
const { eval_id, run_id } = params;
|
|
@@ -6063,7 +6063,7 @@ class OutputItems extends APIResource {
|
|
|
6063
6063
|
}
|
|
6064
6064
|
}
|
|
6065
6065
|
|
|
6066
|
-
//
|
|
6066
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/evals/runs/runs.mjs
|
|
6067
6067
|
class Runs2 extends APIResource {
|
|
6068
6068
|
constructor() {
|
|
6069
6069
|
super(...arguments);
|
|
@@ -6107,7 +6107,7 @@ class Runs2 extends APIResource {
|
|
|
6107
6107
|
}
|
|
6108
6108
|
Runs2.OutputItems = OutputItems;
|
|
6109
6109
|
|
|
6110
|
-
//
|
|
6110
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/evals/evals.mjs
|
|
6111
6111
|
class Evals extends APIResource {
|
|
6112
6112
|
constructor() {
|
|
6113
6113
|
super(...arguments);
|
|
@@ -6134,7 +6134,7 @@ class Evals extends APIResource {
|
|
|
6134
6134
|
}
|
|
6135
6135
|
}
|
|
6136
6136
|
Evals.Runs = Runs2;
|
|
6137
|
-
//
|
|
6137
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/files.mjs
|
|
6138
6138
|
class Files2 extends APIResource {
|
|
6139
6139
|
create(body, options) {
|
|
6140
6140
|
return this._client.post("/files", multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client));
|
|
@@ -6176,11 +6176,11 @@ class Files2 extends APIResource {
|
|
|
6176
6176
|
return file;
|
|
6177
6177
|
}
|
|
6178
6178
|
}
|
|
6179
|
-
//
|
|
6179
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/methods.mjs
|
|
6180
6180
|
class Methods extends APIResource {
|
|
6181
6181
|
}
|
|
6182
6182
|
|
|
6183
|
-
//
|
|
6183
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/alpha/graders.mjs
|
|
6184
6184
|
class Graders extends APIResource {
|
|
6185
6185
|
run(body, options) {
|
|
6186
6186
|
return this._client.post("/fine_tuning/alpha/graders/run", {
|
|
@@ -6198,7 +6198,7 @@ class Graders extends APIResource {
|
|
|
6198
6198
|
}
|
|
6199
6199
|
}
|
|
6200
6200
|
|
|
6201
|
-
//
|
|
6201
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs
|
|
6202
6202
|
class Alpha extends APIResource {
|
|
6203
6203
|
constructor() {
|
|
6204
6204
|
super(...arguments);
|
|
@@ -6207,7 +6207,7 @@ class Alpha extends APIResource {
|
|
|
6207
6207
|
}
|
|
6208
6208
|
Alpha.Graders = Graders;
|
|
6209
6209
|
|
|
6210
|
-
//
|
|
6210
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs
|
|
6211
6211
|
class Permissions extends APIResource {
|
|
6212
6212
|
create(fineTunedModelCheckpoint, body, options) {
|
|
6213
6213
|
return this._client.getAPIList(path`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, { body, method: "post", ...options, __security: { adminAPIKeyAuth: true } });
|
|
@@ -6228,7 +6228,7 @@ class Permissions extends APIResource {
|
|
|
6228
6228
|
}
|
|
6229
6229
|
}
|
|
6230
6230
|
|
|
6231
|
-
//
|
|
6231
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs
|
|
6232
6232
|
class Checkpoints extends APIResource {
|
|
6233
6233
|
constructor() {
|
|
6234
6234
|
super(...arguments);
|
|
@@ -6237,14 +6237,14 @@ class Checkpoints extends APIResource {
|
|
|
6237
6237
|
}
|
|
6238
6238
|
Checkpoints.Permissions = Permissions;
|
|
6239
6239
|
|
|
6240
|
-
//
|
|
6240
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
|
|
6241
6241
|
class Checkpoints2 extends APIResource {
|
|
6242
6242
|
list(fineTuningJobID, query2 = {}, options) {
|
|
6243
6243
|
return this._client.getAPIList(path`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query: query2, ...options, __security: { bearerAuth: true } });
|
|
6244
6244
|
}
|
|
6245
6245
|
}
|
|
6246
6246
|
|
|
6247
|
-
//
|
|
6247
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs
|
|
6248
6248
|
class Jobs extends APIResource {
|
|
6249
6249
|
constructor() {
|
|
6250
6250
|
super(...arguments);
|
|
@@ -6290,7 +6290,7 @@ class Jobs extends APIResource {
|
|
|
6290
6290
|
}
|
|
6291
6291
|
Jobs.Checkpoints = Checkpoints2;
|
|
6292
6292
|
|
|
6293
|
-
//
|
|
6293
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/fine-tuning/fine-tuning.mjs
|
|
6294
6294
|
class FineTuning extends APIResource {
|
|
6295
6295
|
constructor() {
|
|
6296
6296
|
super(...arguments);
|
|
@@ -6304,11 +6304,11 @@ FineTuning.Methods = Methods;
|
|
|
6304
6304
|
FineTuning.Jobs = Jobs;
|
|
6305
6305
|
FineTuning.Checkpoints = Checkpoints;
|
|
6306
6306
|
FineTuning.Alpha = Alpha;
|
|
6307
|
-
//
|
|
6307
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/graders/grader-models.mjs
|
|
6308
6308
|
class GraderModels extends APIResource {
|
|
6309
6309
|
}
|
|
6310
6310
|
|
|
6311
|
-
//
|
|
6311
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/graders/graders.mjs
|
|
6312
6312
|
class Graders2 extends APIResource {
|
|
6313
6313
|
constructor() {
|
|
6314
6314
|
super(...arguments);
|
|
@@ -6316,7 +6316,7 @@ class Graders2 extends APIResource {
|
|
|
6316
6316
|
}
|
|
6317
6317
|
}
|
|
6318
6318
|
Graders2.GraderModels = GraderModels;
|
|
6319
|
-
//
|
|
6319
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/images.mjs
|
|
6320
6320
|
class Images extends APIResource {
|
|
6321
6321
|
createVariation(body, options) {
|
|
6322
6322
|
return this._client.post("/images/variations", multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client));
|
|
@@ -6333,7 +6333,7 @@ class Images extends APIResource {
|
|
|
6333
6333
|
});
|
|
6334
6334
|
}
|
|
6335
6335
|
}
|
|
6336
|
-
//
|
|
6336
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/models.mjs
|
|
6337
6337
|
class Models extends APIResource {
|
|
6338
6338
|
retrieve(model, options) {
|
|
6339
6339
|
return this._client.get(path`/models/${model}`, { ...options, __security: { bearerAuth: true } });
|
|
@@ -6345,13 +6345,13 @@ class Models extends APIResource {
|
|
|
6345
6345
|
return this._client.delete(path`/models/${model}`, { ...options, __security: { bearerAuth: true } });
|
|
6346
6346
|
}
|
|
6347
6347
|
}
|
|
6348
|
-
//
|
|
6348
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/moderations.mjs
|
|
6349
6349
|
class Moderations extends APIResource {
|
|
6350
6350
|
create(body, options) {
|
|
6351
6351
|
return this._client.post("/moderations", { body, ...options, __security: { bearerAuth: true } });
|
|
6352
6352
|
}
|
|
6353
6353
|
}
|
|
6354
|
-
//
|
|
6354
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/realtime/calls.mjs
|
|
6355
6355
|
class Calls extends APIResource {
|
|
6356
6356
|
accept(callID, body, options) {
|
|
6357
6357
|
return this._client.post(path`/realtime/calls/${callID}/accept`, {
|
|
@@ -6386,7 +6386,7 @@ class Calls extends APIResource {
|
|
|
6386
6386
|
}
|
|
6387
6387
|
}
|
|
6388
6388
|
|
|
6389
|
-
//
|
|
6389
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/realtime/client-secrets.mjs
|
|
6390
6390
|
class ClientSecrets extends APIResource {
|
|
6391
6391
|
create(body, options) {
|
|
6392
6392
|
return this._client.post("/realtime/client_secrets", {
|
|
@@ -6397,7 +6397,7 @@ class ClientSecrets extends APIResource {
|
|
|
6397
6397
|
}
|
|
6398
6398
|
}
|
|
6399
6399
|
|
|
6400
|
-
//
|
|
6400
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/realtime/realtime.mjs
|
|
6401
6401
|
class Realtime2 extends APIResource {
|
|
6402
6402
|
constructor() {
|
|
6403
6403
|
super(...arguments);
|
|
@@ -6407,7 +6407,7 @@ class Realtime2 extends APIResource {
|
|
|
6407
6407
|
}
|
|
6408
6408
|
Realtime2.ClientSecrets = ClientSecrets;
|
|
6409
6409
|
Realtime2.Calls = Calls;
|
|
6410
|
-
//
|
|
6410
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/ResponsesParser.mjs
|
|
6411
6411
|
function maybeParseResponse(response, params) {
|
|
6412
6412
|
if (!params || !hasAutoParseableInput2(params)) {
|
|
6413
6413
|
const parsed = {
|
|
@@ -6533,7 +6533,7 @@ function addOutputText(rsp) {
|
|
|
6533
6533
|
rsp.output_text = texts.join("");
|
|
6534
6534
|
}
|
|
6535
6535
|
|
|
6536
|
-
//
|
|
6536
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/responses/ResponseAccumulator.mjs
|
|
6537
6537
|
function accumulateResponse(event, snapshot) {
|
|
6538
6538
|
if (!snapshot) {
|
|
6539
6539
|
if (event.type !== "response.created") {
|
|
@@ -6922,7 +6922,7 @@ function assertNever3(value) {
|
|
|
6922
6922
|
throw new OpenAIError(`Unhandled response stream event: ${JSON.stringify(value)}`);
|
|
6923
6923
|
}
|
|
6924
6924
|
|
|
6925
|
-
//
|
|
6925
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/responses/ResponseStream.mjs
|
|
6926
6926
|
var _ResponseStream_instances;
|
|
6927
6927
|
var _ResponseStream_params;
|
|
6928
6928
|
var _ResponseStream_currentResponseSnapshot;
|
|
@@ -7113,14 +7113,14 @@ function finalizeResponse(snapshot, params) {
|
|
|
7113
7113
|
return maybeParseResponse(snapshot, params);
|
|
7114
7114
|
}
|
|
7115
7115
|
|
|
7116
|
-
//
|
|
7116
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/responses/input-items.mjs
|
|
7117
7117
|
class InputItems2 extends APIResource {
|
|
7118
7118
|
list(responseID, query2 = {}, options) {
|
|
7119
7119
|
return this._client.getAPIList(path`/responses/${responseID}/input_items`, CursorPage, { query: query2, ...options, __security: { bearerAuth: true } });
|
|
7120
7120
|
}
|
|
7121
7121
|
}
|
|
7122
7122
|
|
|
7123
|
-
//
|
|
7123
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/responses/input-tokens.mjs
|
|
7124
7124
|
class InputTokens2 extends APIResource {
|
|
7125
7125
|
count(body = {}, options) {
|
|
7126
7126
|
return this._client.post("/responses/input_tokens", {
|
|
@@ -7131,7 +7131,7 @@ class InputTokens2 extends APIResource {
|
|
|
7131
7131
|
}
|
|
7132
7132
|
}
|
|
7133
7133
|
|
|
7134
|
-
//
|
|
7134
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/responses/responses.mjs
|
|
7135
7135
|
class Responses2 extends APIResource {
|
|
7136
7136
|
constructor() {
|
|
7137
7137
|
super(...arguments);
|
|
@@ -7189,7 +7189,7 @@ class Responses2 extends APIResource {
|
|
|
7189
7189
|
}
|
|
7190
7190
|
Responses2.InputItems = InputItems2;
|
|
7191
7191
|
Responses2.InputTokens = InputTokens2;
|
|
7192
|
-
//
|
|
7192
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/skills/content.mjs
|
|
7193
7193
|
class Content2 extends APIResource {
|
|
7194
7194
|
retrieve(skillID, options) {
|
|
7195
7195
|
return this._client.get(path`/skills/${skillID}/content`, {
|
|
@@ -7201,7 +7201,7 @@ class Content2 extends APIResource {
|
|
|
7201
7201
|
}
|
|
7202
7202
|
}
|
|
7203
7203
|
|
|
7204
|
-
//
|
|
7204
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/skills/versions/content.mjs
|
|
7205
7205
|
class Content3 extends APIResource {
|
|
7206
7206
|
retrieve(version, params, options) {
|
|
7207
7207
|
const { skill_id } = params;
|
|
@@ -7214,7 +7214,7 @@ class Content3 extends APIResource {
|
|
|
7214
7214
|
}
|
|
7215
7215
|
}
|
|
7216
7216
|
|
|
7217
|
-
//
|
|
7217
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/skills/versions/versions.mjs
|
|
7218
7218
|
class Versions extends APIResource {
|
|
7219
7219
|
constructor() {
|
|
7220
7220
|
super(...arguments);
|
|
@@ -7247,7 +7247,7 @@ class Versions extends APIResource {
|
|
|
7247
7247
|
}
|
|
7248
7248
|
Versions.Content = Content3;
|
|
7249
7249
|
|
|
7250
|
-
//
|
|
7250
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/skills/skills.mjs
|
|
7251
7251
|
class Skills extends APIResource {
|
|
7252
7252
|
constructor() {
|
|
7253
7253
|
super(...arguments);
|
|
@@ -7280,14 +7280,14 @@ class Skills extends APIResource {
|
|
|
7280
7280
|
}
|
|
7281
7281
|
Skills.Content = Content2;
|
|
7282
7282
|
Skills.Versions = Versions;
|
|
7283
|
-
//
|
|
7283
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/uploads/parts.mjs
|
|
7284
7284
|
class Parts extends APIResource {
|
|
7285
7285
|
create(uploadID, body, options) {
|
|
7286
7286
|
return this._client.post(path`/uploads/${uploadID}/parts`, multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client));
|
|
7287
7287
|
}
|
|
7288
7288
|
}
|
|
7289
7289
|
|
|
7290
|
-
//
|
|
7290
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/uploads/uploads.mjs
|
|
7291
7291
|
class Uploads extends APIResource {
|
|
7292
7292
|
constructor() {
|
|
7293
7293
|
super(...arguments);
|
|
@@ -7311,7 +7311,7 @@ class Uploads extends APIResource {
|
|
|
7311
7311
|
}
|
|
7312
7312
|
}
|
|
7313
7313
|
Uploads.Parts = Parts;
|
|
7314
|
-
//
|
|
7314
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/lib/Util.mjs
|
|
7315
7315
|
var allSettledWithThrow = async (promises) => {
|
|
7316
7316
|
const results = await Promise.allSettled(promises);
|
|
7317
7317
|
const rejected = results.filter((result) => result.status === "rejected");
|
|
@@ -7330,7 +7330,7 @@ var allSettledWithThrow = async (promises) => {
|
|
|
7330
7330
|
return values2;
|
|
7331
7331
|
};
|
|
7332
7332
|
|
|
7333
|
-
//
|
|
7333
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/vector-stores/file-batches.mjs
|
|
7334
7334
|
class FileBatches extends APIResource {
|
|
7335
7335
|
create(vectorStoreID, body, options) {
|
|
7336
7336
|
return this._client.post(path`/vector_stores/${vectorStoreID}/file_batches`, {
|
|
@@ -7428,7 +7428,7 @@ class FileBatches extends APIResource {
|
|
|
7428
7428
|
}
|
|
7429
7429
|
}
|
|
7430
7430
|
|
|
7431
|
-
//
|
|
7431
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/vector-stores/files.mjs
|
|
7432
7432
|
class Files3 extends APIResource {
|
|
7433
7433
|
create(vectorStoreID, body, options) {
|
|
7434
7434
|
return this._client.post(path`/vector_stores/${vectorStoreID}/files`, {
|
|
@@ -7528,7 +7528,7 @@ class Files3 extends APIResource {
|
|
|
7528
7528
|
}
|
|
7529
7529
|
}
|
|
7530
7530
|
|
|
7531
|
-
//
|
|
7531
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/vector-stores/vector-stores.mjs
|
|
7532
7532
|
class VectorStores extends APIResource {
|
|
7533
7533
|
constructor() {
|
|
7534
7534
|
super(...arguments);
|
|
@@ -7585,7 +7585,7 @@ class VectorStores extends APIResource {
|
|
|
7585
7585
|
}
|
|
7586
7586
|
VectorStores.Files = Files3;
|
|
7587
7587
|
VectorStores.FileBatches = FileBatches;
|
|
7588
|
-
//
|
|
7588
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/videos.mjs
|
|
7589
7589
|
class Videos extends APIResource {
|
|
7590
7590
|
create(body, options) {
|
|
7591
7591
|
return this._client.post("/videos", multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client));
|
|
@@ -7631,7 +7631,7 @@ class Videos extends APIResource {
|
|
|
7631
7631
|
return this._client.post(path`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client));
|
|
7632
7632
|
}
|
|
7633
7633
|
}
|
|
7634
|
-
//
|
|
7634
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/resources/webhooks/webhooks.mjs
|
|
7635
7635
|
var _Webhooks_instances;
|
|
7636
7636
|
var _Webhooks_validateSecret;
|
|
7637
7637
|
var _Webhooks_getRequiredHeader;
|
|
@@ -7697,7 +7697,7 @@ _Webhooks_instances = new WeakSet, _Webhooks_validateSecret = function _Webhooks
|
|
|
7697
7697
|
}
|
|
7698
7698
|
return value;
|
|
7699
7699
|
};
|
|
7700
|
-
//
|
|
7700
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/internal/provider.mjs
|
|
7701
7701
|
var providerDefinitionsKey = Symbol.for("openai.node.providerDefinitions.v1");
|
|
7702
7702
|
var providerGlobal = globalThis;
|
|
7703
7703
|
var existingProviderDefinitions = providerGlobal[providerDefinitionsKey];
|
|
@@ -7713,7 +7713,7 @@ function configureProvider(provider) {
|
|
|
7713
7713
|
return definition.configure();
|
|
7714
7714
|
}
|
|
7715
7715
|
|
|
7716
|
-
//
|
|
7716
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/client.mjs
|
|
7717
7717
|
var _OpenAI_instances;
|
|
7718
7718
|
var _a2;
|
|
7719
7719
|
var _OpenAI_encoder;
|
|
@@ -8334,7 +8334,7 @@ function isUndiciDispatcherVersionMismatchError(error2) {
|
|
|
8334
8334
|
}
|
|
8335
8335
|
return false;
|
|
8336
8336
|
}
|
|
8337
|
-
//
|
|
8337
|
+
// node_modules/.bun/openai@6.49.0+ab3ed8e9421bfd7b/node_modules/openai/azure.mjs
|
|
8338
8338
|
var _deployments_endpoints = new Set([
|
|
8339
8339
|
"/completions",
|
|
8340
8340
|
"/chat/completions",
|
|
@@ -8346,7 +8346,7 @@ var _deployments_endpoints = new Set([
|
|
|
8346
8346
|
"/batches",
|
|
8347
8347
|
"/images/edits"
|
|
8348
8348
|
]);
|
|
8349
|
-
//
|
|
8349
|
+
// packages/core/src/providers/routing-receipt.ts
|
|
8350
8350
|
var TASK_KINDS = [
|
|
8351
8351
|
"coding",
|
|
8352
8352
|
"design",
|
|
@@ -8504,7 +8504,7 @@ function mergeRoutingReceipts(...batches) {
|
|
|
8504
8504
|
return receipts;
|
|
8505
8505
|
}
|
|
8506
8506
|
|
|
8507
|
-
//
|
|
8507
|
+
// packages/core/src/providers/openai-compatible.ts
|
|
8508
8508
|
function usageOf(response) {
|
|
8509
8509
|
if (!response.usage)
|
|
8510
8510
|
throw new Error("Model response did not include usage accounting");
|
|
@@ -8541,8 +8541,71 @@ function toWireMessage(message) {
|
|
|
8541
8541
|
}
|
|
8542
8542
|
return { role: message.role, content: message.content };
|
|
8543
8543
|
}
|
|
8544
|
-
function toWireMessages(messages) {
|
|
8545
|
-
|
|
8544
|
+
function toWireMessages(messages, options = {}) {
|
|
8545
|
+
const vision = options.vision ?? true;
|
|
8546
|
+
const wire = [];
|
|
8547
|
+
let pending = [];
|
|
8548
|
+
const flush = () => {
|
|
8549
|
+
if (pending.length === 0)
|
|
8550
|
+
return;
|
|
8551
|
+
wire.push({
|
|
8552
|
+
role: "user",
|
|
8553
|
+
content: [
|
|
8554
|
+
{ type: "text", text: `Image${pending.reduce((sum, entry) => sum + entry.images.length, 0) === 1 ? "" : "s"} returned by the ${[...new Set(pending.map((entry) => entry.name))].join(", ")} tool call${pending.length === 1 ? "" : "s"} above: ${pending.flatMap((entry) => entry.images.map((image) => image.path)).join(", ")}` },
|
|
8555
|
+
...pending.flatMap((entry) => entry.images.map((image) => ({ type: "image_url", image_url: { url: `data:${image.mediaType};base64,${image.data}` } })))
|
|
8556
|
+
]
|
|
8557
|
+
});
|
|
8558
|
+
pending = [];
|
|
8559
|
+
};
|
|
8560
|
+
for (const message of messages) {
|
|
8561
|
+
if (message.role !== "tool")
|
|
8562
|
+
flush();
|
|
8563
|
+
if (message.role === "tool" && message.images?.length) {
|
|
8564
|
+
if (vision) {
|
|
8565
|
+
wire.push(toWireMessage(message));
|
|
8566
|
+
pending.push({ name: message.name, images: message.images });
|
|
8567
|
+
} else {
|
|
8568
|
+
const note = `[${message.images.length === 1 ? "image" : "images"} not shown: this model cannot view images (${message.images.map((image) => image.path).join(", ")})]`;
|
|
8569
|
+
wire.push(toWireMessage({ ...message, content: `${message.content}
|
|
8570
|
+
${note}` }));
|
|
8571
|
+
}
|
|
8572
|
+
continue;
|
|
8573
|
+
}
|
|
8574
|
+
wire.push(toWireMessage(message));
|
|
8575
|
+
}
|
|
8576
|
+
flush();
|
|
8577
|
+
return wire;
|
|
8578
|
+
}
|
|
8579
|
+
var EPHEMERAL = { type: "ephemeral" };
|
|
8580
|
+
function usesOpenRouterCacheControl(model) {
|
|
8581
|
+
return model.startsWith("anthropic/") || model.startsWith("google/");
|
|
8582
|
+
}
|
|
8583
|
+
function isOpenRouterBaseUrl(baseURL) {
|
|
8584
|
+
if (!baseURL)
|
|
8585
|
+
return false;
|
|
8586
|
+
try {
|
|
8587
|
+
return new URL(baseURL).hostname.endsWith("openrouter.ai");
|
|
8588
|
+
} catch {
|
|
8589
|
+
return false;
|
|
8590
|
+
}
|
|
8591
|
+
}
|
|
8592
|
+
function withPartBreakpoint(message) {
|
|
8593
|
+
if (typeof message.content === "string") {
|
|
8594
|
+
return message.content ? { ...message, content: [{ type: "text", text: message.content, cache_control: EPHEMERAL }] } : message;
|
|
8595
|
+
}
|
|
8596
|
+
if (!Array.isArray(message.content))
|
|
8597
|
+
return message;
|
|
8598
|
+
const parts = message.content;
|
|
8599
|
+
const last = parts.map((part) => part.type).lastIndexOf("text");
|
|
8600
|
+
if (last < 0)
|
|
8601
|
+
return message;
|
|
8602
|
+
return { ...message, content: parts.map((part, index) => index === last ? { ...part, cache_control: EPHEMERAL } : part) };
|
|
8603
|
+
}
|
|
8604
|
+
function withOpenRouterCacheControl(messages, model) {
|
|
8605
|
+
if (!usesOpenRouterCacheControl(model))
|
|
8606
|
+
return messages;
|
|
8607
|
+
const lastUser = messages.map((message) => message.role).lastIndexOf("user");
|
|
8608
|
+
return messages.map((message, index) => message.role === "system" || index === lastUser ? withPartBreakpoint(message) : message);
|
|
8546
8609
|
}
|
|
8547
8610
|
function parseArguments(value) {
|
|
8548
8611
|
try {
|
|
@@ -8593,7 +8656,7 @@ function turnFromChatResponse(response) {
|
|
|
8593
8656
|
...routingReceipt ? { routingReceipt } : {}
|
|
8594
8657
|
};
|
|
8595
8658
|
}
|
|
8596
|
-
async function collectChatStream(stream, onTextDelta) {
|
|
8659
|
+
async function collectChatStream(stream, onTextDelta, onOutputProgress) {
|
|
8597
8660
|
let id = "";
|
|
8598
8661
|
let model = "";
|
|
8599
8662
|
let content = "";
|
|
@@ -8615,10 +8678,15 @@ async function collectChatStream(stream, onTextDelta) {
|
|
|
8615
8678
|
finishReason = choice.finish_reason;
|
|
8616
8679
|
if (choice.delta?.refusal)
|
|
8617
8680
|
refusal += choice.delta.refusal;
|
|
8681
|
+
if (choice.delta?.reasoning || choice.delta?.reasoning_content)
|
|
8682
|
+
onOutputProgress?.("reasoning");
|
|
8618
8683
|
if (choice.delta?.content) {
|
|
8619
8684
|
content += choice.delta.content;
|
|
8685
|
+
onOutputProgress?.("text");
|
|
8620
8686
|
onTextDelta?.(choice.delta.content);
|
|
8621
8687
|
}
|
|
8688
|
+
if (choice.delta?.tool_calls?.length)
|
|
8689
|
+
onOutputProgress?.("tool_call");
|
|
8622
8690
|
for (const fragment of choice.delta?.tool_calls ?? []) {
|
|
8623
8691
|
const existing = calls.get(fragment.index) ?? { id: "", name: "", args: "" };
|
|
8624
8692
|
calls.set(fragment.index, {
|
|
@@ -8640,7 +8708,7 @@ async function collectChatStream(stream, onTextDelta) {
|
|
|
8640
8708
|
};
|
|
8641
8709
|
}
|
|
8642
8710
|
|
|
8643
|
-
//
|
|
8711
|
+
// packages/core/src/providers/model-capabilities.ts
|
|
8644
8712
|
var CONSERVATIVE_CAPABILITIES = { contextWindow: 200000, maxOutputTokens: 16000, supportsEffort: false };
|
|
8645
8713
|
function exactCapabilities(models, contextWindow, maxOutputTokens, supportsEffort = false) {
|
|
8646
8714
|
return models.map((prefix) => ({ prefix, match: "exact", capabilities: { contextWindow, maxOutputTokens, supportsEffort } }));
|
|
@@ -8697,7 +8765,143 @@ function capabilitiesFor(modelId) {
|
|
|
8697
8765
|
var DEFAULT_OUTPUT_CEILING = 64000;
|
|
8698
8766
|
var PROTOCOL_MAX_OUTPUT_TOKENS = 128000;
|
|
8699
8767
|
|
|
8700
|
-
//
|
|
8768
|
+
// packages/core/src/providers/stream-deadline.ts
|
|
8769
|
+
var DEFAULT_FIRST_BYTE_TIMEOUT_MS = 300000;
|
|
8770
|
+
var DEFAULT_IDLE_TIMEOUT_MS = 90000;
|
|
8771
|
+
var DEFAULT_TOTAL_TIMEOUT_MS = 30 * 60000;
|
|
8772
|
+
|
|
8773
|
+
class StreamTimeoutError extends Error {
|
|
8774
|
+
phase;
|
|
8775
|
+
timeoutMs;
|
|
8776
|
+
name = "TimeoutError";
|
|
8777
|
+
code = "ETIMEDOUT";
|
|
8778
|
+
constructor(phase, timeoutMs) {
|
|
8779
|
+
const seconds = Math.round(timeoutMs / 1000);
|
|
8780
|
+
super(phase === "first_byte" ? `Model request timed out: no response within ${seconds}s.` : phase === "idle" ? `Model stream timed out: no data received for ${seconds}s.` : `Model request timed out: exceeded the ${seconds}s overall limit.`);
|
|
8781
|
+
this.phase = phase;
|
|
8782
|
+
this.timeoutMs = timeoutMs;
|
|
8783
|
+
}
|
|
8784
|
+
}
|
|
8785
|
+
function streamTimeoutsFor(timeoutMs, overrides = {}) {
|
|
8786
|
+
const legacy = typeof timeoutMs === "number" && Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : undefined;
|
|
8787
|
+
return {
|
|
8788
|
+
firstByteMs: overrides.firstByteMs ?? Math.max(DEFAULT_FIRST_BYTE_TIMEOUT_MS, legacy ?? 0),
|
|
8789
|
+
idleMs: overrides.idleMs ?? legacy ?? DEFAULT_IDLE_TIMEOUT_MS,
|
|
8790
|
+
totalMs: overrides.totalMs ?? Math.max(DEFAULT_TOTAL_TIMEOUT_MS, legacy ?? 0)
|
|
8791
|
+
};
|
|
8792
|
+
}
|
|
8793
|
+
function createStreamDeadline(options = {}) {
|
|
8794
|
+
const timeouts = {
|
|
8795
|
+
firstByteMs: options.firstByteMs ?? DEFAULT_FIRST_BYTE_TIMEOUT_MS,
|
|
8796
|
+
idleMs: options.idleMs ?? DEFAULT_IDLE_TIMEOUT_MS,
|
|
8797
|
+
totalMs: options.totalMs ?? DEFAULT_TOTAL_TIMEOUT_MS
|
|
8798
|
+
};
|
|
8799
|
+
const controller = new AbortController;
|
|
8800
|
+
const signal = options.signal ? AbortSignal.any([controller.signal, options.signal]) : controller.signal;
|
|
8801
|
+
let timedOut;
|
|
8802
|
+
let started = false;
|
|
8803
|
+
let disposed = false;
|
|
8804
|
+
let phaseTimer;
|
|
8805
|
+
let totalTimer;
|
|
8806
|
+
const waiters = new Set;
|
|
8807
|
+
const schedule = (ms, fire) => {
|
|
8808
|
+
const timer = setTimeout(fire, ms);
|
|
8809
|
+
timer.unref?.();
|
|
8810
|
+
return timer;
|
|
8811
|
+
};
|
|
8812
|
+
const clear = () => {
|
|
8813
|
+
if (phaseTimer !== undefined)
|
|
8814
|
+
clearTimeout(phaseTimer);
|
|
8815
|
+
if (totalTimer !== undefined)
|
|
8816
|
+
clearTimeout(totalTimer);
|
|
8817
|
+
phaseTimer = totalTimer = undefined;
|
|
8818
|
+
};
|
|
8819
|
+
const expire = (phase, ms) => {
|
|
8820
|
+
if (disposed || timedOut || options.signal?.aborted)
|
|
8821
|
+
return;
|
|
8822
|
+
timedOut = new StreamTimeoutError(phase, ms);
|
|
8823
|
+
clear();
|
|
8824
|
+
controller.abort(timedOut);
|
|
8825
|
+
for (const reject of waiters)
|
|
8826
|
+
reject(timedOut);
|
|
8827
|
+
waiters.clear();
|
|
8828
|
+
};
|
|
8829
|
+
if (!options.signal?.aborted) {
|
|
8830
|
+
phaseTimer = schedule(timeouts.firstByteMs, () => expire("first_byte", timeouts.firstByteMs));
|
|
8831
|
+
totalTimer = schedule(timeouts.totalMs, () => expire("total", timeouts.totalMs));
|
|
8832
|
+
}
|
|
8833
|
+
const touch = () => {
|
|
8834
|
+
if (disposed || timedOut)
|
|
8835
|
+
return;
|
|
8836
|
+
started = true;
|
|
8837
|
+
if (phaseTimer !== undefined)
|
|
8838
|
+
clearTimeout(phaseTimer);
|
|
8839
|
+
phaseTimer = schedule(timeouts.idleMs, () => expire("idle", timeouts.idleMs));
|
|
8840
|
+
};
|
|
8841
|
+
const race = (promise) => {
|
|
8842
|
+
if (timedOut) {
|
|
8843
|
+
promise.catch(() => {
|
|
8844
|
+
return;
|
|
8845
|
+
});
|
|
8846
|
+
return Promise.reject(timedOut);
|
|
8847
|
+
}
|
|
8848
|
+
return new Promise((resolve, reject) => {
|
|
8849
|
+
const onTimeout = (error2) => {
|
|
8850
|
+
promise.catch(() => {
|
|
8851
|
+
return;
|
|
8852
|
+
});
|
|
8853
|
+
reject(error2);
|
|
8854
|
+
};
|
|
8855
|
+
waiters.add(onTimeout);
|
|
8856
|
+
promise.then((value) => {
|
|
8857
|
+
waiters.delete(onTimeout);
|
|
8858
|
+
resolve(value);
|
|
8859
|
+
}, (error2) => {
|
|
8860
|
+
waiters.delete(onTimeout);
|
|
8861
|
+
reject(error2);
|
|
8862
|
+
});
|
|
8863
|
+
});
|
|
8864
|
+
};
|
|
8865
|
+
async function* wrap(stream) {
|
|
8866
|
+
const iterator = stream[Symbol.asyncIterator]();
|
|
8867
|
+
let finished = false;
|
|
8868
|
+
try {
|
|
8869
|
+
while (true) {
|
|
8870
|
+
const next = await race(iterator.next());
|
|
8871
|
+
if (next.done) {
|
|
8872
|
+
finished = true;
|
|
8873
|
+
return;
|
|
8874
|
+
}
|
|
8875
|
+
touch();
|
|
8876
|
+
yield next.value;
|
|
8877
|
+
}
|
|
8878
|
+
} finally {
|
|
8879
|
+
if (!finished)
|
|
8880
|
+
Promise.resolve().then(() => iterator.return?.()).catch(() => {
|
|
8881
|
+
return;
|
|
8882
|
+
});
|
|
8883
|
+
}
|
|
8884
|
+
}
|
|
8885
|
+
return {
|
|
8886
|
+
signal,
|
|
8887
|
+
get timedOut() {
|
|
8888
|
+
return timedOut;
|
|
8889
|
+
},
|
|
8890
|
+
get started() {
|
|
8891
|
+
return started;
|
|
8892
|
+
},
|
|
8893
|
+
touch,
|
|
8894
|
+
race,
|
|
8895
|
+
wrap,
|
|
8896
|
+
dispose() {
|
|
8897
|
+
disposed = true;
|
|
8898
|
+
clear();
|
|
8899
|
+
waiters.clear();
|
|
8900
|
+
}
|
|
8901
|
+
};
|
|
8902
|
+
}
|
|
8903
|
+
|
|
8904
|
+
// packages/core/src/providers/openai-agent.ts
|
|
8701
8905
|
function usesInklingToolContract(model) {
|
|
8702
8906
|
return model === "thinkingmachines/inkling:free" || model === "thinkingmachines/inkling-small:free";
|
|
8703
8907
|
}
|
|
@@ -8724,9 +8928,9 @@ class OpenAIAgentTurnProvider {
|
|
|
8724
8928
|
if (!request.safetyIdentifier.trim())
|
|
8725
8929
|
throw new Error("safetyIdentifier is required");
|
|
8726
8930
|
const inkling = usesInklingToolContract(this.options.model);
|
|
8727
|
-
const
|
|
8931
|
+
const body = {
|
|
8728
8932
|
model: this.options.model,
|
|
8729
|
-
messages: toWireMessages(request.messages),
|
|
8933
|
+
messages: isOpenRouterBaseUrl(this.options.baseURL) ? withOpenRouterCacheControl(toWireMessages(request.messages), this.options.model) : toWireMessages(request.messages),
|
|
8730
8934
|
...request.tools.length > 0 ? {
|
|
8731
8935
|
tools: request.tools.map((tool) => ({ type: "function", function: { name: tool.name, description: tool.description, parameters: tool.inputSchema } }))
|
|
8732
8936
|
} : {},
|
|
@@ -8737,15 +8941,22 @@ class OpenAIAgentTurnProvider {
|
|
|
8737
8941
|
...request.effort && this.capabilities.supportsEffort ? { reasoning_effort: request.effort } : {},
|
|
8738
8942
|
stream: true,
|
|
8739
8943
|
stream_options: { include_usage: true }
|
|
8740
|
-
}
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8944
|
+
};
|
|
8945
|
+
const deadline = createStreamDeadline({ ...streamTimeoutsFor(this.options.timeoutMs), signal: request.signal });
|
|
8946
|
+
try {
|
|
8947
|
+
const response = await deadline.race(this.call(body, deadline.signal));
|
|
8948
|
+
return turnFromChatResponse(Symbol.asyncIterator in Object(response) ? await collectChatStream(deadline.wrap(response), request.onTextDelta, request.onOutputProgress) : response);
|
|
8949
|
+
} catch (error2) {
|
|
8950
|
+
if (deadline.timedOut)
|
|
8951
|
+
throw deadline.timedOut;
|
|
8952
|
+
throw error2;
|
|
8953
|
+
} finally {
|
|
8954
|
+
deadline.dispose();
|
|
8955
|
+
}
|
|
8745
8956
|
}
|
|
8746
8957
|
}
|
|
8747
8958
|
|
|
8748
|
-
//
|
|
8959
|
+
// packages/core/src/wander.ts
|
|
8749
8960
|
var WANDER_MARKER = "[Wander]";
|
|
8750
8961
|
var WANDER_OBJECTIVE_MAX = 500;
|
|
8751
8962
|
var WANDER_LAB_FILES = {
|
|
@@ -8860,4 +9071,4 @@ function wanderGradeCounts(results) {
|
|
|
8860
9071
|
return WANDER_GRADES.map((grade) => ({ grade, count: results.claims.filter((claim) => claim.grade === grade).length }));
|
|
8861
9072
|
}
|
|
8862
9073
|
|
|
8863
|
-
export { approximateInputTokens, newPartTotals, addPart, tokenEstimateFrom, affordableOutputTokensFor, affordableOutputTokens, priceActualModelUsage, modelPricesFromEnvironment, TASK_KINDS, buildTaskProfile, mergeRoutingReceipts, capabilitiesFor, DEFAULT_OUTPUT_CEILING, PROTOCOL_MAX_OUTPUT_TOKENS, makeParseableTextFormat, OpenAI, toWireMessages, turnFromChatResponse, collectChatStream, OpenAIAgentTurnProvider, WANDER_MARKER, WANDER_LAB_FILES, isWanderObjective, isWanderRandomScheduleObjective, buildWanderScheduleObjective, pickWanderTopic, buildWanderObjective, wanderPlannerInstructions, WANDER_GRADES, parseWanderResults, wanderGradeCounts };
|
|
9074
|
+
export { approximateInputTokens, newPartTotals, addPart, tokenEstimateFrom, affordableOutputTokensFor, affordableOutputTokens, priceActualModelUsage, modelPricesFromEnvironment, TASK_KINDS, buildTaskProfile, mergeRoutingReceipts, capabilitiesFor, DEFAULT_OUTPUT_CEILING, PROTOCOL_MAX_OUTPUT_TOKENS, DEFAULT_TOTAL_TIMEOUT_MS, StreamTimeoutError, streamTimeoutsFor, createStreamDeadline, APIConnectionError, makeParseableTextFormat, OpenAI, toWireMessages, withOpenRouterCacheControl, turnFromChatResponse, collectChatStream, OpenAIAgentTurnProvider, WANDER_MARKER, WANDER_LAB_FILES, isWanderObjective, isWanderRandomScheduleObjective, buildWanderScheduleObjective, pickWanderTopic, buildWanderObjective, wanderPlannerInstructions, WANDER_GRADES, parseWanderResults, wanderGradeCounts };
|