@openclaw/codex 2026.6.11-beta.2 → 2026.7.1-beta.1
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/{app-server-policy-BPTiVNsW.js → app-server-policy-xi0ZmBGO.js} +2 -2
- package/dist/{attempt-notifications-BYnndyFl.js → attempt-notifications-l9LElGOU.js} +26 -2
- package/dist/{client-CLrtWgrD.js → client-IcTBKEqA.js} +5 -2
- package/dist/{client-factory-Bm6HsGob.js → client-factory-CwjdQQ4j.js} +1 -1
- package/dist/{command-handlers-DEPTJYk0.js → command-handlers-vZy8xX5X.js} +25 -19
- package/dist/{compact-aQJ0ZKhe.js → compact-BzB9AqN1.js} +5 -5
- package/dist/{computer-use-ClrJwoFp.js → computer-use-FPGG-mtX.js} +3 -3
- package/dist/{config-CszD0vP3.js → config-C_whBx3M.js} +8 -3
- package/dist/{conversation-binding-t0XMLz-j.js → conversation-binding-CEE2UyYb.js} +28 -15
- package/dist/harness.js +6 -6
- package/dist/index.js +25 -17
- package/dist/{media-understanding-provider-ZUQHN7gT.js → media-understanding-provider-C5yYzx_6.js} +6 -6
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{models-CAmfBWRl.js → models-Ccy1_7nN.js} +2 -2
- package/dist/{plugin-app-cache-key-C9ILt7bl.js → plugin-app-cache-key-CDioyur-.js} +8 -4
- package/dist/{protocol-validators-B19q5BIX.js → protocol-validators-CB4mtyrs.js} +106 -12
- package/dist/{provider-B-OHpbD3.js → provider-DosqwRb6.js} +53 -18
- package/dist/{provider-capabilities-D7hnTO76.js → provider-capabilities-CE5k8cmO.js} +179 -15
- package/dist/provider-catalog.js +4 -2
- package/dist/provider.js +2 -2
- package/dist/{request-Dcd452Nk.js → request-BQuSQF29.js} +2 -2
- package/dist/{run-attempt-CXxtFC9d.js → run-attempt-O3Zs32KI.js} +106 -29
- package/dist/{sandbox-guard-3tnjhjFb.js → sandbox-guard-pTY2COoC.js} +2 -0
- package/dist/{session-binding-HOuPt-E0.js → session-binding-Cm0Gg7Z1.js} +2 -1
- package/dist/{shared-client-Dtx5i7Ez.js → shared-client-rR6TDJA3.js} +98 -47
- package/dist/{side-question-C-DhgJOd.js → side-question-DDVgFmpv.js} +12 -12
- package/dist/{thread-lifecycle-DtT3-ehU.js → thread-lifecycle-DeSMZSXr.js} +148 -42
- package/dist/{web-search-provider.runtime-CkwxrXQj.js → web-search-provider.runtime-Q89rQhsL.js} +2 -2
- package/npm-shrinkwrap.json +30 -30
- package/openclaw.plugin.json +3 -3
- package/package.json +5 -5
|
@@ -642,6 +642,16 @@ var ThreadResumeResponse_default = {
|
|
|
642
642
|
],
|
|
643
643
|
"type": "string"
|
|
644
644
|
},
|
|
645
|
+
"LegacyAppPathString": { "type": "string" },
|
|
646
|
+
"McpToolCallAppContext": {
|
|
647
|
+
"properties": {
|
|
648
|
+
"connectorId": { "type": "string" },
|
|
649
|
+
"linkId": { "type": ["string", "null"] },
|
|
650
|
+
"resourceUri": { "type": ["string", "null"] }
|
|
651
|
+
},
|
|
652
|
+
"required": ["connectorId"],
|
|
653
|
+
"type": "object"
|
|
654
|
+
},
|
|
645
655
|
"McpToolCallError": {
|
|
646
656
|
"properties": { "message": { "type": "string" } },
|
|
647
657
|
"required": ["message"],
|
|
@@ -716,6 +726,15 @@ var ThreadResumeResponse_default = {
|
|
|
716
726
|
"type": "string"
|
|
717
727
|
}]
|
|
718
728
|
},
|
|
729
|
+
"MultiAgentMode": {
|
|
730
|
+
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
|
|
731
|
+
"enum": [
|
|
732
|
+
"none",
|
|
733
|
+
"explicitRequestOnly",
|
|
734
|
+
"proactive"
|
|
735
|
+
],
|
|
736
|
+
"type": "string"
|
|
737
|
+
},
|
|
719
738
|
"NetworkAccess": {
|
|
720
739
|
"enum": ["restricted", "enabled"],
|
|
721
740
|
"type": "string"
|
|
@@ -996,6 +1015,11 @@ var ThreadResumeResponse_default = {
|
|
|
996
1015
|
"description": "Usually the first user message in the thread, if available.",
|
|
997
1016
|
"type": "string"
|
|
998
1017
|
},
|
|
1018
|
+
"recencyAt": {
|
|
1019
|
+
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
|
|
1020
|
+
"format": "int64",
|
|
1021
|
+
"type": ["integer", "null"]
|
|
1022
|
+
},
|
|
999
1023
|
"sessionId": {
|
|
1000
1024
|
"description": "Session id shared by threads that belong to the same session tree.",
|
|
1001
1025
|
"type": "string"
|
|
@@ -1172,7 +1196,7 @@ var ThreadResumeResponse_default = {
|
|
|
1172
1196
|
"type": "array"
|
|
1173
1197
|
},
|
|
1174
1198
|
"cwd": {
|
|
1175
|
-
"allOf": [{ "$ref": "#/definitions/
|
|
1199
|
+
"allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
|
|
1176
1200
|
"description": "The command's working directory."
|
|
1177
1201
|
},
|
|
1178
1202
|
"durationMs": {
|
|
@@ -1237,6 +1261,7 @@ var ThreadResumeResponse_default = {
|
|
|
1237
1261
|
},
|
|
1238
1262
|
{
|
|
1239
1263
|
"properties": {
|
|
1264
|
+
"appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
|
|
1240
1265
|
"arguments": true,
|
|
1241
1266
|
"durationMs": {
|
|
1242
1267
|
"description": "The duration of the MCP tool call in milliseconds.",
|
|
@@ -1245,7 +1270,10 @@ var ThreadResumeResponse_default = {
|
|
|
1245
1270
|
},
|
|
1246
1271
|
"error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
|
|
1247
1272
|
"id": { "type": "string" },
|
|
1248
|
-
"mcpAppResourceUri": {
|
|
1273
|
+
"mcpAppResourceUri": {
|
|
1274
|
+
"description": "Deprecated: use `appContext.resourceUri` instead.",
|
|
1275
|
+
"type": ["string", "null"]
|
|
1276
|
+
},
|
|
1249
1277
|
"pluginId": { "type": ["string", "null"] },
|
|
1250
1278
|
"result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
|
|
1251
1279
|
"server": { "type": "string" },
|
|
@@ -1819,12 +1847,17 @@ var ThreadResumeResponse_default = {
|
|
|
1819
1847
|
},
|
|
1820
1848
|
"instructionSources": {
|
|
1821
1849
|
"default": [],
|
|
1822
|
-
"description": "
|
|
1823
|
-
"items": { "$ref": "#/definitions/
|
|
1850
|
+
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
|
|
1851
|
+
"items": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
1824
1852
|
"type": "array"
|
|
1825
1853
|
},
|
|
1826
1854
|
"model": { "type": "string" },
|
|
1827
1855
|
"modelProvider": { "type": "string" },
|
|
1856
|
+
"multiAgentMode": {
|
|
1857
|
+
"allOf": [{ "$ref": "#/definitions/MultiAgentMode" }],
|
|
1858
|
+
"default": "explicitRequestOnly",
|
|
1859
|
+
"description": "@deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior."
|
|
1860
|
+
},
|
|
1828
1861
|
"reasoningEffort": { "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] },
|
|
1829
1862
|
"runtimeWorkspaceRoots": {
|
|
1830
1863
|
"default": [],
|
|
@@ -2218,6 +2251,16 @@ var ThreadStartResponse_default = {
|
|
|
2218
2251
|
],
|
|
2219
2252
|
"type": "string"
|
|
2220
2253
|
},
|
|
2254
|
+
"LegacyAppPathString": { "type": "string" },
|
|
2255
|
+
"McpToolCallAppContext": {
|
|
2256
|
+
"properties": {
|
|
2257
|
+
"connectorId": { "type": "string" },
|
|
2258
|
+
"linkId": { "type": ["string", "null"] },
|
|
2259
|
+
"resourceUri": { "type": ["string", "null"] }
|
|
2260
|
+
},
|
|
2261
|
+
"required": ["connectorId"],
|
|
2262
|
+
"type": "object"
|
|
2263
|
+
},
|
|
2221
2264
|
"McpToolCallError": {
|
|
2222
2265
|
"properties": { "message": { "type": "string" } },
|
|
2223
2266
|
"required": ["message"],
|
|
@@ -2292,6 +2335,15 @@ var ThreadStartResponse_default = {
|
|
|
2292
2335
|
"type": "string"
|
|
2293
2336
|
}]
|
|
2294
2337
|
},
|
|
2338
|
+
"MultiAgentMode": {
|
|
2339
|
+
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
|
|
2340
|
+
"enum": [
|
|
2341
|
+
"none",
|
|
2342
|
+
"explicitRequestOnly",
|
|
2343
|
+
"proactive"
|
|
2344
|
+
],
|
|
2345
|
+
"type": "string"
|
|
2346
|
+
},
|
|
2295
2347
|
"NetworkAccess": {
|
|
2296
2348
|
"enum": ["restricted", "enabled"],
|
|
2297
2349
|
"type": "string"
|
|
@@ -2572,6 +2624,11 @@ var ThreadStartResponse_default = {
|
|
|
2572
2624
|
"description": "Usually the first user message in the thread, if available.",
|
|
2573
2625
|
"type": "string"
|
|
2574
2626
|
},
|
|
2627
|
+
"recencyAt": {
|
|
2628
|
+
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
|
|
2629
|
+
"format": "int64",
|
|
2630
|
+
"type": ["integer", "null"]
|
|
2631
|
+
},
|
|
2575
2632
|
"sessionId": {
|
|
2576
2633
|
"description": "Session id shared by threads that belong to the same session tree.",
|
|
2577
2634
|
"type": "string"
|
|
@@ -2748,7 +2805,7 @@ var ThreadStartResponse_default = {
|
|
|
2748
2805
|
"type": "array"
|
|
2749
2806
|
},
|
|
2750
2807
|
"cwd": {
|
|
2751
|
-
"allOf": [{ "$ref": "#/definitions/
|
|
2808
|
+
"allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
|
|
2752
2809
|
"description": "The command's working directory."
|
|
2753
2810
|
},
|
|
2754
2811
|
"durationMs": {
|
|
@@ -2813,6 +2870,7 @@ var ThreadStartResponse_default = {
|
|
|
2813
2870
|
},
|
|
2814
2871
|
{
|
|
2815
2872
|
"properties": {
|
|
2873
|
+
"appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
|
|
2816
2874
|
"arguments": true,
|
|
2817
2875
|
"durationMs": {
|
|
2818
2876
|
"description": "The duration of the MCP tool call in milliseconds.",
|
|
@@ -2821,7 +2879,10 @@ var ThreadStartResponse_default = {
|
|
|
2821
2879
|
},
|
|
2822
2880
|
"error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
|
|
2823
2881
|
"id": { "type": "string" },
|
|
2824
|
-
"mcpAppResourceUri": {
|
|
2882
|
+
"mcpAppResourceUri": {
|
|
2883
|
+
"description": "Deprecated: use `appContext.resourceUri` instead.",
|
|
2884
|
+
"type": ["string", "null"]
|
|
2885
|
+
},
|
|
2825
2886
|
"pluginId": { "type": ["string", "null"] },
|
|
2826
2887
|
"result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
|
|
2827
2888
|
"server": { "type": "string" },
|
|
@@ -3378,12 +3439,17 @@ var ThreadStartResponse_default = {
|
|
|
3378
3439
|
"cwd": { "$ref": "#/definitions/AbsolutePathBuf" },
|
|
3379
3440
|
"instructionSources": {
|
|
3380
3441
|
"default": [],
|
|
3381
|
-
"description": "
|
|
3382
|
-
"items": { "$ref": "#/definitions/
|
|
3442
|
+
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
|
|
3443
|
+
"items": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
3383
3444
|
"type": "array"
|
|
3384
3445
|
},
|
|
3385
3446
|
"model": { "type": "string" },
|
|
3386
3447
|
"modelProvider": { "type": "string" },
|
|
3448
|
+
"multiAgentMode": {
|
|
3449
|
+
"allOf": [{ "$ref": "#/definitions/MultiAgentMode" }],
|
|
3450
|
+
"default": "explicitRequestOnly",
|
|
3451
|
+
"description": "@deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior."
|
|
3452
|
+
},
|
|
3387
3453
|
"reasoningEffort": { "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] },
|
|
3388
3454
|
"runtimeWorkspaceRoots": {
|
|
3389
3455
|
"default": [],
|
|
@@ -3709,6 +3775,16 @@ var TurnCompletedNotification_default = {
|
|
|
3709
3775
|
],
|
|
3710
3776
|
"type": "string"
|
|
3711
3777
|
},
|
|
3778
|
+
"LegacyAppPathString": { "type": "string" },
|
|
3779
|
+
"McpToolCallAppContext": {
|
|
3780
|
+
"properties": {
|
|
3781
|
+
"connectorId": { "type": "string" },
|
|
3782
|
+
"linkId": { "type": ["string", "null"] },
|
|
3783
|
+
"resourceUri": { "type": ["string", "null"] }
|
|
3784
|
+
},
|
|
3785
|
+
"required": ["connectorId"],
|
|
3786
|
+
"type": "object"
|
|
3787
|
+
},
|
|
3712
3788
|
"McpToolCallError": {
|
|
3713
3789
|
"properties": { "message": { "type": "string" } },
|
|
3714
3790
|
"required": ["message"],
|
|
@@ -3986,7 +4062,7 @@ var TurnCompletedNotification_default = {
|
|
|
3986
4062
|
"type": "array"
|
|
3987
4063
|
},
|
|
3988
4064
|
"cwd": {
|
|
3989
|
-
"allOf": [{ "$ref": "#/definitions/
|
|
4065
|
+
"allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
|
|
3990
4066
|
"description": "The command's working directory."
|
|
3991
4067
|
},
|
|
3992
4068
|
"durationMs": {
|
|
@@ -4051,6 +4127,7 @@ var TurnCompletedNotification_default = {
|
|
|
4051
4127
|
},
|
|
4052
4128
|
{
|
|
4053
4129
|
"properties": {
|
|
4130
|
+
"appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
|
|
4054
4131
|
"arguments": true,
|
|
4055
4132
|
"durationMs": {
|
|
4056
4133
|
"description": "The duration of the MCP tool call in milliseconds.",
|
|
@@ -4059,7 +4136,10 @@ var TurnCompletedNotification_default = {
|
|
|
4059
4136
|
},
|
|
4060
4137
|
"error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
|
|
4061
4138
|
"id": { "type": "string" },
|
|
4062
|
-
"mcpAppResourceUri": {
|
|
4139
|
+
"mcpAppResourceUri": {
|
|
4140
|
+
"description": "Deprecated: use `appContext.resourceUri` instead.",
|
|
4141
|
+
"type": ["string", "null"]
|
|
4142
|
+
},
|
|
4063
4143
|
"pluginId": { "type": ["string", "null"] },
|
|
4064
4144
|
"result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
|
|
4065
4145
|
"server": { "type": "string" },
|
|
@@ -4860,6 +4940,16 @@ var TurnStartResponse_default = {
|
|
|
4860
4940
|
],
|
|
4861
4941
|
"type": "string"
|
|
4862
4942
|
},
|
|
4943
|
+
"LegacyAppPathString": { "type": "string" },
|
|
4944
|
+
"McpToolCallAppContext": {
|
|
4945
|
+
"properties": {
|
|
4946
|
+
"connectorId": { "type": "string" },
|
|
4947
|
+
"linkId": { "type": ["string", "null"] },
|
|
4948
|
+
"resourceUri": { "type": ["string", "null"] }
|
|
4949
|
+
},
|
|
4950
|
+
"required": ["connectorId"],
|
|
4951
|
+
"type": "object"
|
|
4952
|
+
},
|
|
4863
4953
|
"McpToolCallError": {
|
|
4864
4954
|
"properties": { "message": { "type": "string" } },
|
|
4865
4955
|
"required": ["message"],
|
|
@@ -5137,7 +5227,7 @@ var TurnStartResponse_default = {
|
|
|
5137
5227
|
"type": "array"
|
|
5138
5228
|
},
|
|
5139
5229
|
"cwd": {
|
|
5140
|
-
"allOf": [{ "$ref": "#/definitions/
|
|
5230
|
+
"allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
|
|
5141
5231
|
"description": "The command's working directory."
|
|
5142
5232
|
},
|
|
5143
5233
|
"durationMs": {
|
|
@@ -5202,6 +5292,7 @@ var TurnStartResponse_default = {
|
|
|
5202
5292
|
},
|
|
5203
5293
|
{
|
|
5204
5294
|
"properties": {
|
|
5295
|
+
"appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
|
|
5205
5296
|
"arguments": true,
|
|
5206
5297
|
"durationMs": {
|
|
5207
5298
|
"description": "The duration of the MCP tool call in milliseconds.",
|
|
@@ -5210,7 +5301,10 @@ var TurnStartResponse_default = {
|
|
|
5210
5301
|
},
|
|
5211
5302
|
"error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
|
|
5212
5303
|
"id": { "type": "string" },
|
|
5213
|
-
"mcpAppResourceUri": {
|
|
5304
|
+
"mcpAppResourceUri": {
|
|
5305
|
+
"description": "Deprecated: use `appContext.resourceUri` instead.",
|
|
5306
|
+
"type": ["string", "null"]
|
|
5307
|
+
},
|
|
5214
5308
|
"pluginId": { "type": ["string", "null"] },
|
|
5215
5309
|
"result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
|
|
5216
5310
|
"server": { "type": "string" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CODEX_APP_SERVER_AUTH_MARKER, CODEX_BASE_URL, CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS, buildCodexModelDefinition, buildCodexProviderConfig } from "./provider-catalog.js";
|
|
2
2
|
import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
|
|
3
|
-
import { d as resolveCodexAppServerRuntimeOptions, u as readCodexPluginConfig } from "./config-
|
|
3
|
+
import { d as resolveCodexAppServerRuntimeOptions, u as readCodexPluginConfig } from "./config-C_whBx3M.js";
|
|
4
4
|
import { resolveCodexSystemPromptContribution } from "./prompt-overlay.js";
|
|
5
5
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
import { MAX_DATE_TIMESTAMP_MS, resolveExpiresAtMsFromEpochSeconds } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -410,6 +410,14 @@ const MODEL_DISCOVERY_PAGE_LIMIT = 100;
|
|
|
410
410
|
const CODEX_APP_SERVER_SETUP_METHOD_ID = "app-server";
|
|
411
411
|
const CODEX_DEFAULT_MODEL_REF = `${CODEX_PROVIDER_ID}/${FALLBACK_CODEX_MODELS[0].id}`;
|
|
412
412
|
const codexCatalogLog = createSubsystemLogger("codex/catalog");
|
|
413
|
+
const CODEX_REASONING_EFFORTS = [
|
|
414
|
+
"minimal",
|
|
415
|
+
"low",
|
|
416
|
+
"medium",
|
|
417
|
+
"high",
|
|
418
|
+
"xhigh",
|
|
419
|
+
"max"
|
|
420
|
+
];
|
|
413
421
|
/**
|
|
414
422
|
* Builds the Codex provider plugin, including setup metadata, catalog discovery,
|
|
415
423
|
* dynamic model resolution, and prompt/thinking hooks.
|
|
@@ -471,14 +479,10 @@ function buildCodexProvider(options = {}) {
|
|
|
471
479
|
startOptions: appServer.start
|
|
472
480
|
}));
|
|
473
481
|
},
|
|
474
|
-
resolveThinkingProfile: ({ modelId }) => ({ levels: [
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
{ id: "medium" },
|
|
479
|
-
{ id: "high" },
|
|
480
|
-
...isKnownXHighCodexModel(modelId) ? [{ id: "xhigh" }] : []
|
|
481
|
-
] }),
|
|
482
|
+
resolveThinkingProfile: ({ modelId, compat }) => ({ levels: [{ id: "off" }, ...resolveCodexThinkingEfforts({
|
|
483
|
+
modelId,
|
|
484
|
+
supportedReasoningEfforts: readCodexSupportedReasoningEfforts(compat)
|
|
485
|
+
}).map((id) => ({ id }))] }),
|
|
482
486
|
resolveSystemPromptContribution: ({ config, modelId }) => resolveCodexSystemPromptContribution({
|
|
483
487
|
config,
|
|
484
488
|
modelId
|
|
@@ -512,7 +516,7 @@ function resolveCodexDynamicModel(modelId) {
|
|
|
512
516
|
id,
|
|
513
517
|
model: id,
|
|
514
518
|
inputModalities: fallbackModel?.inputModalities ?? ["text"],
|
|
515
|
-
supportedReasoningEfforts: fallbackModel?.supportedReasoningEfforts
|
|
519
|
+
supportedReasoningEfforts: fallbackModel?.supportedReasoningEfforts
|
|
516
520
|
}),
|
|
517
521
|
provider: CODEX_PROVIDER_ID,
|
|
518
522
|
baseUrl: CODEX_BASE_URL
|
|
@@ -541,11 +545,11 @@ async function listModelsBestEffort(params) {
|
|
|
541
545
|
}
|
|
542
546
|
}
|
|
543
547
|
async function listCodexAppServerModelsLazy(options) {
|
|
544
|
-
const { listCodexAppServerModels } = await import("./models-
|
|
548
|
+
const { listCodexAppServerModels } = await import("./models-Ccy1_7nN.js").then((n) => n.r);
|
|
545
549
|
return listCodexAppServerModels(options);
|
|
546
550
|
}
|
|
547
551
|
async function requestCodexAppServerRateLimitsLazy(options) {
|
|
548
|
-
const { requestCodexAppServerJson } = await import("./request-
|
|
552
|
+
const { requestCodexAppServerJson } = await import("./request-BQuSQF29.js").then((n) => n.n);
|
|
549
553
|
return await requestCodexAppServerJson({
|
|
550
554
|
method: "account/rateLimits/read",
|
|
551
555
|
timeoutMs: options.timeoutMs,
|
|
@@ -564,21 +568,52 @@ function shouldSkipLiveDiscovery(env = process.env) {
|
|
|
564
568
|
if (override === "0" || override === "false") return true;
|
|
565
569
|
return Boolean(env.VITEST) && override !== "1";
|
|
566
570
|
}
|
|
567
|
-
function shouldDefaultToReasoningModel(modelId) {
|
|
568
|
-
const lower = modelId.toLowerCase();
|
|
569
|
-
return lower.startsWith("gpt-5") || lower.startsWith("o1") || lower.startsWith("o3") || lower.startsWith("o4");
|
|
570
|
-
}
|
|
571
571
|
function isKnownXHighCodexModel(modelId) {
|
|
572
572
|
const lower = modelId.trim().toLowerCase();
|
|
573
573
|
return lower.startsWith("gpt-5") || lower.startsWith("o3") || lower.startsWith("o4") || lower.includes("codex");
|
|
574
574
|
}
|
|
575
|
+
function normalizeCodexReasoningEfforts(efforts) {
|
|
576
|
+
if (!efforts) return [];
|
|
577
|
+
const supported = new Set(efforts.map((effort) => effort.trim().toLowerCase()));
|
|
578
|
+
return CODEX_REASONING_EFFORTS.filter((effort) => supported.has(effort));
|
|
579
|
+
}
|
|
580
|
+
/** Read app-server reasoning metadata from a runtime model compat union. */
|
|
581
|
+
function readCodexSupportedReasoningEfforts(compat) {
|
|
582
|
+
if (!compat || typeof compat !== "object" || Array.isArray(compat)) return;
|
|
583
|
+
const efforts = compat.supportedReasoningEfforts;
|
|
584
|
+
if (!Array.isArray(efforts)) return;
|
|
585
|
+
return efforts.filter((effort) => typeof effort === "string");
|
|
586
|
+
}
|
|
587
|
+
function resolveCodexThinkingEfforts(params) {
|
|
588
|
+
if (params.supportedReasoningEfforts) return normalizeCodexReasoningEfforts(params.supportedReasoningEfforts);
|
|
589
|
+
return [
|
|
590
|
+
"minimal",
|
|
591
|
+
"low",
|
|
592
|
+
"medium",
|
|
593
|
+
"high",
|
|
594
|
+
...isKnownXHighCodexModel(params.modelId) ? ["xhigh"] : [],
|
|
595
|
+
...isMaxReasoningCodexModel(params.modelId) ? ["max"] : []
|
|
596
|
+
];
|
|
597
|
+
}
|
|
598
|
+
/** Map a requested effort onto the authoritative app-server model contract. */
|
|
599
|
+
function resolveCodexSupportedReasoningEffort(params) {
|
|
600
|
+
const supported = normalizeCodexReasoningEfforts(params.supportedReasoningEfforts);
|
|
601
|
+
if (supported.includes(params.requested)) return params.requested;
|
|
602
|
+
const requestedRank = CODEX_REASONING_EFFORTS.indexOf(params.requested);
|
|
603
|
+
return supported.find((effort) => CODEX_REASONING_EFFORTS.indexOf(effort) >= requestedRank) ?? supported.at(-1);
|
|
604
|
+
}
|
|
575
605
|
/**
|
|
576
606
|
* Returns true for Codex models that use the modern reasoning effort enum and
|
|
577
607
|
* reject the legacy CLI `minimal` default.
|
|
578
608
|
*/
|
|
579
609
|
function isModernCodexModel(modelId) {
|
|
580
610
|
const lower = modelId.trim().toLowerCase();
|
|
581
|
-
return lower === "gpt-5.5" || lower === "gpt-5.4" || lower === "gpt-5.4-mini" || lower === "gpt-5.3-codex-spark";
|
|
611
|
+
return lower === "gpt-5.6" || lower.startsWith("gpt-5.6-") || lower === "gpt-5.5" || lower === "gpt-5.4" || lower === "gpt-5.4-mini" || lower === "gpt-5.3-codex-spark";
|
|
612
|
+
}
|
|
613
|
+
/** Return whether Codex accepts the preview GPT-5.6 `max` reasoning effort. */
|
|
614
|
+
function isMaxReasoningCodexModel(modelId) {
|
|
615
|
+
const lower = modelId.trim().toLowerCase();
|
|
616
|
+
return lower === "gpt-5.6" || lower.startsWith("gpt-5.6-");
|
|
582
617
|
}
|
|
583
618
|
//#endregion
|
|
584
|
-
export {
|
|
619
|
+
export { readCodexSupportedReasoningEfforts as a, hasCodexRateLimitSnapshots as c, summarizeCodexAccountRateLimits as d, summarizeCodexAccountUsage as f, isModernCodexModel as i, resolveCodexUsageLimitResetAtMs as l, buildCodexProviderCatalog as n, resolveCodexSupportedReasoningEffort as o, summarizeCodexRateLimits as p, isMaxReasoningCodexModel as r, formatCodexUsageLimitErrorMessage as s, buildCodexProvider as t, shouldRefreshCodexRateLimitsForUsageLimitMessage as u };
|