@openclaw/ai 2026.9.33 → 2026.9.34

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.
Files changed (62) hide show
  1. package/dist/{anthropic-a0uD7NUz.mjs → anthropic-BL3z3SiB.mjs} +2 -2
  2. package/dist/{anthropic-payload-policy-BVcxWtQD.d.mts → anthropic-payload-policy-CFbalbbU.d.mts} +3 -3
  3. package/dist/{anthropic-stream-reducer-Cis7c1sm.mjs → anthropic-stream-reducer-XCL_L8KJ.mjs} +1 -1
  4. package/dist/{api-registry-pGjnPg1z.d.mts → api-registry-BLbq15N5.d.mts} +2 -2
  5. package/dist/{azure-openai-responses-CqWvI8x6.mjs → azure-openai-responses-DqXyjyTC.mjs} +2 -2
  6. package/dist/diagnostics.d.mts +4 -4
  7. package/dist/env-api-keys-BR0MUYYD.d.mts +17 -0
  8. package/dist/event-stream-B0vjWzHd.d.mts +1 -0
  9. package/dist/{event-stream-DOPFYVqs.d.mts → event-stream-CiaHxSK0.d.mts} +1 -1
  10. package/dist/event-stream.d.mts +2 -2
  11. package/dist/{google-BfYNxKpG.mjs → google-D9zpPelZ.mjs} +1 -1
  12. package/dist/{google-interactions-BJNj0ugu.mjs → google-interactions-Br_n4tZB.mjs} +14 -11
  13. package/dist/{google-messages-C4ZiLG1P.mjs → google-messages-pvt0rKfN.mjs} +3 -1
  14. package/dist/{google-shared-6u4WCDyl.mjs → google-shared-DPeR7LLA.mjs} +9 -14
  15. package/dist/{google-vertex-CX1QaTs3.mjs → google-vertex-D4Qde9Qq.mjs} +1 -1
  16. package/dist/{host-COwfRiSL.d.mts → host-BhpDO5Sy.d.mts} +3 -3
  17. package/dist/{index-DHeFfpcz.d.mts → index-Iw8l620S.d.mts} +3 -3
  18. package/dist/index.d.mts +6 -6
  19. package/dist/internal/anthropic.d.mts +5 -5
  20. package/dist/internal/anthropic.mjs +2 -2
  21. package/dist/internal/env-api-keys.d.mts +2 -0
  22. package/dist/internal/env-api-keys.mjs +2 -0
  23. package/dist/internal/google-model-family.d.mts +2 -0
  24. package/dist/internal/google-model-family.mjs +6 -2
  25. package/dist/internal/openai-completions-compat.d.mts +1 -1
  26. package/dist/internal/openai-responses-payload-policy.d.mts +1 -1
  27. package/dist/internal/openai.d.mts +9 -9
  28. package/dist/internal/openai.mjs +5 -5
  29. package/dist/internal/runtime.d.mts +8 -23
  30. package/dist/internal/shared.d.mts +3 -3
  31. package/dist/internal/tool-schema.mjs +1 -1
  32. package/dist/{openai-chatgpt-responses-L0Jc-0DF.mjs → openai-chatgpt-responses-CHluxZ0P.mjs} +58 -49
  33. package/dist/{openai-completions-gyTpI3xG.mjs → openai-completions-D0f28olp.mjs} +3 -3
  34. package/dist/{openai-completions-compat-CqWP1fn5.d.mts → openai-completions-compat-CQbGsPt0.d.mts} +3 -3
  35. package/dist/{openai-completions-stream-BrsoGafc.mjs → openai-completions-stream-iagLwGz6.mjs} +9 -8
  36. package/dist/{openai-prompt-cache-YTmJ_iMS.d.mts → openai-prompt-cache-CuY5QDIc.d.mts} +2 -2
  37. package/dist/{openai-provider-client-D1gd0dfR.mjs → openai-provider-client-Bcjj6_fK.mjs} +1 -1
  38. package/dist/{openai-responses-DluFZzn_.mjs → openai-responses-D2ElJYAb.mjs} +3 -3
  39. package/dist/{openai-responses-compaction-replay-CQHR2isp.d.mts → openai-responses-compaction-replay-DiGjwK4d.d.mts} +4 -4
  40. package/dist/{openai-responses-contracts-C2H8pffb.d.mts → openai-responses-contracts-CYScOS7J.d.mts} +4 -4
  41. package/dist/{openai-responses-prompt-observer-internal-C5WB2Kxf.mjs → openai-responses-prompt-observer-internal-CWhVpkYl.mjs} +4 -4
  42. package/dist/{openai-responses-shared-BpGnmnV8.mjs → openai-responses-shared-BUaK4Pb3.mjs} +503 -11
  43. package/dist/{openai-responses-terminal-usage-D0WZQlIF.d.mts → openai-responses-terminal-usage-CLzeNWqW.d.mts} +2 -2
  44. package/dist/{openai-tool-schema-vsl-cE-n.mjs → openai-tool-schema-DSAxYnHW.mjs} +18 -1
  45. package/dist/{openai-transport-params-C4eZAXf2.mjs → openai-transport-params-CqLxK93q.mjs} +15 -3
  46. package/dist/{provider-options-yDbWMoEr.d.mts → provider-options-CFiaIG4K.d.mts} +2 -2
  47. package/dist/{provider-types-CHsKHBBD.d.mts → provider-types-Bx_6hBmK.d.mts} +3 -3
  48. package/dist/provider-types.d.mts +5 -5
  49. package/dist/providers.d.mts +2 -2
  50. package/dist/providers.mjs +8 -8
  51. package/dist/{transport-stream-shared-CYLM2HEK.d.mts → transport-stream-shared-B_REuIea.d.mts} +4 -4
  52. package/dist/{transport-utils-CnxX8hPj.mjs → transport-utils-B11GlmDO.mjs} +5 -1
  53. package/dist/transports.d.mts +14 -13
  54. package/dist/transports.mjs +17 -502
  55. package/dist/{types-CLLR3eB4.d.mts → types-B89w6ly2.d.mts} +11 -0
  56. package/dist/types-DbmNRKvK.d.mts +1 -0
  57. package/dist/types.d.mts +5 -5
  58. package/dist/{validation-Cat2wQsc.d.mts → validation-DblQWSRA.d.mts} +1 -1
  59. package/dist/validation.d.mts +1 -1
  60. package/package.json +6 -1
  61. package/dist/event-stream-CMQfX_yr.d.mts +0 -1
  62. package/dist/types-CoL-LJ7j.d.mts +0 -1
@@ -2,8 +2,8 @@ import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
2
2
  import { b as resolveClaudeOpus5ModelIdentity, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity } from "./src-Dq6VRdeL.mjs";
3
3
  import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
4
4
  import { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, m as defaultsClaudeAdaptiveThinking, n as getAiTransportHost, p as buildAnthropicClaudeCodeIdentity, r as resolveAiTransportHeaderSentinels, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract } from "./host-DqhMLv8J.mjs";
5
- import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-CnxX8hPj.mjs";
6
- import { A as applyAnthropicRequestCacheControl, B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, D as applyAnthropicContextManagementToRequest, F as resolveAnthropicCacheOptions, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, N as isDirectAnthropicModel, R as resolveAnthropicRequestBetaHeader, d as convertAnthropicTools, f as buildAnthropicReplayPlan, g as normalizeAnthropicToolCallId, h as suppressAnthropicCompaction, j as buildAnthropicSystemBlocks, l as buildAnthropicGenerationParams, p as isAnthropicReplayRejection, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as convertAnthropicMessages } from "./anthropic-stream-reducer-Cis7c1sm.mjs";
5
+ import { t as MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "./transport-utils-B11GlmDO.mjs";
6
+ import { A as applyAnthropicRequestCacheControl, B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, D as applyAnthropicContextManagementToRequest, F as resolveAnthropicCacheOptions, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, N as isDirectAnthropicModel, R as resolveAnthropicRequestBetaHeader, d as convertAnthropicTools, f as buildAnthropicReplayPlan, g as normalizeAnthropicToolCallId, h as suppressAnthropicCompaction, j as buildAnthropicSystemBlocks, l as buildAnthropicGenerationParams, p as isAnthropicReplayRejection, q as omitFoundryBearerCredentialHeaders, t as consumeAnthropicStream, u as convertAnthropicMessages } from "./anthropic-stream-reducer-XCL_L8KJ.mjs";
7
7
  import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
8
8
  import { D as parseJsonWithRepair, m as notifyProviderHttpResponse, n as assignTransportErrorDetails, u as finalizeTransportStream } from "./transport-stream-shared-Dt7VrJFd.mjs";
9
9
  import { n as buildBaseOptions, r as clampMaxTokensToModel, t as adjustMaxTokensForThinking } from "./simple-options-B9u6-CF3.mjs";
@@ -1,6 +1,6 @@
1
- import "./index-DHeFfpcz.mjs";
2
- import { O as Model } from "./types-CLLR3eB4.mjs";
3
- import { t as AnthropicContextManagementOptions } from "./provider-options-yDbWMoEr.mjs";
1
+ import "./index-Iw8l620S.mjs";
2
+ import { O as Model } from "./types-B89w6ly2.mjs";
3
+ import { t as AnthropicContextManagementOptions } from "./provider-options-CFiaIG4K.mjs";
4
4
  import { TextBlockParam } from "@anthropic-ai/sdk/resources/messages.js";
5
5
  //#region packages/ai/src/transports/anthropic-payload-policy.d.ts
6
6
  /** @deprecated Anthropic-family provider payload helper; do not use from third-party plugins. */
@@ -4,7 +4,7 @@ import { a as asRecord, o as isRecord, r as asOptionalObjectRecord, s as readStr
4
4
  import { _ as requiresClaudeAdaptiveThinking, d as ANTHROPIC_CLAUDE_CODE_VERSION, h as mapAnthropicStopReason, k as isImageWithMediaPayload, n as getAiTransportHost, v as resolveAnthropicThinkingEffort, w as calculateCost } from "./host-DqhMLv8J.mjs";
5
5
  import { i as normalizeOptionalLowercaseString, r as normalizeNullableString } from "./string-coerce-fsri9iCu.mjs";
6
6
  import { i as asNonNegativeFiniteNumber, n as estimateBase64DecodedBytes } from "./base64-C1PsYcRQ.mjs";
7
- import "./transport-utils-CnxX8hPj.mjs";
7
+ import "./transport-utils-B11GlmDO.mjs";
8
8
  import { i as resolveProviderRequestCapabilities, r as resolveProviderEndpoint } from "./host-policy-B3DuH3Le.mjs";
9
9
  import { t as resolveCacheRetention } from "./cache-retention-0x979a5V.mjs";
10
10
  import { C as parseJsonObjectPreservingUnsafeIntegers, E as createToolArgumentPreviewSchedule, O as parseStreamingJson, _ as sanitizeNonEmptyTransportPayloadText, b as transportAbortError, d as iterateModelStream, j as sanitizeSurrogates, l as finalizeTerminalToolCallArguments, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-Dt7VrJFd.mjs";
@@ -1,5 +1,5 @@
1
- import "./index-DHeFfpcz.mjs";
2
- import { G as SimpleStreamOptions, J as StreamFunction, O as Model, Y as StreamOptions, d as Context, n as Api, s as AssistantMessageEventStreamContract } from "./types-CLLR3eB4.mjs";
1
+ import "./index-Iw8l620S.mjs";
2
+ import { G as SimpleStreamOptions, J as StreamFunction, O as Model, Y as StreamOptions, d as Context, n as Api, s as AssistantMessageEventStreamContract } from "./types-B89w6ly2.mjs";
3
3
  //#region packages/ai/src/api-registry.d.ts
4
4
  /** Runtime stream adapter signature stored in the API provider registry. */
5
5
  type ApiStreamFunction = (model: Model, context: Context, options?: StreamOptions) => AssistantMessageEventStreamContract;
@@ -2,10 +2,10 @@ import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
2
2
  import { n as getAiTransportHost } from "./host-DqhMLv8J.mjs";
3
3
  import { n as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-DHxMpeRz.mjs";
4
4
  import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
5
- import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-C4eZAXf2.mjs";
5
+ import { g as resolveOpenAISimpleReasoningEffort } from "./openai-transport-params-CqLxK93q.mjs";
6
6
  import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
7
7
  import { n as createAssistantOutput } from "./provider-transcript-transform-Cg-36VSt.mjs";
8
- import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-BpGnmnV8.mjs";
8
+ import { P as convertProviderResponsesMessages, r as runResponsesStreamLifecycle, t as applyCommonResponsesParams } from "./openai-responses-shared-BUaK4Pb3.mjs";
9
9
  import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, t as isOpenAICompatibleAzureResponsesBaseUrl } from "./azure-openai-responses-client-compat-C7K7QfUE.mjs";
10
10
  import OpenAI, { AzureOpenAI } from "openai";
11
11
  //#region packages/ai/src/providers/azure-openai-responses.ts
@@ -1,7 +1,7 @@
1
- import { a as ProviderRefusalReview, o as readProviderRefusalReview } from "./index-DHeFfpcz.mjs";
2
- import { a as AssistantMessage, dt as DiagnosticErrorInfo, ft as appendAssistantMessageDiagnostic, gt as isProviderRefusalAssistantError, ht as formatThrownValue, mt as extractDiagnosticError, pt as createAssistantMessageDiagnostic, ut as AssistantMessageDiagnostic } from "./types-CLLR3eB4.mjs";
3
- import "./types-CoL-LJ7j.mjs";
4
- import { n as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-D0WZQlIF.mjs";
1
+ import { a as ProviderRefusalReview, o as readProviderRefusalReview } from "./index-Iw8l620S.mjs";
2
+ import { a as AssistantMessage, dt as DiagnosticErrorInfo, ft as appendAssistantMessageDiagnostic, gt as isProviderRefusalAssistantError, ht as formatThrownValue, mt as extractDiagnosticError, pt as createAssistantMessageDiagnostic, ut as AssistantMessageDiagnostic } from "./types-B89w6ly2.mjs";
3
+ import "./types-DbmNRKvK.mjs";
4
+ import { n as isResponsesOutputLimitToolCallError } from "./openai-responses-terminal-usage-CLzeNWqW.mjs";
5
5
  import { n as ProviderErrorRedactor, r as configureProviderErrorRedactor } from "./provider-error-xumb1V3F.mjs";
6
6
  import { r as projectDiagnosticValue, t as DiagnosticProjectionPolicy } from "./credential-redaction-BKv49aiv.mjs";
7
7
  import { n as formatModelTransportDebugUrl, r as emitModelTransportDebug, t as formatModelTransportDebugBaseUrl } from "./model-transport-url-C5f59L3Y.mjs";
@@ -0,0 +1,17 @@
1
+ //#region packages/ai/src/env-api-keys.d.ts
2
+ /**
3
+ * Find configured environment variables that can provide an API key for a provider.
4
+ *
5
+ * This only reports actual API key variables. It intentionally excludes ambient
6
+ * credential sources such as AWS profiles, AWS IAM credentials, and Google
7
+ * Application Default Credentials.
8
+ */
9
+ declare function findEnvKeys(provider: string): string[] | undefined;
10
+ /**
11
+ * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.
12
+ *
13
+ * Will not return API keys for providers that require OAuth tokens.
14
+ */
15
+ declare function getEnvApiKey(provider: string): string | undefined;
16
+ //#endregion
17
+ export { getEnvApiKey as n, findEnvKeys as t };
@@ -0,0 +1 @@
1
+ import "./event-stream-CiaHxSK0.mjs";
@@ -1,4 +1,4 @@
1
- import { $ as ThinkingContent, a as AssistantMessage, o as AssistantMessageEvent, s as AssistantMessageEventStreamContract } from "./types-CLLR3eB4.mjs";
1
+ import { $ as ThinkingContent, a as AssistantMessage, o as AssistantMessageEvent, s as AssistantMessageEventStreamContract } from "./types-B89w6ly2.mjs";
2
2
  //#region packages/llm-core/src/utils/event-stream.d.ts
3
3
  /** Returns only an append whose current and previously observed snapshots still match. */
4
4
  declare function readAssistantThinkingAppend(block: ThinkingContent, previous: string): string | undefined;
@@ -1,3 +1,3 @@
1
- import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DOPFYVqs.mjs";
2
- import "./event-stream-CMQfX_yr.mjs";
1
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CiaHxSK0.mjs";
2
+ import "./event-stream-B0vjWzHd.mjs";
3
3
  export { AssistantMessageEventStream, EventStream, createAssistantMessageEventStream };
@@ -5,7 +5,7 @@ import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
5
5
  import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
6
6
  import { n as createAssistantOutput } from "./provider-transcript-transform-Cg-36VSt.mjs";
7
7
  import { n as resolveOpencodeSessionHeaders } from "./session-affinity-Bcunsn4I.mjs";
8
- import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-6u4WCDyl.mjs";
8
+ import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-DPeR7LLA.mjs";
9
9
  import { GoogleGenAI } from "@google/genai";
10
10
  //#region packages/ai/src/providers/google.ts
11
11
  let toolCallCounter = 0;
@@ -1,12 +1,13 @@
1
1
  import { t as AssistantMessageEventStream } from "./event-stream-vd9UnCAU.mjs";
2
2
  import { a as asRecord, i as asOptionalRecord, s as readStringField } from "./record-coerce-CNDovvft.mjs";
3
3
  import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels, w as calculateCost } from "./host-DqhMLv8J.mjs";
4
+ import { c as streamFragmentError } from "./transport-utils-B11GlmDO.mjs";
4
5
  import { t as buildGuardedModelFetch } from "./host-policy-B3DuH3Le.mjs";
5
6
  import { b as transportAbortError, c as failTransportStream, g as parseTerminalToolCallArguments, h as notifyProviderStreamOpened, j as sanitizeSurrogates, m as notifyProviderHttpResponse, w as parseJsonPreservingUnsafeIntegers } from "./transport-stream-shared-Dt7VrJFd.mjs";
6
7
  import { C as stripSystemPromptCacheBoundary, n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
7
8
  import { n as getEnvApiKey } from "./env-api-keys-CyX4VKGO.mjs";
8
9
  import { n as createAssistantOutput, t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
9
- import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-6u4WCDyl.mjs";
10
+ import { n as buildGoogleInteractionsSimpleThinking } from "./google-shared-DPeR7LLA.mjs";
10
11
  import { createRequire } from "node:module";
11
12
  //#region packages/ai/src/providers/google-interactions-request.ts
12
13
  const DEFAULT_GOOGLE_API_BASE_URL = "https://generativelanguage.googleapis.com";
@@ -366,14 +367,16 @@ async function runGoogleInteractionsLifecycle(params) {
366
367
  let sawCompletion = false;
367
368
  while (!streamDone) {
368
369
  const { done, value } = await reader.read();
369
- if (done) break;
370
- buffer += decoder.decode(value, { stream: true });
371
- const lines = buffer.split("\n");
372
- buffer = lines.pop() ?? "";
373
- for (const line of lines) {
374
- const trimmed = line.trim();
375
- if (!trimmed || !trimmed.startsWith("data:")) continue;
376
- const dataStr = trimmed.slice(5).trim();
370
+ buffer += decoder.decode(value, { stream: !done });
371
+ const frames = buffer.split(/(?:\r\n|\r(?!\n)|\n)(?:\r\n|\r(?!\n)|\n)/);
372
+ buffer = frames.pop() ?? "";
373
+ if (done) {
374
+ if (/[\r\n]$/.test(buffer)) frames.push(buffer);
375
+ streamDone = true;
376
+ }
377
+ for (const frame of frames) {
378
+ const dataStr = frame.split(/\r\n|\r|\n/).filter((line) => line.startsWith("data:")).map((line) => line.slice(5)).join("\n").trim();
379
+ if (!dataStr) continue;
377
380
  if (dataStr === "[DONE]") {
378
381
  streamDone = true;
379
382
  break;
@@ -381,8 +384,8 @@ async function runGoogleInteractionsLifecycle(params) {
381
384
  let event;
382
385
  try {
383
386
  event = asRecord(parseJsonPreservingUnsafeIntegers(dataStr));
384
- } catch {
385
- continue;
387
+ } catch (error) {
388
+ throw streamFragmentError(error);
386
389
  }
387
390
  const eventType = event.event_type || event.type;
388
391
  logGoogleInteractionsDebug("stream event", { eventType: typeof eventType === "string" ? eventType : "unknown" });
@@ -3,9 +3,11 @@ import { k as isImageWithMediaPayload, w as calculateCost } from "./host-DqhMLv8
3
3
  import { a as createEmptyTransportUsage, b as transportAbortError, j as sanitizeSurrogates, r as coerceTransportToolCallArguments, v as sanitizeTransportPayloadText } from "./transport-stream-shared-Dt7VrJFd.mjs";
4
4
  import { D as sortPromptCacheToolsByName, d as describeToolResultMediaPlaceholder, m as extractToolResultText } from "./simple-options-B9u6-CF3.mjs";
5
5
  import { t as notifyLlmRequestActivity } from "./llm-request-activity-BjtkplhG.mjs";
6
+ import { isGoogleGemini4Model } from "./internal/google-model-family.mjs";
6
7
  //#region packages/ai/src/transports/google-thinking-level.ts
7
- /** Returns whether a Gemini Flash model accepts the MINIMAL thinking level. */
8
+ /** Reports MINIMAL support for Gemini Flash and Gemini 4 models. */
8
9
  function googleFlashSupportsMinimalThinking(modelId) {
10
+ if (isGoogleGemini4Model(modelId)) return false;
9
11
  const match = modelId.toLowerCase().match(/(?:^|\/)gemini-3\.(\d+)-flash(?:-|$)/);
10
12
  if (!match) return true;
11
13
  return Number.parseInt(match[1] ?? "0", 10) < 7;
@@ -2,7 +2,8 @@ import { T as clampThinkingLevel } from "./host-DqhMLv8J.mjs";
2
2
  import { b as transportAbortError, c as failTransportStream, h as notifyProviderStreamOpened, j as sanitizeSurrogates } from "./transport-stream-shared-Dt7VrJFd.mjs";
3
3
  import { C as stripSystemPromptCacheBoundary } from "./simple-options-B9u6-CF3.mjs";
4
4
  import { t as transformProviderMessages } from "./provider-transcript-transform-Cg-36VSt.mjs";
5
- import { a as googleFlashSupportsMinimalThinking, i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, t as convertGoogleTools } from "./google-messages-C4ZiLG1P.mjs";
5
+ import { isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel } from "./internal/google-model-family.mjs";
6
+ import { a as googleFlashSupportsMinimalThinking, i as consumeGoogleGenerateContentStream, n as projectGoogleMessages, r as requiresGoogleToolCallId, t as convertGoogleTools } from "./google-messages-pvt0rKfN.mjs";
6
7
  import { FunctionCallingConfigMode, ThinkingLevel } from "@google/genai";
7
8
  //#region packages/ai/src/providers/google-shared.ts
8
9
  function convertMessages(model, context) {
@@ -10,7 +11,7 @@ function convertMessages(model, context) {
10
11
  model,
11
12
  messages: transformProviderMessages(context.messages, model, (id) => requiresGoogleToolCallId(model.id) ? id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64) : id),
12
13
  replay: "signed-parts",
13
- requiresToolCallSignature: model.provider !== "google-gemini-cli" && (isGemini3ProModel(model) || isGemini3FlashModel(model))
14
+ requiresToolCallSignature: model.provider !== "google-gemini-cli" && isGoogleGemini3ThinkingLevelModel(model.id)
14
15
  });
15
16
  }
16
17
  /**
@@ -99,7 +100,7 @@ function buildGoogleSimpleThinking(model, options) {
99
100
  enabled: true,
100
101
  level: ThinkingLevel.HIGH
101
102
  };
102
- return isGemini3ProModel(model) || isGemini3FlashModel(model) ? { enabled: true } : {
103
+ return isGoogleGemini3ThinkingLevelModel(model.id) ? { enabled: true } : {
103
104
  enabled: true,
104
105
  budgetTokens: -1
105
106
  };
@@ -107,7 +108,7 @@ function buildGoogleSimpleThinking(model, options) {
107
108
  const clampedReasoning = clampThinkingLevel(model, options.reasoning);
108
109
  if (clampedReasoning === "off") return { enabled: false };
109
110
  const effort = clampedReasoning === "max" ? "high" : clampedReasoning;
110
- if (isGemini3ProModel(model) || isGemini3FlashModel(model) || isGemma4Model(model)) return {
111
+ if (isGoogleGemini3ThinkingLevelModel(model.id) || isGemma4Model(model)) return {
111
112
  enabled: true,
112
113
  level: getGoogleThinkingLevel(effort, model)
113
114
  };
@@ -139,8 +140,8 @@ function buildGoogleInteractionsSimpleThinking(model, options) {
139
140
  };
140
141
  }
141
142
  function getDisabledGoogleThinkingConfig(model) {
142
- if (isGemini3ProModel(model)) return { thinkingLevel: ThinkingLevel.LOW };
143
- if (isGemini3FlashModel(model)) return { thinkingLevel: googleFlashSupportsMinimalThinking(model.id) ? ThinkingLevel.MINIMAL : ThinkingLevel.LOW };
143
+ if (isGoogleGemini3ProModel(model.id)) return { thinkingLevel: ThinkingLevel.LOW };
144
+ if (isGoogleGemini3ThinkingLevelModel(model.id)) return { thinkingLevel: googleFlashSupportsMinimalThinking(model.id) ? ThinkingLevel.MINIMAL : ThinkingLevel.LOW };
144
145
  if (isGemma4Model(model) || model.id.toLowerCase().includes("gemini-2.5-pro")) return {};
145
146
  return { thinkingBudget: 0 };
146
147
  }
@@ -148,18 +149,12 @@ function getDisabledGoogleThinkingConfig(model) {
148
149
  function isGemma4Model(model) {
149
150
  return /gemma-?4/.test(model.id.toLowerCase());
150
151
  }
151
- function isGemini3ProModel(model) {
152
- return /gemini-(?:3(?:\.\d+)?-pro|pro-latest)/.test(model.id.toLowerCase());
153
- }
154
- function isGemini3FlashModel(model) {
155
- return /gemini-(?:3(?:\.\d+)?-flash|flash(?:-lite)?-latest)/.test(model.id.toLowerCase());
156
- }
157
152
  function getGoogleThinkingLevel(effort, model) {
158
153
  const lowEffort = effort === "minimal" || effort === "low";
159
- if (isGemini3ProModel(model)) return lowEffort ? ThinkingLevel.LOW : ThinkingLevel.HIGH;
154
+ if (isGoogleGemini3ProModel(model.id)) return lowEffort ? ThinkingLevel.LOW : ThinkingLevel.HIGH;
160
155
  if (isGemma4Model(model)) return lowEffort ? ThinkingLevel.MINIMAL : ThinkingLevel.HIGH;
161
156
  switch (effort) {
162
- case "minimal": return isGemini3FlashModel(model) && !googleFlashSupportsMinimalThinking(model.id) ? ThinkingLevel.LOW : ThinkingLevel.MINIMAL;
157
+ case "minimal": return googleFlashSupportsMinimalThinking(model.id) ? ThinkingLevel.MINIMAL : ThinkingLevel.LOW;
163
158
  case "low": return ThinkingLevel.LOW;
164
159
  case "medium": return ThinkingLevel.MEDIUM;
165
160
  case "high": return ThinkingLevel.HIGH;
@@ -3,7 +3,7 @@ import { n as getAiTransportHost, r as resolveAiTransportHeaderSentinels } from
3
3
  import { a as normalizeOptionalString } from "./string-coerce-fsri9iCu.mjs";
4
4
  import { n as buildBaseOptions } from "./simple-options-B9u6-CF3.mjs";
5
5
  import { n as createAssistantOutput } from "./provider-transcript-transform-Cg-36VSt.mjs";
6
- import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-6u4WCDyl.mjs";
6
+ import { i as runGoogleGenerateContentLifecycle, r as buildGoogleSimpleThinking, t as buildGoogleGenerateContentParams } from "./google-shared-DPeR7LLA.mjs";
7
7
  import { GoogleGenAI, ResourceScope } from "@google/genai";
8
8
  //#region packages/ai/src/providers/google-vertex.ts
9
9
  const API_VERSION = "v1";
@@ -1,6 +1,6 @@
1
- import "./index-DHeFfpcz.mjs";
2
- import { O as Model, d as Context, n as Api, q as StreamFn } from "./types-CLLR3eB4.mjs";
3
- import { n as ApiRegistry } from "./api-registry-pGjnPg1z.mjs";
1
+ import "./index-Iw8l620S.mjs";
2
+ import { O as Model, d as Context, n as Api, q as StreamFn } from "./types-B89w6ly2.mjs";
3
+ import { n as ApiRegistry } from "./api-registry-BLbq15N5.mjs";
4
4
  //#region packages/ai/src/host.d.ts
5
5
  /** Provider capability facts needed by the package-owned transports. */
6
6
  interface AiProviderRequestCapabilities {
@@ -1,6 +1,6 @@
1
- import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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";
2
- import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DOPFYVqs.mjs";
3
- import { n as validateToolCall, t as validateToolArguments } from "./validation-Cat2wQsc.mjs";
1
+ import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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-B89w6ly2.mjs";
2
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CiaHxSK0.mjs";
3
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-DblQWSRA.mjs";
4
4
  //#region packages/llm-core/src/model-contracts/anthropic.d.ts
5
5
  type ClaudeModelRef = {
6
6
  id?: string;
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
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
- import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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
- import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-DOPFYVqs.mjs";
4
- import { n as validateToolCall, t as validateToolArguments } from "./validation-Cat2wQsc.mjs";
5
- import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-pGjnPg1z.mjs";
6
- import { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-COwfRiSL.mjs";
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-Iw8l620S.mjs";
2
+ import { $ as ThinkingContent, A as ModelCostRates, B as ProviderReplayState, C as KnownImagesApi, D as Message, E as MaybePromise, F as PROVIDER_FAILURE_WITH_OUTPUT_ERROR_CODE, G as SimpleStreamOptions, H as ProviderStreamOptions, I as PROVIDER_POST_DISPATCH_AMBIGUITY_ERROR_CODE, J as StreamFunction, K as StopReason, L as PricingTier, M as OpenAICompletionsCompat, N as OpenAIResponsesCompat, O as Model, 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, d as Context, 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-B89w6ly2.mjs";
3
+ import { n as EventStream, r as createAssistantMessageEventStream, t as AssistantMessageEventStream } from "./event-stream-CiaHxSK0.mjs";
4
+ import { n as validateToolCall, t as validateToolArguments } from "./validation-DblQWSRA.mjs";
5
+ import { a as RegisteredApiProvider, i as ApiStreamSimpleFunction, n as ApiRegistry, o as createApiRegistry, r as ApiStreamFunction, t as ApiProvider } from "./api-registry-BLbq15N5.mjs";
6
+ import { a as AiProviderRequestPolicyInput, c as AiTransportHost, d as configureAiTransportHost, f as getAiTransportHost, i as AiProviderRequestCapabilities, l as AiTransportPluginHost, n as AiInlineImageBlock, o as AiProviderStreamHookContext, p as resolveAiTransportHeaderSentinels, r as AiInlineTextBlock, s as AiTransformTransportMessages, t as AiInlineContentBlock, u as OpenAIStrictToolSettingOptions } from "./host-BhpDO5Sy.mjs";
7
7
  //#region packages/ai/src/stream.d.ts
8
8
  /** Creates an isolated LLM runtime backed by the supplied provider registry. */
9
9
  export declare function createLlmRuntime(registry?: ApiRegistry): {
@@ -1,8 +1,8 @@
1
- import { A as supportsClaudeNativeXhighEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, b as resolveClaudeMythos5ModelIdentity, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, k as supportsClaudeNativeMaxEffort, m as requiresClaudeBetweenToolsThinking, p as bindsClaudeThinkingPrefix, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "../index-DHeFfpcz.mjs";
2
- import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context, ot as Usage, ut as AssistantMessageDiagnostic } from "../types-CLLR3eB4.mjs";
3
- import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-yDbWMoEr.mjs";
4
- import "../types-CoL-LJ7j.mjs";
5
- import { p as resolveAnthropicServerCompactionPlan } from "../anthropic-payload-policy-BVcxWtQD.mjs";
1
+ import { A as supportsClaudeNativeXhighEffort, C as resolveClaudeOpus5ModelIdentity, D as supportsClaudeAdaptiveThinking, S as resolveClaudeOpus55ModelIdentity, T as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeFable5ModelIdentity, b as resolveClaudeMythos5ModelIdentity, g as requiresClaudeMandatoryAdaptiveThinking, h as requiresClaudeDefaultSampling, k as supportsClaudeNativeMaxEffort, m as requiresClaudeBetweenToolsThinking, p as bindsClaudeThinkingPrefix, v as resolveClaudeHaiku55ModelIdentity, w as resolveClaudeSonnet55ModelIdentity, x as resolveClaudeNativeThinkingLevelMap, y as resolveClaudeModelIdentity } from "../index-Iw8l620S.mjs";
2
+ import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context, ot as Usage, ut as AssistantMessageDiagnostic } from "../types-B89w6ly2.mjs";
3
+ import { i as AnthropicThinkingDisplay, n as AnthropicEffort, r as AnthropicOptions, t as AnthropicContextManagementOptions } from "../provider-options-CFiaIG4K.mjs";
4
+ import "../types-DbmNRKvK.mjs";
5
+ import { p as resolveAnthropicServerCompactionPlan } from "../anthropic-payload-policy-CFbalbbU.mjs";
6
6
  import { Tool } from "@anthropic-ai/sdk/resources/messages.js";
7
7
  //#region packages/ai/src/providers/anthropic.d.ts
8
8
  type AnthropicCompactionOptions = AnthropicOptions & {
@@ -1,5 +1,5 @@
1
1
  import { D as supportsClaudeNativeXhighEffort, E as supportsClaudeNativeMaxEffort, S as resolveClaudeSonnet5ModelIdentity, _ as resolveClaudeMythos5ModelIdentity, b as resolveClaudeOpus5ModelIdentity, d as requiresClaudeBetweenToolsThinking, f as requiresClaudeDefaultSampling, g as resolveClaudeModelIdentity, h as resolveClaudeHaiku55ModelIdentity, m as resolveClaudeFable5ModelIdentity, p as requiresClaudeMandatoryAdaptiveThinking, u as bindsClaudeThinkingPrefix, v as resolveClaudeNativeThinkingLevelMap, w as supportsClaudeAdaptiveThinking, x as resolveClaudeSonnet55ModelIdentity, y as resolveClaudeOpus55ModelIdentity } from "../src-Dq6VRdeL.mjs";
2
2
  import { _ as requiresClaudeAdaptiveThinking, b as usesClaudeFable5MessagesContract, d as ANTHROPIC_CLAUDE_CODE_VERSION, f as applyClaudeRequestContract, g as prepareClaudeNoPrefillRequestContext, h as mapAnthropicStopReason, m as defaultsClaudeAdaptiveThinking, p as buildAnthropicClaudeCodeIdentity, v as resolveAnthropicThinkingEffort, x as usesClaudeStreamingRefusalContract, y as resolveModelBoundThinkingReplayMode } from "../host-DqhMLv8J.mjs";
3
- import { B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, E as readAnthropicInputTransformations, G as resolveAnthropicFallbackServingModelCost, H as CLAUDE_OPUS_FALLBACK_MODEL_COST, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, S as ANTHROPIC_OMITTED_REASONING_TEXT, T as logAnthropicThinkingDrops, U as applyAnthropicFallbackBoundary, V as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, W as readAnthropicFallbackBoundary, _ as normalizeAnthropicToolChoice, a as readAnthropicPromptUsageSnapshot, b as resolveOriginalAnthropicToolName, c as applyAnthropicRefusal, g as normalizeAnthropicToolCallId, i as readAnthropicCacheWriteUsage, n as applyAnthropicMessageDeltaUsage, o as readAnthropicUsageTokenCount, q as omitFoundryBearerCredentialHeaders, r as applyAnthropicMessageStartUsage, s as readLastAnthropicIterationUsage, v as projectAnthropicTools, w as findActiveAnthropicToolTurnAssistantIndex, x as toClaudeCodeToolName, y as reconcileAnthropicToolChoice, z as resolveAnthropicServerCompactionPlan } from "../anthropic-stream-reducer-Cis7c1sm.mjs";
4
- import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-a0uD7NUz.mjs";
3
+ import { B as ANTHROPIC_SERVER_SIDE_FALLBACKS, C as applyAnthropicThinkingBindingControls, E as readAnthropicInputTransformations, G as resolveAnthropicFallbackServingModelCost, H as CLAUDE_OPUS_FALLBACK_MODEL_COST, J as usesFoundryBearerAuth, K as isAnthropicOAuthApiKey, S as ANTHROPIC_OMITTED_REASONING_TEXT, T as logAnthropicThinkingDrops, U as applyAnthropicFallbackBoundary, V as ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, W as readAnthropicFallbackBoundary, _ as normalizeAnthropicToolChoice, a as readAnthropicPromptUsageSnapshot, b as resolveOriginalAnthropicToolName, c as applyAnthropicRefusal, g as normalizeAnthropicToolCallId, i as readAnthropicCacheWriteUsage, n as applyAnthropicMessageDeltaUsage, o as readAnthropicUsageTokenCount, q as omitFoundryBearerCredentialHeaders, r as applyAnthropicMessageStartUsage, s as readLastAnthropicIterationUsage, v as projectAnthropicTools, w as findActiveAnthropicToolTurnAssistantIndex, x as toClaudeCodeToolName, y as reconcileAnthropicToolChoice, z as resolveAnthropicServerCompactionPlan } from "../anthropic-stream-reducer-XCL_L8KJ.mjs";
4
+ import { n as streamAnthropic, r as streamSimpleAnthropic } from "../anthropic-BL3z3SiB.mjs";
5
5
  export { ANTHROPIC_CLAUDE_CODE_VERSION, ANTHROPIC_OMITTED_REASONING_TEXT, ANTHROPIC_SERVER_SIDE_FALLBACKS, ANTHROPIC_SERVER_SIDE_FALLBACK_BETA, CLAUDE_OPUS_FALLBACK_MODEL_COST, applyAnthropicFallbackBoundary, applyAnthropicMessageDeltaUsage, applyAnthropicMessageStartUsage, applyAnthropicRefusal, applyAnthropicThinkingBindingControls, applyClaudeRequestContract, bindsClaudeThinkingPrefix, buildAnthropicClaudeCodeIdentity, defaultsClaudeAdaptiveThinking, findActiveAnthropicToolTurnAssistantIndex, isAnthropicOAuthApiKey, logAnthropicThinkingDrops, mapAnthropicStopReason, normalizeAnthropicToolCallId, normalizeAnthropicToolChoice, omitFoundryBearerCredentialHeaders, prepareClaudeNoPrefillRequestContext, projectAnthropicTools, readAnthropicCacheWriteUsage, readAnthropicFallbackBoundary, readAnthropicInputTransformations, readAnthropicPromptUsageSnapshot, readAnthropicUsageTokenCount, readLastAnthropicIterationUsage, reconcileAnthropicToolChoice, requiresClaudeAdaptiveThinking, requiresClaudeBetweenToolsThinking, requiresClaudeDefaultSampling, requiresClaudeMandatoryAdaptiveThinking, resolveAnthropicFallbackServingModelCost, resolveAnthropicServerCompactionPlan, resolveAnthropicThinkingEffort, resolveClaudeFable5ModelIdentity, resolveClaudeHaiku55ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeNativeThinkingLevelMap, resolveClaudeOpus55ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet55ModelIdentity, resolveClaudeSonnet5ModelIdentity, resolveModelBoundThinkingReplayMode, resolveOriginalAnthropicToolName, streamAnthropic, streamSimpleAnthropic, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort, toClaudeCodeToolName, usesClaudeFable5MessagesContract, usesClaudeStreamingRefusalContract, usesFoundryBearerAuth };
@@ -0,0 +1,2 @@
1
+ import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-BR0MUYYD.mjs";
2
+ export { findEnvKeys, getEnvApiKey };
@@ -0,0 +1,2 @@
1
+ import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-CyX4VKGO.mjs";
2
+ export { findEnvKeys, getEnvApiKey };
@@ -1,5 +1,7 @@
1
1
  //#region packages/ai/src/internal/google-model-family.d.ts
2
2
  export declare function isGoogleGemini3ProModel(modelId: string): boolean;
3
3
  export declare function isGoogleGemini3FlashModel(modelId: string): boolean;
4
+ export declare function isGoogleGemini4Model(modelId: string): boolean;
5
+ /** Identifies thinkingLevel-family Gemini models (3.x and 4). */
4
6
  export declare function isGoogleGemini3ThinkingLevelModel(modelId: string): boolean;
5
7
  //#endregion
@@ -8,8 +8,12 @@ function isGoogleGemini3FlashModel(modelId) {
8
8
  const normalized = normalizeLowercaseStringOrEmpty(modelId);
9
9
  return /(?:^|\/)gemini-(?:3(?:\.\d+)?-flash|flash(?:-lite)?-latest)(?:-|$)/.test(normalized);
10
10
  }
11
+ function isGoogleGemini4Model(modelId) {
12
+ return /(?:^|\/)gemini-4(?:[-.]|$)/.test(normalizeLowercaseStringOrEmpty(modelId));
13
+ }
14
+ /** Identifies thinkingLevel-family Gemini models (3.x and 4). */
11
15
  function isGoogleGemini3ThinkingLevelModel(modelId) {
12
- return isGoogleGemini3ProModel(modelId) || isGoogleGemini3FlashModel(modelId);
16
+ return isGoogleGemini3ProModel(modelId) || isGoogleGemini3FlashModel(modelId) || isGoogleGemini4Model(modelId);
13
17
  }
14
18
  //#endregion
15
- export { isGoogleGemini3FlashModel, isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel };
19
+ export { isGoogleGemini3FlashModel, isGoogleGemini3ProModel, isGoogleGemini3ThinkingLevelModel, isGoogleGemini4Model };
@@ -1,2 +1,2 @@
1
- import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-CqWP1fn5.mjs";
1
+ import { a as resolveOpenAICompletionsCompat } from "../openai-completions-compat-CQbGsPt0.mjs";
2
2
  export { resolveOpenAICompletionsCompat };
@@ -1,3 +1,3 @@
1
- import { c as readOpenAIResponsesCompactionWindow, s as OpenAIResponsesCompactionOutput, t as OPENAI_RESPONSES_APIS } from "../openai-responses-contracts-C2H8pffb.mjs";
1
+ import { c as readOpenAIResponsesCompactionWindow, s as OpenAIResponsesCompactionOutput, t as OPENAI_RESPONSES_APIS } from "../openai-responses-contracts-CYScOS7J.mjs";
2
2
  import { i as resolveOpenAIResponsesServerCompactionPlan, r as resolveOpenAIResponsesPayloadPolicy } from "../openai-responses-payload-policy-C7GsA1y0.mjs";
3
3
  export { OPENAI_RESPONSES_APIS, type OpenAIResponsesCompactionOutput, readOpenAIResponsesCompactionWindow, resolveOpenAIResponsesPayloadPolicy, resolveOpenAIResponsesServerCompactionPlan };
@@ -1,13 +1,13 @@
1
- import "../index-DHeFfpcz.mjs";
2
- import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context } from "../types-CLLR3eB4.mjs";
3
- import { C as supportsOpenAITemperature, S as supportsOpenAIReasoningEffort, _ as normalizeOpenAIReasoningEffort, a as BaseOpenAIStreamOptions, b as resolveOpenAIReasoningEffortMapping, d as OpenAIApiReasoningEffort, f as OpenAIReasoningEffort, g as isOpenAIGpt6Model, h as isOpenAIGpt56Model, l as codeModeToolSurfaceObserver, m as isOpenAIGpt55Model, o as CodeModeToolSurfaceObservation, p as isOpenAIGpt54MiniModel, s as OpenAICompletionsOptions, u as reasoningTagTextPolicy, v as resolveOpenAIModelReasoningEfforts, x as resolveOpenAISupportedReasoningEfforts, y as resolveOpenAIReasoningEffortForModel } from "../provider-options-yDbWMoEr.mjs";
1
+ import "../index-Iw8l620S.mjs";
2
+ import { G as SimpleStreamOptions, J as StreamFunction, K as StopReason, O as Model, d as Context } from "../types-B89w6ly2.mjs";
3
+ import { C as supportsOpenAITemperature, S as supportsOpenAIReasoningEffort, _ as normalizeOpenAIReasoningEffort, a as BaseOpenAIStreamOptions, b as resolveOpenAIReasoningEffortMapping, d as OpenAIApiReasoningEffort, f as OpenAIReasoningEffort, g as isOpenAIGpt6Model, h as isOpenAIGpt56Model, l as codeModeToolSurfaceObserver, m as isOpenAIGpt55Model, o as CodeModeToolSurfaceObservation, p as isOpenAIGpt54MiniModel, s as OpenAICompletionsOptions, u as reasoningTagTextPolicy, v as resolveOpenAIModelReasoningEfforts, x as resolveOpenAISupportedReasoningEfforts, y as resolveOpenAIReasoningEffortForModel } from "../provider-options-CFiaIG4K.mjs";
4
4
  import { a as reconcileOpenAIResponsesToolChoice, i as reconcileOpenAICompletionsToolChoice, n as OpenAIToolProjection, r as projectOpenAITools, t as OpenAICompletionsToolChoice } from "../openai-tool-projection-793cE3QX.mjs";
5
- import "../types-CoL-LJ7j.mjs";
6
- import { t as ResolvedOpenAICompletionsCompat } from "../openai-completions-compat-CqWP1fn5.mjs";
7
- import { a as ResponsesPromptObservation, l as OpenAIRequestReasoningEffort, o as responsesPromptObserver } from "../openai-responses-contracts-C2H8pffb.mjs";
8
- import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-YTmJ_iMS.mjs";
9
- import { a as resolveResponsesTerminalStopReason, i as readResponsesReasoningTokens, n as isResponsesOutputLimitToolCallError, r as mapResponsesTerminalUsage, t as ResponsesTerminalUsagePayload } from "../openai-responses-terminal-usage-D0WZQlIF.mjs";
10
- import "../openai-responses-compaction-replay-CQHR2isp.mjs";
5
+ import "../types-DbmNRKvK.mjs";
6
+ import { t as ResolvedOpenAICompletionsCompat } from "../openai-completions-compat-CQbGsPt0.mjs";
7
+ import { a as ResponsesPromptObservation, l as OpenAIRequestReasoningEffort, o as responsesPromptObserver } from "../openai-responses-contracts-CYScOS7J.mjs";
8
+ import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-CuY5QDIc.mjs";
9
+ import { a as resolveResponsesTerminalStopReason, i as readResponsesReasoningTokens, n as isResponsesOutputLimitToolCallError, r as mapResponsesTerminalUsage, t as ResponsesTerminalUsagePayload } from "../openai-responses-terminal-usage-CLzeNWqW.mjs";
10
+ import "../openai-responses-compaction-replay-DiGjwK4d.mjs";
11
11
  import { ResponseCreateParamsStreaming, ResponseInputItem } from "openai/resources/responses/responses.js";
12
12
  import { ChatCompletionMessageParam } from "openai/resources/chat/completions.js";
13
13
  //#region packages/ai/src/providers/azure-deployment-map.d.ts
@@ -2,13 +2,13 @@ import { a as normalizeOpenAIReasoningEffort, c as resolveOpenAIReasoningEffortM
2
2
  import { n as clampOpenAIPromptCacheKey, r as resolveOpenAIPromptCacheParams, t as OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH } from "../openai-prompt-cache-DHxMpeRz.mjs";
3
3
  import { g as resolveResponsesTerminalStopReason, h as readResponsesReasoningTokens, m as mapResponsesTerminalUsage, p as isResponsesOutputLimitToolCallError } from "../diagnostics-CJaB6g8J.mjs";
4
4
  import { a as encodedModelRequestBodyStream, c as serializeModelRequestBody, l as codeModeToolSurfaceObserver, o as modelRequestBodyState, u as reasoningTagTextPolicy } from "../simple-options-B9u6-CF3.mjs";
5
- import { f as projectOpenAITools, m as reconcileOpenAIResponsesToolChoice, p as reconcileOpenAICompletionsToolChoice } from "../openai-transport-params-C4eZAXf2.mjs";
6
- import { a as convertMessages } from "../openai-completions-stream-BrsoGafc.mjs";
5
+ import { f as projectOpenAITools, m as reconcileOpenAIResponsesToolChoice, p as reconcileOpenAICompletionsToolChoice } from "../openai-transport-params-CqLxK93q.mjs";
6
+ import { a as convertMessages } from "../openai-completions-stream-iagLwGz6.mjs";
7
7
  import { h as responsesPromptObserver } from "../openai-responses-contracts-CLxnqS9p.mjs";
8
8
  import { t as mapOpenAIStopReason } from "../openai-stop-reason-8s70vDXj.mjs";
9
- import { M as bindResponsesInputMessage, _ as isResponsesTextContentPartType, d as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, f as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, g as isAzureResponsesTextDeltaEventType, h as isAzureResponsesTextDeltaEvent, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, p as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextDeltaEventType, y as resolveResponsesMessageSnapshotCollapse } from "../openai-responses-shared-BpGnmnV8.mjs";
9
+ import { M as bindResponsesInputMessage, _ as isResponsesTextContentPartType, d as AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, f as AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, g as isAzureResponsesTextDeltaEventType, h as isAzureResponsesTextDeltaEvent, l as createResponsesToolCallTracker, m as OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, p as OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, u as readResponsesToolCallItemIdentity, v as isResponsesTextDeltaEventType, y as resolveResponsesMessageSnapshotCollapse } from "../openai-responses-shared-BUaK4Pb3.mjs";
10
10
  import { i as resolveAzureDeploymentNameFromMap, n as isTraditionalAzureOpenAIHost, r as parseAzureDeploymentNameMap, t as isOpenAICompatibleAzureResponsesBaseUrl } from "../azure-openai-responses-client-compat-C7K7QfUE.mjs";
11
11
  import { t as responsesRequestLifecycle } from "../openai-responses-request-lifecycle-Fsag-IGZ.mjs";
12
- import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-gyTpI3xG.mjs";
13
- import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-DluFZzn_.mjs";
12
+ import { n as streamOpenAICompletions, r as streamSimpleOpenAICompletions } from "../openai-completions-D0f28olp.mjs";
13
+ import { n as streamOpenAIResponses, r as streamSimpleOpenAIResponses } from "../openai-responses-D2ElJYAb.mjs";
14
14
  export { AZURE_RESPONSES_TEXT_CONTENT_PART_TYPE, AZURE_RESPONSES_TEXT_DELTA_EVENT_TYPE, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH, OPENAI_RESPONSES_OUTPUT_TEXT_CONTENT_PART_TYPE, OPENAI_RESPONSES_OUTPUT_TEXT_DELTA_EVENT_TYPE, bindResponsesInputMessage, clampOpenAIPromptCacheKey, codeModeToolSurfaceObserver, convertMessages, createResponsesToolCallTracker, encodedModelRequestBodyStream, isAzureResponsesTextDeltaEvent, isAzureResponsesTextDeltaEventType, isOpenAICompatibleAzureResponsesBaseUrl, isOpenAIGpt54MiniModel, isOpenAIGpt55Model, isOpenAIGpt56Model, isOpenAIGpt6Model, isResponsesOutputLimitToolCallError, isResponsesTextContentPartType, isResponsesTextDeltaEventType, isTraditionalAzureOpenAIHost, mapOpenAIStopReason, mapResponsesTerminalUsage, modelRequestBodyState, normalizeOpenAIReasoningEffort, parseAzureDeploymentNameMap, projectOpenAITools, readResponsesReasoningTokens, readResponsesToolCallItemIdentity, reasoningTagTextPolicy, reconcileOpenAICompletionsToolChoice, reconcileOpenAIResponsesToolChoice, resolveAzureDeploymentNameFromMap, resolveOpenAIModelReasoningEfforts, resolveOpenAIPromptCacheParams, resolveOpenAIReasoningEffortForModel, resolveOpenAIReasoningEffortMapping, resolveOpenAISupportedReasoningEfforts, resolveResponsesMessageSnapshotCollapse, resolveResponsesTerminalStopReason, responsesPromptObserver, responsesRequestLifecycle, serializeModelRequestBody, streamOpenAICompletions, streamOpenAIResponses, streamSimpleOpenAICompletions, streamSimpleOpenAIResponses, supportsOpenAIReasoningEffort, supportsOpenAITemperature };
@@ -1,10 +1,11 @@
1
- import "../index-DHeFfpcz.mjs";
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
- import { i as getEventStreamCompletion } from "../event-stream-DOPFYVqs.mjs";
4
- import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-pGjnPg1z.mjs";
5
- import "../types-CoL-LJ7j.mjs";
1
+ import "../index-Iw8l620S.mjs";
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-B89w6ly2.mjs";
3
+ import { i as getEventStreamCompletion } from "../event-stream-CiaHxSK0.mjs";
4
+ import { a as RegisteredApiProvider, t as ApiProvider } from "../api-registry-BLbq15N5.mjs";
5
+ import "../types-DbmNRKvK.mjs";
6
+ import { n as getEnvApiKey, t as findEnvKeys } from "../env-api-keys-BR0MUYYD.mjs";
6
7
  import { t as sanitizeSurrogates } from "../sanitize-unicode-BZiVbGwK.mjs";
7
- import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-CYLM2HEK.mjs";
8
+ import { v as parseTerminalToolCallArguments } from "../transport-stream-shared-B_REuIea.mjs";
8
9
  //#region packages/ai/src/internal/default-runtime.d.ts
9
10
  export declare const defaultApiRegistry: {
10
11
  registerApiProvider: <TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, sourceId?: string) => void;
@@ -48,22 +49,6 @@ declare const { stream, complete, streamSimple, completeSimple }: {
48
49
  completeSimple: <TApi extends Api>(model: Model<TApi>, context: Context, options?: SimpleStreamOptions) => Promise<AssistantMessage>;
49
50
  };
50
51
  //#endregion
51
- //#region packages/ai/src/env-api-keys.d.ts
52
- /**
53
- * Find configured environment variables that can provide an API key for a provider.
54
- *
55
- * This only reports actual API key variables. It intentionally excludes ambient
56
- * credential sources such as AWS profiles, AWS IAM credentials, and Google
57
- * Application Default Credentials.
58
- */
59
- export declare function findEnvKeys(provider: string): string[] | undefined;
60
- /**
61
- * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.
62
- *
63
- * Will not return API keys for providers that require OAuth tokens.
64
- */
65
- export declare function getEnvApiKey(provider: string): string | undefined;
66
- //#endregion
67
52
  //#region packages/ai/src/model-utils.d.ts
68
53
  /** Calculates and stores model cost fields from token usage and per-million pricing. */
69
54
  export declare function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage): Usage["cost"];
@@ -241,4 +226,4 @@ export type SseByteGuard = {
241
226
  };
242
227
  export declare function createSseByteGuard(reader: ReadableStreamDefaultReader<Uint8Array>, opts: ReadSseStreamWithLimitOptions): SseByteGuard;
243
228
  //#endregion
244
- export { type ReasoningTagTextDelta, type ReasoningTagTextPartitioner, complete, completeSimple, getApiProvider, getApiProviders, getEventStreamCompletion, parseTerminalToolCallArguments, sanitizeSurrogates, stream, streamSimple };
229
+ export { type ReasoningTagTextDelta, type ReasoningTagTextPartitioner, complete, completeSimple, findEnvKeys, getApiProvider, getApiProviders, getEnvApiKey, getEventStreamCompletion, parseTerminalToolCallArguments, sanitizeSurrogates, stream, streamSimple };
@@ -1,6 +1,6 @@
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
- import { a as readAssistantThinkingAppend } from "../event-stream-DOPFYVqs.mjs";
3
- import "../types-CoL-LJ7j.mjs";
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-B89w6ly2.mjs";
2
+ import { a as readAssistantThinkingAppend } from "../event-stream-CiaHxSK0.mjs";
3
+ import "../types-DbmNRKvK.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";
@@ -1,3 +1,3 @@
1
1
  import { n as projectRuntimeToolInputSchema } from "../tool-schema-json-projection-Ct8SeBeJ.mjs";
2
- import { _ as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, a as resolveOpenAIProjectedToolsStrictToolFlag, c as extractToolSchemaModelCompat, d as shouldOmitEmptyArrayItems, g as findLlamacppGbnfSchemaViolations, h as cleanSchemaForLlamacppGbnf, i as normalizeStrictOpenAIJsonSchema, l as normalizeToolParameterSchema, m as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, n as isStrictOpenAIJsonSchemaCompatible, o as findOpenAIStrictSchemaViolations, p as stripUnsupportedSchemaKeywords, r as normalizeOpenAIStrictToolParameters, s as normalizeOpenAIStrictCompatSchema, t as findOpenAIStrictToolProjectionDiagnostics, u as resolveUnsupportedToolSchemaKeywords, v as cleanSchemaForGemini } from "../openai-tool-schema-vsl-cE-n.mjs";
2
+ import { _ as GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, a as resolveOpenAIProjectedToolsStrictToolFlag, c as extractToolSchemaModelCompat, d as shouldOmitEmptyArrayItems, g as findLlamacppGbnfSchemaViolations, h as cleanSchemaForLlamacppGbnf, i as normalizeStrictOpenAIJsonSchema, l as normalizeToolParameterSchema, m as LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, n as isStrictOpenAIJsonSchemaCompatible, o as findOpenAIStrictSchemaViolations, p as stripUnsupportedSchemaKeywords, r as normalizeOpenAIStrictToolParameters, s as normalizeOpenAIStrictCompatSchema, t as findOpenAIStrictToolProjectionDiagnostics, u as resolveUnsupportedToolSchemaKeywords, v as cleanSchemaForGemini } from "../openai-tool-schema-DSAxYnHW.mjs";
3
3
  export { GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS, LLAMACPP_GBNF_MAX_REPETITION_THRESHOLD, cleanSchemaForGemini, cleanSchemaForLlamacppGbnf, extractToolSchemaModelCompat, findLlamacppGbnfSchemaViolations, findOpenAIStrictSchemaViolations, findOpenAIStrictToolProjectionDiagnostics, isStrictOpenAIJsonSchemaCompatible, normalizeOpenAIStrictCompatSchema, normalizeOpenAIStrictToolParameters, normalizeStrictOpenAIJsonSchema, normalizeToolParameterSchema, projectRuntimeToolInputSchema, resolveOpenAIProjectedToolsStrictToolFlag, resolveUnsupportedToolSchemaKeywords, shouldOmitEmptyArrayItems, stripUnsupportedSchemaKeywords };