ai-sdk-provider-codex-cli 1.0.3 → 1.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/README.md CHANGED
@@ -21,10 +21,10 @@ A community provider for Vercel AI SDK v6 that uses OpenAI's Codex CLI (non‑in
21
21
 
22
22
  ## Version Compatibility
23
23
 
24
- | Provider Version | AI SDK Version | NPM Tag | NPM Installation |
25
- | ---------------- | -------------- | ------------ | ---------------- |
26
- | 1.x.x | v6 | `latest` | `npm i ai-sdk-provider-codex-cli ai@^6.0.0` |
27
- | 0.x.x | v5 | `ai-sdk-v5` | `npm i ai-sdk-provider-codex-cli@ai-sdk-v5 ai@^5.0.0` |
24
+ | Provider Version | AI SDK Version | NPM Tag | NPM Installation |
25
+ | ---------------- | -------------- | ----------- | ----------------------------------------------------- |
26
+ | 1.x.x | v6 | `latest` | `npm i ai-sdk-provider-codex-cli ai@^6.0.0` |
27
+ | 0.x.x | v5 | `ai-sdk-v5` | `npm i ai-sdk-provider-codex-cli@ai-sdk-v5 ai@^5.0.0` |
28
28
 
29
29
  ## Installation
30
30
 
package/dist/index.cjs CHANGED
@@ -621,7 +621,6 @@ var CodexCliLanguageModel = class {
621
621
  this.logger.warn(`[codex-cli] Failed to write image to temp file: ${String(e)}`);
622
622
  }
623
623
  }
624
- args.push(promptText);
625
624
  const env = {
626
625
  ...process.env,
627
626
  ...settings.env || {},
@@ -635,6 +634,10 @@ var CodexCliLanguageModel = class {
635
634
  lastMessageIsTemp = true;
636
635
  }
637
636
  args.push("--output-last-message", lastMessagePath);
637
+ if (tempImagePaths.length > 0) {
638
+ args.push("--");
639
+ }
640
+ args.push(promptText);
638
641
  return {
639
642
  cmd: base.cmd,
640
643
  args,
@@ -1002,7 +1005,7 @@ var CodexCliLanguageModel = class {
1002
1005
  );
1003
1006
  let text = "";
1004
1007
  let usage = createEmptyCodexUsage();
1005
- let finishReason = mapCodexCliFinishReason(void 0);
1008
+ const finishReason = mapCodexCliFinishReason(void 0);
1006
1009
  const startTime = Date.now();
1007
1010
  const child = child_process.spawn(cmd, args, { env, cwd, stdio: ["ignore", "pipe", "pipe"] });
1008
1011
  let onAbort;
package/dist/index.js CHANGED
@@ -618,7 +618,6 @@ var CodexCliLanguageModel = class {
618
618
  this.logger.warn(`[codex-cli] Failed to write image to temp file: ${String(e)}`);
619
619
  }
620
620
  }
621
- args.push(promptText);
622
621
  const env = {
623
622
  ...process.env,
624
623
  ...settings.env || {},
@@ -632,6 +631,10 @@ var CodexCliLanguageModel = class {
632
631
  lastMessageIsTemp = true;
633
632
  }
634
633
  args.push("--output-last-message", lastMessagePath);
634
+ if (tempImagePaths.length > 0) {
635
+ args.push("--");
636
+ }
637
+ args.push(promptText);
635
638
  return {
636
639
  cmd: base.cmd,
637
640
  args,
@@ -999,7 +1002,7 @@ var CodexCliLanguageModel = class {
999
1002
  );
1000
1003
  let text = "";
1001
1004
  let usage = createEmptyCodexUsage();
1002
- let finishReason = mapCodexCliFinishReason(void 0);
1005
+ const finishReason = mapCodexCliFinishReason(void 0);
1003
1006
  const startTime = Date.now();
1004
1007
  const child = spawn(cmd, args, { env, cwd, stdio: ["ignore", "pipe", "pipe"] });
1005
1008
  let onAbort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sdk-provider-codex-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "AI SDK v6 provider for OpenAI Codex CLI (use ChatGPT Plus/Pro subscription)",
5
5
  "keywords": [
6
6
  "ai-sdk",