@ljoukov/llm 7.0.8 → 7.0.10
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.cjs +54 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +52 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -19,6 +19,17 @@ declare function estimateCallCostUsd({ modelId, tokens, responseImages, imageSiz
|
|
|
19
19
|
imageSize?: string;
|
|
20
20
|
}): number;
|
|
21
21
|
|
|
22
|
+
declare const OPENAI_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
23
|
+
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
24
|
+
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
25
|
+
declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark"];
|
|
26
|
+
declare const EXPERIMENTAL_CHATGPT_MODEL_PREFIX: "experimental-chatgpt-";
|
|
27
|
+
type ListedChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
28
|
+
type ExperimentalChatGptModelId = `${typeof EXPERIMENTAL_CHATGPT_MODEL_PREFIX}${string}`;
|
|
29
|
+
type ChatGptModelId = ListedChatGptModelId | ExperimentalChatGptModelId;
|
|
30
|
+
declare function isExperimentalChatGptModelId(value: string): value is ExperimentalChatGptModelId;
|
|
31
|
+
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
32
|
+
|
|
22
33
|
type LlmTelemetryOperation = "generateText" | "streamText" | "generateJson" | "streamJson" | "generateImages";
|
|
23
34
|
type LlmTelemetryBaseEvent = {
|
|
24
35
|
readonly timestamp: string;
|
|
@@ -208,11 +219,11 @@ type LlmToolCallStreamEvent = LlmToolCallStartedEvent | LlmToolCallCompletedEven
|
|
|
208
219
|
type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent | LlmToolCallStreamEvent;
|
|
209
220
|
type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
|
|
210
221
|
declare const LLM_TEXT_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
|
|
211
|
-
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
|
|
222
|
+
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number] | ExperimentalChatGptModelId;
|
|
212
223
|
declare const LLM_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
213
224
|
type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
|
|
214
225
|
declare const LLM_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "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", "gemini-3.1-flash-image-preview"];
|
|
215
|
-
type LlmModelId =
|
|
226
|
+
type LlmModelId = LlmTextModelId | LlmImageModelId;
|
|
216
227
|
declare function isLlmTextModelId(value: string): value is LlmTextModelId;
|
|
217
228
|
declare function isLlmImageModelId(value: string): value is LlmImageModelId;
|
|
218
229
|
declare function isLlmModelId(value: string): value is LlmModelId;
|
|
@@ -975,13 +986,6 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
|
|
|
975
986
|
}): Promise<ChatGptAuthProfile>;
|
|
976
987
|
declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
|
|
977
988
|
|
|
978
|
-
declare const OPENAI_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
979
|
-
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
980
|
-
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
981
|
-
declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark"];
|
|
982
|
-
type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
983
|
-
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
984
|
-
|
|
985
989
|
declare const GEMINI_TEXT_MODEL_IDS: readonly ["gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
|
|
986
990
|
declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
987
991
|
declare const GEMINI_MODEL_IDS: readonly ["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", "gemini-3.1-flash-image-preview"];
|
|
@@ -1006,4 +1010,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
|
|
|
1006
1010
|
declare function isFireworksModelId(value: string): value is FireworksModelId;
|
|
1007
1011
|
declare function resolveFireworksModelId(model: string): string | undefined;
|
|
1008
1012
|
|
|
1009
|
-
export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentLogLineSink, type AgentLoggingConfig, type AgentLoggingSelection, type AgentLoopStream, type AgentPathInfo, type AgentPathKind, type AgentRunCompletedTelemetryEvent, type AgentRunStartedTelemetryEvent, type AgentRunStreamTelemetryEvent, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, type AssessmentSubagentInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type CandidateAssessment, type CandidateEvolutionOptions, type CandidateEvolutionResult, type CandidateEvolutionSnapshot, type CandidateEvolutionStats, type CandidateFeedbackEntry, type CandidateIssue, type CandidateProposal, type CandidateRecord, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CodexViewImageToolInput, type CreateApplyPatchToolOptions, DEFAULT_FILE_TTL_SECONDS, DEFAULT_SIGNED_URL_TTL_SECONDS, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FeedbackScope, 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 GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, type GenerationSubagent, type GenerationSubagentInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type LlmBaseRequest, type LlmBlockedEvent, type LlmCallCompletedTelemetryEvent, type LlmCallStartedTelemetryEvent, type LlmCallStreamTelemetryEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFileCreateParams, type LlmFileDeleted, type LlmFileUploadBackend, type LlmFileUploadEvent, type LlmFileUploadMetrics, type LlmFileUploadMode, type LlmFileUploadSource, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputFilePart, type LlmInputImagePart, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmMediaResolution, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStoredFile, type LlmStreamEvent, type LlmTelemetryOperation, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmThinkingLevel, type LlmToolCallCompletedEvent, type LlmToolCallContext, type LlmToolCallResult, type LlmToolCallStartedEvent, type LlmToolCallStreamEvent, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopSteeringAppendResult, type LlmToolLoopSteeringChannel, type LlmToolLoopSteeringInput, type LlmToolLoopSteeringMessage, type LlmToolLoopStep, type LlmToolLoopStream, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type ModelConcurrencyConfig, type ModelConcurrencyProvider, OPENAI_MODEL_IDS, type OpenAiModelId, type ParentSelectionConfig, type ParentSelectionMidpoint, type PostCheckRejection, type PostGenerationCheckInput, type RunAgentLoopRequest, type TelemetryConfig, type TelemetryEvent, type TelemetrySelection, type TelemetrySink, appendMarkdownSourcesSection, applyPatch, configureGemini, configureModelConcurrency, configureTelemetry, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReplaceTool, createRgSearchTool, createToolLoopSteeringChannel, createViewImageTool, createWriteFileTool, customTool, emptyFileUploadMetrics, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, files, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resetModelConcurrencyConfig, resetTelemetry, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runCandidateEvolution, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
|
|
1013
|
+
export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentLogLineSink, type AgentLoggingConfig, type AgentLoggingSelection, type AgentLoopStream, type AgentPathInfo, type AgentPathKind, type AgentRunCompletedTelemetryEvent, type AgentRunStartedTelemetryEvent, type AgentRunStreamTelemetryEvent, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, type AssessmentSubagentInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type CandidateAssessment, type CandidateEvolutionOptions, type CandidateEvolutionResult, type CandidateEvolutionSnapshot, type CandidateEvolutionStats, type CandidateFeedbackEntry, type CandidateIssue, type CandidateProposal, type CandidateRecord, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CodexViewImageToolInput, type CreateApplyPatchToolOptions, DEFAULT_FILE_TTL_SECONDS, DEFAULT_SIGNED_URL_TTL_SECONDS, EXPERIMENTAL_CHATGPT_MODEL_PREFIX, type ExperimentalChatGptModelId, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FeedbackScope, 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 GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, type GenerationSubagent, type GenerationSubagentInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type ListedChatGptModelId, type LlmBaseRequest, type LlmBlockedEvent, type LlmCallCompletedTelemetryEvent, type LlmCallStartedTelemetryEvent, type LlmCallStreamTelemetryEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFileCreateParams, type LlmFileDeleted, type LlmFileUploadBackend, type LlmFileUploadEvent, type LlmFileUploadMetrics, type LlmFileUploadMode, type LlmFileUploadSource, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputFilePart, type LlmInputImagePart, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmMediaResolution, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStoredFile, type LlmStreamEvent, type LlmTelemetryOperation, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmThinkingLevel, type LlmToolCallCompletedEvent, type LlmToolCallContext, type LlmToolCallResult, type LlmToolCallStartedEvent, type LlmToolCallStreamEvent, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopSteeringAppendResult, type LlmToolLoopSteeringChannel, type LlmToolLoopSteeringInput, type LlmToolLoopSteeringMessage, type LlmToolLoopStep, type LlmToolLoopStream, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type ModelConcurrencyConfig, type ModelConcurrencyProvider, OPENAI_MODEL_IDS, type OpenAiModelId, type ParentSelectionConfig, type ParentSelectionMidpoint, type PostCheckRejection, type PostGenerationCheckInput, type RunAgentLoopRequest, type TelemetryConfig, type TelemetryEvent, type TelemetrySelection, type TelemetrySink, appendMarkdownSourcesSection, applyPatch, configureGemini, configureModelConcurrency, configureTelemetry, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReplaceTool, createRgSearchTool, createToolLoopSteeringChannel, createViewImageTool, createWriteFileTool, customTool, emptyFileUploadMetrics, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, files, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isExperimentalChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resetModelConcurrencyConfig, resetTelemetry, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runCandidateEvolution, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,17 @@ declare function estimateCallCostUsd({ modelId, tokens, responseImages, imageSiz
|
|
|
19
19
|
imageSize?: string;
|
|
20
20
|
}): number;
|
|
21
21
|
|
|
22
|
+
declare const OPENAI_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
23
|
+
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
24
|
+
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
25
|
+
declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark"];
|
|
26
|
+
declare const EXPERIMENTAL_CHATGPT_MODEL_PREFIX: "experimental-chatgpt-";
|
|
27
|
+
type ListedChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
28
|
+
type ExperimentalChatGptModelId = `${typeof EXPERIMENTAL_CHATGPT_MODEL_PREFIX}${string}`;
|
|
29
|
+
type ChatGptModelId = ListedChatGptModelId | ExperimentalChatGptModelId;
|
|
30
|
+
declare function isExperimentalChatGptModelId(value: string): value is ExperimentalChatGptModelId;
|
|
31
|
+
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
32
|
+
|
|
22
33
|
type LlmTelemetryOperation = "generateText" | "streamText" | "generateJson" | "streamJson" | "generateImages";
|
|
23
34
|
type LlmTelemetryBaseEvent = {
|
|
24
35
|
readonly timestamp: string;
|
|
@@ -208,11 +219,11 @@ type LlmToolCallStreamEvent = LlmToolCallStartedEvent | LlmToolCallCompletedEven
|
|
|
208
219
|
type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent | LlmToolCallStreamEvent;
|
|
209
220
|
type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
|
|
210
221
|
declare const LLM_TEXT_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
|
|
211
|
-
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
|
|
222
|
+
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number] | ExperimentalChatGptModelId;
|
|
212
223
|
declare const LLM_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
213
224
|
type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
|
|
214
225
|
declare const LLM_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "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", "gemini-3.1-flash-image-preview"];
|
|
215
|
-
type LlmModelId =
|
|
226
|
+
type LlmModelId = LlmTextModelId | LlmImageModelId;
|
|
216
227
|
declare function isLlmTextModelId(value: string): value is LlmTextModelId;
|
|
217
228
|
declare function isLlmImageModelId(value: string): value is LlmImageModelId;
|
|
218
229
|
declare function isLlmModelId(value: string): value is LlmModelId;
|
|
@@ -975,13 +986,6 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
|
|
|
975
986
|
}): Promise<ChatGptAuthProfile>;
|
|
976
987
|
declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
|
|
977
988
|
|
|
978
|
-
declare const OPENAI_MODEL_IDS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
979
|
-
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
980
|
-
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
981
|
-
declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.4", "chatgpt-gpt-5.4-fast", "chatgpt-gpt-5.4-mini", "chatgpt-gpt-5.3-codex-spark"];
|
|
982
|
-
type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
983
|
-
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
984
|
-
|
|
985
989
|
declare const GEMINI_TEXT_MODEL_IDS: readonly ["gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
|
|
986
990
|
declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
987
991
|
declare const GEMINI_MODEL_IDS: readonly ["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", "gemini-3.1-flash-image-preview"];
|
|
@@ -1006,4 +1010,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
|
|
|
1006
1010
|
declare function isFireworksModelId(value: string): value is FireworksModelId;
|
|
1007
1011
|
declare function resolveFireworksModelId(model: string): string | undefined;
|
|
1008
1012
|
|
|
1009
|
-
export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentLogLineSink, type AgentLoggingConfig, type AgentLoggingSelection, type AgentLoopStream, type AgentPathInfo, type AgentPathKind, type AgentRunCompletedTelemetryEvent, type AgentRunStartedTelemetryEvent, type AgentRunStreamTelemetryEvent, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, type AssessmentSubagentInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type CandidateAssessment, type CandidateEvolutionOptions, type CandidateEvolutionResult, type CandidateEvolutionSnapshot, type CandidateEvolutionStats, type CandidateFeedbackEntry, type CandidateIssue, type CandidateProposal, type CandidateRecord, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CodexViewImageToolInput, type CreateApplyPatchToolOptions, DEFAULT_FILE_TTL_SECONDS, DEFAULT_SIGNED_URL_TTL_SECONDS, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FeedbackScope, 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 GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, type GenerationSubagent, type GenerationSubagentInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type LlmBaseRequest, type LlmBlockedEvent, type LlmCallCompletedTelemetryEvent, type LlmCallStartedTelemetryEvent, type LlmCallStreamTelemetryEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFileCreateParams, type LlmFileDeleted, type LlmFileUploadBackend, type LlmFileUploadEvent, type LlmFileUploadMetrics, type LlmFileUploadMode, type LlmFileUploadSource, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputFilePart, type LlmInputImagePart, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmMediaResolution, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStoredFile, type LlmStreamEvent, type LlmTelemetryOperation, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmThinkingLevel, type LlmToolCallCompletedEvent, type LlmToolCallContext, type LlmToolCallResult, type LlmToolCallStartedEvent, type LlmToolCallStreamEvent, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopSteeringAppendResult, type LlmToolLoopSteeringChannel, type LlmToolLoopSteeringInput, type LlmToolLoopSteeringMessage, type LlmToolLoopStep, type LlmToolLoopStream, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type ModelConcurrencyConfig, type ModelConcurrencyProvider, OPENAI_MODEL_IDS, type OpenAiModelId, type ParentSelectionConfig, type ParentSelectionMidpoint, type PostCheckRejection, type PostGenerationCheckInput, type RunAgentLoopRequest, type TelemetryConfig, type TelemetryEvent, type TelemetrySelection, type TelemetrySink, appendMarkdownSourcesSection, applyPatch, configureGemini, configureModelConcurrency, configureTelemetry, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReplaceTool, createRgSearchTool, createToolLoopSteeringChannel, createViewImageTool, createWriteFileTool, customTool, emptyFileUploadMetrics, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, files, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resetModelConcurrencyConfig, resetTelemetry, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runCandidateEvolution, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
|
|
1013
|
+
export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentLogLineSink, type AgentLoggingConfig, type AgentLoggingSelection, type AgentLoopStream, type AgentPathInfo, type AgentPathKind, type AgentRunCompletedTelemetryEvent, type AgentRunStartedTelemetryEvent, type AgentRunStreamTelemetryEvent, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, type AssessmentSubagentInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type CandidateAssessment, type CandidateEvolutionOptions, type CandidateEvolutionResult, type CandidateEvolutionSnapshot, type CandidateEvolutionStats, type CandidateFeedbackEntry, type CandidateIssue, type CandidateProposal, type CandidateRecord, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CodexViewImageToolInput, type CreateApplyPatchToolOptions, DEFAULT_FILE_TTL_SECONDS, DEFAULT_SIGNED_URL_TTL_SECONDS, EXPERIMENTAL_CHATGPT_MODEL_PREFIX, type ExperimentalChatGptModelId, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FeedbackScope, 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 GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, type GenerationSubagent, type GenerationSubagentInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type ListedChatGptModelId, type LlmBaseRequest, type LlmBlockedEvent, type LlmCallCompletedTelemetryEvent, type LlmCallStartedTelemetryEvent, type LlmCallStreamTelemetryEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFileCreateParams, type LlmFileDeleted, type LlmFileUploadBackend, type LlmFileUploadEvent, type LlmFileUploadMetrics, type LlmFileUploadMode, type LlmFileUploadSource, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputFilePart, type LlmInputImagePart, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmMediaResolution, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStoredFile, type LlmStreamEvent, type LlmTelemetryOperation, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmThinkingLevel, type LlmToolCallCompletedEvent, type LlmToolCallContext, type LlmToolCallResult, type LlmToolCallStartedEvent, type LlmToolCallStreamEvent, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopSteeringAppendResult, type LlmToolLoopSteeringChannel, type LlmToolLoopSteeringInput, type LlmToolLoopSteeringMessage, type LlmToolLoopStep, type LlmToolLoopStream, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type ModelConcurrencyConfig, type ModelConcurrencyProvider, OPENAI_MODEL_IDS, type OpenAiModelId, type ParentSelectionConfig, type ParentSelectionMidpoint, type PostCheckRejection, type PostGenerationCheckInput, type RunAgentLoopRequest, type TelemetryConfig, type TelemetryEvent, type TelemetrySelection, type TelemetrySink, appendMarkdownSourcesSection, applyPatch, configureGemini, configureModelConcurrency, configureTelemetry, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReplaceTool, createRgSearchTool, createToolLoopSteeringChannel, createViewImageTool, createWriteFileTool, customTool, emptyFileUploadMetrics, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, files, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isExperimentalChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resetModelConcurrencyConfig, resetTelemetry, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runCandidateEvolution, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
|
package/dist/index.js
CHANGED
|
@@ -205,6 +205,42 @@ function getGeminiImagePricing(modelId) {
|
|
|
205
205
|
return void 0;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
// src/openai/models.ts
|
|
209
|
+
var OPENAI_MODEL_IDS = ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
210
|
+
function isOpenAiModelId(value) {
|
|
211
|
+
return OPENAI_MODEL_IDS.includes(value);
|
|
212
|
+
}
|
|
213
|
+
var CHATGPT_MODEL_IDS = [
|
|
214
|
+
"chatgpt-gpt-5.4",
|
|
215
|
+
"chatgpt-gpt-5.4-fast",
|
|
216
|
+
"chatgpt-gpt-5.4-mini",
|
|
217
|
+
"chatgpt-gpt-5.3-codex-spark"
|
|
218
|
+
];
|
|
219
|
+
var EXPERIMENTAL_CHATGPT_MODEL_PREFIX = "experimental-chatgpt-";
|
|
220
|
+
function isExperimentalChatGptModelId(value) {
|
|
221
|
+
return value.startsWith(EXPERIMENTAL_CHATGPT_MODEL_PREFIX) && value.length > EXPERIMENTAL_CHATGPT_MODEL_PREFIX.length;
|
|
222
|
+
}
|
|
223
|
+
function isChatGptModelId(value) {
|
|
224
|
+
return CHATGPT_MODEL_IDS.includes(value) || isExperimentalChatGptModelId(value);
|
|
225
|
+
}
|
|
226
|
+
function stripChatGptPrefix(model) {
|
|
227
|
+
if (isExperimentalChatGptModelId(model)) {
|
|
228
|
+
return model.slice(EXPERIMENTAL_CHATGPT_MODEL_PREFIX.length);
|
|
229
|
+
}
|
|
230
|
+
return model.slice("chatgpt-".length);
|
|
231
|
+
}
|
|
232
|
+
function resolveChatGptProviderModel(model) {
|
|
233
|
+
switch (model) {
|
|
234
|
+
case "chatgpt-gpt-5.4-fast":
|
|
235
|
+
return "gpt-5.4";
|
|
236
|
+
default:
|
|
237
|
+
return stripChatGptPrefix(model);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function resolveChatGptServiceTier(model) {
|
|
241
|
+
return model === "chatgpt-gpt-5.4-fast" ? "priority" : void 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
208
244
|
// src/openai/pricing.ts
|
|
209
245
|
var OPENAI_GPT_54_FAST_MODEL_IDS = ["gpt-5.4-fast", "chatgpt-gpt-5.4-fast"];
|
|
210
246
|
var OPENAI_GPT_54_MINI_MODEL_IDS = ["gpt-5.4-mini", "chatgpt-gpt-5.4-mini"];
|
|
@@ -235,6 +271,9 @@ var OPENAI_GPT_54_NANO_PRICING = {
|
|
|
235
271
|
outputRate: 0.4 / 1e6
|
|
236
272
|
};
|
|
237
273
|
function getOpenAiPricing(modelId) {
|
|
274
|
+
if (isExperimentalChatGptModelId(modelId)) {
|
|
275
|
+
return OPENAI_GPT_54_PRICING;
|
|
276
|
+
}
|
|
238
277
|
if (OPENAI_GPT_54_FAST_MODEL_IDS.includes(modelId)) {
|
|
239
278
|
return OPENAI_GPT_54_PRIORITY_PRICING;
|
|
240
279
|
}
|
|
@@ -2719,35 +2758,6 @@ async function runOpenAiCall(fn, modelId, runOptions) {
|
|
|
2719
2758
|
return getSchedulerForModel3(modelId).run(async () => fn(getOpenAiClient()), runOptions);
|
|
2720
2759
|
}
|
|
2721
2760
|
|
|
2722
|
-
// src/openai/models.ts
|
|
2723
|
-
var OPENAI_MODEL_IDS = ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
2724
|
-
function isOpenAiModelId(value) {
|
|
2725
|
-
return OPENAI_MODEL_IDS.includes(value);
|
|
2726
|
-
}
|
|
2727
|
-
var CHATGPT_MODEL_IDS = [
|
|
2728
|
-
"chatgpt-gpt-5.4",
|
|
2729
|
-
"chatgpt-gpt-5.4-fast",
|
|
2730
|
-
"chatgpt-gpt-5.4-mini",
|
|
2731
|
-
"chatgpt-gpt-5.3-codex-spark"
|
|
2732
|
-
];
|
|
2733
|
-
function isChatGptModelId(value) {
|
|
2734
|
-
return CHATGPT_MODEL_IDS.includes(value);
|
|
2735
|
-
}
|
|
2736
|
-
function stripChatGptPrefix(model) {
|
|
2737
|
-
return model.slice("chatgpt-".length);
|
|
2738
|
-
}
|
|
2739
|
-
function resolveChatGptProviderModel(model) {
|
|
2740
|
-
switch (model) {
|
|
2741
|
-
case "chatgpt-gpt-5.4-fast":
|
|
2742
|
-
return "gpt-5.4";
|
|
2743
|
-
default:
|
|
2744
|
-
return stripChatGptPrefix(model);
|
|
2745
|
-
}
|
|
2746
|
-
}
|
|
2747
|
-
function resolveChatGptServiceTier(model) {
|
|
2748
|
-
return model === "chatgpt-gpt-5.4-fast" ? "priority" : void 0;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
2761
|
// src/agentLogging.ts
|
|
2752
2762
|
import { AsyncLocalStorage } from "async_hooks";
|
|
2753
2763
|
import { Buffer as Buffer3 } from "buffer";
|
|
@@ -7823,7 +7833,7 @@ async function runTextCall(params) {
|
|
|
7823
7833
|
pushEvent({ type: "blocked" });
|
|
7824
7834
|
}
|
|
7825
7835
|
if (result2.model) {
|
|
7826
|
-
modelVersion = providerInfo.serviceTier ? request.model : `chatgpt-${result2.model}`;
|
|
7836
|
+
modelVersion = providerInfo.serviceTier || isExperimentalChatGptModelId(request.model) ? request.model : `chatgpt-${result2.model}`;
|
|
7827
7837
|
pushEvent({ type: "model", modelVersion });
|
|
7828
7838
|
}
|
|
7829
7839
|
latestUsage = extractChatGptUsageTokens(result2.usage);
|
|
@@ -9029,7 +9039,7 @@ async function runToolLoop(request) {
|
|
|
9029
9039
|
}
|
|
9030
9040
|
});
|
|
9031
9041
|
const modelCompletedAtMs = Date.now();
|
|
9032
|
-
modelVersion = response.model && !providerInfo.serviceTier ? `chatgpt-${response.model}` : request.model;
|
|
9042
|
+
modelVersion = response.model && !providerInfo.serviceTier && !isExperimentalChatGptModelId(request.model) ? `chatgpt-${response.model}` : request.model;
|
|
9033
9043
|
usageTokens = extractChatGptUsageTokens(response.usage);
|
|
9034
9044
|
const stepCostUsd = estimateCallCostUsd({
|
|
9035
9045
|
modelId: modelVersion,
|
|
@@ -10782,10 +10792,16 @@ function resolveCollabInputText(params) {
|
|
|
10782
10792
|
return blocks.join("\n\n");
|
|
10783
10793
|
}
|
|
10784
10794
|
if (!params.items || params.items.length === 0) {
|
|
10795
|
+
if (blocks.length > 0) {
|
|
10796
|
+
return blocks.join("\n\n");
|
|
10797
|
+
}
|
|
10785
10798
|
throw new Error(params.emptyItemsError);
|
|
10786
10799
|
}
|
|
10787
10800
|
const itemText = resolveInputItemsText(params.items);
|
|
10788
10801
|
if (!itemText) {
|
|
10802
|
+
if (blocks.length > 0) {
|
|
10803
|
+
return blocks.join("\n\n");
|
|
10804
|
+
}
|
|
10789
10805
|
throw new Error(params.emptyItemsError);
|
|
10790
10806
|
}
|
|
10791
10807
|
blocks.push(itemText);
|
|
@@ -12633,6 +12649,9 @@ async function runAccessHook2(runtime, context) {
|
|
|
12633
12649
|
await runtime.checkAccess(context);
|
|
12634
12650
|
}
|
|
12635
12651
|
function isCodexModel(model) {
|
|
12652
|
+
if (model.startsWith("experimental-chatgpt-")) {
|
|
12653
|
+
return true;
|
|
12654
|
+
}
|
|
12636
12655
|
const normalized = model.startsWith("chatgpt-") ? model.slice("chatgpt-".length) : model;
|
|
12637
12656
|
return normalized.includes("codex") || normalized === "gpt-5.4" || normalized === "gpt-5.4-fast";
|
|
12638
12657
|
}
|
|
@@ -14072,6 +14091,7 @@ export {
|
|
|
14072
14091
|
CODEX_APPLY_PATCH_LARK_GRAMMAR,
|
|
14073
14092
|
DEFAULT_FILE_TTL_SECONDS,
|
|
14074
14093
|
DEFAULT_SIGNED_URL_TTL_SECONDS,
|
|
14094
|
+
EXPERIMENTAL_CHATGPT_MODEL_PREFIX,
|
|
14075
14095
|
FIREWORKS_DEFAULT_GLM_MODEL,
|
|
14076
14096
|
FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL,
|
|
14077
14097
|
FIREWORKS_DEFAULT_KIMI_MODEL,
|
|
@@ -14126,6 +14146,7 @@ export {
|
|
|
14126
14146
|
getChatGptAuthProfile,
|
|
14127
14147
|
getCurrentToolCallContext,
|
|
14128
14148
|
isChatGptModelId,
|
|
14149
|
+
isExperimentalChatGptModelId,
|
|
14129
14150
|
isFireworksModelId,
|
|
14130
14151
|
isGeminiImageModelId,
|
|
14131
14152
|
isGeminiModelId,
|