@oh-my-pi/pi-mnemopi 17.3.4 → 17.3.7

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
+ ## [17.3.5] - 2026-08-16
6
+
7
+ ### Fixed
8
+
9
+ - Fixed an issue where transient provider failures (such as Anthropic overload or rate limit errors) were incorrectly treated as empty responses; these failures are now retried automatically before falling back.
10
+
5
11
  ## [17.3.4] - 2026-08-14
6
12
 
7
13
  ### Fixed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-mnemopi",
4
- "version": "17.3.4",
4
+ "version": "17.3.7",
5
5
  "description": "Local SQLite memory engine for Oh My Pi agents",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -39,10 +39,10 @@
39
39
  "fmt": "biome format --write ."
40
40
  },
41
41
  "dependencies": {
42
- "@oh-my-pi/pi-ai": "17.3.4",
43
- "@oh-my-pi/pi-catalog": "17.3.4",
44
- "@oh-my-pi/pi-natives": "17.3.4",
45
- "@oh-my-pi/pi-utils": "17.3.4"
42
+ "@oh-my-pi/pi-ai": "17.3.7",
43
+ "@oh-my-pi/pi-catalog": "17.3.7",
44
+ "@oh-my-pi/pi-natives": "17.3.7",
45
+ "@oh-my-pi/pi-utils": "17.3.7"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "fastembed": "2.1.0",
@@ -5,9 +5,11 @@ import {
5
5
  completeSimple,
6
6
  type FetchImpl,
7
7
  type Model,
8
+ retryTransientCompletion,
8
9
  withAuth,
9
10
  } from "@oh-my-pi/pi-ai";
10
11
  import { ProviderHttpError } from "@oh-my-pi/pi-ai/error";
12
+ import { fetchWithRetry } from "@oh-my-pi/pi-utils";
11
13
  import { type CompleteOptions, callHostLlm, getHostLlmBackend } from "./llm-backends";
12
14
  import {
13
15
  getMnemopiRuntimeOptions,
@@ -186,16 +188,18 @@ export async function callConfiguredCompletion(
186
188
  return null;
187
189
  }
188
190
  try {
189
- const message = await completeSimple(
190
- model,
191
- {
192
- messages: [{ role: "user", content: prompt, timestamp: Date.now() }],
193
- },
194
- {
195
- apiKey: llmApiKey() || undefined,
196
- maxTokens: opts.maxTokens ?? llmMaxTokens(),
197
- temperature,
198
- },
191
+ const message = await retryTransientCompletion(() =>
192
+ completeSimple(
193
+ model,
194
+ {
195
+ messages: [{ role: "user", content: prompt, timestamp: Date.now() }],
196
+ },
197
+ {
198
+ apiKey: llmApiKey() || undefined,
199
+ maxTokens: opts.maxTokens ?? llmMaxTokens(),
200
+ temperature,
201
+ },
202
+ ),
199
203
  );
200
204
  return assistantText(message).trim() || null;
201
205
  } catch {
@@ -350,11 +354,12 @@ export async function callRemoteLlm(
350
354
  if (key !== "") {
351
355
  headers.Authorization = `Bearer ${key}`;
352
356
  }
353
- const res = await fetchImpl(`${baseUrl}/chat/completions`, {
357
+ const res = await fetchWithRetry(`${baseUrl}/chat/completions`, {
354
358
  method: "POST",
355
359
  headers,
356
360
  body,
357
361
  signal: AbortSignal.timeout(60000),
362
+ fetch: fetchImpl,
358
363
  });
359
364
  if (res.status === 401) {
360
365
  throw new ProviderHttpError("mnemopi remote LLM request unauthorized (401)", 401, { headers: res.headers });