fix: refresh pi-ai patch for pnpm lockfile

This commit is contained in:
Peter Steinberger
2026-01-11 10:55:36 +00:00
parent 0590365683
commit 8dbf72099a
2 changed files with 12 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/dist/providers/google-gemini-cli.js b/dist/providers/google-gemini-cli.js diff --git a/dist/providers/google-gemini-cli.js b/dist/providers/google-gemini-cli.js
index 93aa26c395e9bd0df64376408a13d15ee9e7cce7..beb585e2f2c13eec3bca98acade761101e4572ff 100644 index 93aa26c395e9bd0df64376408a13d15ee9e7cce7..41a439e5fc370038a5febef9e8f021ee279cf8aa 100644
--- a/dist/providers/google-gemini-cli.js --- a/dist/providers/google-gemini-cli.js
+++ b/dist/providers/google-gemini-cli.js +++ b/dist/providers/google-gemini-cli.js
@@ -248,6 +248,11 @@ export const streamGoogleGeminiCli = (model, context, options) => { @@ -248,6 +248,11 @@ export const streamGoogleGeminiCli = (model, context, options) => {
@@ -15,10 +15,10 @@ index 93aa26c395e9bd0df64376408a13d15ee9e7cce7..beb585e2f2c13eec3bca98acade76110
if (attempt < MAX_RETRIES && isRetryableError(response.status, errorText)) { if (attempt < MAX_RETRIES && isRetryableError(response.status, errorText)) {
// Use server-provided delay or exponential backoff // Use server-provided delay or exponential backoff
diff --git a/dist/providers/openai-codex-responses.js b/dist/providers/openai-codex-responses.js diff --git a/dist/providers/openai-codex-responses.js b/dist/providers/openai-codex-responses.js
index 188a8294f26fe1bfe3fb298a7f58e4d8eaf2a529..a3aeb6a7ff53bc4f7f44362adb950b2c55455332 100644 index 188a8294f26fe1bfe3fb298a7f58e4d8eaf2a529..2f543a3ee9ea7603519562ac52ee00b6a7d0432c 100644
--- a/dist/providers/openai-codex-responses.js --- a/dist/providers/openai-codex-responses.js
+++ b/dist/providers/openai-codex-responses.js +++ b/dist/providers/openai-codex-responses.js
@@ -515,7 +531,7 @@ function convertTools(tools) { @@ -515,7 +515,7 @@ function convertTools(tools) {
name: tool.name, name: tool.name,
description: tool.description, description: tool.description,
parameters: tool.parameters, parameters: tool.parameters,
@@ -28,27 +28,23 @@ index 188a8294f26fe1bfe3fb298a7f58e4d8eaf2a529..a3aeb6a7ff53bc4f7f44362adb950b2c
} }
function mapStopReason(status) { function mapStopReason(status) {
diff --git a/dist/providers/openai-responses.js b/dist/providers/openai-responses.js diff --git a/dist/providers/openai-responses.js b/dist/providers/openai-responses.js
index b7c52e449360dcb8152b31f3659401764ce59f17..7c6cd358ee4f7c3994d59be5938554bdb5d32af3 100644 index f07085c64390b211340d6a826b28ea9c2e77302f..71509b70c5aa762872eab3b5ffc7a42579aa881f 100644
--- a/dist/providers/openai-responses.js --- a/dist/providers/openai-responses.js
+++ b/dist/providers/openai-responses.js +++ b/dist/providers/openai-responses.js
@@ -396,11 +396,12 @@ export const streamOpenAIResponses = (model, context, options) => { @@ -396,10 +396,16 @@ function convertMessages(model, context) {
} }
else if (msg.role === "assistant") { else if (msg.role === "assistant") {
const output = []; const output = [];
- // OpenAI Responses rejects `reasoning` items that are not followed by a `message`.
- // Tool-call-only turns (thinking + function_call) are valid assistant turns, but
- // their stored reasoning items must not be replayed as standalone `reasoning` input.
+ // OpenAI Responses rejects `reasoning` items that are not followed by a `message`, + // OpenAI Responses rejects `reasoning` items that are not followed by a `message`,
+ // but tool-call-only turns still require reasoning replay before the function call. + // but tool-call-only turns still require reasoning replay before the function call.
const hasTextBlock = msg.content.some((b) => b.type === "text"); + const hasTextBlock = msg.content.some((b) => b.type === "text");
+ const hasToolCallBlock = msg.content.some((b) => b.type === "toolCall"); + const hasToolCallBlock = msg.content.some((b) => b.type === "toolCall");
for (const block of msg.content) { for (const block of msg.content) {
// Do not submit thinking blocks if the completion had an error (i.e. abort) // Do not submit thinking blocks if the completion had an error (i.e. abort)
if (block.type === "thinking" && msg.stopReason !== "error") { if (block.type === "thinking" && msg.stopReason !== "error") {
if (block.thinkingSignature) { if (block.thinkingSignature) {
- if (!hasTextBlock)
+ if (!hasTextBlock && !hasToolCallBlock) + if (!hasTextBlock && !hasToolCallBlock)
continue; + continue;
const reasoningItem = JSON.parse(block.thinkingSignature); const reasoningItem = JSON.parse(block.thinkingSignature);
output.push(reasoningItem); output.push(reasoningItem);
} }

10
pnpm-lock.yaml generated
View File

@@ -9,7 +9,7 @@ overrides:
patchedDependencies: patchedDependencies:
'@mariozechner/pi-ai@0.42.2': '@mariozechner/pi-ai@0.42.2':
hash: 72c2fb3aeb75b8468245698e67f48eb53bc31b816eca001a007ff8a83285a849 hash: ca50c90a03641eefa125b2b306ab4f2b5451002fc7964810917afa4c9ff66332
path: patches/@mariozechner__pi-ai@0.42.2.patch path: patches/@mariozechner__pi-ai@0.42.2.patch
importers: importers:
@@ -36,7 +36,7 @@ importers:
version: 0.42.2(ws@8.19.0)(zod@4.3.5) version: 0.42.2(ws@8.19.0)(zod@4.3.5)
'@mariozechner/pi-ai': '@mariozechner/pi-ai':
specifier: ^0.42.2 specifier: ^0.42.2
version: 0.42.2(patch_hash=72c2fb3aeb75b8468245698e67f48eb53bc31b816eca001a007ff8a83285a849)(ws@8.19.0)(zod@4.3.5) version: 0.42.2(patch_hash=ca50c90a03641eefa125b2b306ab4f2b5451002fc7964810917afa4c9ff66332)(ws@8.19.0)(zod@4.3.5)
'@mariozechner/pi-coding-agent': '@mariozechner/pi-coding-agent':
specifier: ^0.42.2 specifier: ^0.42.2
version: 0.42.2(ws@8.19.0)(zod@4.3.5) version: 0.42.2(ws@8.19.0)(zod@4.3.5)
@@ -3777,7 +3777,7 @@ snapshots:
'@mariozechner/pi-agent-core@0.42.2(ws@8.19.0)(zod@4.3.5)': '@mariozechner/pi-agent-core@0.42.2(ws@8.19.0)(zod@4.3.5)':
dependencies: dependencies:
'@mariozechner/pi-ai': 0.42.2(patch_hash=72c2fb3aeb75b8468245698e67f48eb53bc31b816eca001a007ff8a83285a849)(ws@8.19.0)(zod@4.3.5) '@mariozechner/pi-ai': 0.42.2(patch_hash=ca50c90a03641eefa125b2b306ab4f2b5451002fc7964810917afa4c9ff66332)(ws@8.19.0)(zod@4.3.5)
'@mariozechner/pi-tui': 0.42.2 '@mariozechner/pi-tui': 0.42.2
transitivePeerDependencies: transitivePeerDependencies:
- '@modelcontextprotocol/sdk' - '@modelcontextprotocol/sdk'
@@ -3787,7 +3787,7 @@ snapshots:
- ws - ws
- zod - zod
'@mariozechner/pi-ai@0.42.2(patch_hash=72c2fb3aeb75b8468245698e67f48eb53bc31b816eca001a007ff8a83285a849)(ws@8.19.0)(zod@4.3.5)': '@mariozechner/pi-ai@0.42.2(patch_hash=ca50c90a03641eefa125b2b306ab4f2b5451002fc7964810917afa4c9ff66332)(ws@8.19.0)(zod@4.3.5)':
dependencies: dependencies:
'@anthropic-ai/sdk': 0.71.2(zod@4.3.5) '@anthropic-ai/sdk': 0.71.2(zod@4.3.5)
'@google/genai': 1.34.0 '@google/genai': 1.34.0
@@ -3811,7 +3811,7 @@ snapshots:
dependencies: dependencies:
'@mariozechner/clipboard': 0.3.0 '@mariozechner/clipboard': 0.3.0
'@mariozechner/pi-agent-core': 0.42.2(ws@8.19.0)(zod@4.3.5) '@mariozechner/pi-agent-core': 0.42.2(ws@8.19.0)(zod@4.3.5)
'@mariozechner/pi-ai': 0.42.2(patch_hash=72c2fb3aeb75b8468245698e67f48eb53bc31b816eca001a007ff8a83285a849)(ws@8.19.0)(zod@4.3.5) '@mariozechner/pi-ai': 0.42.2(patch_hash=ca50c90a03641eefa125b2b306ab4f2b5451002fc7964810917afa4c9ff66332)(ws@8.19.0)(zod@4.3.5)
'@mariozechner/pi-tui': 0.42.2 '@mariozechner/pi-tui': 0.42.2
chalk: 5.6.2 chalk: 5.6.2
cli-highlight: 2.1.11 cli-highlight: 2.1.11