@openclaw/ai 2026.9.7 → 2026.9.9
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-Cw2pgccz.mjs → anthropic-DfsDsNJl.mjs} +8 -8
- package/dist/{anthropic-payload-policy-NIPVYXPq.d.mts → anthropic-payload-policy-BVcxWtQD.d.mts} +2 -2
- package/dist/{anthropic-stream-reducer-D9MCkl8Z.mjs → anthropic-stream-reducer-CiVXqWLP.mjs} +8 -8
- package/dist/{api-registry-D-nbmSqr.d.mts → api-registry-pGjnPg1z.d.mts} +1 -1
- package/dist/{azure-openai-responses-BwT3-X8P.mjs → azure-openai-responses-DUQuNQL6.mjs} +6 -6
- package/dist/diagnostics.d.mts +3 -3
- package/dist/{google-BfapkS_K.mjs → google-CyeM7l4M.mjs} +5 -5
- package/dist/{google-interactions-DW3iXzjc.mjs → google-interactions-BvbVUFzr.mjs} +6 -6
- package/dist/{google-messages-CtjVtVot.mjs → google-messages-BAiONu4V.mjs} +3 -3
- package/dist/{google-shared-Y2YfotEu.mjs → google-shared-tpqMugao.mjs} +5 -5
- package/dist/{google-vertex-Dov4kBWu.mjs → google-vertex-BTwRIP8v.mjs} +4 -4
- package/dist/{host-rxlNaBwm.d.mts → host-COwfRiSL.d.mts} +2 -2
- package/dist/{host-CHi3X87F.mjs → host-l5VGgsa2.mjs} +11 -8
- package/dist/{host-policy-BOAwRg_M.mjs → host-policy-D8HBI2Pv.mjs} +1 -1
- package/dist/{index-D6KsSE74.d.mts → index-DHeFfpcz.d.mts} +21 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/internal/anthropic.d.mts +5 -5
- 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 +8 -8
- package/dist/internal/openai.mjs +8 -8
- package/dist/internal/runtime.d.mts +4 -4
- package/dist/internal/runtime.mjs +2 -2
- package/dist/internal/shared.d.mts +1 -1
- package/dist/internal/shared.mjs +3 -3
- package/dist/{mistral-RS6mboC-.mjs → mistral-Cxbukk9d.mjs} +4 -4
- package/dist/{openai-chatgpt-responses-CYbidtrn.mjs → openai-chatgpt-responses-CUuh4TkA.mjs} +10 -10
- package/dist/{openai-completions-D14ihPYk.mjs → openai-completions-CVwOQW-U.mjs} +9 -9
- package/dist/{openai-completions-compat-qJjmqQ71.d.mts → openai-completions-compat-CqWP1fn5.d.mts} +2 -2
- package/dist/{openai-completions-compat-BOVWBZDn.mjs → openai-completions-compat-W0ykoT4z.mjs} +1 -1
- package/dist/{openai-completions-stream-CDCuw3DP.mjs → openai-completions-stream-Crkc597h.mjs} +10 -10
- package/dist/{openai-prompt-cache-D2V7MqR7.mjs → openai-prompt-cache-D0e4t5-3.mjs} +1 -1
- package/dist/{openai-prompt-cache-CouErLh7.d.mts → openai-prompt-cache-YTmJ_iMS.d.mts} +1 -1
- package/dist/{openai-provider-client-CwfsGBbA.mjs → openai-provider-client-evrjHyOl.mjs} +2 -2
- package/dist/{openai-reasoning-effort-ConhwkeX.mjs → openai-reasoning-effort-C_0p3psG.mjs} +3 -3
- package/dist/{openai-responses-CKCBEc2W.mjs → openai-responses-cNWyKDF8.mjs} +8 -8
- package/dist/{openai-responses-compaction-replay-DiYn-gFM.d.mts → openai-responses-compaction-replay-CQHR2isp.d.mts} +3 -3
- package/dist/{openai-responses-compaction-window-UNK1GDpy.mjs → openai-responses-compaction-window-CYGCjAQz.mjs} +1 -1
- package/dist/{openai-responses-contracts-D1iZ0njF.d.mts → openai-responses-contracts-C2H8pffb.d.mts} +3 -3
- package/dist/{openai-responses-prompt-observer-internal-iAqLb4tk.mjs → openai-responses-prompt-observer-internal-Do_oXZf7.mjs} +9 -9
- package/dist/{openai-responses-shared-DL4ulQn7.mjs → openai-responses-shared-6QypGhvL.mjs} +10 -10
- package/dist/{openai-responses-terminal-usage-BE7lf7nW.d.mts → openai-responses-terminal-usage-D0WZQlIF.d.mts} +1 -1
- package/dist/{openai-transport-params-BwlpzX-2.mjs → openai-transport-params-a_8s6k6d.mjs} +19 -7
- package/dist/{provider-options-Df7ov0K1.d.mts → provider-options-yDbWMoEr.d.mts} +1 -1
- package/dist/{provider-replay-context-DsyI5jOP.mjs → provider-replay-context-Cy7RdZ2C.mjs} +1 -1
- package/dist/{provider-transcript-transform-JbFbHV8h.mjs → provider-transcript-transform-B-bAzjo8.mjs} +2 -2
- package/dist/{provider-transport-turn-state-BheUi_hl.mjs → provider-transport-turn-state-CE0dp-UO.mjs} +1 -1
- package/dist/{provider-types-d4XnoZMd.d.mts → provider-types-CHsKHBBD.d.mts} +2 -2
- package/dist/provider-types.d.mts +3 -3
- package/dist/providers.d.mts +2 -2
- package/dist/providers.mjs +10 -10
- package/dist/{simple-options-CGAkCwtM.mjs → simple-options-ueGsZ3Rz.mjs} +2 -2
- package/dist/{src-H4aXcFuX.mjs → src-Dw59CBue.mjs} +17 -7
- package/dist/{transport-stream-shared-Dh5qKJ8e.mjs → transport-stream-shared-Bz9YwuQ0.mjs} +1 -1
- package/dist/{transport-stream-shared-yYhXa4kX.d.mts → transport-stream-shared-CYLM2HEK.d.mts} +1 -1
- package/dist/{transport-utils-C-4bf2Ok.mjs → transport-utils-CEKSacZh.mjs} +1 -1
- package/dist/transports.d.mts +11 -11
- package/dist/transports.mjs +18 -18
- package/dist/types-CoL-LJ7j.d.mts +1 -0
- package/dist/types.d.mts +3 -3
- package/dist/types.mjs +2 -2
- package/package.json +1 -1
- package/dist/types-CB-_vNyI.d.mts +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../index-
|
|
1
|
+
import "../index-DHeFfpcz.mjs";
|
|
2
2
|
import { G as SimpleStreamOptions, H as ProviderStreamOptions, O as Model, Y as StreamOptions, a as AssistantMessage, d as Context, j as ModelThinkingLevel, n as Api, ot as Usage, s as AssistantMessageEventStreamContract } from "../types-CLLR3eB4.mjs";
|
|
3
3
|
import { i as getEventStreamCompletion } from "../event-stream-DOPFYVqs.mjs";
|
|
4
|
-
import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-
|
|
5
|
-
import "../types-
|
|
4
|
+
import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-pGjnPg1z.mjs";
|
|
5
|
+
import "../types-CoL-LJ7j.mjs";
|
|
6
6
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
|
|
7
|
-
import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-
|
|
7
|
+
import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-CYLM2HEK.mjs";
|
|
8
8
|
//#region packages/ai/src/internal/default-runtime.d.ts
|
|
9
9
|
export declare const defaultApiRegistry: {
|
|
10
10
|
registerApiProvider: <TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, sourceId?: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as isProviderRefusalAssistantError } from "../diagnostics-DzrF1h4J.mjs";
|
|
2
2
|
import { a as getEventStreamCompletion } from "../event-stream-vd9UnCAU.mjs";
|
|
3
3
|
import { n as createApiRegistry, t as createLlmRuntime } from "../stream-DDsCBgd-.mjs";
|
|
4
|
-
import { C as applyProviderReportedUsageCost, D as modelsAreEqual, E as getSupportedThinkingLevels, S as headersToRecord, T as clampThinkingLevel, w as calculateCost } from "../host-
|
|
5
|
-
import { A as shortHash, D as parseJsonWithRepair, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, g as parseTerminalToolCallArguments, j as sanitizeSurrogates, k as repairJson } from "../transport-stream-shared-
|
|
4
|
+
import { C as applyProviderReportedUsageCost, D as modelsAreEqual, E as getSupportedThinkingLevels, S as headersToRecord, T as clampThinkingLevel, w as calculateCost } from "../host-l5VGgsa2.mjs";
|
|
5
|
+
import { A as shortHash, D as parseJsonWithRepair, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, g as parseTerminalToolCallArguments, j as sanitizeSurrogates, k as repairJson } from "../transport-stream-shared-Bz9YwuQ0.mjs";
|
|
6
6
|
import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-CyX4VKGO.mjs";
|
|
7
7
|
import { t as createDeferredEventBuffer } from "../deferred-event-buffer-DAvyP7qA.mjs";
|
|
8
8
|
import { n as onLlmRequestActivity, t as notifyLlmRequestActivity } from "../llm-request-activity-BjtkplhG.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as Message, G as SimpleStreamOptions, O as Model, Q as ThinkingBudgets, Y as StreamOptions, a as AssistantMessage, et as ThinkingLevel, n as Api } from "../types-CLLR3eB4.mjs";
|
|
2
2
|
import { a as readAssistantThinkingAppend } from "../event-stream-DOPFYVqs.mjs";
|
|
3
|
-
import "../types-
|
|
3
|
+
import "../types-CoL-LJ7j.mjs";
|
|
4
4
|
import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
|
|
5
5
|
import { i as projectProviderError } from "../provider-error-xumb1V3F.mjs";
|
|
6
6
|
import { n as createDiagnosticRecord } from "../credential-redaction-BKv49aiv.mjs";
|
package/dist/internal/shared.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as readAssistantThinkingAppend } from "../event-stream-vd9UnCAU.mjs";
|
|
2
|
-
import { O as hasMediaPayload, a as FAILED_ASSISTANT_REPLAY_TEXT, c as isReasoningOnlyLengthAssistantTurn, i as transformMessages, k as isImageWithMediaPayload, l as isStreamErrorFallbackContent, o as STREAM_ERROR_FALLBACK_TEXT, s as hasOnlyAssistantReasoningContent, u as resolveFailedAssistantReplay } from "../host-
|
|
2
|
+
import { O as hasMediaPayload, a as FAILED_ASSISTANT_REPLAY_TEXT, c as isReasoningOnlyLengthAssistantTurn, i as transformMessages, k as isImageWithMediaPayload, l as isStreamErrorFallbackContent, o as STREAM_ERROR_FALLBACK_TEXT, s as hasOnlyAssistantReasoningContent, u as resolveFailedAssistantReplay } from "../host-l5VGgsa2.mjs";
|
|
3
3
|
import { n as projectProviderError, r as createDiagnosticRecord } from "../provider-error-CwT_j2v0.mjs";
|
|
4
|
-
import { j as sanitizeSurrogates } from "../transport-stream-shared-
|
|
5
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, E as normalizeStructuredPromptSection, S as splitSystemPromptRelocatableBoundary, T as normalizePromptCapabilityIds, _ as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY, b as prependSystemPromptAdditionAfterCacheBoundary, d as describeToolResultMediaPlaceholder, f as describeUnsupportedToolResultMedia, g as SYSTEM_PROMPT_CACHE_BOUNDARY, h as formatToolResultText, i as clampReasoning, m as extractToolResultText, n as buildBaseOptions, p as extractToolResultBlockText, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking, v as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY_END, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary, y as ensureSystemPromptCacheBoundary } from "../simple-options-
|
|
4
|
+
import { j as sanitizeSurrogates } from "../transport-stream-shared-Bz9YwuQ0.mjs";
|
|
5
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, E as normalizeStructuredPromptSection, S as splitSystemPromptRelocatableBoundary, T as normalizePromptCapabilityIds, _ as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY, b as prependSystemPromptAdditionAfterCacheBoundary, d as describeToolResultMediaPlaceholder, f as describeUnsupportedToolResultMedia, g as SYSTEM_PROMPT_CACHE_BOUNDARY, h as formatToolResultText, i as clampReasoning, m as extractToolResultText, n as buildBaseOptions, p as extractToolResultBlockText, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking, v as SYSTEM_PROMPT_RELOCATABLE_BOUNDARY_END, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary, y as ensureSystemPromptCacheBoundary } from "../simple-options-ueGsZ3Rz.mjs";
|
|
6
6
|
import { t as projectCopilotRequestFacts } from "../github-copilot-request-facts-BTEBMeOv.mjs";
|
|
7
7
|
//#region packages/ai/src/utils/tls-certificate-errors.ts
|
|
8
8
|
const HOSTNAME_MISMATCH_CODES = /* @__PURE__ */ new Set(["ERR_TLS_CERT_ALTNAME_INVALID", "HOSTNAME_MISMATCH"]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as appendAssistantThinking, t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
2
|
-
import { T as clampThinkingLevel, k as isImageWithMediaPayload, n as getAiTransportHost, w as calculateCost } from "./host-
|
|
3
|
-
import { A as shortHash, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-
|
|
4
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, h as formatToolResultText, m as extractToolResultText, n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-
|
|
2
|
+
import { T as clampThinkingLevel, k as isImageWithMediaPayload, n as getAiTransportHost, w as calculateCost } from "./host-l5VGgsa2.mjs";
|
|
3
|
+
import { A as shortHash, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
4
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, h as formatToolResultText, m as extractToolResultText, n as buildBaseOptions, r as clampMaxTokensToModel } from "./simple-options-ueGsZ3Rz.mjs";
|
|
5
5
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
6
6
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
7
|
-
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-
|
|
7
|
+
import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-B-bAzjo8.mjs";
|
|
8
8
|
import { t as mapOpenAIStopReason } from "./openai-stop-reason-8s70vDXj.mjs";
|
|
9
9
|
import { t as createSseByteGuard } from "./streaming-byte-guard-CC-HMn_u.mjs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
package/dist/{openai-chatgpt-responses-CYbidtrn.mjs → openai-chatgpt-responses-CUuh4TkA.mjs}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { i as formatThrownValue, n as createAssistantMessageDiagnostic, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
3
3
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
4
|
-
import { S as headersToRecord, n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-
|
|
5
|
-
import { d as supportsOpenAITemperature } from "./openai-reasoning-effort-
|
|
6
|
-
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-
|
|
4
|
+
import { S as headersToRecord, n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from "./host-l5VGgsa2.mjs";
|
|
5
|
+
import { d as supportsOpenAITemperature } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
6
|
+
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-D0e4t5-3.mjs";
|
|
7
7
|
import { _ as extractErrorCodeOrErrno, o as WEBSOCKET_NON_RETRYABLE_CLOSE_ERROR_CODE, v as toErrorObject } from "./diagnostics-CJaB6g8J.mjs";
|
|
8
8
|
import { s as resolveTimerTimeoutMs } from "./base64-C1PsYcRQ.mjs";
|
|
9
|
-
import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-
|
|
9
|
+
import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-CEKSacZh.mjs";
|
|
10
10
|
import { parseRetryAfterHeadersSeconds } from "./internal/retry-after.mjs";
|
|
11
|
-
import { S as withProviderResponseHook, b as transportAbortError, h as notifyProviderStreamOpened, n as assignTransportErrorDetails } from "./transport-stream-shared-
|
|
12
|
-
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-
|
|
13
|
-
import { b as createOpenAIResponseHook, g as resolveOpenAISimpleReasoningEffort, h as resolveOpenAIRequestReasoning, x as createResponseModelTracker, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-
|
|
11
|
+
import { S as withProviderResponseHook, b as transportAbortError, h as notifyProviderStreamOpened, n as assignTransportErrorDetails } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
12
|
+
import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-ueGsZ3Rz.mjs";
|
|
13
|
+
import { b as createOpenAIResponseHook, g as resolveOpenAISimpleReasoningEffort, h as resolveOpenAIRequestReasoning, x as createResponseModelTracker, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
14
14
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
15
|
-
import { n as createAssistantOutput } from "./provider-transcript-transform-
|
|
15
|
+
import { n as createAssistantOutput } from "./provider-transcript-transform-B-bAzjo8.mjs";
|
|
16
16
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B9o0S4SZ.mjs";
|
|
17
17
|
import { h as responsesPromptObserver } from "./openai-responses-contracts-CLxnqS9p.mjs";
|
|
18
|
-
import { A as recordResponsesContextUsage, P as convertProviderResponsesMessages, S as isInvalidEncryptedContentError, T as ResponsesStreamFailure, Z as suppressOpenAIResponsesCompaction, b as commitResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, q as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, w as resolveNextResponsesEncryptedContentAttempt } from "./openai-responses-shared-
|
|
18
|
+
import { A as recordResponsesContextUsage, P as convertProviderResponsesMessages, S as isInvalidEncryptedContentError, T as ResponsesStreamFailure, Z as suppressOpenAIResponsesCompaction, b as commitResponsesEncryptedContentAttempt, i as convertResponsesToolPayload, n as applyResponsesServiceTierPricing, o as readOpenAIMisalignmentReview, q as buildOpenAIResponsesReasoningReplayMetadata, s as processResponsesStream, w as resolveNextResponsesEncryptedContentAttempt } from "./openai-responses-shared-6QypGhvL.mjs";
|
|
19
19
|
import { t as createSseByteGuard } from "./streaming-byte-guard-CC-HMn_u.mjs";
|
|
20
20
|
import { n as registerSessionResourceCleanup } from "./session-resources-CkR4WWy1.mjs";
|
|
21
|
-
import { i as resolveOpenAIResponsesTextFormat, t as createResponsesPromptEgressObserver } from "./openai-responses-prompt-observer-internal-
|
|
21
|
+
import { i as resolveOpenAIResponsesTextFormat, t as createResponsesPromptEgressObserver } from "./openai-responses-prompt-observer-internal-Do_oXZf7.mjs";
|
|
22
22
|
import { n as withResponsesRequestAcceptance, t as responsesRequestLifecycle } from "./openai-responses-request-lifecycle-Fsag-IGZ.mjs";
|
|
23
23
|
import { n as resolveOpenAICodexAccountId } from "./openai-chatgpt-jwt-KWcgd0d_.mjs";
|
|
24
24
|
//#region packages/ai/src/providers/openai-chatgpt-responses-events.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
3
|
-
import { T as clampThinkingLevel } from "./host-
|
|
4
|
-
import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
3
|
+
import { T as clampThinkingLevel } from "./host-l5VGgsa2.mjs";
|
|
4
|
+
import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
5
5
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
|
|
6
|
-
import { S as withProviderResponseHook, b as transportAbortError, n as assignTransportErrorDetails } from "./transport-stream-shared-
|
|
7
|
-
import { n as buildBaseOptions, s as prepareModelRequestBody, u as reasoningTagTextPolicy } from "./simple-options-
|
|
8
|
-
import { S as isOpenAICompletionsThinkingEnabled, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-
|
|
6
|
+
import { S as withProviderResponseHook, b as transportAbortError, n as assignTransportErrorDetails } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
7
|
+
import { n as buildBaseOptions, s as prepareModelRequestBody, u as reasoningTagTextPolicy } from "./simple-options-ueGsZ3Rz.mjs";
|
|
8
|
+
import { S as isOpenAICompletionsThinkingEnabled, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
9
9
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
10
10
|
import { a as tagUnresolvedTextAsCommentary, t as clearPendingCommentaryText } from "./assistant-text-phase-C20rxWwP.mjs";
|
|
11
|
-
import { n as createAssistantOutput } from "./provider-transcript-transform-
|
|
12
|
-
import { a as convertMessages, i as buildOpenAICompletionsRequest, s as finalizeOpenAICompletionsToolCalls, t as processCompletionsStream } from "./openai-completions-stream-
|
|
11
|
+
import { n as createAssistantOutput } from "./provider-transcript-transform-B-bAzjo8.mjs";
|
|
12
|
+
import { a as convertMessages, i as buildOpenAICompletionsRequest, s as finalizeOpenAICompletionsToolCalls, t as processCompletionsStream } from "./openai-completions-stream-Crkc597h.mjs";
|
|
13
13
|
import { i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B9o0S4SZ.mjs";
|
|
14
|
-
import { n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-
|
|
14
|
+
import { n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-CE0dp-UO.mjs";
|
|
15
15
|
import { n as hasCopilotVisionInput, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-B37TB3rB.mjs";
|
|
16
|
-
import { t as createOpenAIProviderClient } from "./openai-provider-client-
|
|
16
|
+
import { t as createOpenAIProviderClient } from "./openai-provider-client-evrjHyOl.mjs";
|
|
17
17
|
//#region packages/ai/src/providers/openai-completions.ts
|
|
18
18
|
var openai_completions_exports = /* @__PURE__ */ __exportAll({
|
|
19
19
|
convertMessages: () => convertMessages,
|
package/dist/{openai-completions-compat-qJjmqQ71.d.mts → openai-completions-compat-CqWP1fn5.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-DHeFfpcz.mjs";
|
|
2
2
|
import { M as OpenAICompletionsCompat, O as Model } from "./types-CLLR3eB4.mjs";
|
|
3
|
-
import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-
|
|
3
|
+
import { a as AiProviderRequestPolicyInput, i as AiProviderRequestCapabilities } from "./host-COwfRiSL.mjs";
|
|
4
4
|
//#region packages/ai/src/transports/openai-completions-compat.d.ts
|
|
5
5
|
type ProviderRequestCapabilities = AiProviderRequestCapabilities;
|
|
6
6
|
type OpenAICompletionsSessionAffinity = "none" | "openai" | "openrouter";
|
package/dist/{openai-completions-compat-BOVWBZDn.mjs → openai-completions-compat-W0ykoT4z.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
|
-
import { i as resolveProviderRequestCapabilities } from "./host-policy-
|
|
2
|
+
import { i as resolveProviderRequestCapabilities } from "./host-policy-D8HBI2Pv.mjs";
|
|
3
3
|
//#region packages/ai/src/providers/openai-response-format.ts
|
|
4
4
|
const JSON_SCHEMA_RESPONSE_FORMAT_NAME = "openclaw_response";
|
|
5
5
|
const OLLAMA_CLOUD_ORIGIN = "https://ollama.com";
|
package/dist/{openai-completions-stream-CDCuw3DP.mjs → openai-completions-stream-Crkc597h.mjs}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { r as appendAssistantThinking } from "./event-stream-vd9UnCAU.mjs";
|
|
2
2
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
3
|
-
import { k as isImageWithMediaPayload, n as getAiTransportHost } from "./host-
|
|
4
|
-
import { n as isOpenAIGpt55Model, r as isOpenAIGpt56Model, t as isOpenAIGpt54MiniModel } from "./openai-reasoning-effort-
|
|
3
|
+
import { k as isImageWithMediaPayload, n as getAiTransportHost } from "./host-l5VGgsa2.mjs";
|
|
4
|
+
import { n as isOpenAIGpt55Model, r as isOpenAIGpt56Model, t as isOpenAIGpt54MiniModel } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
5
5
|
import { r as uniqueStrings } from "./string-normalization-J9ZiLfGO.mjs";
|
|
6
6
|
import { o as truncateUtf16Safe } from "./provider-error-CwT_j2v0.mjs";
|
|
7
|
-
import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-
|
|
7
|
+
import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-D0e4t5-3.mjs";
|
|
8
8
|
import { r as emitModelTransportDebug } from "./diagnostics-CJaB6g8J.mjs";
|
|
9
9
|
import { i as asNonNegativeFiniteNumber } from "./base64-C1PsYcRQ.mjs";
|
|
10
|
-
import { c as supportsModelTools, r as estimateStringChars } from "./transport-utils-
|
|
11
|
-
import { c as shouldOmitOllamaCompatResponseFormat, n as isNativeOpenAIEndpoint, s as resolveOpenAICompletionsResponseFormat, t as detectOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
12
|
-
import { r as resolveProviderEndpoint } from "./host-policy-
|
|
10
|
+
import { c as supportsModelTools, r as estimateStringChars } from "./transport-utils-CEKSacZh.mjs";
|
|
11
|
+
import { c as shouldOmitOllamaCompatResponseFormat, n as isNativeOpenAIEndpoint, s as resolveOpenAICompletionsResponseFormat, t as detectOpenAICompletionsCompat } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
12
|
+
import { r as resolveProviderEndpoint } from "./host-policy-D8HBI2Pv.mjs";
|
|
13
13
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
|
|
14
|
-
import { E as createToolArgumentPreviewSchedule, O as parseStreamingJson, d as iterateModelStream, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, y as throwIfModelStreamAborted } from "./transport-stream-shared-
|
|
15
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, S as splitSystemPromptRelocatableBoundary, d as describeToolResultMediaPlaceholder, m as extractToolResultText, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-
|
|
16
|
-
import { C as log, D as readOpenAICompletionsReasoningBatch, E as readOpenAICompletionsContentDeltas, S as isOpenAICompletionsThinkingEnabled, T as parseOpenAICompletionsUsage, d as prepareOpenAITools, f as projectOpenAITools, g as resolveOpenAISimpleReasoningEffort, h as resolveOpenAIRequestReasoning, k as resolvePromptCacheKey, p as reconcileOpenAICompletionsToolChoice, s as getCompat, u as resolveOpenAIStrictToolFlagWithDiagnostics, v as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, w as measureUtf8AppendBytes } from "./openai-transport-params-
|
|
14
|
+
import { E as createToolArgumentPreviewSchedule, O as parseStreamingJson, d as iterateModelStream, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, y as throwIfModelStreamAborted } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
15
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, S as splitSystemPromptRelocatableBoundary, d as describeToolResultMediaPlaceholder, m as extractToolResultText, w as stripSystemPromptRelocatableBoundary, x as splitSystemPromptCacheBoundary } from "./simple-options-ueGsZ3Rz.mjs";
|
|
16
|
+
import { C as log, D as readOpenAICompletionsReasoningBatch, E as readOpenAICompletionsContentDeltas, S as isOpenAICompletionsThinkingEnabled, T as parseOpenAICompletionsUsage, d as prepareOpenAITools, f as projectOpenAITools, g as resolveOpenAISimpleReasoningEffort, h as resolveOpenAIRequestReasoning, k as resolvePromptCacheKey, p as reconcileOpenAICompletionsToolChoice, s as getCompat, u as resolveOpenAIStrictToolFlagWithDiagnostics, v as GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP, w as measureUtf8AppendBytes } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
17
17
|
import { a as tagUnresolvedTextAsCommentary, i as tagPendingCommentaryText, n as rememberPendingCommentaryTags, r as tagInterruptedTextPhases, t as clearPendingCommentaryText } from "./assistant-text-phase-C20rxWwP.mjs";
|
|
18
18
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
19
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
19
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-B-bAzjo8.mjs";
|
|
20
20
|
import { a as withFirstStreamEventTimeout } from "./stream-first-event-timeout-B9o0S4SZ.mjs";
|
|
21
21
|
import { f as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-vsl-cE-n.mjs";
|
|
22
22
|
import { isGoogleGemini3FlashModel, isGoogleGemini3ProModel } from "./internal/google-model-family.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as isNativeOpenAIEndpoint } from "./openai-completions-compat-
|
|
1
|
+
import { n as isNativeOpenAIEndpoint } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
2
2
|
//#region packages/normalization-core/src/code-points.ts
|
|
3
3
|
/** Truncates to a nonnegative code-point budget; grapheme clusters may be split. */
|
|
4
4
|
function truncateCodePoints(text, maxCodePoints) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as OpenAICompletionsCompat, O as Model, l as CacheRetention } from "./types-CLLR3eB4.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-CoL-LJ7j.mjs";
|
|
3
3
|
//#region packages/ai/src/providers/openai-prompt-cache.d.ts
|
|
4
4
|
/** Selects documented lifetime fields shared by Responses and Chat Completions. */
|
|
5
5
|
declare function resolveOpenAIPromptCacheParams(model: Pick<Model, "id" | "provider" | "baseUrl">, cacheRetention: CacheRetention, compat: Required<Pick<OpenAICompletionsCompat, "supportsPromptCacheKey" | "supportsLongCacheRetention">>): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as getAiTransportHost } from "./host-
|
|
2
|
-
import { O as resolveOpenAIClientBaseUrl } from "./openai-transport-params-
|
|
1
|
+
import { n as getAiTransportHost } from "./host-l5VGgsa2.mjs";
|
|
2
|
+
import { O as resolveOpenAIClientBaseUrl } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
3
3
|
import { i as resolveCloudflareBaseUrl, r as isCloudflareProvider } from "./github-copilot-headers-B37TB3rB.mjs";
|
|
4
4
|
import OpenAI from "openai";
|
|
5
5
|
//#region packages/ai/src/providers/openai-provider-client.ts
|
|
@@ -103,7 +103,7 @@ const GPT_56_REASONING_EFFORTS = [
|
|
|
103
103
|
"xhigh",
|
|
104
104
|
"max"
|
|
105
105
|
];
|
|
106
|
-
const
|
|
106
|
+
const GPT_6_MANDATORY_REASONING_EFFORTS = [
|
|
107
107
|
"low",
|
|
108
108
|
"medium",
|
|
109
109
|
"high",
|
|
@@ -162,7 +162,7 @@ function isOpenAIGpt56Model(model) {
|
|
|
162
162
|
/** Return whether a model has a known GPT-6 reasoning and sampling contract. */
|
|
163
163
|
function isOpenAIGpt6Model(model) {
|
|
164
164
|
const id = normalizeModelId(typeof model.id === "string" ? model.id : void 0);
|
|
165
|
-
return id === "gpt-6-astra" || id === "gpt-6-sol" || id === "gpt-6-luna";
|
|
165
|
+
return id === "gpt-6-astra" || id === "gpt-6-sol" || id === "gpt-6-luna" || id === "gpt-6.1-sol";
|
|
166
166
|
}
|
|
167
167
|
/** Normalize user-facing reasoning effort names to API effort names. */
|
|
168
168
|
function normalizeOpenAIReasoningEffort(effort) {
|
|
@@ -192,7 +192,7 @@ function resolveOpenAIModelReasoningEfforts(model) {
|
|
|
192
192
|
const api = resolveOpenAIThinkingApi(model.api);
|
|
193
193
|
const supportsMax = api !== "openai-completions";
|
|
194
194
|
if (isOpenAIGpt6Model(model) && api !== "azure-openai-responses") {
|
|
195
|
-
if (id === "gpt-6-astra") return supportsMax ?
|
|
195
|
+
if (id === "gpt-6-astra" || id === "gpt-6.1-sol") return supportsMax ? GPT_6_MANDATORY_REASONING_EFFORTS : GPT_CODEX_REASONING_EFFORTS;
|
|
196
196
|
return supportsMax ? GPT_56_REASONING_EFFORTS : GPT_52_REASONING_EFFORTS;
|
|
197
197
|
}
|
|
198
198
|
if (/^gpt-5\.6(?:-|$)/u.test(id)) return supportsMax ? GPT_56_REASONING_EFFORTS : GPT_52_REASONING_EFFORTS;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
|
|
3
|
-
import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-
|
|
4
|
-
import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
3
|
+
import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-D0e4t5-3.mjs";
|
|
4
|
+
import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
5
5
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
|
|
6
|
-
import { n as buildBaseOptions } from "./simple-options-
|
|
7
|
-
import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-
|
|
6
|
+
import { n as buildBaseOptions } from "./simple-options-ueGsZ3Rz.mjs";
|
|
7
|
+
import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
8
8
|
import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
|
|
9
|
-
import { n as createAssistantOutput } from "./provider-transcript-transform-
|
|
10
|
-
import { n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-
|
|
11
|
-
import { P as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-
|
|
9
|
+
import { n as createAssistantOutput } from "./provider-transcript-transform-B-bAzjo8.mjs";
|
|
10
|
+
import { n as resolveProviderSimpleCompletionHeaders } from "./provider-transport-turn-state-CE0dp-UO.mjs";
|
|
11
|
+
import { P as convertProviderResponsesMessages, n as applyResponsesServiceTierPricing, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-6QypGhvL.mjs";
|
|
12
12
|
import { n as hasCopilotVisionInput, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-B37TB3rB.mjs";
|
|
13
|
-
import { t as createOpenAIProviderClient } from "./openai-provider-client-
|
|
13
|
+
import { t as createOpenAIProviderClient } from "./openai-provider-client-evrjHyOl.mjs";
|
|
14
14
|
//#region packages/ai/src/providers/openai-responses.ts
|
|
15
15
|
var openai_responses_exports = /* @__PURE__ */ __exportAll({
|
|
16
16
|
streamOpenAIResponses: () => streamOpenAIResponses,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-DHeFfpcz.mjs";
|
|
2
2
|
import { O as Model, a as AssistantMessage } from "./types-CLLR3eB4.mjs";
|
|
3
|
-
import "./provider-options-
|
|
4
|
-
import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, s as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-
|
|
3
|
+
import "./provider-options-yDbWMoEr.mjs";
|
|
4
|
+
import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, s as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-C2H8pffb.mjs";
|
|
5
5
|
import "openai/resources/responses/responses.js";
|
|
6
6
|
//#region packages/ai/src/transports/openai-responses-compaction-replay.d.ts
|
|
7
7
|
declare function captureOpenAIResponsesCompaction(output: Pick<AssistantMessage, "providerReplay">, item: ReplayableResponseCompactionItem, boundary: number | "retained-users", model: Model, captureMetadata?: OpenAIResponsesReasoningReplayMetadata, compactedOutput?: OpenAIResponsesCompactionOutput): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
2
|
import { i as normalizeOptionalLowercaseString, n as normalizeLowercaseStringOrEmpty, s as readStringValue } from "./string-coerce-fsri9iCu.mjs";
|
|
3
|
-
import { u as supportsOpenAIReasoningEffort } from "./openai-reasoning-effort-
|
|
3
|
+
import { u as supportsOpenAIReasoningEffort } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
4
4
|
import { t as canonicalizeBase64 } from "./base64-C1PsYcRQ.mjs";
|
|
5
5
|
import { t as parsePositiveInteger } from "./positive-integer-CjN5OJbH.mjs";
|
|
6
6
|
import { i as OPENAI_RESPONSES_APIS } from "./openai-responses-contracts-CLxnqS9p.mjs";
|
package/dist/{openai-responses-contracts-D1iZ0njF.d.mts → openai-responses-contracts-C2H8pffb.d.mts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-DHeFfpcz.mjs";
|
|
2
2
|
import { O as Model, j as ModelThinkingLevel, n as Api } from "./types-CLLR3eB4.mjs";
|
|
3
|
-
import { a as BaseOpenAIStreamOptions, f as OpenAIReasoningEffort } from "./provider-options-
|
|
4
|
-
import "./types-
|
|
3
|
+
import { a as BaseOpenAIStreamOptions, f as OpenAIReasoningEffort } from "./provider-options-yDbWMoEr.mjs";
|
|
4
|
+
import "./types-CoL-LJ7j.mjs";
|
|
5
5
|
import { ResponseCompactionItem, ResponseCreateParamsStreaming, ResponseInputItem } from "openai/resources/responses/responses.js";
|
|
6
6
|
//#region packages/ai/src/providers/openai-request-reasoning.d.ts
|
|
7
7
|
type OpenAIRequestReasoningEffort = ModelThinkingLevel | "none";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
|
-
import { n as getAiTransportHost } from "./host-
|
|
3
|
-
import { d as supportsOpenAITemperature, i as isOpenAIGpt6Model, m as resolveOpenAIThinkingApi } from "./openai-reasoning-effort-
|
|
4
|
-
import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-
|
|
5
|
-
import { o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-
|
|
2
|
+
import { n as getAiTransportHost } from "./host-l5VGgsa2.mjs";
|
|
3
|
+
import { d as supportsOpenAITemperature, i as isOpenAIGpt6Model, m as resolveOpenAIThinkingApi } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
4
|
+
import { r as resolveOpenAIPromptCacheParams } from "./openai-prompt-cache-D0e4t5-3.mjs";
|
|
5
|
+
import { o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
6
6
|
import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
|
|
7
|
-
import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
8
|
-
import { C as stripSystemPromptCacheBoundary } from "./simple-options-
|
|
9
|
-
import { g as resolveOpenAISimpleReasoningEffort, h as resolveOpenAIRequestReasoning, k as resolvePromptCacheKey, m as reconcileOpenAIResponsesToolChoice, s as getCompat } from "./openai-transport-params-
|
|
7
|
+
import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
8
|
+
import { C as stripSystemPromptCacheBoundary } from "./simple-options-ueGsZ3Rz.mjs";
|
|
9
|
+
import { g as resolveOpenAISimpleReasoningEffort, h as resolveOpenAIRequestReasoning, k as resolvePromptCacheKey, m as reconcileOpenAIResponsesToolChoice, s as getCompat } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
10
10
|
import { h as responsesPromptObserver, r as OPENAI_CODEX_RESPONSES_DEFAULT_INSTRUCTIONS } from "./openai-responses-contracts-CLxnqS9p.mjs";
|
|
11
|
-
import { a as applyOpenAIResponsesPayloadPolicy, s as resolveOpenAIResponsesPayloadPolicy } from "./openai-responses-compaction-window-
|
|
12
|
-
import { F as convertResponsesMessages, N as buildResponsesInputMessage, a as prepareResponsesTools } from "./openai-responses-shared-
|
|
11
|
+
import { a as applyOpenAIResponsesPayloadPolicy, s as resolveOpenAIResponsesPayloadPolicy } from "./openai-responses-compaction-window-CYGCjAQz.mjs";
|
|
12
|
+
import { F as convertResponsesMessages, N as buildResponsesInputMessage, a as prepareResponsesTools } from "./openai-responses-shared-6QypGhvL.mjs";
|
|
13
13
|
//#region packages/ai/src/transports/openai-responses-params-internal.ts
|
|
14
14
|
const OPENAI_RESPONSES_TOOL_CALL_PROVIDERS = /* @__PURE__ */ new Set([
|
|
15
15
|
"openai",
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { o as readProviderRefusalReview, t as appendAssistantMessageDiagnostic } from "./diagnostics-DzrF1h4J.mjs";
|
|
2
2
|
import { r as appendAssistantThinking } from "./event-stream-vd9UnCAU.mjs";
|
|
3
3
|
import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
|
|
4
|
-
import { k as isImageWithMediaPayload, n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, w as calculateCost } from "./host-
|
|
4
|
+
import { k as isImageWithMediaPayload, n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, w as calculateCost } from "./host-l5VGgsa2.mjs";
|
|
5
5
|
import { a as normalizeOptionalString, o as normalizeStringifiedOptionalString, s as readStringValue } from "./string-coerce-fsri9iCu.mjs";
|
|
6
|
-
import { d as supportsOpenAITemperature } from "./openai-reasoning-effort-
|
|
6
|
+
import { d as supportsOpenAITemperature } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
7
7
|
import { o as truncateUtf16Safe, s as stableStringify } from "./provider-error-CwT_j2v0.mjs";
|
|
8
8
|
import { a as resolveModelSseDebugMode, d as isResponsesProviderTool, g as resolveResponsesTerminalStopReason, h as readResponsesReasoningTokens, i as resolveModelPayloadDebugMode, l as ResponsesOutputIdentityError, m as mapResponsesTerminalUsage, r as emitModelTransportDebug, u as hasOnlyResponsesFunctionTools } from "./diagnostics-CJaB6g8J.mjs";
|
|
9
|
-
import { o as redactSensitiveText } from "./transport-utils-
|
|
10
|
-
import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-
|
|
11
|
-
import { A as shortHash, C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, S as withProviderResponseHook, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, c as failTransportStream, d as iterateModelStream, g as parseTerminalToolCallArguments, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeTransportPayloadText } from "./transport-stream-shared-
|
|
12
|
-
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, s as prepareModelRequestBody } from "./simple-options-
|
|
13
|
-
import { A as redactIdentifier, C as log, d as prepareOpenAITools, h as resolveOpenAIRequestReasoning, j as sha256Hex, u as resolveOpenAIStrictToolFlagWithDiagnostics, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-
|
|
14
|
-
import { n as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-
|
|
9
|
+
import { o as redactSensitiveText } from "./transport-utils-CEKSacZh.mjs";
|
|
10
|
+
import { i as resolveOpenAICompletionsCompat } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
11
|
+
import { A as shortHash, C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, S as withProviderResponseHook, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, c as failTransportStream, d as iterateModelStream, g as parseTerminalToolCallArguments, t as IncompleteToolCallError, u as finalizeTransportStream, v as sanitizeTransportPayloadText } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
12
|
+
import { C as stripSystemPromptCacheBoundary, D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText, s as prepareModelRequestBody } from "./simple-options-ueGsZ3Rz.mjs";
|
|
13
|
+
import { A as redactIdentifier, C as log, d as prepareOpenAITools, h as resolveOpenAIRequestReasoning, j as sha256Hex, u as resolveOpenAIStrictToolFlagWithDiagnostics, y as createOpenAIProviderAcceptanceHook } from "./openai-transport-params-a_8s6k6d.mjs";
|
|
14
|
+
import { n as providerReplayContextMatches, t as buildProviderReplayContext } from "./provider-replay-context-Cy7RdZ2C.mjs";
|
|
15
15
|
import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
|
|
16
|
-
import { t as transformProviderMessages } from "./provider-transcript-transform-
|
|
16
|
+
import { t as transformProviderMessages } from "./provider-transcript-transform-B-bAzjo8.mjs";
|
|
17
17
|
import { a as withFirstStreamEventTimeout, i as getFirstStreamEventTimeoutMs, r as getFirstStreamEventTimeoutHandler, t as createFirstStreamEventAbortController } from "./stream-first-event-timeout-B9o0S4SZ.mjs";
|
|
18
18
|
import { a as resolveOpenAIProjectedToolsStrictToolFlag, f as withPreparedToolSchemaNormalization, r as normalizeOpenAIStrictToolParameters } from "./openai-tool-schema-vsl-cE-n.mjs";
|
|
19
19
|
import { a as OPENAI_RESPONSES_COMPACTION_REPLAY_TYPE, c as OPENAI_RESPONSES_RETAINED_COMPACTION_REPLAY_TYPE, f as RESPONSE_FAILED_NO_DETAILS_MESSAGE, o as OPENAI_RESPONSES_REASONING_REPLAY_BLOCK_META_KEY, p as isPreviousResponseRejection, s as OPENAI_RESPONSES_REASONING_REPLAY_META_KEY } from "./openai-responses-contracts-CLxnqS9p.mjs";
|
|
20
|
-
import { n as isOpenAIResponsesCompactionOutput, r as readOpenAIResponsesCompactionWindow } from "./openai-responses-compaction-window-
|
|
20
|
+
import { n as isOpenAIResponsesCompactionOutput, r as readOpenAIResponsesCompactionWindow } from "./openai-responses-compaction-window-CYGCjAQz.mjs";
|
|
21
21
|
import { n as registerSessionResourceCleanup } from "./session-resources-CkR4WWy1.mjs";
|
|
22
22
|
import { randomUUID } from "node:crypto";
|
|
23
23
|
//#region packages/ai/src/transports/openai-responses-replay.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K as StopReason, a as AssistantMessage, ot as Usage } from "./types-CLLR3eB4.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-CoL-LJ7j.mjs";
|
|
3
3
|
import OpenAI from "openai";
|
|
4
4
|
//#region packages/ai/src/providers/openai-responses-terminal-usage.d.ts
|
|
5
5
|
/** A known output ceiling can resume sampling after admitted tools have settled. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { o as isRecord, r as asOptionalObjectRecord } from "./record-coerce-CNDovvft.mjs";
|
|
2
|
-
import { C as applyProviderReportedUsageCost, S as headersToRecord, T as clampThinkingLevel, n as getAiTransportHost, w as calculateCost } from "./host-
|
|
2
|
+
import { C as applyProviderReportedUsageCost, S as headersToRecord, T as clampThinkingLevel, n as getAiTransportHost, w as calculateCost } from "./host-l5VGgsa2.mjs";
|
|
3
3
|
import { a as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty } from "./string-coerce-fsri9iCu.mjs";
|
|
4
|
-
import { a as normalizeOpenAIReasoningEffort, c as resolveOpenAIReasoningEffortMapping, f as MODEL_CATALOG_THINKING_LEVELS, m as resolveOpenAIThinkingApi, o as resolveOpenAIModelReasoningEfforts, s as resolveOpenAIReasoningEffortForModel, u as supportsOpenAIReasoningEffort } from "./openai-reasoning-effort-
|
|
5
|
-
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-
|
|
6
|
-
import { i as isCodeModeModelVisibleToolName } from "./transport-utils-
|
|
7
|
-
import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-
|
|
8
|
-
import { n as resolveModelRequestTimeoutMs } from "./host-policy-
|
|
9
|
-
import { m as notifyProviderHttpResponse } from "./transport-stream-shared-
|
|
4
|
+
import { a as normalizeOpenAIReasoningEffort, c as resolveOpenAIReasoningEffortMapping, f as MODEL_CATALOG_THINKING_LEVELS, m as resolveOpenAIThinkingApi, o as resolveOpenAIModelReasoningEfforts, s as resolveOpenAIReasoningEffortForModel, u as supportsOpenAIReasoningEffort } from "./openai-reasoning-effort-C_0p3psG.mjs";
|
|
5
|
+
import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-D0e4t5-3.mjs";
|
|
6
|
+
import { i as isCodeModeModelVisibleToolName } from "./transport-utils-CEKSacZh.mjs";
|
|
7
|
+
import { i as resolveOpenAICompletionsCompat, o as usesNativeOpenAICodexResponsesBackend } from "./openai-completions-compat-W0ykoT4z.mjs";
|
|
8
|
+
import { n as resolveModelRequestTimeoutMs } from "./host-policy-D8HBI2Pv.mjs";
|
|
9
|
+
import { m as notifyProviderHttpResponse } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
10
10
|
import { n as projectRuntimeToolInputSchema, t as prepareRuntimeToolInputSchema } from "./tool-schema-json-projection-Ct8SeBeJ.mjs";
|
|
11
11
|
import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
|
|
12
12
|
import { a as resolveOpenAIProjectedToolsStrictToolFlag, t as findOpenAIStrictToolProjectionDiagnostics } from "./openai-tool-schema-vsl-cE-n.mjs";
|
|
@@ -209,12 +209,24 @@ function parseOpenAICompletionsUsage(rawUsage, model, options) {
|
|
|
209
209
|
const input = Math.max(0, (rawUsage.prompt_tokens || 0) - cacheRead - cacheWrite);
|
|
210
210
|
const output = rawUsage.completion_tokens || 0;
|
|
211
211
|
const reasoningTokens = rawUsage.completion_tokens_details?.reasoning_tokens;
|
|
212
|
+
const hasCoherentContext = [
|
|
213
|
+
rawUsage.prompt_tokens,
|
|
214
|
+
rawUsage.completion_tokens,
|
|
215
|
+
rawUsage.total_tokens,
|
|
216
|
+
cacheRead,
|
|
217
|
+
cacheWrite
|
|
218
|
+
].every((value) => typeof value === "number" && Number.isFinite(value) && value >= 0) && rawUsage.prompt_tokens >= cacheRead + cacheWrite && rawUsage.total_tokens >= rawUsage.prompt_tokens + rawUsage.completion_tokens;
|
|
212
219
|
const usage = {
|
|
213
220
|
input,
|
|
214
221
|
output,
|
|
215
222
|
cacheRead,
|
|
216
223
|
cacheWrite,
|
|
217
224
|
...options?.includeReasoningTokens !== false && typeof reasoningTokens === "number" && Number.isFinite(reasoningTokens) ? { reasoningTokens } : {},
|
|
225
|
+
contextUsage: hasCoherentContext ? {
|
|
226
|
+
state: "available",
|
|
227
|
+
promptTokens: rawUsage.prompt_tokens,
|
|
228
|
+
totalTokens: Math.max(input + output + cacheRead + cacheWrite, rawUsage.total_tokens)
|
|
229
|
+
} : { state: "unavailable" },
|
|
218
230
|
totalTokens: input + output + cacheRead + cacheWrite,
|
|
219
231
|
cost: {
|
|
220
232
|
input: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Y as StreamOptions } from "./types-CLLR3eB4.mjs";
|
|
2
2
|
import { t as OpenAICompletionsToolChoice } from "./openai-tool-projection-793cE3QX.mjs";
|
|
3
|
-
import "./types-
|
|
3
|
+
import "./types-CoL-LJ7j.mjs";
|
|
4
4
|
import Anthropic from "@anthropic-ai/sdk";
|
|
5
5
|
//#region packages/ai/src/providers/openai-reasoning-effort.d.ts
|
|
6
6
|
declare const ENABLED_REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as shortHash } from "./transport-stream-shared-
|
|
1
|
+
import { A as shortHash } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
2
2
|
//#region packages/ai/src/transports/provider-replay-context.ts
|
|
3
3
|
function hashReplayContextValue(value) {
|
|
4
4
|
const normalized = value?.trim();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as transformMessages } from "./host-
|
|
2
|
-
import { a as createEmptyTransportUsage } from "./transport-stream-shared-
|
|
1
|
+
import { i as transformMessages } from "./host-l5VGgsa2.mjs";
|
|
2
|
+
import { a as createEmptyTransportUsage } from "./transport-stream-shared-Bz9YwuQ0.mjs";
|
|
3
3
|
//#region packages/ai/src/transports/assistant-output.ts
|
|
4
4
|
function createAssistantOutput(model, api = model.api) {
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getAiTransportHost } from "./host-
|
|
1
|
+
import { n as getAiTransportHost } from "./host-l5VGgsa2.mjs";
|
|
2
2
|
import { n as resolveOpencodeSessionHeaders, t as hasOpencodeSessionHeader } from "./session-affinity-Bcunsn4I.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region packages/ai/src/transports/provider-transport-turn-state.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as index_d_exports } from "./index-
|
|
1
|
+
import { t as index_d_exports } from "./index-DHeFfpcz.mjs";
|
|
2
2
|
import { O as Model, X as TextContent, Y as StreamOptions, a as AssistantMessage, d as Context, f as ImageContent, it as ToolResultMessage, n as Api, s as AssistantMessageEventStreamContract, st as UserMessage } from "./types-CLLR3eB4.mjs";
|
|
3
|
-
import "./types-
|
|
3
|
+
import "./types-CoL-LJ7j.mjs";
|
|
4
4
|
//#region packages/ai/src/provider-types.d.ts
|
|
5
5
|
declare const PROVIDER_CONTEXT_HANDOFF: unique symbol;
|
|
6
6
|
type VideoContent = Omit<ImageContent, "type"> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { A as supportsClaudeNativeXhighEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, E as supportsClaude1MContext, O as supportsClaudeFastMode, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, a as ProviderRefusalReview, b as resolveClaudeMythos5ModelIdentity, c as CLAUDE_HAIKU_55_THINKING_PROFILE, d as CLAUDE_SONNET_55_THINKING_PROFILE, f as CLAUDE_SONNET_5_THINKING_PROFILE, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, i as normalizeResolvedPricing, k as supportsClaudeNativeMaxEffort, l as CLAUDE_OPUS_55_THINKING_PROFILE, m as requiresClaudeBetweenToolsThinking, n as calculateUsageCost, o as readProviderRefusalReview, p as bindsClaudeThinkingPrefix, r as normalizeModelCostConfig, s as CLAUDE_FABLE_5_THINKING_PROFILE, u as CLAUDE_OPUS_5_THINKING_PROFILE, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "./index-DHeFfpcz.mjs";
|
|
2
2
|
import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, P as OpenRouterRouting, Q as ThinkingBudgets, R as Provider, S as KnownApi, T as MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, U as RawModelCostConfig, V as ProviderResponse, W as RawPricingTier, X as TextContent, Y as StreamOptions, Z as TextSignatureV1, _ as ImagesModel, a as AssistantMessage, at as Transport, b as ImagesProvider, c as AssistantMessageEventStreamLike, ct as ValidateToolArgumentsFn, dt as DiagnosticErrorInfo, et as ThinkingLevel, f as ImageContent, ft as appendAssistantMessageDiagnostic, g as ImagesInputContent, gt as isProviderRefusalAssistantError, h as ImagesFunction, ht as formatThrownValue, i as AssistantImages, it as ToolResultMessage, j as ModelThinkingLevel, k as ModelCostConfig, l as CacheRetention, lt as VercelGatewayRouting, m as ImagesContext, mt as extractDiagnosticError, n as Api, nt as Tool, o as AssistantMessageEvent, ot as Usage, p as ImagesApi, pt as createAssistantMessageDiagnostic, q as StreamFn, r as AssistantDeliveryTtsFacts, rt as ToolCall, s as AssistantMessageEventStreamContract, st as UserMessage, t as AnthropicMessagesCompat, tt as ThinkingLevelMap, u as CompleteSimpleFn, ut as AssistantMessageDiagnostic, v as ImagesOptions, w as KnownImagesProvider, x as ImagesStopReason, y as ImagesOutputContent, z as ProviderImagesOptions } from "./types-CLLR3eB4.mjs";
|
|
3
3
|
import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DOPFYVqs.mjs";
|
|
4
4
|
import { n as validateToolCall, t as validateToolArguments } from "./validation-Cat2wQsc.mjs";
|
|
5
|
-
import { a as ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-
|
|
6
|
-
export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_OPUS_55_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_55_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderRefusalReview, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RawModelCostConfig, type RawPricingTier, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type isProviderRefusalAssistantError, type normalizeModelCostConfig, type normalizeResolvedPricing, type readProviderRefusalReview, type requiresClaudeBetweenToolsThinking, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus55ModelIdentity, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet55ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
|
|
5
|
+
import { a as ProviderContextHandoff, c as ProviderStreamFunction, d as VideoContent, f as resolveProviderContext, i as ProviderContext, l as ProviderStreamOptions, n as ModelInputContent, o as ProviderMessage, r as PROVIDER_CONTEXT_HANDOFF, s as ProviderModel, t as MediaContent, u as ProviderUserMessage } from "./provider-types-CHsKHBBD.mjs";
|
|
6
|
+
export { type AnthropicMessagesCompat, type Api, type AssistantDeliveryTtsFacts, type AssistantImages, type AssistantMessage, type AssistantMessageDiagnostic, type AssistantMessageEvent, type AssistantMessageEventStream, type AssistantMessageEventStreamContract, type AssistantMessageEventStreamLike, type CLAUDE_FABLE_5_THINKING_PROFILE, type CLAUDE_HAIKU_55_THINKING_PROFILE, type CLAUDE_OPUS_55_THINKING_PROFILE, type CLAUDE_OPUS_5_THINKING_PROFILE, type CLAUDE_SONNET_55_THINKING_PROFILE, type CLAUDE_SONNET_5_THINKING_PROFILE, type CacheRetention, type CompleteSimpleFn, type ProviderContext as Context, ProviderContext, type DiagnosticErrorInfo, type EventStream, type ImageContent, type ImagesApi, type ImagesContext, type ImagesFunction, type ImagesInputContent, type ImagesModel, type ImagesOptions, type ImagesOutputContent, type ImagesProvider, type ImagesStopReason, type KnownApi, type KnownImagesApi, type KnownImagesProvider, type MALFORMED_TOOL_CALL_ARGUMENTS_ERROR_CODE, type MaybePromise, MediaContent, type ProviderMessage as Message, ProviderMessage, type ProviderModel as Model, ProviderModel, type ModelCostConfig, type ModelCostRates, ModelInputContent, type ModelThinkingLevel, type OpenAICompletionsCompat, type OpenAIResponsesCompat, type OpenRouterRouting, PROVIDER_CONTEXT_HANDOFF, type PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, type PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, type PricingTier, type Provider, ProviderContextHandoff, type ProviderImagesOptions, type ProviderRefusalReview, type ProviderReplayState, type ProviderResponse, ProviderStreamFunction, type ProviderStreamFunction as StreamFunction, ProviderStreamOptions, ProviderUserMessage, type RawModelCostConfig, type RawPricingTier, type SimpleStreamOptions, type StopReason, type StreamFn, type StreamOptions, type TextContent, type TextSignatureV1, type ThinkingBudgets, type ThinkingContent, type ThinkingLevel, type ThinkingLevelMap, type Tool, type ToolCall, type ToolResultMessage, type Transport, type Usage, type UserMessage, type ValidateToolArgumentsFn, type VercelGatewayRouting, VideoContent, type appendAssistantMessageDiagnostic, type bindsClaudeThinkingPrefix, type calculateUsageCost, type createAssistantMessageDiagnostic, type createAssistantMessageEventStream, type extractDiagnosticError, type formatThrownValue, type isProviderRefusalAssistantError, type normalizeModelCostConfig, type normalizeResolvedPricing, type readProviderRefusalReview, type requiresClaudeBetweenToolsThinking, type requiresClaudeDefaultSampling, type requiresClaudeMandatoryAdaptiveThinking, type resolveClaudeFable5ModelIdentity, type resolveClaudeHaiku55ModelIdentity, type resolveClaudeModelIdentity, type resolveClaudeMythos5ModelIdentity, type resolveClaudeNativeThinkingLevelMap, type resolveClaudeOpus55ModelIdentity, type resolveClaudeOpus5ModelIdentity, type resolveClaudeSonnet55ModelIdentity, type resolveClaudeSonnet5ModelIdentity, resolveProviderContext, type supportsClaude1MContext, type supportsClaudeAdaptiveThinking, type supportsClaudeFastMode, type supportsClaudeNativeMaxEffort, type supportsClaudeNativeXhighEffort, type validateToolArguments, type validateToolCall };
|
package/dist/providers.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ApiRegistry } from "./api-registry-
|
|
2
|
-
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-
|
|
1
|
+
import { n as ApiRegistry } from "./api-registry-pGjnPg1z.mjs";
|
|
2
|
+
import { n as clampOpenAIPromptCacheKey, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "./openai-prompt-cache-YTmJ_iMS.mjs";
|
|
3
3
|
//#region packages/ai/src/providers/register-builtins.d.ts
|
|
4
4
|
/** Source id used for built-in API provider registrations. */
|
|
5
5
|
export declare const BUILT_IN_API_PROVIDER_SOURCE_ID = "core:built-in";
|