@openclaw/ai 2026.9.5 → 2026.9.6
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/{anthropic-COtDvgtt.mjs → anthropic-DZQ_7gD1.mjs} +35 -35
- package/dist/{anthropic-payload-policy-5Erq1Nzy.d.mts → anthropic-payload-policy-DyfwikYJ.d.mts} +4 -4
- package/dist/{anthropic-stream-reducer-BvdYYWL8.mjs → anthropic-stream-reducer-D6ZI1wwj.mjs} +32 -16
- package/dist/{api-registry-Ba2Cv-ut.d.mts → api-registry-C2T3lTV7.d.mts} +2 -2
- package/dist/{assistant-output-BsEkB-vU.mjs → assistant-output-DM1JBNs1.mjs} +1 -1
- package/dist/{azure-openai-responses-YrgnD583.mjs → azure-openai-responses-DS86GYzq.mjs} +5 -5
- package/dist/{base64-BQOzsvUH.mjs → base64-CPmadnUf.mjs} +8 -8
- package/dist/{diagnostics-Dm4bisWG.mjs → diagnostics-CH8j2wIG.mjs} +55 -10
- package/dist/{diagnostics-CPeq9F7y.mjs → diagnostics-DzrF1h4J.mjs} +18 -1
- package/dist/diagnostics.d.mts +11 -5
- package/dist/diagnostics.mjs +4 -4
- package/dist/event-stream-C0nsgbj2.d.mts +1 -0
- package/dist/{event-stream-CCoa-qSI.d.mts → event-stream-CjnIZZst.d.mts} +1 -1
- package/dist/event-stream.d.mts +2 -2
- package/dist/{google-BuhpRO9r.mjs → google-BZJFjhuC.mjs} +5 -5
- package/dist/{google-messages-CyWnYlh0.mjs → google-messages-DB7GKkDk.mjs} +3 -3
- package/dist/{google-shared-BT5ZeNer.mjs → google-shared-Bok4I6zB.mjs} +5 -5
- package/dist/{google-vertex-C7EplRvt.mjs → google-vertex-3eVNR2qW.mjs} +4 -4
- package/dist/{host-FZ1RA_qD.d.mts → host-DH-Z-LDb.d.mts} +3 -3
- package/dist/{host-policy-DUnXSx0I.mjs → host-policy-DZO3oPPk.mjs} +1 -1
- package/dist/{host-B4MeUNBc.mjs → host-yTvBrYM2.mjs} +41 -7
- package/dist/{index-DaF2QbwS.d.mts → index-C25RT6bP.d.mts} +36 -8
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +4 -4
- package/dist/internal/anthropic.d.mts +12 -8
- package/dist/internal/anthropic.mjs +5 -5
- package/dist/internal/openai-completions-compat.d.mts +1 -1
- package/dist/internal/openai-completions-compat.mjs +1 -1
- package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
- package/dist/internal/openai-responses-payload-policy.mjs +1 -1
- package/dist/internal/openai.d.mts +22 -8
- package/dist/internal/openai.mjs +11 -10
- package/dist/internal/runtime.d.mts +6 -6
- package/dist/internal/runtime.mjs +5 -5
- package/dist/internal/shared.d.mts +5 -4
- package/dist/internal/shared.mjs +4 -4
- package/dist/internal/tool-schema.d.mts +1 -1
- package/dist/internal/tool-schema.mjs +1 -1
- package/dist/{mistral-moA-mbwl.mjs → mistral-C_13dVBn.mjs} +5 -5
- package/dist/{model-transport-url-DKocrEsb.d.mts → model-transport-url-C5f59L3Y.d.mts} +1 -1
- package/dist/{openai-chatgpt-responses-DWID3EFO.mjs → openai-chatgpt-responses-sTxPl4zM.mjs} +107 -84
- package/dist/{openai-completions-DJ1Vm-CD.mjs → openai-completions-BO6D_hrB.mjs} +10 -10
- package/dist/{openai-completions-compat-CkwdxTZx.mjs → openai-completions-compat-CUollwl6.mjs} +1 -1
- package/dist/{openai-completions-compat-JE7gqxb9.d.mts → openai-completions-compat-DfJG1wSO.d.mts} +3 -3
- package/dist/{openai-completions-stream-Bu98b0Hv.mjs → openai-completions-stream-BpuJ0ZOA.mjs} +38 -25
- package/dist/{openai-prompt-cache-CJ_xEevu.d.mts → openai-prompt-cache-C4RHdN4n.d.mts} +2 -2
- package/dist/{openai-prompt-cache-1wfaIszn.mjs → openai-prompt-cache-CjV_2IRI.mjs} +1 -1
- package/dist/{openai-provider-client-DPo0Hmak.mjs → openai-provider-client-BP8J1aeg.mjs} +2 -2
- package/dist/{openai-reasoning-effort-NlFZmfEu.mjs → openai-reasoning-effort-ash8dPrd.mjs} +12 -4
- package/dist/{openai-responses-BejZzQCP.mjs → openai-responses-BJ_IEoMU.mjs} +7 -7
- package/dist/{openai-responses-compaction-window-D6P5oZP5.mjs → openai-responses-compaction-window-BiNCT0bS.mjs} +3 -3
- package/dist/{openai-responses-contracts-Dflvrfa8.d.mts → openai-responses-contracts-B1ENJFpI.d.mts} +4 -4
- package/dist/{openai-responses-prompt-observer-internal-C15_-OwV.mjs → openai-responses-prompt-observer-internal-DPHWgbBH.mjs} +14 -11
- package/dist/openai-responses-request-lifecycle-DFuyO1pQ.mjs +36 -0
- package/dist/{openai-responses-shared-CwsziD_m.mjs → openai-responses-shared-DvSqtJ6_.mjs} +481 -410
- package/dist/{openai-responses-terminal-usage-Dl3J6zrf.d.mts → openai-responses-terminal-usage-BNFbvY9f.d.mts} +2 -2
- package/dist/{openai-tool-schema-BO8rwyAD.mjs → openai-tool-schema-D4BMcj2D.mjs} +171 -95
- package/dist/{openai-transport-params-DQeuAvBl.mjs → openai-transport-params-DZKOTSfH.mjs} +9 -9
- package/dist/{positive-integer-DtjCkbue.mjs → positive-integer-BiUxrd71.mjs} +1 -1
- package/dist/{provider-error-DDqw9Qda.mjs → provider-error-CRhW7lkJ.mjs} +40 -7
- package/dist/{provider-error-CzNw4BWX.d.mts → provider-error-xumb1V3F.d.mts} +3 -1
- package/dist/{provider-options-DprLsWh9.d.mts → provider-options-DZYq53lj.d.mts} +6 -4
- package/dist/{provider-replay-context-CnUSOwhr.mjs → provider-replay-context-DPr3w20a.mjs} +1 -1
- package/dist/{provider-transcript-transform-BsRAhuWJ.mjs → provider-transcript-transform-BTocjCRs.mjs} +1 -1
- package/dist/{provider-transport-turn-state-CkGToCD2.mjs → provider-transport-turn-state-lrXEFkYr.mjs} +1 -1
- package/dist/{provider-types-CAKRC7N5.d.mts → provider-types-w1rEqrGP.d.mts} +3 -3
- package/dist/provider-types.d.mts +6 -6
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +10 -10
- package/dist/{reasoning-tag-text-partitioner-Dy9IO8Dc.mjs → reasoning-tag-text-partitioner-Di38crhI.mjs} +154 -35
- package/dist/{simple-options-C6cFWj_f.mjs → simple-options-np1XPuhm.mjs} +2 -2
- package/dist/{src-DeKjbE8I.mjs → src-DwGYYyZp.mjs} +15 -6
- package/dist/{stream-first-event-timeout-C9ZadkJW.mjs → stream-first-event-timeout-BeptfRL6.mjs} +1 -1
- package/dist/{transport-stream-shared-D-6FQSHm.mjs → transport-stream-shared-B5RioB_Q.mjs} +5 -13
- package/dist/{transport-stream-shared-BbUkFaHi.d.mts → transport-stream-shared-B7Z9oCYg.d.mts} +5 -5
- package/dist/{transport-utils-1cyq5Y7x.mjs → transport-utils-03Qi0CN2.mjs} +3 -3
- package/dist/transports.d.mts +11 -11
- package/dist/transports.mjs +70 -45
- package/dist/types-DTvddOfm.d.mts +1 -0
- package/dist/{types-4_uVs5WH.d.mts → types-qZFbaDbK.d.mts} +2 -0
- package/dist/types.d.mts +6 -6
- package/dist/types.mjs +3 -3
- package/dist/{validation-Ctzu2DhF.d.mts → validation-DhQhmt6t.d.mts} +1 -1
- package/dist/validation.d.mts +1 -1
- package/package.json +5 -5
- package/dist/event-stream-DmSCpi1T.d.mts +0 -1
- package/dist/types-DkJfb4W3.d.mts +0 -1
package/dist/providers.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as AssistantMessageEventStream } from "./event-stream-D8PARQfL.mjs";
|
|
2
|
-
import { n as projectProviderError } from "./provider-error-
|
|
3
|
-
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-
|
|
2
|
+
import { n as projectProviderError } from "./provider-error-CRhW7lkJ.mjs";
|
|
3
|
+
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-CjV_2IRI.mjs";
|
|
4
4
|
//#region packages/ai/src/providers/register-builtins.ts
|
|
5
5
|
/** Source id used for built-in API provider registrations. */
|
|
6
6
|
const BUILT_IN_API_PROVIDER_SOURCE_ID = "core:built-in";
|
|
@@ -62,35 +62,35 @@ function createLazyRegistration(api, importModule, select) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
const registerBuiltIns = [
|
|
65
|
-
createLazyRegistration("anthropic-messages", () => import("./anthropic-
|
|
65
|
+
createLazyRegistration("anthropic-messages", () => import("./anthropic-DZQ_7gD1.mjs").then((n) => n.t), (module) => ({
|
|
66
66
|
stream: module.streamAnthropic,
|
|
67
67
|
streamSimple: module.streamSimpleAnthropic
|
|
68
68
|
})),
|
|
69
|
-
createLazyRegistration("openai-completions", () => import("./openai-completions-
|
|
69
|
+
createLazyRegistration("openai-completions", () => import("./openai-completions-BO6D_hrB.mjs").then((n) => n.t), (module) => ({
|
|
70
70
|
stream: module.streamOpenAICompletions,
|
|
71
71
|
streamSimple: module.streamSimpleOpenAICompletions
|
|
72
72
|
})),
|
|
73
|
-
createLazyRegistration("mistral-conversations", () => import("./mistral-
|
|
73
|
+
createLazyRegistration("mistral-conversations", () => import("./mistral-C_13dVBn.mjs"), (module) => ({
|
|
74
74
|
stream: module.streamMistral,
|
|
75
75
|
streamSimple: module.streamSimpleMistral
|
|
76
76
|
})),
|
|
77
|
-
createLazyRegistration("openai-responses", () => import("./openai-responses-
|
|
77
|
+
createLazyRegistration("openai-responses", () => import("./openai-responses-BJ_IEoMU.mjs").then((n) => n.t), (module) => ({
|
|
78
78
|
stream: module.streamOpenAIResponses,
|
|
79
79
|
streamSimple: module.streamSimpleOpenAIResponses
|
|
80
80
|
})),
|
|
81
|
-
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-
|
|
81
|
+
createLazyRegistration("azure-openai-responses", () => import("./azure-openai-responses-DS86GYzq.mjs"), (module) => ({
|
|
82
82
|
stream: module.streamAzureOpenAIResponses,
|
|
83
83
|
streamSimple: module.streamSimpleAzureOpenAIResponses
|
|
84
84
|
})),
|
|
85
|
-
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-
|
|
85
|
+
createLazyRegistration("openai-chatgpt-responses", () => import("./openai-chatgpt-responses-sTxPl4zM.mjs"), (module) => ({
|
|
86
86
|
stream: module.streamOpenAICodexResponses,
|
|
87
87
|
streamSimple: module.streamSimpleOpenAICodexResponses
|
|
88
88
|
})),
|
|
89
|
-
createLazyRegistration("google-generative-ai", () => import("./google-
|
|
89
|
+
createLazyRegistration("google-generative-ai", () => import("./google-BZJFjhuC.mjs"), (module) => ({
|
|
90
90
|
stream: module.streamGoogle,
|
|
91
91
|
streamSimple: module.streamSimpleGoogle
|
|
92
92
|
})),
|
|
93
|
-
createLazyRegistration("google-vertex", () => import("./google-vertex-
|
|
93
|
+
createLazyRegistration("google-vertex", () => import("./google-vertex-3eVNR2qW.mjs"), (module) => ({
|
|
94
94
|
stream: module.streamGoogleVertex,
|
|
95
95
|
streamSimple: module.streamSimpleGoogleVertex
|
|
96
96
|
}))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import "./provider-error-
|
|
2
|
+
import "./provider-error-CRhW7lkJ.mjs";
|
|
3
3
|
import { t as expectDefined } from "./expect-lbe3Hgrh.mjs";
|
|
4
4
|
//#region node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
|
|
5
5
|
/**
|
|
@@ -10751,7 +10751,7 @@ function replace($0, $1) {
|
|
|
10751
10751
|
return $1 === "|" ? $1 : $0;
|
|
10752
10752
|
}
|
|
10753
10753
|
//#endregion
|
|
10754
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.
|
|
10754
|
+
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.2/node_modules/micromark-extension-gfm-table/lib/edit-map.js
|
|
10755
10755
|
/**
|
|
10756
10756
|
* @import {Event} from 'micromark-util-types'
|
|
10757
10757
|
*/
|
|
@@ -10773,14 +10773,25 @@ var EditMap = class {
|
|
|
10773
10773
|
* @type {Array<Change>}
|
|
10774
10774
|
*/
|
|
10775
10775
|
this.map = [];
|
|
10776
|
+
/**
|
|
10777
|
+
* Changes by index, so `add` does not scan `map` (quadratic on
|
|
10778
|
+
* table-heavy documents).
|
|
10779
|
+
*
|
|
10780
|
+
* @type {Map<number, Change>}
|
|
10781
|
+
*/
|
|
10782
|
+
this.index = /* @__PURE__ */ new Map();
|
|
10776
10783
|
}
|
|
10777
10784
|
/**
|
|
10778
10785
|
* Create an edit: a remove and/or add at a certain place.
|
|
10779
10786
|
*
|
|
10780
10787
|
* @param {number} index
|
|
10788
|
+
* Index at which to apply the edit.
|
|
10781
10789
|
* @param {number} remove
|
|
10790
|
+
* Count of items to remove at the index.
|
|
10782
10791
|
* @param {Array<Event>} add
|
|
10792
|
+
* Items to add at the index.
|
|
10783
10793
|
* @returns {undefined}
|
|
10794
|
+
* Nothing.
|
|
10784
10795
|
*/
|
|
10785
10796
|
add(index, remove, add) {
|
|
10786
10797
|
addImplementation(this, index, remove, add);
|
|
@@ -10789,7 +10800,9 @@ var EditMap = class {
|
|
|
10789
10800
|
* Done, change the events.
|
|
10790
10801
|
*
|
|
10791
10802
|
* @param {Array<Event>} events
|
|
10803
|
+
* List of events to apply the edits to.
|
|
10792
10804
|
* @returns {undefined}
|
|
10805
|
+
* Nothing.
|
|
10793
10806
|
*/
|
|
10794
10807
|
consume(events) {
|
|
10795
10808
|
this.map.sort(function(a, b) {
|
|
@@ -10813,37 +10826,43 @@ var EditMap = class {
|
|
|
10813
10826
|
slice = vecs.pop();
|
|
10814
10827
|
}
|
|
10815
10828
|
this.map.length = 0;
|
|
10829
|
+
this.index.clear();
|
|
10816
10830
|
}
|
|
10817
10831
|
};
|
|
10818
10832
|
/**
|
|
10819
10833
|
* Create an edit.
|
|
10820
10834
|
*
|
|
10821
10835
|
* @param {EditMap} editMap
|
|
10836
|
+
* Edit map to apply to.
|
|
10822
10837
|
* @param {number} at
|
|
10838
|
+
* Index at which to apply the edit.
|
|
10823
10839
|
* @param {number} remove
|
|
10840
|
+
* Count of items to remove at the index.
|
|
10824
10841
|
* @param {Array<Event>} add
|
|
10842
|
+
* Items to add at the index.
|
|
10825
10843
|
* @returns {undefined}
|
|
10844
|
+
* Nothing.
|
|
10826
10845
|
*/
|
|
10827
10846
|
function addImplementation(editMap, at, remove, add) {
|
|
10828
|
-
let index = 0;
|
|
10829
10847
|
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
10830
10848
|
if (remove === 0 && add.length === 0) return;
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
editMap.map.push([
|
|
10849
|
+
const existing = editMap.index.get(at);
|
|
10850
|
+
if (existing) {
|
|
10851
|
+
existing[1] += remove;
|
|
10852
|
+
existing[2].push(...add);
|
|
10853
|
+
return;
|
|
10854
|
+
}
|
|
10855
|
+
/** @type {Change} */
|
|
10856
|
+
const change = [
|
|
10840
10857
|
at,
|
|
10841
10858
|
remove,
|
|
10842
10859
|
add
|
|
10843
|
-
]
|
|
10860
|
+
];
|
|
10861
|
+
editMap.map.push(change);
|
|
10862
|
+
editMap.index.set(at, change);
|
|
10844
10863
|
}
|
|
10845
10864
|
//#endregion
|
|
10846
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.
|
|
10865
|
+
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.2/node_modules/micromark-extension-gfm-table/lib/infer.js
|
|
10847
10866
|
/**
|
|
10848
10867
|
* @import {Event} from 'micromark-util-types'
|
|
10849
10868
|
*/
|
|
@@ -10881,7 +10900,7 @@ function gfmTableAlign(events, index) {
|
|
|
10881
10900
|
return align;
|
|
10882
10901
|
}
|
|
10883
10902
|
//#endregion
|
|
10884
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.
|
|
10903
|
+
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.2/node_modules/micromark-extension-gfm-table/lib/syntax.js
|
|
10885
10904
|
/**
|
|
10886
10905
|
* @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
10887
10906
|
*/
|
|
@@ -10907,6 +10926,8 @@ function gfmTable() {
|
|
|
10907
10926
|
} } };
|
|
10908
10927
|
}
|
|
10909
10928
|
/**
|
|
10929
|
+
* Tokenizer for GFM tables.
|
|
10930
|
+
*
|
|
10910
10931
|
* @this {TokenizeContext}
|
|
10911
10932
|
* @type {Tokenizer}
|
|
10912
10933
|
*/
|
|
@@ -10936,7 +10957,7 @@ function tokenizeTable(effects, ok, nok) {
|
|
|
10936
10957
|
function start(code) {
|
|
10937
10958
|
let index = self.events.length - 1;
|
|
10938
10959
|
while (index > -1) {
|
|
10939
|
-
const type = self.events[index][1]
|
|
10960
|
+
const { type } = self.events[index][1];
|
|
10940
10961
|
if (type === "lineEnding" || type === "linePrefix") index--;
|
|
10941
10962
|
else break;
|
|
10942
10963
|
}
|
|
@@ -11465,12 +11486,19 @@ function resolveTable(events, context) {
|
|
|
11465
11486
|
* Generate a cell.
|
|
11466
11487
|
*
|
|
11467
11488
|
* @param {EditMap} map
|
|
11489
|
+
* Edit map to apply to.
|
|
11468
11490
|
* @param {Readonly<TokenizeContext>} context
|
|
11491
|
+
* Tokenize context.
|
|
11469
11492
|
* @param {Readonly<Range>} range
|
|
11493
|
+
* Range of the cell within events.
|
|
11470
11494
|
* @param {RowKind} rowKind
|
|
11495
|
+
* Type of row.
|
|
11471
11496
|
* @param {number | undefined} rowEnd
|
|
11497
|
+
* Index of the end of the row, if known.
|
|
11472
11498
|
* @param {Token | undefined} previousCell
|
|
11499
|
+
* Previous cell token, if any.
|
|
11473
11500
|
* @returns {Token | undefined}
|
|
11501
|
+
* Current cell token after flushing, if any.
|
|
11474
11502
|
*/
|
|
11475
11503
|
function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
|
|
11476
11504
|
const groupName = rowKind === 1 ? "tableHeader" : rowKind === 2 ? "tableDelimiter" : "tableData";
|
|
@@ -11541,10 +11569,17 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
|
|
|
11541
11569
|
* Generate table end (and table body end).
|
|
11542
11570
|
*
|
|
11543
11571
|
* @param {Readonly<EditMap>} map
|
|
11572
|
+
* Edit map to apply to.
|
|
11544
11573
|
* @param {Readonly<TokenizeContext>} context
|
|
11574
|
+
* Tokenize context.
|
|
11545
11575
|
* @param {number} index
|
|
11576
|
+
* Index within the events where the table end should be inserted.
|
|
11546
11577
|
* @param {Token} table
|
|
11578
|
+
* Table token.
|
|
11547
11579
|
* @param {Token | undefined} tableBody
|
|
11580
|
+
* Table body token, if any.
|
|
11581
|
+
* @returns {undefined}
|
|
11582
|
+
* Nothing.
|
|
11548
11583
|
*/
|
|
11549
11584
|
function flushTableEnd(map, context, index, table, tableBody) {
|
|
11550
11585
|
/** @type {Array<Event>} */
|
|
@@ -11567,9 +11602,14 @@ function flushTableEnd(map, context, index, table, tableBody) {
|
|
|
11567
11602
|
map.add(index + 1, 0, exits);
|
|
11568
11603
|
}
|
|
11569
11604
|
/**
|
|
11605
|
+
* Get the point (start or end) for a given event in the list of events.
|
|
11606
|
+
*
|
|
11570
11607
|
* @param {Readonly<Array<Event>>} events
|
|
11608
|
+
* List of events.
|
|
11571
11609
|
* @param {number} index
|
|
11610
|
+
* Index of the event to get the point for.
|
|
11572
11611
|
* @returns {Readonly<Point>}
|
|
11612
|
+
* Start point for enter and end point for exit.
|
|
11573
11613
|
*/
|
|
11574
11614
|
function getPoint(events, index) {
|
|
11575
11615
|
const event = events[index];
|
|
@@ -11729,45 +11769,124 @@ function captureInlineSources(text, sources) {
|
|
|
11729
11769
|
lineEnding: observe
|
|
11730
11770
|
} };
|
|
11731
11771
|
}
|
|
11772
|
+
function captureIndentedSources(text, sources, observeInlineLineEnding) {
|
|
11773
|
+
const observe = function(token) {
|
|
11774
|
+
if (!this.tokenStack.some(([parent]) => parent.type === "codeIndented")) return;
|
|
11775
|
+
const start = this.stack.findLast((entry) => entry.type === "code")?.position?.start.offset;
|
|
11776
|
+
if (start === void 0) return;
|
|
11777
|
+
let source = sources.get(start);
|
|
11778
|
+
if (!source) {
|
|
11779
|
+
const owner = this.stack.find((entry) => entry.type === "listItem" || entry.type === "blockquote");
|
|
11780
|
+
source = {
|
|
11781
|
+
value: "",
|
|
11782
|
+
offsets: [],
|
|
11783
|
+
context: text.slice(owner?.position?.start.offset ?? start, token.start.offset),
|
|
11784
|
+
ownerStart: owner?.position?.start.offset ?? start,
|
|
11785
|
+
nested: owner !== void 0
|
|
11786
|
+
};
|
|
11787
|
+
sources.set(start, source);
|
|
11788
|
+
}
|
|
11789
|
+
const value = this.sliceSerialize(token);
|
|
11790
|
+
const extra = value.length - (token.end.offset - token.start.offset);
|
|
11791
|
+
for (let cursor = start + source.offsets.length; cursor < token.end.offset; cursor += 1) {
|
|
11792
|
+
const consumed = cursor - token.start.offset;
|
|
11793
|
+
source.offsets.push(source.value.length + (consumed > 0 ? consumed + extra : 0));
|
|
11794
|
+
}
|
|
11795
|
+
source.value += value;
|
|
11796
|
+
};
|
|
11797
|
+
return { enter: {
|
|
11798
|
+
codeFlowValue(token) {
|
|
11799
|
+
observe.call(this, token);
|
|
11800
|
+
expectDefined(this.config.enter.data, "Markdown data handler").call(this, token);
|
|
11801
|
+
},
|
|
11802
|
+
lineEnding(token) {
|
|
11803
|
+
observeInlineLineEnding?.call(this, token);
|
|
11804
|
+
observe.call(this, token);
|
|
11805
|
+
}
|
|
11806
|
+
} };
|
|
11807
|
+
}
|
|
11732
11808
|
function parseMarkdownOwnership(text, options) {
|
|
11809
|
+
const paragraphs = options?.includeIndentedSource ? [] : void 0;
|
|
11733
11810
|
if (!text) return {
|
|
11734
11811
|
regions: [],
|
|
11735
11812
|
codeSpans: [],
|
|
11736
11813
|
textSpans: [],
|
|
11737
|
-
retainStart: 0
|
|
11814
|
+
retainStart: 0,
|
|
11815
|
+
completedParagraphs: [],
|
|
11816
|
+
...paragraphs ? { paragraphs } : {}
|
|
11738
11817
|
};
|
|
11739
11818
|
const sources = /* @__PURE__ */ new Map();
|
|
11819
|
+
const indentedSources = options?.includeIndentedSource ? /* @__PURE__ */ new Map() : void 0;
|
|
11820
|
+
const inlineSourceExtension = options?.includeSource ? captureInlineSources(text, sources) : void 0;
|
|
11740
11821
|
const tables = options?.syntax !== "commonmark";
|
|
11741
11822
|
const tree = fromMarkdown(text, {
|
|
11742
11823
|
extensions: [DISABLE_HTML_MARKDOWN, ...tables ? [gfmTable()] : []],
|
|
11743
|
-
mdastExtensions: [
|
|
11824
|
+
mdastExtensions: [
|
|
11825
|
+
...tables ? [gfmTableFromMarkdown()] : [],
|
|
11826
|
+
...inlineSourceExtension ? [inlineSourceExtension] : [],
|
|
11827
|
+
...indentedSources ? [captureIndentedSources(text, indentedSources, inlineSourceExtension?.enter?.lineEnding)] : []
|
|
11828
|
+
]
|
|
11744
11829
|
});
|
|
11830
|
+
const completedParagraphs = [];
|
|
11745
11831
|
const regions = [];
|
|
11746
11832
|
const textSpans = [];
|
|
11747
|
-
const
|
|
11748
|
-
|
|
11749
|
-
const
|
|
11750
|
-
const
|
|
11751
|
-
const
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11833
|
+
const blocks = tree.children ?? [];
|
|
11834
|
+
for (let index = 0; index < blocks.length; index += 1) {
|
|
11835
|
+
const block = expectDefined(blocks[index], "Markdown block");
|
|
11836
|
+
const next = blocks[index + 1]?.position?.start;
|
|
11837
|
+
const blockStart = block.position?.start?.offset;
|
|
11838
|
+
const endLine = block.position?.end?.line;
|
|
11839
|
+
const blockEnd = block.position?.end?.offset;
|
|
11840
|
+
if (paragraphs && block.type === "paragraph" && blockStart !== void 0 && blockEnd !== void 0) paragraphs.push({
|
|
11841
|
+
start: blockStart,
|
|
11842
|
+
end: blockEnd
|
|
11843
|
+
});
|
|
11844
|
+
let paragraph;
|
|
11845
|
+
if (block.type === "paragraph" && blockStart !== void 0 && endLine !== void 0 && next?.offset !== void 0 && next.line !== void 0 && next.line > endLine + 1) {
|
|
11846
|
+
paragraph = {
|
|
11847
|
+
start: blockStart,
|
|
11848
|
+
end: next.offset,
|
|
11849
|
+
hasReferenceCandidate: false
|
|
11850
|
+
};
|
|
11851
|
+
completedParagraphs.push(paragraph);
|
|
11852
|
+
}
|
|
11853
|
+
const pending = [block];
|
|
11854
|
+
while (pending.length > 0) {
|
|
11855
|
+
const node = expectDefined(pending.pop(), "Markdown ownership node");
|
|
11856
|
+
if (paragraph && node.type === "text" && node.value?.includes("[")) paragraph.hasReferenceCandidate = true;
|
|
11857
|
+
const start = node.position?.start?.offset;
|
|
11858
|
+
const end = node.position?.end?.offset;
|
|
11859
|
+
if (options?.includeText && node.type === "text" && start !== void 0 && end !== void 0) textSpans.push([start, end]);
|
|
11860
|
+
if ((node.type === "code" || node.type === "inlineCode") && start !== void 0 && end !== void 0) {
|
|
11861
|
+
const source = sources.get(start);
|
|
11862
|
+
if (source) while (source.offsets.length <= end - start) source.offsets.push(source.value.length);
|
|
11863
|
+
const indentedSource = indentedSources?.get(start);
|
|
11864
|
+
if (indentedSource) {
|
|
11865
|
+
indentedSource.value = node.value ?? "";
|
|
11866
|
+
while (indentedSource.offsets.length <= end - start) indentedSource.offsets.push(indentedSource.value.length);
|
|
11867
|
+
indentedSource.offsets.forEach((offset, sourceIndex) => {
|
|
11868
|
+
indentedSource.offsets[sourceIndex] = Math.min(offset, indentedSource.value.length);
|
|
11869
|
+
});
|
|
11870
|
+
}
|
|
11871
|
+
regions.push({
|
|
11872
|
+
start,
|
|
11873
|
+
end,
|
|
11874
|
+
block: node.type === "code",
|
|
11875
|
+
...source ? { source } : {},
|
|
11876
|
+
...indentedSource ? { indentedSource } : {}
|
|
11877
|
+
});
|
|
11878
|
+
}
|
|
11879
|
+
for (const child of node.children?.toReversed() ?? []) pending.push(child);
|
|
11762
11880
|
}
|
|
11763
|
-
for (const child of node.children?.toReversed() ?? []) pending.push(child);
|
|
11764
11881
|
}
|
|
11765
11882
|
regions.sort((left, right) => left.start - right.start);
|
|
11766
11883
|
return {
|
|
11767
11884
|
regions,
|
|
11768
11885
|
codeSpans: regions.map(({ start, end }) => [start, end]),
|
|
11769
11886
|
textSpans,
|
|
11770
|
-
retainStart: tree.children?.at(-1)?.position?.start?.offset ?? text.length
|
|
11887
|
+
retainStart: tree.children?.at(-1)?.position?.start?.offset ?? text.length,
|
|
11888
|
+
completedParagraphs,
|
|
11889
|
+
...paragraphs ? { paragraphs } : {}
|
|
11771
11890
|
};
|
|
11772
11891
|
}
|
|
11773
11892
|
function isInsideCode(index, spans) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
|
|
2
|
-
import { v as sanitizeSurrogates } from "./host-
|
|
3
|
-
import { i as copyProviderAcceptanceObserver } from "./transport-stream-shared-
|
|
2
|
+
import { v as sanitizeSurrogates } from "./host-yTvBrYM2.mjs";
|
|
3
|
+
import { i as copyProviderAcceptanceObserver } from "./transport-stream-shared-B5RioB_Q.mjs";
|
|
4
4
|
//#region packages/ai/src/utils/prompt-cache-stability.ts
|
|
5
5
|
/**
|
|
6
6
|
* Prompt-cache normalization helpers. They keep generated prompt sections
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./diagnostics-DzrF1h4J.mjs";
|
|
1
2
|
import "./validation-Dw7cb6BV.mjs";
|
|
2
3
|
//#region packages/llm-core/src/model-contracts/anthropic.ts
|
|
3
4
|
function normalizeClaudeModelId(modelId) {
|
|
@@ -29,6 +30,7 @@ const CLAUDE_SONNET_5_THINKING_PROFILE = {
|
|
|
29
30
|
defaultLevel: "high"
|
|
30
31
|
};
|
|
31
32
|
const CLAUDE_OPUS_5_THINKING_PROFILE = CLAUDE_SONNET_5_THINKING_PROFILE;
|
|
33
|
+
const CLAUDE_OPUS_55_THINKING_PROFILE = CLAUDE_FABLE_5_THINKING_PROFILE;
|
|
32
34
|
/** Resolve the canonical normalized Claude model id for one runtime model ref. */
|
|
33
35
|
function resolveClaudeModelIdentity(ref) {
|
|
34
36
|
const normalized = normalizeClaudeModelId((typeof ref.params?.canonicalModelId === "string" ? ref.params.canonicalModelId : void 0) ?? ref.id);
|
|
@@ -49,17 +51,16 @@ function resolveClaudeMythos5ModelIdentity(ref) {
|
|
|
49
51
|
return normalized.slice((match.index ?? 0) + (match[0].startsWith("-") ? 1 : 0));
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* new model (Mythos 5.1 is unregistered here and unproven).
|
|
54
|
+
* Prefix-bound thinking requires append-only runtime context. Extend this list
|
|
55
|
+
* only with live replay proof for the model (Mythos 5.1 remains unproven).
|
|
55
56
|
*/
|
|
56
57
|
function bindsClaudeThinkingPrefix(ref) {
|
|
57
|
-
return /^claude-fable-5-1(?=$|[^a-z0-9])/.test(resolveClaudeModelIdentity(ref));
|
|
58
|
+
return resolveClaudeOpus55ModelIdentity(ref) !== void 0 || /^claude-fable-5-1(?=$|[^a-z0-9])/.test(resolveClaudeModelIdentity(ref));
|
|
58
59
|
}
|
|
59
60
|
/** Return whether a Claude model requires adaptive thinking instead of manual budgets. */
|
|
60
61
|
function requiresClaudeMandatoryAdaptiveThinking(ref) {
|
|
61
62
|
const modelId = resolveClaudeModelIdentity(ref);
|
|
62
|
-
return resolveClaudeFable5ModelIdentity(ref) !== void 0 || resolveClaudeMythos5ModelIdentity(ref) !== void 0 || /(?:^|-)claude-mythos-preview(?=$|[^a-z0-9])/.test(modelId);
|
|
63
|
+
return resolveClaudeOpus55ModelIdentity(ref) !== void 0 || resolveClaudeFable5ModelIdentity(ref) !== void 0 || resolveClaudeMythos5ModelIdentity(ref) !== void 0 || /(?:^|-)claude-mythos-preview(?=$|[^a-z0-9])/.test(modelId);
|
|
63
64
|
}
|
|
64
65
|
/** Resolve Claude Sonnet 5 through direct ids, cloud ids, or deployment metadata. */
|
|
65
66
|
function resolveClaudeSonnet5ModelIdentity(ref) {
|
|
@@ -71,11 +72,19 @@ function resolveClaudeSonnet5ModelIdentity(ref) {
|
|
|
71
72
|
/** Resolve Claude Opus 5 through aliases, direct ids, cloud ids, or deployment metadata. */
|
|
72
73
|
function resolveClaudeOpus5ModelIdentity(ref) {
|
|
73
74
|
const normalized = resolveClaudeModelIdentity(ref);
|
|
75
|
+
const opus55Identity = resolveClaudeOpus55ModelIdentity(ref);
|
|
76
|
+
if (opus55Identity) return opus55Identity;
|
|
74
77
|
if (normalized === "opus" || normalized === "opus-5") return "claude-opus-5";
|
|
75
78
|
const match = /(?:^|-)claude-opus-5(?=$|[^a-z0-9])/.exec(normalized);
|
|
76
79
|
if (!match) return;
|
|
77
80
|
return normalized.slice((match.index ?? 0) + (match[0].startsWith("-") ? 1 : 0));
|
|
78
81
|
}
|
|
82
|
+
/** Resolve the Opus 5.5 contract without matching other Opus 5 generations. */
|
|
83
|
+
function resolveClaudeOpus55ModelIdentity(ref) {
|
|
84
|
+
const normalized = resolveClaudeModelIdentity(ref);
|
|
85
|
+
if (normalized === "opus-5-5") return "claude-opus-5-5";
|
|
86
|
+
return /^claude-opus-5-5(?=$|[^a-z0-9])/.test(normalized) ? normalized : void 0;
|
|
87
|
+
}
|
|
79
88
|
/** Return whether a Claude model supports adaptive thinking. */
|
|
80
89
|
function supportsClaudeAdaptiveThinking(ref) {
|
|
81
90
|
const modelId = resolveClaudeModelIdentity(ref);
|
|
@@ -192,4 +201,4 @@ function calculateUsageCost(usage, pricing) {
|
|
|
192
201
|
return cost;
|
|
193
202
|
}
|
|
194
203
|
//#endregion
|
|
195
|
-
export {
|
|
204
|
+
export { supportsClaudeNativeXhighEffort as S, resolveClaudeSonnet5ModelIdentity as _, CLAUDE_OPUS_55_THINKING_PROFILE as a, supportsClaudeFastMode as b, bindsClaudeThinkingPrefix as c, resolveClaudeFable5ModelIdentity as d, resolveClaudeModelIdentity as f, resolveClaudeOpus5ModelIdentity as g, resolveClaudeOpus55ModelIdentity as h, CLAUDE_FABLE_5_THINKING_PROFILE as i, requiresClaudeDefaultSampling as l, resolveClaudeNativeThinkingLevelMap as m, normalizeModelCostConfig as n, CLAUDE_OPUS_5_THINKING_PROFILE as o, resolveClaudeMythos5ModelIdentity as p, normalizeResolvedPricing as r, CLAUDE_SONNET_5_THINKING_PROFILE as s, calculateUsageCost as t, requiresClaudeMandatoryAdaptiveThinking as u, supportsClaude1MContext as v, supportsClaudeNativeMaxEffort as x, supportsClaudeAdaptiveThinking as y };
|
package/dist/{stream-first-event-timeout-C9ZadkJW.mjs → stream-first-event-timeout-BeptfRL6.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as clampTimerTimeoutMs } from "./base64-
|
|
1
|
+
import { a as clampTimerTimeoutMs } from "./base64-CPmadnUf.mjs";
|
|
2
2
|
//#region packages/ai/src/utils/stream-first-event-timeout.ts
|
|
3
3
|
function getFirstStreamEventTimeoutMs(options) {
|
|
4
4
|
return options?.firstEventTimeoutMs;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as createAssistantMessageDiagnostic, t as appendAssistantMessageDiagnostic } from "./diagnostics-
|
|
1
|
+
import { n as createAssistantMessageDiagnostic, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
|
|
2
2
|
import { i as createAssistantMessageEventStream } from "./event-stream-D8PARQfL.mjs";
|
|
3
3
|
import { i as asOptionalRecord, n as asNullableRecord, t as asNonArrayRecord } from "./record-coerce-DwRYMj3t.mjs";
|
|
4
|
-
import { n as getAiTransportHost, v as sanitizeSurrogates } from "./host-
|
|
5
|
-
import { i as projectDiagnosticValue, n as projectProviderError } from "./provider-error-
|
|
6
|
-
import { c as isTransientNetworkError } from "./diagnostics-
|
|
4
|
+
import { A as headersToRecord, n as getAiTransportHost, v as sanitizeSurrogates } from "./host-yTvBrYM2.mjs";
|
|
5
|
+
import { i as projectDiagnosticValue, n as projectProviderError } from "./provider-error-CRhW7lkJ.mjs";
|
|
6
|
+
import { c as isTransientNetworkError } from "./diagnostics-CH8j2wIG.mjs";
|
|
7
7
|
import { parse } from "partial-json";
|
|
8
8
|
//#region packages/ai/src/utils/hash.ts
|
|
9
9
|
/** Fast deterministic hash to shorten long strings */
|
|
@@ -20,14 +20,6 @@ function shortHash(str) {
|
|
|
20
20
|
return (h2 >>> 0).toString(36) + (h1 >>> 0).toString(36);
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region packages/ai/src/utils/headers.ts
|
|
24
|
-
/** Converts a Headers object to a plain record for provider request handling. */
|
|
25
|
-
function headersToRecord(headers) {
|
|
26
|
-
const result = {};
|
|
27
|
-
for (const [key, value] of headers.entries()) result[key] = value;
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
23
|
//#region packages/ai/src/utils/json-parse.ts
|
|
32
24
|
const VALID_JSON_ESCAPES = /* @__PURE__ */ new Set([
|
|
33
25
|
"\"",
|
|
@@ -564,4 +556,4 @@ function failTransportStream(params) {
|
|
|
564
556
|
stream.end();
|
|
565
557
|
}
|
|
566
558
|
//#endregion
|
|
567
|
-
export { quoteUnsafeIntegerLiterals as C, repairJson as D, parseStreamingJson as E,
|
|
559
|
+
export { quoteUnsafeIntegerLiterals as C, repairJson as D, parseStreamingJson as E, shortHash as O, parseJsonPreservingUnsafeIntegers as S, parseJsonWithRepair as T, sanitizeTransportPayloadText as _, createEmptyTransportUsage as a, withProviderResponseHook as b, finalizeTerminalToolCallArguments as c, mergeTransportMetadata as d, notifyProviderHttpMetadata as f, sanitizeNonEmptyTransportPayloadText as g, parseTerminalToolCallArguments as h, copyProviderAcceptanceObserver as i, finalizeTransportStream as l, notifyProviderStreamOpened as m, assignTransportErrorDetails as n, createWritableTransportEventStream as o, notifyProviderHttpResponse as p, coerceTransportToolCallArguments as r, failTransportStream as s, IncompleteToolCallError as t, mergeTransportHeaders as u, transportAbortError as v, createToolArgumentPreviewSchedule as w, parseJsonObjectPreservingUnsafeIntegers as x, withProviderAcceptanceObserver as y };
|
package/dist/{transport-stream-shared-BbUkFaHi.d.mts → transport-stream-shared-B7Z9oCYg.d.mts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { O as Model, V as ProviderResponse, Y as StreamOptions, a as AssistantMessage, ot as Usage } from "./types-
|
|
3
|
-
import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-
|
|
4
|
-
import "./event-stream-
|
|
5
|
-
import { t as ProviderErrorProjection } from "./provider-error-
|
|
1
|
+
import "./index-C25RT6bP.mjs";
|
|
2
|
+
import { O as Model, V as ProviderResponse, Y as StreamOptions, a as AssistantMessage, ot as Usage } from "./types-qZFbaDbK.mjs";
|
|
3
|
+
import { r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CjnIZZst.mjs";
|
|
4
|
+
import "./event-stream-C0nsgbj2.mjs";
|
|
5
|
+
import { t as ProviderErrorProjection } from "./provider-error-xumb1V3F.mjs";
|
|
6
6
|
//#region packages/ai/src/transports/transport-stream-shared.d.ts
|
|
7
7
|
type ContextUsage = NonNullable<Usage["contextUsage"]>;
|
|
8
8
|
type TransportUsage = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as getAiTransportHost } from "./host-
|
|
1
|
+
import { n as getAiTransportHost } from "./host-yTvBrYM2.mjs";
|
|
2
2
|
import { t as truncateUtf16Safe } from "./utf16-slice-CvGodqok.mjs";
|
|
3
|
-
import "./provider-error-
|
|
3
|
+
import "./provider-error-CRhW7lkJ.mjs";
|
|
4
4
|
import "./internal/retry-after.mjs";
|
|
5
|
-
import "./positive-integer-
|
|
5
|
+
import "./positive-integer-BiUxrd71.mjs";
|
|
6
6
|
//#region packages/normalization-core/src/response-bytes.ts
|
|
7
7
|
async function consumeResponseBytes(options) {
|
|
8
8
|
let size = 0;
|
package/dist/transports.d.mts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { $ as ThinkingContent, B as ProviderReplayState, K as StopReason, M as OpenAICompletionsCompat, O as Model, X as TextContent, Y as StreamOptions, _t as ModelDataThinkingFormat, a as AssistantMessage, d as Context, l as CacheRetention, n as Api, nt as Tool, ot as Usage, q as StreamFn, rt as ToolCall } from "./types-
|
|
3
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
4
|
-
import { a as BaseOpenAIStreamOptions, c as OpenAIResponsesCompactionRejection, o as CodeModeToolSurfaceObservation, s as OpenAICompletionsOptions } from "./provider-options-
|
|
1
|
+
import "./index-C25RT6bP.mjs";
|
|
2
|
+
import { $ as ThinkingContent, B as ProviderReplayState, K as StopReason, M as OpenAICompletionsCompat, O as Model, X as TextContent, Y as StreamOptions, _t as ModelDataThinkingFormat, a as AssistantMessage, d as Context, l as CacheRetention, n as Api, nt as Tool, ot as Usage, q as StreamFn, rt as ToolCall } from "./types-qZFbaDbK.mjs";
|
|
3
|
+
import { n as ApiRegistry } from "./api-registry-C2T3lTV7.mjs";
|
|
4
|
+
import { a as BaseOpenAIStreamOptions, c as OpenAIResponsesCompactionRejection, o as CodeModeToolSurfaceObservation, s as OpenAICompletionsOptions } from "./provider-options-DZYq53lj.mjs";
|
|
5
5
|
import { n as OpenAIToolProjection } from "./openai-tool-projection-793cE3QX.mjs";
|
|
6
|
-
import "./types-
|
|
7
|
-
import { a as buildAnthropicSystemBlocks, c as logAnthropicContextEdits, d as resolveAnthropicEphemeralCacheControl, f as resolveAnthropicPayloadPolicy, i as applyAnthropicRequestCacheControl, l as resolveAnthropicCacheOptions, n as applyAnthropicEphemeralCacheControlMarkers, o as isAnthropicServerToolClearingEnabled, p as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, s as isDirectAnthropicModel, t as applyAnthropicContextManagementToRequest, u as resolveAnthropicContextManagementBetaHeader } from "./anthropic-payload-policy-
|
|
8
|
-
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as detectOpenAICompletionsCompat, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
9
|
-
import { i as ReplayableResponseCompactionItem, n as OpenAIResponsesOptions, r as OpenAIResponsesReasoningReplayMetadata, s as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-
|
|
6
|
+
import "./types-DTvddOfm.mjs";
|
|
7
|
+
import { a as buildAnthropicSystemBlocks, c as logAnthropicContextEdits, d as resolveAnthropicEphemeralCacheControl, f as resolveAnthropicPayloadPolicy, i as applyAnthropicRequestCacheControl, l as resolveAnthropicCacheOptions, n as applyAnthropicEphemeralCacheControlMarkers, o as isAnthropicServerToolClearingEnabled, p as resolveAnthropicServerCompactionPlan, r as applyAnthropicPayloadPolicyToParams, s as isDirectAnthropicModel, t as applyAnthropicContextManagementToRequest, u as resolveAnthropicContextManagementBetaHeader } from "./anthropic-payload-policy-DyfwikYJ.mjs";
|
|
8
|
+
import { a as resolveOpenAICompletionsCompat, i as isOpenAICodexResponsesModel, n as detectOpenAICompletionsCompat, o as resolveOpenAIPromptCacheKeySupport, r as isNativeOpenAIEndpoint, s as usesNativeOpenAICodexResponsesBackend, t as ResolvedOpenAICompletionsCompat } from "./openai-completions-compat-DfJG1wSO.mjs";
|
|
9
|
+
import { i as ReplayableResponseCompactionItem, n as OpenAIResponsesOptions, r as OpenAIResponsesReasoningReplayMetadata, s as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-B1ENJFpI.mjs";
|
|
10
10
|
import { i as resolveOpenAIResponsesServerCompactionPlan, n as resolveOpenAIResponsesCompactEndpointPlan, r as resolveOpenAIResponsesPayloadPolicy, t as applyOpenAIResponsesPayloadPolicy } from "./openai-responses-payload-policy-C7GsA1y0.mjs";
|
|
11
|
-
import { S as withProviderResponseHook, _ as parseTerminalToolCallArguments, a as coerceTransportToolCallArguments, b as transportAbortError, c as createWritableTransportEventStream, d as finalizeTransportStream, f as mergeTransportHeaders, g as notifyProviderStreamOpened, h as notifyProviderHttpResponse, i as assignTransportErrorDetails, l as failTransportStream, m as notifyProviderHttpMetadata, n as ProviderAcceptance, o as copyProviderAcceptanceObserver, p as mergeTransportMetadata, r as WritableTransportStream, s as createEmptyTransportUsage, t as IncompleteToolCallError, u as finalizeTerminalToolCallArguments, v as sanitizeNonEmptyTransportPayloadText, x as withProviderAcceptanceObserver, y as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
11
|
+
import { S as withProviderResponseHook, _ as parseTerminalToolCallArguments, a as coerceTransportToolCallArguments, b as transportAbortError, c as createWritableTransportEventStream, d as finalizeTransportStream, f as mergeTransportHeaders, g as notifyProviderStreamOpened, h as notifyProviderHttpResponse, i as assignTransportErrorDetails, l as failTransportStream, m as notifyProviderHttpMetadata, n as ProviderAcceptance, o as copyProviderAcceptanceObserver, p as mergeTransportMetadata, r as WritableTransportStream, s as createEmptyTransportUsage, t as IncompleteToolCallError, u as finalizeTerminalToolCallArguments, v as sanitizeNonEmptyTransportPayloadText, x as withProviderAcceptanceObserver, y as sanitizeTransportPayloadText } from "./transport-stream-shared-B7Z9oCYg.mjs";
|
|
12
12
|
import { r as sortPromptCacheToolsByName } from "./prompt-cache-stability-Cwcjv_fx.mjs";
|
|
13
13
|
import { r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-ynZBgqW-.mjs";
|
|
14
|
-
import { d as VideoContent, i as ProviderContext, s as ProviderModel } from "./provider-types-
|
|
15
|
-
import { a as resolveModelSseDebugMode, i as resolveModelPayloadDebugMode, n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-
|
|
14
|
+
import { d as VideoContent, i as ProviderContext, s as ProviderModel } from "./provider-types-w1rEqrGP.mjs";
|
|
15
|
+
import { a as resolveModelSseDebugMode, i as resolveModelPayloadDebugMode, n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-C5f59L3Y.mjs";
|
|
16
16
|
import OpenAI from "openai";
|
|
17
17
|
import { Part } from "@google/genai";
|
|
18
18
|
import "openai/resources/responses/responses.js";
|