@kenkaiiii/gg-ai 5.93.0 → 5.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -253,26 +253,18 @@ interface StreamOptions {
253
253
  /** OpenAI service tier for latency-sensitive requests. Only sent to first-party OpenAI API calls. */
254
254
  serviceTier?: "auto" | "default" | "flex" | "priority";
255
255
  /** Provider speed tier. "fast" sends Anthropic `speed: "fast"` (first-party API
256
- * only) or OpenAI/Codex `service_tier: "priority"`. Set automatically by
256
+ * only) or OpenAI `service_tier: "priority"`. Set automatically by
257
257
  * `stream()` for fast-mode model ids (see `resolveFastModeModel`). */
258
258
  speed?: "standard" | "fast";
259
- /** Codex endpoint only: send the Responses-Lite request shape (lite header,
260
- * `parallel_tool_calls: false`, all-turns reasoning context). Unset follows
261
- * the model family (on for gpt-5.6/gpt-6 models). Lite allows only one tool
262
- * call per response, so turning it off lets the model batch calls. */
263
- responsesLite?: boolean;
264
- /** OpenAI only (Codex and API-key routes): send tools with strict
259
+ /** OpenAI only (ChatGPT plan and API-key routes): send tools with strict
265
260
  * (grammar-constrained) schemas. Default true. Strict calls carry every
266
261
  * optional field as null, which costs output tokens and latency per call. */
267
262
  strictTools?: boolean;
268
- /** OpenAI ChatGPT account ID (from OAuth JWT) for codex endpoint */
263
+ /** ChatGPT plan sign-in: the account subject. Set, it routes OpenAI to the plan. */
269
264
  accountId?: string;
270
- /** Stable conversation identity for Codex transport headers. This is distinct from
271
- * promptCacheKey: sessions with matching prefixes may share a cache key, but must
272
- * retain independent session/thread identities. */
265
+ /** Stable conversation identity, distinct from promptCacheKey: sessions with
266
+ * matching prefixes may share a cache key but keep independent identities. */
273
267
  transportSessionId?: string;
274
- /** Google Cloud/Code Assist project ID used by Gemini OAuth transport. */
275
- projectId?: string;
276
268
  /** Enable provider-native web search. Each provider uses its own format:
277
269
  * - Anthropic: server tool `web_search_20250305`
278
270
  * - Moonshot: `builtin_function` `$web_search`
@@ -315,16 +307,8 @@ interface StreamOptions {
315
307
  * budget_tokens < max_tokens), no request is sent and the response has
316
308
  * zero usage with stopReason "end_turn". */
317
309
  prewarm?: boolean;
318
- /** Override the User-Agent sent with OAuth-authenticated Anthropic requests.
319
- * Anthropic's OAuth edge rejects requests whose claude-cli version lags too
320
- * far behind the real Claude Code release; callers that track the live
321
- * version should pass it here. Ignored for non-Anthropic providers and for
322
- * Anthropic requests using a regular API key. */
323
- userAgent?: string;
324
- /** Extra HTTP headers attached to every model request. Used by providers
325
- * whose endpoint gates on client identity (e.g. Kimi For Coding requires a
326
- * `User-Agent: kimi-code-cli/...` and `X-Msh-*` device headers). Merged
327
- * into the underlying SDK's default headers. */
310
+ /** Extra HTTP headers attached to every model request. Merged into the
311
+ * underlying SDK's default headers. */
328
312
  defaultHeaders?: Record<string, string>;
329
313
  /** Provider-specific request-body fields, merged into the JSON body of every
330
314
  * model request (e.g. OpenRouter's routing object:
@@ -985,8 +969,8 @@ declare const TOOL_CALL_NAME_RULES: Record<ToolCallNameRule["id"], ToolCallNameR
985
969
  declare function isValidToolCallName(name: unknown, rule: ToolCallNameRule): boolean;
986
970
  /**
987
971
  * Pick the tool-name rule for the transport a request will actually use. Mirrors
988
- * the routing in `stream.ts`: `openai` with an `accountId` is the Codex
989
- * (Responses) endpoint, MiniMax rides the Anthropic transport but is a third
972
+ * the routing in `stream.ts`: `openai` itself (the ChatGPT plan or an API key)
973
+ * is the Responses API, MiniMax rides the Anthropic transport but is a third
990
974
  * party, and an `openai` pointed at a custom baseUrl is an unknown compatible
991
975
  * server.
992
976
  */
@@ -1047,9 +1031,15 @@ declare function continuesTurn(message: Message): boolean;
1047
1031
  /** A real turn boundary: a user message that isn't a runtime notice. */
1048
1032
  declare function opensTurn(message: Message): boolean;
1049
1033
 
1050
- declare const CODEX_CLIENT_VERSION = "0.166.0";
1034
+ /**
1035
+ * GPT-6 family (and gpt-5.6): reasoning can't be turned off, and the models
1036
+ * default to low verbosity. Point releases keep the dotted version (gpt-6.1-sol).
1037
+ */
1051
1038
  declare function usesResponsesLite(model: string): boolean;
1052
1039
 
1040
+ /** GG Coder's own client identity. Sent where a provider needs a User-Agent; never another vendor's. */
1041
+ declare const GG_CODER_USER_AGENT = "ggcoder (+https://github.com/KenKaiii/gg-coder)";
1042
+
1053
1043
  /**
1054
1044
  * Fire a minimal `max_tokens: 1` request that populates the Anthropic prompt
1055
1045
  * cache with the system prompt + tools prefix, so the first real user turn is
@@ -1067,24 +1057,10 @@ declare function prewarmAnthropicCache(options: {
1067
1057
  tools?: StreamOptions["tools"];
1068
1058
  serverTools?: StreamOptions["serverTools"];
1069
1059
  baseUrl?: string;
1070
- userAgent?: string;
1071
1060
  cacheRetention?: StreamOptions["cacheRetention"];
1072
1061
  signal?: AbortSignal;
1073
1062
  }): Promise<void>;
1074
1063
 
1075
- declare const CLAUDE_CODE_FALLBACK_VERSION = "2.1.316";
1076
- /** Test hook: the pending background refresh, if any. */
1077
- declare function pendingClaudeCodeVersionRefresh(): Promise<void> | null;
1078
- /**
1079
- * Resolve the current Claude Code release version for spoofing the claude-cli
1080
- * User-Agent on OAuth and inference requests. Cached in-memory for the process
1081
- * lifetime and on disk for 24h. Falls back to a hardcoded constant if the npm
1082
- * registry is unreachable and no cache exists.
1083
- */
1084
- declare function getClaudeCodeVersion(): Promise<string>;
1085
- /** Build the User-Agent string Anthropic's OAuth + inference edges expect. */
1086
- declare function getClaudeCliUserAgent(): Promise<string>;
1087
-
1088
1064
  interface PalsuProviderState {
1089
1065
  /** `stream()` calls served. */
1090
1066
  callCount: number;
@@ -1171,4 +1147,4 @@ declare function palsuEmbedding(text: string, dimensions?: number): number[];
1171
1147
  /** Deterministic fake relevance: the share of distinct query words found in the document (0–1). */
1172
1148
  declare function palsuRerankScore(query: string, document: string): number;
1173
1149
 
1174
- export { type AssistantMessage, CLAUDE_CODE_FALLBACK_VERSION, CODEX_CLIENT_VERSION, type CacheRetention, type ChatErrorReason, type ContentPart, type DoneEvent, type EmbedInputType, type EmbedOptions, type EmbedResult, type EmbedUsage, type ErrorEvent, type ErrorSource, EventStream, FAST_MODE_SUFFIX, type FastModeRejection, type FastModeResolution, type FormattedChatError, type FormattedError, GGAIError, type ImageContent, LOCAL_NO_API_KEY, type Message, type MessageProvenance, type MessageProvenanceKind, type MessageProvenanceSource, type MessageProvenanceVisibility, type OpenRouterProviderPreferences, PRECONNECT_INTERVAL_MS, type PalsuModelConfig, type PalsuModelHandle, type PalsuProviderConfig, type PalsuProviderHandle, type PalsuProviderState, type PalsuResponse, type PalsuResponseFactory, type PreconnectOptions, type PreparedContext, type Provider, type ProviderCapability, type ProviderDiagnosticFn, type ProviderEmbedFn, type ProviderEmbedRequest, type ProviderEmbedResponse, type ProviderEntry, ProviderError, type ProviderOptions, type ProviderRerankFn, type ProviderRerankRequest, type ProviderRerankResponse, type ProviderStreamFn, REDACTED as REDACTION_MARKER, type RawContent, type RedactionOptions, type RerankOptions, type RerankResponse, type RerankResult, type RerankUsage, ResponseStalledError, type ServerToolCall, type ServerToolCallEvent, type ServerToolDefinition, type ServerToolResult, type ServerToolResultEvent, type StopReason, type StreamEvent, type StreamOptions, type StreamResponse, StreamResult, type SystemMessage, TOOL_CALL_NAME_RULES, type TextContent, type TextDeltaEvent, type ThinkingContent, type ThinkingDeltaEvent, type ThinkingLevel, type Tool, type ToolCall, type ToolCallDeltaEvent, type ToolCallDoneEvent, type ToolCallNameRule, type ToolChoice, type ToolResult, type ToolResultContent, type ToolResultMessage, type Usage, type UserMessage, type VideoContent, clampProviderContextImages, classifyProviderError, continuesTurn, describeFastModeRejection, dropInvalidToolCalls, embed, environmentSecrets, formatChatError, formatError, formatErrorForDisplay, getClaudeCliUserAgent, getClaudeCodeVersion, hasLoneSurrogate, isHardBillingMessage, isUsageLimitError, isValidToolCallName, localBearerKey, localWireModelId, opensTurn, palsuAssistantMessage, palsuEmbedding, palsuRerankScore, palsuText, palsuThinking, palsuToolCall, parseFastModeRejection, pendingClaudeCodeVersionRefresh, preconnectOrigin, preconnectProvider, prewarmAnthropicCache, providerRegistry, redactText, redactValue, registerPalsuProvider, rerank, resolveFastModeModel, resolveToolSchema, sanitizeMessagesForWire, setProviderDiagnostic, sliceHead, sliceTail, stream, toAnthropicMessages, toOpenAIMessages, toWellFormedText, toolCallNameRuleFor, usesResponsesLite };
1150
+ export { type AssistantMessage, type CacheRetention, type ChatErrorReason, type ContentPart, type DoneEvent, type EmbedInputType, type EmbedOptions, type EmbedResult, type EmbedUsage, type ErrorEvent, type ErrorSource, EventStream, FAST_MODE_SUFFIX, type FastModeRejection, type FastModeResolution, type FormattedChatError, type FormattedError, GGAIError, GG_CODER_USER_AGENT, type ImageContent, LOCAL_NO_API_KEY, type Message, type MessageProvenance, type MessageProvenanceKind, type MessageProvenanceSource, type MessageProvenanceVisibility, type OpenRouterProviderPreferences, PRECONNECT_INTERVAL_MS, type PalsuModelConfig, type PalsuModelHandle, type PalsuProviderConfig, type PalsuProviderHandle, type PalsuProviderState, type PalsuResponse, type PalsuResponseFactory, type PreconnectOptions, type PreparedContext, type Provider, type ProviderCapability, type ProviderDiagnosticFn, type ProviderEmbedFn, type ProviderEmbedRequest, type ProviderEmbedResponse, type ProviderEntry, ProviderError, type ProviderOptions, type ProviderRerankFn, type ProviderRerankRequest, type ProviderRerankResponse, type ProviderStreamFn, REDACTED as REDACTION_MARKER, type RawContent, type RedactionOptions, type RerankOptions, type RerankResponse, type RerankResult, type RerankUsage, ResponseStalledError, type ServerToolCall, type ServerToolCallEvent, type ServerToolDefinition, type ServerToolResult, type ServerToolResultEvent, type StopReason, type StreamEvent, type StreamOptions, type StreamResponse, StreamResult, type SystemMessage, TOOL_CALL_NAME_RULES, type TextContent, type TextDeltaEvent, type ThinkingContent, type ThinkingDeltaEvent, type ThinkingLevel, type Tool, type ToolCall, type ToolCallDeltaEvent, type ToolCallDoneEvent, type ToolCallNameRule, type ToolChoice, type ToolResult, type ToolResultContent, type ToolResultMessage, type Usage, type UserMessage, type VideoContent, clampProviderContextImages, classifyProviderError, continuesTurn, describeFastModeRejection, dropInvalidToolCalls, embed, environmentSecrets, formatChatError, formatError, formatErrorForDisplay, hasLoneSurrogate, isHardBillingMessage, isUsageLimitError, isValidToolCallName, localBearerKey, localWireModelId, opensTurn, palsuAssistantMessage, palsuEmbedding, palsuRerankScore, palsuText, palsuThinking, palsuToolCall, parseFastModeRejection, preconnectOrigin, preconnectProvider, prewarmAnthropicCache, providerRegistry, redactText, redactValue, registerPalsuProvider, rerank, resolveFastModeModel, resolveToolSchema, sanitizeMessagesForWire, setProviderDiagnostic, sliceHead, sliceTail, stream, toAnthropicMessages, toOpenAIMessages, toWellFormedText, toolCallNameRuleFor, usesResponsesLite };
package/dist/index.d.ts CHANGED
@@ -253,26 +253,18 @@ interface StreamOptions {
253
253
  /** OpenAI service tier for latency-sensitive requests. Only sent to first-party OpenAI API calls. */
254
254
  serviceTier?: "auto" | "default" | "flex" | "priority";
255
255
  /** Provider speed tier. "fast" sends Anthropic `speed: "fast"` (first-party API
256
- * only) or OpenAI/Codex `service_tier: "priority"`. Set automatically by
256
+ * only) or OpenAI `service_tier: "priority"`. Set automatically by
257
257
  * `stream()` for fast-mode model ids (see `resolveFastModeModel`). */
258
258
  speed?: "standard" | "fast";
259
- /** Codex endpoint only: send the Responses-Lite request shape (lite header,
260
- * `parallel_tool_calls: false`, all-turns reasoning context). Unset follows
261
- * the model family (on for gpt-5.6/gpt-6 models). Lite allows only one tool
262
- * call per response, so turning it off lets the model batch calls. */
263
- responsesLite?: boolean;
264
- /** OpenAI only (Codex and API-key routes): send tools with strict
259
+ /** OpenAI only (ChatGPT plan and API-key routes): send tools with strict
265
260
  * (grammar-constrained) schemas. Default true. Strict calls carry every
266
261
  * optional field as null, which costs output tokens and latency per call. */
267
262
  strictTools?: boolean;
268
- /** OpenAI ChatGPT account ID (from OAuth JWT) for codex endpoint */
263
+ /** ChatGPT plan sign-in: the account subject. Set, it routes OpenAI to the plan. */
269
264
  accountId?: string;
270
- /** Stable conversation identity for Codex transport headers. This is distinct from
271
- * promptCacheKey: sessions with matching prefixes may share a cache key, but must
272
- * retain independent session/thread identities. */
265
+ /** Stable conversation identity, distinct from promptCacheKey: sessions with
266
+ * matching prefixes may share a cache key but keep independent identities. */
273
267
  transportSessionId?: string;
274
- /** Google Cloud/Code Assist project ID used by Gemini OAuth transport. */
275
- projectId?: string;
276
268
  /** Enable provider-native web search. Each provider uses its own format:
277
269
  * - Anthropic: server tool `web_search_20250305`
278
270
  * - Moonshot: `builtin_function` `$web_search`
@@ -315,16 +307,8 @@ interface StreamOptions {
315
307
  * budget_tokens < max_tokens), no request is sent and the response has
316
308
  * zero usage with stopReason "end_turn". */
317
309
  prewarm?: boolean;
318
- /** Override the User-Agent sent with OAuth-authenticated Anthropic requests.
319
- * Anthropic's OAuth edge rejects requests whose claude-cli version lags too
320
- * far behind the real Claude Code release; callers that track the live
321
- * version should pass it here. Ignored for non-Anthropic providers and for
322
- * Anthropic requests using a regular API key. */
323
- userAgent?: string;
324
- /** Extra HTTP headers attached to every model request. Used by providers
325
- * whose endpoint gates on client identity (e.g. Kimi For Coding requires a
326
- * `User-Agent: kimi-code-cli/...` and `X-Msh-*` device headers). Merged
327
- * into the underlying SDK's default headers. */
310
+ /** Extra HTTP headers attached to every model request. Merged into the
311
+ * underlying SDK's default headers. */
328
312
  defaultHeaders?: Record<string, string>;
329
313
  /** Provider-specific request-body fields, merged into the JSON body of every
330
314
  * model request (e.g. OpenRouter's routing object:
@@ -985,8 +969,8 @@ declare const TOOL_CALL_NAME_RULES: Record<ToolCallNameRule["id"], ToolCallNameR
985
969
  declare function isValidToolCallName(name: unknown, rule: ToolCallNameRule): boolean;
986
970
  /**
987
971
  * Pick the tool-name rule for the transport a request will actually use. Mirrors
988
- * the routing in `stream.ts`: `openai` with an `accountId` is the Codex
989
- * (Responses) endpoint, MiniMax rides the Anthropic transport but is a third
972
+ * the routing in `stream.ts`: `openai` itself (the ChatGPT plan or an API key)
973
+ * is the Responses API, MiniMax rides the Anthropic transport but is a third
990
974
  * party, and an `openai` pointed at a custom baseUrl is an unknown compatible
991
975
  * server.
992
976
  */
@@ -1047,9 +1031,15 @@ declare function continuesTurn(message: Message): boolean;
1047
1031
  /** A real turn boundary: a user message that isn't a runtime notice. */
1048
1032
  declare function opensTurn(message: Message): boolean;
1049
1033
 
1050
- declare const CODEX_CLIENT_VERSION = "0.166.0";
1034
+ /**
1035
+ * GPT-6 family (and gpt-5.6): reasoning can't be turned off, and the models
1036
+ * default to low verbosity. Point releases keep the dotted version (gpt-6.1-sol).
1037
+ */
1051
1038
  declare function usesResponsesLite(model: string): boolean;
1052
1039
 
1040
+ /** GG Coder's own client identity. Sent where a provider needs a User-Agent; never another vendor's. */
1041
+ declare const GG_CODER_USER_AGENT = "ggcoder (+https://github.com/KenKaiii/gg-coder)";
1042
+
1053
1043
  /**
1054
1044
  * Fire a minimal `max_tokens: 1` request that populates the Anthropic prompt
1055
1045
  * cache with the system prompt + tools prefix, so the first real user turn is
@@ -1067,24 +1057,10 @@ declare function prewarmAnthropicCache(options: {
1067
1057
  tools?: StreamOptions["tools"];
1068
1058
  serverTools?: StreamOptions["serverTools"];
1069
1059
  baseUrl?: string;
1070
- userAgent?: string;
1071
1060
  cacheRetention?: StreamOptions["cacheRetention"];
1072
1061
  signal?: AbortSignal;
1073
1062
  }): Promise<void>;
1074
1063
 
1075
- declare const CLAUDE_CODE_FALLBACK_VERSION = "2.1.316";
1076
- /** Test hook: the pending background refresh, if any. */
1077
- declare function pendingClaudeCodeVersionRefresh(): Promise<void> | null;
1078
- /**
1079
- * Resolve the current Claude Code release version for spoofing the claude-cli
1080
- * User-Agent on OAuth and inference requests. Cached in-memory for the process
1081
- * lifetime and on disk for 24h. Falls back to a hardcoded constant if the npm
1082
- * registry is unreachable and no cache exists.
1083
- */
1084
- declare function getClaudeCodeVersion(): Promise<string>;
1085
- /** Build the User-Agent string Anthropic's OAuth + inference edges expect. */
1086
- declare function getClaudeCliUserAgent(): Promise<string>;
1087
-
1088
1064
  interface PalsuProviderState {
1089
1065
  /** `stream()` calls served. */
1090
1066
  callCount: number;
@@ -1171,4 +1147,4 @@ declare function palsuEmbedding(text: string, dimensions?: number): number[];
1171
1147
  /** Deterministic fake relevance: the share of distinct query words found in the document (0–1). */
1172
1148
  declare function palsuRerankScore(query: string, document: string): number;
1173
1149
 
1174
- export { type AssistantMessage, CLAUDE_CODE_FALLBACK_VERSION, CODEX_CLIENT_VERSION, type CacheRetention, type ChatErrorReason, type ContentPart, type DoneEvent, type EmbedInputType, type EmbedOptions, type EmbedResult, type EmbedUsage, type ErrorEvent, type ErrorSource, EventStream, FAST_MODE_SUFFIX, type FastModeRejection, type FastModeResolution, type FormattedChatError, type FormattedError, GGAIError, type ImageContent, LOCAL_NO_API_KEY, type Message, type MessageProvenance, type MessageProvenanceKind, type MessageProvenanceSource, type MessageProvenanceVisibility, type OpenRouterProviderPreferences, PRECONNECT_INTERVAL_MS, type PalsuModelConfig, type PalsuModelHandle, type PalsuProviderConfig, type PalsuProviderHandle, type PalsuProviderState, type PalsuResponse, type PalsuResponseFactory, type PreconnectOptions, type PreparedContext, type Provider, type ProviderCapability, type ProviderDiagnosticFn, type ProviderEmbedFn, type ProviderEmbedRequest, type ProviderEmbedResponse, type ProviderEntry, ProviderError, type ProviderOptions, type ProviderRerankFn, type ProviderRerankRequest, type ProviderRerankResponse, type ProviderStreamFn, REDACTED as REDACTION_MARKER, type RawContent, type RedactionOptions, type RerankOptions, type RerankResponse, type RerankResult, type RerankUsage, ResponseStalledError, type ServerToolCall, type ServerToolCallEvent, type ServerToolDefinition, type ServerToolResult, type ServerToolResultEvent, type StopReason, type StreamEvent, type StreamOptions, type StreamResponse, StreamResult, type SystemMessage, TOOL_CALL_NAME_RULES, type TextContent, type TextDeltaEvent, type ThinkingContent, type ThinkingDeltaEvent, type ThinkingLevel, type Tool, type ToolCall, type ToolCallDeltaEvent, type ToolCallDoneEvent, type ToolCallNameRule, type ToolChoice, type ToolResult, type ToolResultContent, type ToolResultMessage, type Usage, type UserMessage, type VideoContent, clampProviderContextImages, classifyProviderError, continuesTurn, describeFastModeRejection, dropInvalidToolCalls, embed, environmentSecrets, formatChatError, formatError, formatErrorForDisplay, getClaudeCliUserAgent, getClaudeCodeVersion, hasLoneSurrogate, isHardBillingMessage, isUsageLimitError, isValidToolCallName, localBearerKey, localWireModelId, opensTurn, palsuAssistantMessage, palsuEmbedding, palsuRerankScore, palsuText, palsuThinking, palsuToolCall, parseFastModeRejection, pendingClaudeCodeVersionRefresh, preconnectOrigin, preconnectProvider, prewarmAnthropicCache, providerRegistry, redactText, redactValue, registerPalsuProvider, rerank, resolveFastModeModel, resolveToolSchema, sanitizeMessagesForWire, setProviderDiagnostic, sliceHead, sliceTail, stream, toAnthropicMessages, toOpenAIMessages, toWellFormedText, toolCallNameRuleFor, usesResponsesLite };
1150
+ export { type AssistantMessage, type CacheRetention, type ChatErrorReason, type ContentPart, type DoneEvent, type EmbedInputType, type EmbedOptions, type EmbedResult, type EmbedUsage, type ErrorEvent, type ErrorSource, EventStream, FAST_MODE_SUFFIX, type FastModeRejection, type FastModeResolution, type FormattedChatError, type FormattedError, GGAIError, GG_CODER_USER_AGENT, type ImageContent, LOCAL_NO_API_KEY, type Message, type MessageProvenance, type MessageProvenanceKind, type MessageProvenanceSource, type MessageProvenanceVisibility, type OpenRouterProviderPreferences, PRECONNECT_INTERVAL_MS, type PalsuModelConfig, type PalsuModelHandle, type PalsuProviderConfig, type PalsuProviderHandle, type PalsuProviderState, type PalsuResponse, type PalsuResponseFactory, type PreconnectOptions, type PreparedContext, type Provider, type ProviderCapability, type ProviderDiagnosticFn, type ProviderEmbedFn, type ProviderEmbedRequest, type ProviderEmbedResponse, type ProviderEntry, ProviderError, type ProviderOptions, type ProviderRerankFn, type ProviderRerankRequest, type ProviderRerankResponse, type ProviderStreamFn, REDACTED as REDACTION_MARKER, type RawContent, type RedactionOptions, type RerankOptions, type RerankResponse, type RerankResult, type RerankUsage, ResponseStalledError, type ServerToolCall, type ServerToolCallEvent, type ServerToolDefinition, type ServerToolResult, type ServerToolResultEvent, type StopReason, type StreamEvent, type StreamOptions, type StreamResponse, StreamResult, type SystemMessage, TOOL_CALL_NAME_RULES, type TextContent, type TextDeltaEvent, type ThinkingContent, type ThinkingDeltaEvent, type ThinkingLevel, type Tool, type ToolCall, type ToolCallDeltaEvent, type ToolCallDoneEvent, type ToolCallNameRule, type ToolChoice, type ToolResult, type ToolResultContent, type ToolResultMessage, type Usage, type UserMessage, type VideoContent, clampProviderContextImages, classifyProviderError, continuesTurn, describeFastModeRejection, dropInvalidToolCalls, embed, environmentSecrets, formatChatError, formatError, formatErrorForDisplay, hasLoneSurrogate, isHardBillingMessage, isUsageLimitError, isValidToolCallName, localBearerKey, localWireModelId, opensTurn, palsuAssistantMessage, palsuEmbedding, palsuRerankScore, palsuText, palsuThinking, palsuToolCall, parseFastModeRejection, preconnectOrigin, preconnectProvider, prewarmAnthropicCache, providerRegistry, redactText, redactValue, registerPalsuProvider, rerank, resolveFastModeModel, resolveToolSchema, sanitizeMessagesForWire, setProviderDiagnostic, sliceHead, sliceTail, stream, toAnthropicMessages, toOpenAIMessages, toWellFormedText, toolCallNameRuleFor, usesResponsesLite };