openclaw - 💡(How to fix) Fix [Bug]: image ⁠ tool fails in 2026.4.15 — broken ⁠ ajv ⁠ import path in ⁠ @mariozechner/pi-ai

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

image ⁠ tool fails on all models due to broken ajv import path in @mariozechner/pi-ai

Error Message

  1. Observe the error in tool output

Root Cause

image ⁠ tool fails on all models due to broken ajv import path in @mariozechner/pi-ai

Code Example

Cannot find package '.../openclaw/node_modules/ajv/index.js' imported from
.../openclaw/node_modules/@mariozechner/pi-ai/dist/utils/validation.js
Did you mean to import "ajv/dist/ajv.js"?
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

image ⁠ tool fails on all models due to broken ajv import path in @mariozechner/pi-ai

Steps to reproduce

  1. Install OpenClaw 2026.4.15
  2. Use the image tool (send any image to the assistant)
  3. Observe the error in tool output

Expected behavior

Image is analyzed successfully by the configured model.

Actual behavior

Tool fails immediately with: ⁠ Cannot find package '.../ajv/index.js' imported from .../pi-ai/dist/utils/validation.js — Did you mean to import "ajv/dist/ajv.js"? 

OpenClaw version

2026.4.15 (041266a)

Operating system

macOS 15.4

Install method

pnpm global

Model

Any (both default and Claude fallback fail identically)

Provider / routing chain

openclaw -> default model router

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Cannot find package '.../openclaw/node_modules/ajv/index.js' imported from
.../openclaw/node_modules/@mariozechner/pi-ai/dist/utils/validation.js
Did you mean to import "ajv/dist/ajv.js"?

Impact and severity

Affected: All users on 2026.4.15 using the image tool Severity: Blocks workflow (image analysis completely non-functional) Frequency: Always (100% reproducible) Consequence: Cannot analyze any images sent to the assistant

Additional information

No response

extent analysis

TL;DR

The issue can likely be resolved by fixing the broken ajv import path in the @mariozechner/pi-ai package.

Guidance

  • Verify the import path of ajv in @mariozechner/pi-ai/dist/utils/validation.js to ensure it matches the actual location of the ajv package.
  • Check the package.json of @mariozechner/pi-ai to see if the ajv dependency is correctly specified and if the version is compatible with the expected import path.
  • Consider updating @mariozechner/pi-ai to a version where the import path issue is fixed, if available.
  • If the issue persists, try manually adjusting the import path in @mariozechner/pi-ai/dist/utils/validation.js to point to the correct location of ajv, as hinted by the error message ("Did you mean to import 'ajv/dist/ajv.js'?").

Example

No code snippet is provided as the issue is related to a specific package import path, and any changes should be made with caution and based on the actual package structure.

Notes

The solution may depend on the specific version of @mariozechner/pi-ai and ajv being used. It's also possible that the issue is not solely with the import path but with how the packages are installed or managed by pnpm.

Recommendation

Apply workaround: Manually adjust the import path in @mariozechner/pi-ai/dist/utils/validation.js to point to the correct location of ajv, as this is a direct fix for the reported error and does not require waiting for an update to @mariozechner/pi-ai.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Image is analyzed successfully by the configured model.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: image ⁠ tool fails in 2026.4.15 — broken ⁠ ajv ⁠ import path in ⁠ @mariozechner/pi-ai