@nyte-ai/ai 0.0.23 → 0.0.25-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +2 -38
- package/dist/chunks/{account-limits-cache-8qzk56vj.js → account-limits-cache-4qpef10z.js} +14 -1
- package/dist/chunks/{account-limits-cache-xds88kxd.js → account-limits-cache-525841fw.js} +12 -2
- package/dist/chunks/{account-limits-cache-me1x57bs.js → account-limits-cache-5ya94ve1.js} +42 -12
- package/dist/chunks/{account-limits-cache-ezvbhjym.js → account-limits-cache-5zw0zvpy.js} +4 -4
- package/dist/chunks/{account-limits-cache-pfa86y8e.js → account-limits-cache-9twrnvar.js} +1 -1
- package/dist/chunks/{account-limits-cache-vwgfz727.js → account-limits-cache-b25batbp.js} +2 -2
- package/dist/chunks/{account-limits-cache-vbw7n959.js → account-limits-cache-c8r9ga7d.js} +8 -8
- package/dist/chunks/{account-limits-cache-tq0ddhww.js → account-limits-cache-eq2sae8w.js} +3 -3
- package/dist/chunks/{account-limits-cache-zn01kscn.js → account-limits-cache-gtv32njs.js} +1 -1
- package/dist/chunks/{account-limits-cache-nxkprk3g.js → account-limits-cache-gvscpb51.js} +1 -1
- package/dist/chunks/{account-limits-cache-925zgz25.js → account-limits-cache-jt8g1rn2.js} +4 -4
- package/dist/chunks/{account-limits-cache-hndeb95d.js → account-limits-cache-k4zewdqs.js} +1 -1
- package/dist/chunks/{account-limits-cache-8yq9e32s.js → account-limits-cache-kn9pwsba.js} +3 -3
- package/dist/chunks/{account-limits-cache-0jdep92d.js → account-limits-cache-n916ac1t.js} +1 -1
- package/dist/chunks/{account-limits-cache-fdwad56n.js → account-limits-cache-qnrhx8gg.js} +1 -1
- package/dist/chunks/{account-limits-cache-w8ya0xct.js → account-limits-cache-rp9ht95p.js} +1 -1
- package/dist/chunks/{account-limits-cache-n3yk6g5c.js → account-limits-cache-s77e2bgc.js} +1 -1
- package/dist/chunks/{account-limits-cache-bsknrh6t.js → account-limits-cache-sk1m9fsp.js} +1 -1
- package/dist/chunks/{account-limits-cache-aazmkcnq.js → account-limits-cache-w0abqhna.js} +2 -2
- package/dist/chunks/{account-limits-cache-j8c5ra3q.js → account-limits-cache-wawwj02k.js} +16 -5
- package/dist/chunks/{account-limits-cache-6r6bqm7g.js → account-limits-cache-ygydb22m.js} +1 -1
- package/dist/chunks/{account-limits-cache-fbkaq46e.js → account-limits-cache-z9mfzg68.js} +1 -1
- package/dist/src/api/anthropic-convert.d.ts +9 -3
- package/dist/src/api/anthropic-convert.js +5 -2
- package/dist/src/api/anthropic-messages.js +48 -17
- package/dist/src/api/anthropic-messages.lazy.js +1 -1
- package/dist/src/api/deferred.js +1 -1
- package/dist/src/api/google-generative-ai.js +1 -1
- package/dist/src/api/google-generative-ai.lazy.js +1 -1
- package/dist/src/api/openai-codex-compact.js +7 -7
- package/dist/src/api/openai-codex-protocol.js +4 -4
- package/dist/src/api/openai-codex-responses.js +8 -8
- package/dist/src/api/openai-codex-responses.lazy.js +1 -1
- package/dist/src/api/openai-codex-websocket.js +7 -7
- package/dist/src/api/openai-completions-convert.js +2 -2
- package/dist/src/api/openai-completions-params.js +3 -3
- package/dist/src/api/openai-completions-reasoning.d.ts +5 -5
- package/dist/src/api/openai-completions.js +4 -4
- package/dist/src/api/openai-completions.lazy.js +1 -1
- package/dist/src/api/openai-responses-convert.js +2 -2
- package/dist/src/api/openai-responses-events.d.ts +98 -98
- package/dist/src/api/openai-responses-stream.js +4 -4
- package/dist/src/api/openai-responses.js +4 -4
- package/dist/src/api/openai-responses.lazy.js +1 -1
- package/dist/src/api/transform-messages.d.ts +11 -1
- package/dist/src/api/transform-messages.js +3 -1
- package/dist/src/auth/oauth/authorization-input.d.ts +2 -2
- package/dist/src/index.js +19 -19
- package/dist/src/providers/anthropic.js +2 -2
- package/dist/src/providers/github-copilot.d.ts +1 -1
- package/dist/src/providers/github-copilot.js +4 -4
- package/dist/src/providers/nyte-catalog.js +14 -14
- package/dist/src/providers/openai-codex.js +2 -2
- package/dist/src/providers/openai.js +2 -2
- package/dist/src/providers/opencode-go.js +6 -6
- package/dist/src/providers/opencode.js +5 -5
- package/dist/src/providers/openrouter.js +2 -2
- package/dist/src/providers/vercel-ai-gateway.js +2 -2
- package/dist/src/utils/failure.js +1 -1
- package/dist/src/utils/json-parse.js +1 -1
- package/dist/src/utils/overflow.js +2 -2
- package/dist/src/utils/retry.js +2 -2
- package/dist/src/utils/sse.js +1 -1
- package/package.json +3 -4
- /package/dist/chunks/{account-limits-cache-eyx1jcxc.js → account-limits-cache-20ttssmw.js} +0 -0
- /package/dist/chunks/{account-limits-cache-3dpd8f8k.js → account-limits-cache-3as87r3h.js} +0 -0
- /package/dist/chunks/{account-limits-cache-hxy4942k.js → account-limits-cache-khyz4r1r.js} +0 -0
- /package/dist/chunks/{account-limits-cache-k8z39pe7.js → account-limits-cache-s4xgnvwg.js} +0 -0
- /package/dist/chunks/{account-limits-cache-cknzwbq2.js → account-limits-cache-yck8f1w5.js} +0 -0
- /package/dist/chunks/{account-limits-cache-s9b5ecy4.js → account-limits-cache-z4y0mmpy.js} +0 -0
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
splitDeferredTools2
|
|
14
14
|
} from "../../chunks/account-limits-cache-8s8bz4dr.js";
|
|
15
|
+
import {
|
|
16
|
+
createAssistantMessageDiagnostic2,
|
|
17
|
+
appendAssistantMessageDiagnostic2
|
|
18
|
+
} from "../../chunks/account-limits-cache-9wqk28n5.js";
|
|
15
19
|
import {
|
|
16
20
|
headersToRecord2
|
|
17
21
|
} from "../../chunks/account-limits-cache-ag5b8dja.js";
|
|
@@ -19,14 +23,14 @@ import {
|
|
|
19
23
|
repairJson2,
|
|
20
24
|
parseStreamingJson2,
|
|
21
25
|
parseToolCallArguments2
|
|
22
|
-
} from "../../chunks/account-limits-cache-
|
|
26
|
+
} from "../../chunks/account-limits-cache-z9mfzg68.js";
|
|
23
27
|
import"../../chunks/account-limits-cache-j2bt392s.js";
|
|
24
28
|
import {
|
|
25
29
|
retryProviderRequest2
|
|
26
30
|
} from "../../chunks/account-limits-cache-nbhht7xz.js";
|
|
27
31
|
import {
|
|
28
32
|
iterateServerSentEvents2
|
|
29
|
-
} from "../../chunks/account-limits-cache-
|
|
33
|
+
} from "../../chunks/account-limits-cache-5ya94ve1.js";
|
|
30
34
|
import {
|
|
31
35
|
sanitizeSurrogates2
|
|
32
36
|
} from "../../chunks/account-limits-cache-eqwweapz.js";
|
|
@@ -63,7 +67,7 @@ import {
|
|
|
63
67
|
} from "../../chunks/account-limits-cache-k0pkzhbx.js";
|
|
64
68
|
import {
|
|
65
69
|
transformMessages2
|
|
66
|
-
} from "../../chunks/account-limits-cache-
|
|
70
|
+
} from "../../chunks/account-limits-cache-4qpef10z.js";
|
|
67
71
|
import {
|
|
68
72
|
toClaudeCodeName2,
|
|
69
73
|
fromClaudeCodeName2
|
|
@@ -90,10 +94,12 @@ import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
|
90
94
|
import {
|
|
91
95
|
normalizeToolCallId2,
|
|
92
96
|
convertMessages3,
|
|
97
|
+
prefersStrictSampling2,
|
|
93
98
|
convertTools3
|
|
94
|
-
} from "../../chunks/account-limits-cache-
|
|
99
|
+
} from "../../chunks/account-limits-cache-wawwj02k.js";
|
|
95
100
|
|
|
96
101
|
// src/api/anthropic-messages.ts
|
|
102
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
97
103
|
import { Type } from "typebox";
|
|
98
104
|
import { Value } from "typebox/value";
|
|
99
105
|
function getCacheControl(model, cacheRetention, env) {
|
|
@@ -215,8 +221,6 @@ var stream = (model, context, requested) => {
|
|
|
215
221
|
client = created.client;
|
|
216
222
|
isOAuth = created.isOAuthToken;
|
|
217
223
|
}
|
|
218
|
-
const params = buildParams(model, normalizedContext, isOAuth, nativeToolChanges, options);
|
|
219
|
-
await options?.onPayload?.(params, model);
|
|
220
224
|
const requestOptions = {
|
|
221
225
|
signal: options?.signal,
|
|
222
226
|
maxRetries: 0
|
|
@@ -232,11 +236,30 @@ var stream = (model, context, requested) => {
|
|
|
232
236
|
requestOptions.headers = requestBetas.reduce(appendAnthropicBeta2, mergeAnthropicHeaders2(model.headers, options.headers));
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
const send = async (disablePreferredStrictTools) => {
|
|
240
|
+
const built = buildParams(model, normalizedContext, isOAuth, nativeToolChanges, options, disablePreferredStrictTools);
|
|
241
|
+
await options?.onPayload?.(built.params, model);
|
|
242
|
+
try {
|
|
243
|
+
return await retryProviderRequest2(() => client.beta.messages.create({ ...built.params, stream: true }, requestOptions).asResponse(), {
|
|
244
|
+
maxRetries: options?.maxRetries,
|
|
245
|
+
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
246
|
+
signal: options?.signal
|
|
247
|
+
});
|
|
248
|
+
} catch (error) {
|
|
249
|
+
if (disablePreferredStrictTools || !built.hasPreferredStrictTools || !(error instanceof Anthropic.APIError) || error.status !== 400 || error.type !== "invalid_request_error" || ![
|
|
250
|
+
"The compiled grammar is too large",
|
|
251
|
+
"Too many strict tools (",
|
|
252
|
+
"Schemas contains too many parameters with union types ("
|
|
253
|
+
].some((message) => error.message.includes(message))) {
|
|
254
|
+
throw error;
|
|
255
|
+
}
|
|
256
|
+
appendAssistantMessageDiagnostic2(output, createAssistantMessageDiagnostic2("anthropic_strict_tools_fallback", error, {
|
|
257
|
+
reason: "strict_tool_limits_exceeded"
|
|
258
|
+
}));
|
|
259
|
+
return send(true);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
const response = await send(false);
|
|
240
263
|
const responseHeaders = headersToRecord2(response.headers);
|
|
241
264
|
await options?.onResponse?.({ status: response.status, headers: responseHeaders }, model);
|
|
242
265
|
if (options?.onAccountLimits !== undefined) {
|
|
@@ -453,9 +476,17 @@ function systemBlock(text, cacheControl) {
|
|
|
453
476
|
return block;
|
|
454
477
|
}
|
|
455
478
|
var AnthropicMetadataSchema = Type.Object({ user_id: Type.String() });
|
|
456
|
-
function buildParams(model, context, isOAuthToken, nativeToolChanges, options) {
|
|
479
|
+
function buildParams(model, context, isOAuthToken, nativeToolChanges, options, disablePreferredStrictTools) {
|
|
457
480
|
const cacheControl = getCacheControl(model, options?.cacheRetention, options?.env);
|
|
458
481
|
const compat = getAnthropicCompat2(model);
|
|
482
|
+
let hasPreferredStrictTools = false;
|
|
483
|
+
const toolDefinitions = (tools, toolCacheControl, deferLoading = false) => {
|
|
484
|
+
const definitions = convertTools3(tools, isOAuthToken, compat.supportsEagerToolInputStreaming, compat.supportsStrictTools, toolCacheControl, deferLoading, disablePreferredStrictTools);
|
|
485
|
+
if (tools.some((tool, index) => prefersStrictSampling2(tool) && definitions[index].strict)) {
|
|
486
|
+
hasPreferredStrictTools = true;
|
|
487
|
+
}
|
|
488
|
+
return definitions;
|
|
489
|
+
};
|
|
459
490
|
const initialSystemMessage = getInitialSystemMessage2(context.messages);
|
|
460
491
|
const initialSystemText = initialSystemMessage ? getSystemMessageText2(initialSystemMessage) : "";
|
|
461
492
|
const transformedMessages = transformMessages2(context.messages, model, normalizeToolCallId2);
|
|
@@ -494,14 +525,14 @@ function buildParams(model, context, isOAuthToken, nativeToolChanges, options) {
|
|
|
494
525
|
const initialNames = new Set(initialTools.map((tool) => tool.name));
|
|
495
526
|
const laterTools = getDeclaredTools2(context.messages).filter((tool) => !initialNames.has(tool.name));
|
|
496
527
|
params.tools = [
|
|
497
|
-
...
|
|
528
|
+
...toolDefinitions(initialTools, toolCacheControl),
|
|
498
529
|
DEFERRED_TOOL_PLACEHOLDER,
|
|
499
|
-
...
|
|
530
|
+
...toolDefinitions(laterTools, undefined, true)
|
|
500
531
|
];
|
|
501
532
|
} else if (immediateTools.length > 0 || deferredTools.length > 0) {
|
|
502
533
|
params.tools = [
|
|
503
|
-
...
|
|
504
|
-
...
|
|
534
|
+
...toolDefinitions(immediateTools, toolCacheControl),
|
|
535
|
+
...toolDefinitions(deferredTools, undefined, true)
|
|
505
536
|
];
|
|
506
537
|
}
|
|
507
538
|
if (model.reasoning) {
|
|
@@ -543,7 +574,7 @@ function buildParams(model, context, isOAuthToken, nativeToolChanges, options) {
|
|
|
543
574
|
if (allowedFallbackModels && allowedFallbackModels.length > 0) {
|
|
544
575
|
params.fallbacks = allowedFallbackModels.map((fallback) => ({ model: fallback.model }));
|
|
545
576
|
}
|
|
546
|
-
return params;
|
|
577
|
+
return { params, hasPreferredStrictTools };
|
|
547
578
|
}
|
|
548
579
|
function mapStopReason(delta) {
|
|
549
580
|
const reason = delta.stop_reason;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
anthropicMessagesApi2
|
|
3
|
-
} from "../../chunks/account-limits-cache-
|
|
3
|
+
} from "../../chunks/account-limits-cache-3as87r3h.js";
|
|
4
4
|
import"../../chunks/account-limits-cache-90c9c2eb.js";
|
|
5
5
|
import"../../chunks/account-limits-cache-fsktnetm.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-zcbkmrvy.js";
|
package/dist/src/api/deferred.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compactOpenAICodexContext2,
|
|
3
3
|
compactOpenAIResponsesContext2
|
|
4
|
-
} from "../../chunks/account-limits-cache-
|
|
4
|
+
} from "../../chunks/account-limits-cache-yck8f1w5.js";
|
|
5
5
|
import"../../chunks/account-limits-cache-031vfpt3.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-f9z00x8c.js";
|
|
7
7
|
export {
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "../../chunks/account-limits-cache-k0pkzhbx.js";
|
|
42
42
|
import {
|
|
43
43
|
transformMessages2
|
|
44
|
-
} from "../../chunks/account-limits-cache-
|
|
44
|
+
} from "../../chunks/account-limits-cache-4qpef10z.js";
|
|
45
45
|
|
|
46
46
|
// src/api/google-generative-ai.ts
|
|
47
47
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
googleGenerativeAIApi2
|
|
3
|
-
} from "../../chunks/account-limits-cache-
|
|
3
|
+
} from "../../chunks/account-limits-cache-khyz4r1r.js";
|
|
4
4
|
import"../../chunks/account-limits-cache-90c9c2eb.js";
|
|
5
5
|
import"../../chunks/account-limits-cache-fsktnetm.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-zcbkmrvy.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "../../chunks/account-limits-cache-zgzptd0z.js";
|
|
7
7
|
import {
|
|
8
8
|
reportsQuotaExhaustion2
|
|
9
|
-
} from "../../chunks/account-limits-cache-
|
|
9
|
+
} from "../../chunks/account-limits-cache-525841fw.js";
|
|
10
10
|
import {
|
|
11
11
|
headersToRecord2
|
|
12
12
|
} from "../../chunks/account-limits-cache-ag5b8dja.js";
|
|
@@ -42,13 +42,13 @@ import"../../chunks/account-limits-cache-ehy0ze2b.js";
|
|
|
42
42
|
import"../../chunks/account-limits-cache-hj3ek3ty.js";
|
|
43
43
|
import"../../chunks/account-limits-cache-8s8bz4dr.js";
|
|
44
44
|
import"../../chunks/account-limits-cache-9wqk28n5.js";
|
|
45
|
-
import"../../chunks/account-limits-cache-
|
|
45
|
+
import"../../chunks/account-limits-cache-5ya94ve1.js";
|
|
46
46
|
import"../../chunks/account-limits-cache-b4edaybk.js";
|
|
47
47
|
import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
48
48
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
49
49
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
50
|
-
import"../../chunks/account-limits-cache-
|
|
51
|
-
import"../../chunks/account-limits-cache-
|
|
50
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
51
|
+
import"../../chunks/account-limits-cache-s77e2bgc.js";
|
|
52
52
|
import {
|
|
53
53
|
DEFAULT_MAX_RETRIES2,
|
|
54
54
|
compressRequestBodyZstd2,
|
|
@@ -59,16 +59,16 @@ import {
|
|
|
59
59
|
CodexProtocolError2,
|
|
60
60
|
extractCodexEventError2,
|
|
61
61
|
parseSSE2
|
|
62
|
-
} from "../../chunks/account-limits-cache-
|
|
62
|
+
} from "../../chunks/account-limits-cache-b25batbp.js";
|
|
63
63
|
import {
|
|
64
64
|
clampOpenAIPromptCacheKey2
|
|
65
65
|
} from "../../chunks/account-limits-cache-csbxvam7.js";
|
|
66
|
-
import"../../chunks/account-limits-cache-
|
|
66
|
+
import"../../chunks/account-limits-cache-z9mfzg68.js";
|
|
67
67
|
import"../../chunks/account-limits-cache-736tdyme.js";
|
|
68
68
|
import"../../chunks/account-limits-cache-nem079h8.js";
|
|
69
69
|
import {
|
|
70
70
|
withPriorityTier2
|
|
71
|
-
} from "../../chunks/account-limits-cache-
|
|
71
|
+
} from "../../chunks/account-limits-cache-w0abqhna.js";
|
|
72
72
|
|
|
73
73
|
// src/api/openai-codex-compact.ts
|
|
74
74
|
import { Type } from "typebox";
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
mapCodexEvents2,
|
|
14
14
|
parseSSE2,
|
|
15
15
|
parseErrorResponse2
|
|
16
|
-
} from "../../chunks/account-limits-cache-
|
|
17
|
-
import"../../chunks/account-limits-cache-
|
|
18
|
-
import"../../chunks/account-limits-cache-
|
|
16
|
+
} from "../../chunks/account-limits-cache-b25batbp.js";
|
|
17
|
+
import"../../chunks/account-limits-cache-s77e2bgc.js";
|
|
18
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
19
19
|
import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
20
20
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
21
|
-
import"../../chunks/account-limits-cache-
|
|
21
|
+
import"../../chunks/account-limits-cache-5ya94ve1.js";
|
|
22
22
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
23
23
|
import"../../chunks/account-limits-cache-8s8bz4dr.js";
|
|
24
24
|
import"../../chunks/account-limits-cache-hj3ek3ty.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../../chunks/account-limits-cache-9wqk28n5.js";
|
|
19
19
|
import {
|
|
20
20
|
reportsQuotaExhaustion2
|
|
21
|
-
} from "../../chunks/account-limits-cache-
|
|
21
|
+
} from "../../chunks/account-limits-cache-525841fw.js";
|
|
22
22
|
import"../../chunks/account-limits-cache-j2bt392s.js";
|
|
23
23
|
import {
|
|
24
24
|
retryProviderRequest2
|
|
@@ -41,12 +41,12 @@ import {
|
|
|
41
41
|
} from "../../chunks/account-limits-cache-h92bzz1j.js";
|
|
42
42
|
import"../../chunks/account-limits-cache-f9z00x8c.js";
|
|
43
43
|
import"../../chunks/account-limits-cache-8s8bz4dr.js";
|
|
44
|
-
import"../../chunks/account-limits-cache-
|
|
44
|
+
import"../../chunks/account-limits-cache-5ya94ve1.js";
|
|
45
45
|
import"../../chunks/account-limits-cache-b4edaybk.js";
|
|
46
46
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
47
47
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
48
|
-
import"../../chunks/account-limits-cache-
|
|
49
|
-
import"../../chunks/account-limits-cache-
|
|
48
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
49
|
+
import"../../chunks/account-limits-cache-s77e2bgc.js";
|
|
50
50
|
import {
|
|
51
51
|
compressRequestBodyZstd2,
|
|
52
52
|
buildRequestBody2,
|
|
@@ -56,21 +56,21 @@ import {
|
|
|
56
56
|
mapCodexEvents2,
|
|
57
57
|
parseSSE2,
|
|
58
58
|
parseErrorResponse2
|
|
59
|
-
} from "../../chunks/account-limits-cache-
|
|
59
|
+
} from "../../chunks/account-limits-cache-b25batbp.js";
|
|
60
60
|
import"../../chunks/account-limits-cache-gqsrbky9.js";
|
|
61
61
|
import"../../chunks/account-limits-cache-b23sbrke.js";
|
|
62
62
|
import"../../chunks/account-limits-cache-0yd6bde8.js";
|
|
63
63
|
import"../../chunks/account-limits-cache-zgzptd0z.js";
|
|
64
|
-
import"../../chunks/account-limits-cache-
|
|
64
|
+
import"../../chunks/account-limits-cache-z9mfzg68.js";
|
|
65
65
|
import"../../chunks/account-limits-cache-736tdyme.js";
|
|
66
66
|
import"../../chunks/account-limits-cache-nem079h8.js";
|
|
67
67
|
import {
|
|
68
68
|
withPriorityTier2,
|
|
69
69
|
processResponsesStream2
|
|
70
|
-
} from "../../chunks/account-limits-cache-
|
|
70
|
+
} from "../../chunks/account-limits-cache-w0abqhna.js";
|
|
71
71
|
import {
|
|
72
72
|
streamOverWebSocket2
|
|
73
|
-
} from "../../chunks/account-limits-cache-
|
|
73
|
+
} from "../../chunks/account-limits-cache-eq2sae8w.js";
|
|
74
74
|
import {
|
|
75
75
|
clampOpenAIPromptCacheKey2
|
|
76
76
|
} from "../../chunks/account-limits-cache-csbxvam7.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openAICodexResponsesApi2
|
|
3
|
-
} from "../../chunks/account-limits-cache-
|
|
3
|
+
} from "../../chunks/account-limits-cache-z4y0mmpy.js";
|
|
4
4
|
import"../../chunks/account-limits-cache-90c9c2eb.js";
|
|
5
5
|
import"../../chunks/account-limits-cache-fsktnetm.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-zcbkmrvy.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
closeOpenAICodexWebSocketSessions2,
|
|
3
3
|
streamOverWebSocket2
|
|
4
|
-
} from "../../chunks/account-limits-cache-
|
|
5
|
-
import"../../chunks/account-limits-cache-
|
|
4
|
+
} from "../../chunks/account-limits-cache-eq2sae8w.js";
|
|
5
|
+
import"../../chunks/account-limits-cache-w0abqhna.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-nem079h8.js";
|
|
7
|
-
import"../../chunks/account-limits-cache-
|
|
8
|
-
import"../../chunks/account-limits-cache-
|
|
9
|
-
import"../../chunks/account-limits-cache-
|
|
7
|
+
import"../../chunks/account-limits-cache-b25batbp.js";
|
|
8
|
+
import"../../chunks/account-limits-cache-s77e2bgc.js";
|
|
9
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
10
10
|
import"../../chunks/account-limits-cache-736tdyme.js";
|
|
11
11
|
import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
12
12
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
13
|
-
import"../../chunks/account-limits-cache-
|
|
13
|
+
import"../../chunks/account-limits-cache-5ya94ve1.js";
|
|
14
14
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
15
15
|
import"../../chunks/account-limits-cache-0yd6bde8.js";
|
|
16
16
|
import"../../chunks/account-limits-cache-8s8bz4dr.js";
|
|
@@ -19,7 +19,7 @@ import"../../chunks/account-limits-cache-fvadc36m.js";
|
|
|
19
19
|
import"../../chunks/account-limits-cache-ehy0ze2b.js";
|
|
20
20
|
import"../../chunks/account-limits-cache-b4edaybk.js";
|
|
21
21
|
import"../../chunks/account-limits-cache-6250ykn6.js";
|
|
22
|
-
import"../../chunks/account-limits-cache-
|
|
22
|
+
import"../../chunks/account-limits-cache-z9mfzg68.js";
|
|
23
23
|
import"../../chunks/account-limits-cache-gknnm1kv.js";
|
|
24
24
|
import"../../chunks/account-limits-cache-ag5b8dja.js";
|
|
25
25
|
import"../../chunks/account-limits-cache-fsktnetm.js";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
applyAnthropicCacheControl2,
|
|
5
5
|
convertMessages2,
|
|
6
6
|
convertTools2
|
|
7
|
-
} from "../../chunks/account-limits-cache-
|
|
7
|
+
} from "../../chunks/account-limits-cache-qnrhx8gg.js";
|
|
8
8
|
import"../../chunks/account-limits-cache-hj1h48sc.js";
|
|
9
|
-
import"../../chunks/account-limits-cache-
|
|
9
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
10
10
|
import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
11
11
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
12
12
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildParams2
|
|
3
|
-
} from "../../chunks/account-limits-cache-
|
|
4
|
-
import"../../chunks/account-limits-cache-
|
|
3
|
+
} from "../../chunks/account-limits-cache-gtv32njs.js";
|
|
4
|
+
import"../../chunks/account-limits-cache-qnrhx8gg.js";
|
|
5
5
|
import"../../chunks/account-limits-cache-hj1h48sc.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-csbxvam7.js";
|
|
7
7
|
import"../../chunks/account-limits-cache-k0pkzhbx.js";
|
|
8
|
-
import"../../chunks/account-limits-cache-
|
|
8
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
9
9
|
import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
10
10
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
11
11
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Type, type Static } from "typebox";
|
|
7
7
|
export declare const OpenAIReasoningDetailSchema: Type.TUnion<[Type.TObject<{
|
|
8
|
+
id: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
9
|
+
format: Type.TOptional<Type.TString>;
|
|
10
|
+
index: Type.TOptional<Type.TNumber>;
|
|
8
11
|
type: Type.TLiteral<"reasoning.summary">;
|
|
9
12
|
summary: Type.TString;
|
|
13
|
+
}>, Type.TObject<{
|
|
10
14
|
id: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
11
15
|
format: Type.TOptional<Type.TString>;
|
|
12
16
|
index: Type.TOptional<Type.TNumber>;
|
|
13
|
-
}>, Type.TObject<{
|
|
14
17
|
type: Type.TLiteral<"reasoning.encrypted">;
|
|
15
18
|
data: Type.TString;
|
|
19
|
+
}>, Type.TObject<{
|
|
16
20
|
id: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
17
21
|
format: Type.TOptional<Type.TString>;
|
|
18
22
|
index: Type.TOptional<Type.TNumber>;
|
|
19
|
-
}>, Type.TObject<{
|
|
20
23
|
type: Type.TLiteral<"reasoning.text">;
|
|
21
24
|
text: Type.TString;
|
|
22
25
|
signature: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
23
|
-
id: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
24
|
-
format: Type.TOptional<Type.TString>;
|
|
25
|
-
index: Type.TOptional<Type.TNumber>;
|
|
26
26
|
}>]>;
|
|
27
27
|
export type OpenAIReasoningDetail = Static<typeof OpenAIReasoningDetailSchema>;
|
|
28
28
|
type OpenAIEncryptedReasoningDetail = Extract<OpenAIReasoningDetail, {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
parseStreamingJson2,
|
|
19
19
|
parseToolCallArguments2
|
|
20
|
-
} from "../../chunks/account-limits-cache-
|
|
20
|
+
} from "../../chunks/account-limits-cache-z9mfzg68.js";
|
|
21
21
|
import {
|
|
22
22
|
getNyteUserAgent2
|
|
23
23
|
} from "../../chunks/account-limits-cache-gknnm1kv.js";
|
|
@@ -60,14 +60,14 @@ import {
|
|
|
60
60
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|
|
61
61
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
62
62
|
import"../../chunks/account-limits-cache-b4edaybk.js";
|
|
63
|
-
import"../../chunks/account-limits-cache-
|
|
63
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
64
64
|
import {
|
|
65
65
|
resolveCompat2
|
|
66
|
-
} from "../../chunks/account-limits-cache-
|
|
66
|
+
} from "../../chunks/account-limits-cache-qnrhx8gg.js";
|
|
67
67
|
import"../../chunks/account-limits-cache-csbxvam7.js";
|
|
68
68
|
import {
|
|
69
69
|
buildParams2
|
|
70
|
-
} from "../../chunks/account-limits-cache-
|
|
70
|
+
} from "../../chunks/account-limits-cache-gtv32njs.js";
|
|
71
71
|
|
|
72
72
|
// src/api/openai-completions.ts
|
|
73
73
|
import OpenAI from "openai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openAICompletionsApi2
|
|
3
|
-
} from "../../chunks/account-limits-cache-
|
|
3
|
+
} from "../../chunks/account-limits-cache-20ttssmw.js";
|
|
4
4
|
import"../../chunks/account-limits-cache-90c9c2eb.js";
|
|
5
5
|
import"../../chunks/account-limits-cache-fsktnetm.js";
|
|
6
6
|
import"../../chunks/account-limits-cache-zcbkmrvy.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
encodeTextSignatureV12,
|
|
3
3
|
convertResponsesMessages2,
|
|
4
4
|
convertResponsesTools2
|
|
5
|
-
} from "../../chunks/account-limits-cache-
|
|
6
|
-
import"../../chunks/account-limits-cache-
|
|
5
|
+
} from "../../chunks/account-limits-cache-s77e2bgc.js";
|
|
6
|
+
import"../../chunks/account-limits-cache-4qpef10z.js";
|
|
7
7
|
import"../../chunks/account-limits-cache-h92bzz1j.js";
|
|
8
8
|
import"../../chunks/account-limits-cache-eqwweapz.js";
|
|
9
9
|
import"../../chunks/account-limits-cache-0af5gqeg.js";
|