@oh-my-pi/pi-ai 16.4.0 → 16.4.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.4.1] - 2026-07-10
6
+
7
+ ### Changed
8
+
9
+ - Enforced `all_turns` reasoning context for all Responses Lite requests
10
+
5
11
  ## [16.4.0] - 2026-07-10
6
12
 
7
13
  ### Added
@@ -14,7 +14,7 @@ export interface CodexRequestOptions {
14
14
  /** User-facing effort; maps 1:1 onto the wire tier of the same name. */
15
15
  reasoningEffort?: CodexCallerEffort | "none";
16
16
  reasoningSummary?: ReasoningConfig["summary"] | null;
17
- /** Explicit `reasoning.context` override; defaults to `all_turns` when unset. The `all_turns` value is gated to gpt-5.4+ Codex models older ids reject it, so it is suppressed and `context` omitted. */
17
+ /** Explicit `reasoning.context` override; defaults to `all_turns` when unset. Gated to gpt-5.4+ Codex models (older ids reject it, so it is suppressed and `context` omitted). Note that under Responses Lite (`responsesLite`), the server strictly requires `reasoning.context` to be `all_turns`, which overrides this option and forces `all_turns`. */
18
18
  reasoningContext?: CodexReasoningContext;
19
19
  textVerbosity?: "low" | "medium" | "high";
20
20
  include?: string[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-ai",
4
- "version": "16.4.0",
4
+ "version": "16.4.1",
5
5
  "description": "Unified LLM API with automatic model discovery and provider configuration",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -38,9 +38,9 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@bufbuild/protobuf": "^2.12.0",
41
- "@oh-my-pi/pi-catalog": "16.4.0",
42
- "@oh-my-pi/pi-utils": "16.4.0",
43
- "@oh-my-pi/pi-wire": "16.4.0",
41
+ "@oh-my-pi/pi-catalog": "16.4.1",
42
+ "@oh-my-pi/pi-utils": "16.4.1",
43
+ "@oh-my-pi/pi-wire": "16.4.1",
44
44
  "arktype": "^2.2.0",
45
45
  "zod": "^4"
46
46
  },
@@ -32,7 +32,7 @@ export interface CodexRequestOptions {
32
32
  /** User-facing effort; maps 1:1 onto the wire tier of the same name. */
33
33
  reasoningEffort?: CodexCallerEffort | "none";
34
34
  reasoningSummary?: ReasoningConfig["summary"] | null;
35
- /** Explicit `reasoning.context` override; defaults to `all_turns` when unset. The `all_turns` value is gated to gpt-5.4+ Codex models older ids reject it, so it is suppressed and `context` omitted. */
35
+ /** Explicit `reasoning.context` override; defaults to `all_turns` when unset. Gated to gpt-5.4+ Codex models (older ids reject it, so it is suppressed and `context` omitted). Note that under Responses Lite (`responsesLite`), the server strictly requires `reasoning.context` to be `all_turns`, which overrides this option and forces `all_turns`. */
36
36
  reasoningContext?: CodexReasoningContext;
37
37
  textVerbosity?: "low" | "medium" | "high";
38
38
  include?: string[];
@@ -379,8 +379,9 @@ export async function transformRequestBody(
379
379
  applyCodexResponsesLiteShape(body);
380
380
  }
381
381
 
382
- if (options.reasoningEffort !== undefined) {
383
- const reasoningConfig = getReasoningConfig(model, options.reasoningEffort, options);
382
+ if (options.reasoningEffort !== undefined || responsesLite) {
383
+ const reasoningConfig =
384
+ options.reasoningEffort !== undefined ? getReasoningConfig(model, options.reasoningEffort, options) : {};
384
385
  body.reasoning = {
385
386
  ...body.reasoning,
386
387
  ...reasoningConfig,
@@ -394,7 +395,8 @@ export async function transformRequestBody(
394
395
  // default. The version gate is authoritative: even an explicit
395
396
  // `all_turns` override is suppressed on unsupported models, while
396
397
  // `current_turn`/`auto` (universally supported) always pass through.
397
- const context = options.reasoningContext ?? "all_turns";
398
+ // Note: Responses Lite forces `all_turns` to satisfy the transport's server invariant.
399
+ const context = responsesLite ? "all_turns" : (options.reasoningContext ?? "all_turns");
398
400
  if (context === "all_turns" && !supportsAllTurnsReasoningContext(model.id)) {
399
401
  delete body.reasoning.context;
400
402
  } else {