@ljoukov/llm 3.0.2 → 3.0.4

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
@@ -76,9 +76,18 @@ type LlmBlockedEvent = {
76
76
  };
77
77
  type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent;
78
78
  type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
79
+ declare const LLM_TEXT_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.1-codex-mini", "chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
80
+ type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
81
+ declare const LLM_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
82
+ type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
83
+ declare const LLM_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.1-codex-mini", "chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview"];
84
+ type LlmModelId = (typeof LLM_MODEL_IDS)[number];
85
+ declare function isLlmTextModelId(value: string): value is LlmTextModelId;
86
+ declare function isLlmImageModelId(value: string): value is LlmImageModelId;
87
+ declare function isLlmModelId(value: string): value is LlmModelId;
79
88
  type LlmTextResult = {
80
89
  readonly provider: LlmProvider;
81
- readonly model: string;
90
+ readonly model: LlmModelId;
82
91
  readonly modelVersion: string;
83
92
  readonly content?: LlmContent;
84
93
  readonly text: string;
@@ -134,7 +143,7 @@ type LlmInput = {
134
143
  readonly instructions?: string;
135
144
  };
136
145
  type LlmBaseRequest = {
137
- readonly model: string;
146
+ readonly model: LlmModelId;
138
147
  readonly tools?: readonly LlmToolConfig[];
139
148
  readonly responseMimeType?: string;
140
149
  readonly responseJsonSchema?: JsonSchema;
@@ -146,7 +155,10 @@ type LlmBaseRequest = {
146
155
  readonly signal?: AbortSignal;
147
156
  };
148
157
  type LlmTextRequest = LlmInput & LlmBaseRequest;
149
- type LlmJsonRequest<T> = LlmInput & LlmBaseRequest & {
158
+ type LlmStructuredRequestBase = Omit<LlmBaseRequest, "model"> & {
159
+ readonly model: LlmTextModelId;
160
+ };
161
+ type LlmJsonRequest<T> = LlmInput & LlmStructuredRequestBase & {
150
162
  readonly schema: z.ZodType<T>;
151
163
  readonly openAiSchemaName?: string;
152
164
  readonly maxAttempts?: number;
@@ -181,7 +193,7 @@ type LlmImageData = {
181
193
  readonly data: Buffer;
182
194
  };
183
195
  type LlmGenerateImagesRequest = {
184
- readonly model: string;
196
+ readonly model: LlmImageModelId;
185
197
  readonly stylePrompt: string;
186
198
  readonly styleImages?: readonly LlmImageData[];
187
199
  readonly imagePrompts: readonly string[];
@@ -245,7 +257,7 @@ type LlmToolLoopResult = {
245
257
  readonly totalCostUsd: number;
246
258
  };
247
259
  type LlmToolLoopRequest = LlmInput & {
248
- readonly model: string;
260
+ readonly model: LlmTextModelId;
249
261
  readonly tools: LlmToolSet;
250
262
  readonly modelTools?: readonly LlmToolConfig[];
251
263
  readonly maxSteps?: number;
@@ -290,6 +302,22 @@ declare function loadEnvFromFile(filePath: string, { override }?: {
290
302
  override?: boolean;
291
303
  }): void;
292
304
 
305
+ type AgentSubagentToolPromptPattern = "codex" | "none";
306
+ type AgentSubagentToolConfig = {
307
+ readonly enabled?: boolean;
308
+ readonly maxAgents?: number;
309
+ readonly maxDepth?: number;
310
+ readonly defaultWaitTimeoutMs?: number;
311
+ readonly maxWaitTimeoutMs?: number;
312
+ readonly promptPattern?: AgentSubagentToolPromptPattern;
313
+ readonly instructions?: string;
314
+ readonly model?: LlmTextModelId;
315
+ readonly maxSteps?: number;
316
+ readonly inheritTools?: boolean;
317
+ readonly inheritFilesystemTool?: boolean;
318
+ };
319
+ type AgentSubagentToolSelection = boolean | AgentSubagentToolConfig;
320
+
293
321
  type AgentPathKind = "file" | "directory" | "symlink" | "other";
294
322
  type AgentPathInfo = {
295
323
  readonly kind: AgentPathKind;
@@ -473,10 +501,14 @@ type AgentFilesystemToolConfig = {
473
501
  readonly options?: AgentFilesystemToolsOptions;
474
502
  };
475
503
  type AgentFilesystemToolSelection = boolean | AgentFilesystemToolProfile | AgentFilesystemToolConfig;
504
+
476
505
  type RunAgentLoopRequest = Omit<LlmToolLoopRequest, "tools"> & {
477
506
  readonly tools?: LlmToolSet;
478
507
  readonly filesystemTool?: AgentFilesystemToolSelection;
479
508
  readonly filesystem_tool?: AgentFilesystemToolSelection;
509
+ readonly subagentTool?: AgentSubagentToolSelection;
510
+ readonly subagent_tool?: AgentSubagentToolSelection;
511
+ readonly subagents?: AgentSubagentToolSelection;
480
512
  };
481
513
  declare function runAgentLoop(request: RunAgentLoopRequest): Promise<LlmToolLoopResult>;
482
514
 
@@ -536,9 +568,22 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
536
568
  }): Promise<ChatGptAuthProfile>;
537
569
  declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
538
570
 
539
- declare const GEMINI_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
571
+ declare const OPENAI_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.1-codex-mini"];
572
+ type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
573
+ declare function isOpenAiModelId(value: string): value is OpenAiModelId;
574
+ declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini"];
575
+ type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
576
+ declare function isChatGptModelId(value: string): value is ChatGptModelId;
577
+
578
+ declare const GEMINI_TEXT_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
579
+ declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
580
+ declare const GEMINI_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview"];
540
581
  type GeminiModelId = (typeof GEMINI_MODEL_IDS)[number];
582
+ type GeminiTextModelId = (typeof GEMINI_TEXT_MODEL_IDS)[number];
583
+ type GeminiImageModelId = (typeof GEMINI_IMAGE_MODEL_IDS)[number];
541
584
  declare function isGeminiModelId(value: string): value is GeminiModelId;
585
+ declare function isGeminiTextModelId(value: string): value is GeminiTextModelId;
586
+ declare function isGeminiImageModelId(value: string): value is GeminiImageModelId;
542
587
  type GeminiConfiguration = {
543
588
  readonly projectId?: string;
544
589
  readonly location?: string;
@@ -554,4 +599,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
554
599
  declare function isFireworksModelId(value: string): value is FireworksModelId;
555
600
  declare function resolveFireworksModelId(model: string): string | undefined;
556
601
 
557
- export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentPathInfo, type AgentPathKind, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type ChatGptAuthProfile, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CreateApplyPatchToolOptions, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FireworksModelId, type GeminiGlobToolInput, type GeminiGrepSearchToolInput, type GeminiListDirectoryToolInput, type GeminiModelId, type GeminiReadFileToolInput, type GeminiReadFilesToolInput, type GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiWriteFileToolInput, InMemoryAgentFilesystem, type JsonSchema, type LlmBaseRequest, type LlmBlockedEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFunctionTool, type LlmImageData, type LlmImageSize, type LlmInput, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmModelEvent, type LlmProvider, type LlmStreamEvent, type LlmTextDeltaEvent, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmToolCallContext, type LlmToolCallResult, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopStep, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReadFilesTool, createReplaceTool, createRgSearchTool, createWriteFileTool, customTool, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isFireworksModelId, isGeminiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
602
+ export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentPathInfo, type AgentPathKind, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CreateApplyPatchToolOptions, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FireworksModelId, GEMINI_IMAGE_MODEL_IDS, GEMINI_MODEL_IDS, GEMINI_TEXT_MODEL_IDS, type GeminiGlobToolInput, type GeminiGrepSearchToolInput, type GeminiImageModelId, type GeminiListDirectoryToolInput, type GeminiModelId, type GeminiReadFileToolInput, type GeminiReadFilesToolInput, type GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type LlmBaseRequest, type LlmBlockedEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStreamEvent, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmToolCallContext, type LlmToolCallResult, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopStep, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReadFilesTool, createReplaceTool, createRgSearchTool, createWriteFileTool, customTool, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
package/dist/index.d.ts CHANGED
@@ -76,9 +76,18 @@ type LlmBlockedEvent = {
76
76
  };
77
77
  type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent;
78
78
  type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
79
+ declare const LLM_TEXT_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.1-codex-mini", "chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
80
+ type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
81
+ declare const LLM_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
82
+ type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
83
+ declare const LLM_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.1-codex-mini", "chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview"];
84
+ type LlmModelId = (typeof LLM_MODEL_IDS)[number];
85
+ declare function isLlmTextModelId(value: string): value is LlmTextModelId;
86
+ declare function isLlmImageModelId(value: string): value is LlmImageModelId;
87
+ declare function isLlmModelId(value: string): value is LlmModelId;
79
88
  type LlmTextResult = {
80
89
  readonly provider: LlmProvider;
81
- readonly model: string;
90
+ readonly model: LlmModelId;
82
91
  readonly modelVersion: string;
83
92
  readonly content?: LlmContent;
84
93
  readonly text: string;
@@ -134,7 +143,7 @@ type LlmInput = {
134
143
  readonly instructions?: string;
135
144
  };
136
145
  type LlmBaseRequest = {
137
- readonly model: string;
146
+ readonly model: LlmModelId;
138
147
  readonly tools?: readonly LlmToolConfig[];
139
148
  readonly responseMimeType?: string;
140
149
  readonly responseJsonSchema?: JsonSchema;
@@ -146,7 +155,10 @@ type LlmBaseRequest = {
146
155
  readonly signal?: AbortSignal;
147
156
  };
148
157
  type LlmTextRequest = LlmInput & LlmBaseRequest;
149
- type LlmJsonRequest<T> = LlmInput & LlmBaseRequest & {
158
+ type LlmStructuredRequestBase = Omit<LlmBaseRequest, "model"> & {
159
+ readonly model: LlmTextModelId;
160
+ };
161
+ type LlmJsonRequest<T> = LlmInput & LlmStructuredRequestBase & {
150
162
  readonly schema: z.ZodType<T>;
151
163
  readonly openAiSchemaName?: string;
152
164
  readonly maxAttempts?: number;
@@ -181,7 +193,7 @@ type LlmImageData = {
181
193
  readonly data: Buffer;
182
194
  };
183
195
  type LlmGenerateImagesRequest = {
184
- readonly model: string;
196
+ readonly model: LlmImageModelId;
185
197
  readonly stylePrompt: string;
186
198
  readonly styleImages?: readonly LlmImageData[];
187
199
  readonly imagePrompts: readonly string[];
@@ -245,7 +257,7 @@ type LlmToolLoopResult = {
245
257
  readonly totalCostUsd: number;
246
258
  };
247
259
  type LlmToolLoopRequest = LlmInput & {
248
- readonly model: string;
260
+ readonly model: LlmTextModelId;
249
261
  readonly tools: LlmToolSet;
250
262
  readonly modelTools?: readonly LlmToolConfig[];
251
263
  readonly maxSteps?: number;
@@ -290,6 +302,22 @@ declare function loadEnvFromFile(filePath: string, { override }?: {
290
302
  override?: boolean;
291
303
  }): void;
292
304
 
305
+ type AgentSubagentToolPromptPattern = "codex" | "none";
306
+ type AgentSubagentToolConfig = {
307
+ readonly enabled?: boolean;
308
+ readonly maxAgents?: number;
309
+ readonly maxDepth?: number;
310
+ readonly defaultWaitTimeoutMs?: number;
311
+ readonly maxWaitTimeoutMs?: number;
312
+ readonly promptPattern?: AgentSubagentToolPromptPattern;
313
+ readonly instructions?: string;
314
+ readonly model?: LlmTextModelId;
315
+ readonly maxSteps?: number;
316
+ readonly inheritTools?: boolean;
317
+ readonly inheritFilesystemTool?: boolean;
318
+ };
319
+ type AgentSubagentToolSelection = boolean | AgentSubagentToolConfig;
320
+
293
321
  type AgentPathKind = "file" | "directory" | "symlink" | "other";
294
322
  type AgentPathInfo = {
295
323
  readonly kind: AgentPathKind;
@@ -473,10 +501,14 @@ type AgentFilesystemToolConfig = {
473
501
  readonly options?: AgentFilesystemToolsOptions;
474
502
  };
475
503
  type AgentFilesystemToolSelection = boolean | AgentFilesystemToolProfile | AgentFilesystemToolConfig;
504
+
476
505
  type RunAgentLoopRequest = Omit<LlmToolLoopRequest, "tools"> & {
477
506
  readonly tools?: LlmToolSet;
478
507
  readonly filesystemTool?: AgentFilesystemToolSelection;
479
508
  readonly filesystem_tool?: AgentFilesystemToolSelection;
509
+ readonly subagentTool?: AgentSubagentToolSelection;
510
+ readonly subagent_tool?: AgentSubagentToolSelection;
511
+ readonly subagents?: AgentSubagentToolSelection;
480
512
  };
481
513
  declare function runAgentLoop(request: RunAgentLoopRequest): Promise<LlmToolLoopResult>;
482
514
 
@@ -536,9 +568,22 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
536
568
  }): Promise<ChatGptAuthProfile>;
537
569
  declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
538
570
 
539
- declare const GEMINI_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
571
+ declare const OPENAI_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.1-codex-mini"];
572
+ type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
573
+ declare function isOpenAiModelId(value: string): value is OpenAiModelId;
574
+ declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini"];
575
+ type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
576
+ declare function isChatGptModelId(value: string): value is ChatGptModelId;
577
+
578
+ declare const GEMINI_TEXT_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
579
+ declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
580
+ declare const GEMINI_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview"];
540
581
  type GeminiModelId = (typeof GEMINI_MODEL_IDS)[number];
582
+ type GeminiTextModelId = (typeof GEMINI_TEXT_MODEL_IDS)[number];
583
+ type GeminiImageModelId = (typeof GEMINI_IMAGE_MODEL_IDS)[number];
541
584
  declare function isGeminiModelId(value: string): value is GeminiModelId;
585
+ declare function isGeminiTextModelId(value: string): value is GeminiTextModelId;
586
+ declare function isGeminiImageModelId(value: string): value is GeminiImageModelId;
542
587
  type GeminiConfiguration = {
543
588
  readonly projectId?: string;
544
589
  readonly location?: string;
@@ -554,4 +599,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
554
599
  declare function isFireworksModelId(value: string): value is FireworksModelId;
555
600
  declare function resolveFireworksModelId(model: string): string | undefined;
556
601
 
557
- export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentPathInfo, type AgentPathKind, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type ChatGptAuthProfile, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CreateApplyPatchToolOptions, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FireworksModelId, type GeminiGlobToolInput, type GeminiGrepSearchToolInput, type GeminiListDirectoryToolInput, type GeminiModelId, type GeminiReadFileToolInput, type GeminiReadFilesToolInput, type GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiWriteFileToolInput, InMemoryAgentFilesystem, type JsonSchema, type LlmBaseRequest, type LlmBlockedEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFunctionTool, type LlmImageData, type LlmImageSize, type LlmInput, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmModelEvent, type LlmProvider, type LlmStreamEvent, type LlmTextDeltaEvent, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmToolCallContext, type LlmToolCallResult, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopStep, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReadFilesTool, createReplaceTool, createRgSearchTool, createWriteFileTool, customTool, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isFireworksModelId, isGeminiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
602
+ export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentPathInfo, type AgentPathKind, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CreateApplyPatchToolOptions, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FireworksModelId, GEMINI_IMAGE_MODEL_IDS, GEMINI_MODEL_IDS, GEMINI_TEXT_MODEL_IDS, type GeminiGlobToolInput, type GeminiGrepSearchToolInput, type GeminiImageModelId, type GeminiListDirectoryToolInput, type GeminiModelId, type GeminiReadFileToolInput, type GeminiReadFilesToolInput, type GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type LlmBaseRequest, type LlmBlockedEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStreamEvent, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmToolCallContext, type LlmToolCallResult, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopStep, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReadFilesTool, createReplaceTool, createRgSearchTool, createWriteFileTool, customTool, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };