ai-sdk-provider-codex-cli 0.5.1 → 0.5.2

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/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/ben-vargas/ai-sdk-provider-codex-cli/issues)
11
11
  [![Latest Release](https://img.shields.io/github/v/release/ben-vargas/ai-sdk-provider-codex-cli?display_name=tag)](https://github.com/ben-vargas/ai-sdk-provider-codex-cli/releases/latest)
12
12
 
13
- A community provider for Vercel AI SDK v5 that uses OpenAI’s Codex CLI (non‑interactive `codex exec`) to talk to GPT‑5.1 class models (`gpt-5.1`, the Codex-specific `gpt-5.1-codex`, and the lightweight `gpt-5.1-codex-mini` slugs) with your ChatGPT Plus/Pro subscription. The provider spawns the Codex CLI process, parses its JSONL output, and adapts it to the AI SDK LanguageModelV2 interface. Legacy GPT-5 / GPT-5-codex slugs remain compatible for existing workflows.
13
+ A community provider for Vercel AI SDK v5 that uses OpenAI’s Codex CLI (non‑interactive `codex exec`) to talk to GPT‑5.1 class models (`gpt-5.1`, the Codex-specific `gpt-5.1-codex`, the flagship `gpt-5.1-codex-max`, and the lightweight `gpt-5.1-codex-mini` slugs) with your ChatGPT Plus/Pro subscription. The provider spawns the Codex CLI process, parses its JSONL output, and adapts it to the AI SDK LanguageModelV2 interface. Legacy GPT-5 / GPT-5-codex slugs remain compatible for existing workflows.
14
14
 
15
15
  - Works with `generateText`, `streamText`, and `generateObject` (native JSON Schema support via `--output-schema`)
16
16
  - Uses ChatGPT OAuth from `codex login` (tokens in `~/.codex/auth.json`) or `OPENAI_API_KEY`
@@ -28,7 +28,7 @@ npm i -g @openai/codex
28
28
  codex login # or set OPENAI_API_KEY
29
29
  ```
30
30
 
31
- > **⚠️ Version Requirement**: Requires Codex CLI **>= 0.42.0** for `--experimental-json` and `--output-schema` support. **>= 0.44.0 recommended** for full usage tracking and tool streaming support. Check your version with `codex --version` and upgrade if needed:
31
+ > **⚠️ Version Requirement**: Requires Codex CLI **>= 0.42.0** for `--experimental-json` and `--output-schema` support. **>= 0.60.0 recommended** for `gpt-5.1-codex-max` and `xhigh` reasoning effort. If you supply your own Codex CLI (global install or custom `codexPath`/`allowNpx`), check it with `codex --version` and upgrade if needed. The optional dependency `@openai/codex` in this package pulls a compatible version automatically.
32
32
  >
33
33
  > ```bash
34
34
  > npm i -g @openai/codex@latest
@@ -248,7 +248,7 @@ const model = codexCli('gpt-5.1-codex', {
248
248
  skipGitRepoCheck: true,
249
249
 
250
250
  // Reasoning & verbosity
251
- reasoningEffort: 'medium', // minimal | low | medium | high
251
+ reasoningEffort: 'medium', // minimal | low | medium | high | xhigh (xhigh only on gpt-5.1-codex-max)
252
252
  reasoningSummary: 'auto', // auto | detailed (Note: 'concise' and 'none' are rejected by API)
253
253
  reasoningSummaryFormat: 'none', // none | experimental
254
254
  modelVerbosity: 'high', // low | medium | high
package/dist/index.cjs CHANGED
@@ -82,7 +82,7 @@ var settingsSchema = zod.z.object({
82
82
  verbose: zod.z.boolean().optional(),
83
83
  logger: zod.z.union([zod.z.literal(false), loggerFunctionSchema]).optional(),
84
84
  // NEW: Reasoning & Verbosity
85
- reasoningEffort: zod.z.enum(["minimal", "low", "medium", "high"]).optional(),
85
+ reasoningEffort: zod.z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
86
86
  // Note: API rejects 'concise' and 'none' despite error messages claiming they're valid
87
87
  reasoningSummary: zod.z.enum(["auto", "detailed"]).optional(),
88
88
  reasoningSummaryFormat: zod.z.enum(["none", "experimental"]).optional(),
@@ -231,7 +231,7 @@ function isAuthenticationError(err) {
231
231
 
232
232
  // src/codex-cli-language-model.ts
233
233
  var codexCliProviderOptionsSchema = zod.z.object({
234
- reasoningEffort: zod.z.enum(["minimal", "low", "medium", "high"]).optional(),
234
+ reasoningEffort: zod.z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
235
235
  reasoningSummary: zod.z.enum(["auto", "detailed"]).optional(),
236
236
  reasoningSummaryFormat: zod.z.enum(["none", "experimental"]).optional(),
237
237
  textVerbosity: zod.z.enum(["low", "medium", "high"]).optional(),
package/dist/index.d.cts CHANGED
@@ -37,7 +37,7 @@ interface Logger {
37
37
  }
38
38
  type ApprovalMode = 'untrusted' | 'on-failure' | 'on-request' | 'never';
39
39
  type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';
40
- type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
40
+ type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
41
41
  /**
42
42
  * Reasoning summary detail level.
43
43
  * Note: The API error messages claim 'concise' and 'none' are valid, but they are
@@ -64,9 +64,9 @@ interface CodexCliSettings {
64
64
  * Controls reasoning effort for reasoning-capable models (o3, o4-mini, the GPT-5.1 family,
65
65
  * and legacy GPT-5 slugs). Higher effort produces more thorough reasoning at the cost of latency.
66
66
  *
67
- * Codex CLI model presets currently expose `low`/`medium`/`high` for `gpt-5.1` and `gpt-5.1-codex`,
68
- * while `gpt-5.1-codex-mini` only offers `medium`/`high`. The legacy `gpt-5` slug still allowed
69
- * `minimal`, but GPT-5.1 rejects it.
67
+ * Codex CLI model presets currently expose `low`/`medium`/`high` for `gpt-5.1` and `gpt-5.1-codex`.
68
+ * `gpt-5.1-codex-max` additionally supports `xhigh`. `gpt-5.1-codex-mini` only offers `medium`/`high`.
69
+ * The legacy `gpt-5` slug still allowed `minimal`, but GPT-5.1 rejects it.
70
70
  *
71
71
  * Maps to: `-c model_reasoning_effort=<value>`
72
72
  * @see https://platform.openai.com/docs/guides/reasoning
package/dist/index.d.ts CHANGED
@@ -37,7 +37,7 @@ interface Logger {
37
37
  }
38
38
  type ApprovalMode = 'untrusted' | 'on-failure' | 'on-request' | 'never';
39
39
  type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';
40
- type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
40
+ type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
41
41
  /**
42
42
  * Reasoning summary detail level.
43
43
  * Note: The API error messages claim 'concise' and 'none' are valid, but they are
@@ -64,9 +64,9 @@ interface CodexCliSettings {
64
64
  * Controls reasoning effort for reasoning-capable models (o3, o4-mini, the GPT-5.1 family,
65
65
  * and legacy GPT-5 slugs). Higher effort produces more thorough reasoning at the cost of latency.
66
66
  *
67
- * Codex CLI model presets currently expose `low`/`medium`/`high` for `gpt-5.1` and `gpt-5.1-codex`,
68
- * while `gpt-5.1-codex-mini` only offers `medium`/`high`. The legacy `gpt-5` slug still allowed
69
- * `minimal`, but GPT-5.1 rejects it.
67
+ * Codex CLI model presets currently expose `low`/`medium`/`high` for `gpt-5.1` and `gpt-5.1-codex`.
68
+ * `gpt-5.1-codex-max` additionally supports `xhigh`. `gpt-5.1-codex-mini` only offers `medium`/`high`.
69
+ * The legacy `gpt-5` slug still allowed `minimal`, but GPT-5.1 rejects it.
70
70
  *
71
71
  * Maps to: `-c model_reasoning_effort=<value>`
72
72
  * @see https://platform.openai.com/docs/guides/reasoning
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ var settingsSchema = z.object({
79
79
  verbose: z.boolean().optional(),
80
80
  logger: z.union([z.literal(false), loggerFunctionSchema]).optional(),
81
81
  // NEW: Reasoning & Verbosity
82
- reasoningEffort: z.enum(["minimal", "low", "medium", "high"]).optional(),
82
+ reasoningEffort: z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
83
83
  // Note: API rejects 'concise' and 'none' despite error messages claiming they're valid
84
84
  reasoningSummary: z.enum(["auto", "detailed"]).optional(),
85
85
  reasoningSummaryFormat: z.enum(["none", "experimental"]).optional(),
@@ -228,7 +228,7 @@ function isAuthenticationError(err) {
228
228
 
229
229
  // src/codex-cli-language-model.ts
230
230
  var codexCliProviderOptionsSchema = z.object({
231
- reasoningEffort: z.enum(["minimal", "low", "medium", "high"]).optional(),
231
+ reasoningEffort: z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
232
232
  reasoningSummary: z.enum(["auto", "detailed"]).optional(),
233
233
  reasoningSummaryFormat: z.enum(["none", "experimental"]).optional(),
234
234
  textVerbosity: z.enum(["low", "medium", "high"]).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sdk-provider-codex-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "AI SDK v5 provider for OpenAI Codex CLI with native JSON Schema support",
5
5
  "keywords": [
6
6
  "ai-sdk",
@@ -11,6 +11,7 @@
11
11
  "gpt-5",
12
12
  "gpt-5.1",
13
13
  "gpt-5.1-codex",
14
+ "gpt-5.1-codex-max",
14
15
  "provider"
15
16
  ],
16
17
  "homepage": "https://github.com/ben-vargas/ai-sdk-provider-codex-cli",
@@ -63,7 +64,7 @@
63
64
  "jsonc-parser": "^3.3.1"
64
65
  },
65
66
  "optionalDependencies": {
66
- "@openai/codex": "^0.44.0"
67
+ "@openai/codex": "^0.60.1"
67
68
  },
68
69
  "devDependencies": {
69
70
  "@eslint/js": "^9.14.0",