Raven icon indicating copy to clipboard operation
Raven copied to clipboard

Missing 'orjson' dependency causes APIConnectionError on fresh install

Open jonah791 opened this issue 4 months ago • 0 comments

Description

On a fresh uv tool install raven on Windows (PowerShell 5.1), running raven agent -m "hi" fails with:

Error calling LLM: litellm.APIConnectionError: APIConnectionError:
OpenAIException - No module named 'orjson'

The TUI also shows error: turn_failed (code=-32099) when trying to send a message.

Root Cause

orjson is not listed in pyproject.toml dependencies, but LiteLLM (via the OpenAI SDK) attempts to import it at runtime. The wheel installs litellm without orjson as a transitive dependency, making it unavailable on first install.

Temporary Workaround

# Install orjson into the raven tool environment
uv tool run --from raven python -m pip install orjson

Environment

  • Raven v0.1.3
  • Windows 11, PowerShell 5.1
  • Installed via uv tool install raven[channels]
  • Python 3.12.10

Suggested Fix

Add orjson>=3.9.0 to the [project.dependencies] list in pyproject.toml, or ensure the wheel's transitive dependency resolution includes it.

jonah791 avatar Jul 13 '26 02:07 jonah791