Skip to content

[rollout] fix: add missing orjson runtime dependency - #255

Merged
JoyboyBrian merged 1 commit into
mainfrom
brian/fix-orjson-runtime-dependency
Jul 13, 2026
Merged

[rollout] fix: add missing orjson runtime dependency#255
JoyboyBrian merged 1 commit into
mainfrom
brian/fix-orjson-runtime-dependency

Conversation

@JoyboyBrian

@JoyboyBrian JoyboyBrian commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

  • Add orjson>=3.11.6,<4.0 as a direct SDK runtime dependency for tool-enabled rollout calls across local and remote backends.
  • Regenerate uv.lock, resolving orjson==3.11.9.

Why

Tool-enabled rollout calls can fail on any backend that installs the base SDK dependency set without separately installing orjson. This affected both LocalBackend and Harbor/Daytona sandbox execution, failing with litellm.APIConnectionError: OpenAIException - No module named 'orjson'.

LiteLLM imports LiteLLM_Proxy_MCP_Handler whenever a completion contains any tools (v1.92.0 source). LiteLLM PR #31576 added a top-level LiteLLMProxyRequestSetup import to that handler (commit), which imports http_parsing_utils and therefore orjson at module load time. LiteLLM still declares orjson only under its proxy optional extra (pyproject.toml), so a base LiteLLM installation can reach this runtime path without having orjson installed.

Declaring orjson directly with LiteLLM's existing version bound makes the SDK dependency set complete for tool-enabled rollout calls across local and remote backends. Adding orjson to the rollout image also unblocked the failed remote evaluation and artifact collection, confirming that the dependency gap—not artifact persistence—caused that incident.

How to Test

  • uv lock --check
  • uv run --locked --extra dev ruff check .
  • uv run --locked --extra dev ruff format --check .
  • uv run --locked --extra dev pyright osmosis_ai/
  • uv run --locked --extra dev pytest -q
  • uv build --wheel --out-dir /tmp/osmosis-sdk-orjson-dist
  • unzip -p /tmp/osmosis-sdk-orjson-dist/*.whl '*/METADATA' | rg '^Requires-Dist: orjson'

Checklist

  • PR title follows [module] type: description format
  • Appropriate labels added (bug, rollout, dependencies)
  • ruff check . and ruff format --check . pass
  • pyright osmosis_ai/ passes
  • pytest passes (1607 passed)
  • Public API changes are documented (no public API changes)
  • No secrets or credentials included

@JoyboyBrian JoyboyBrian added bug Something isn't working dependencies Dependency updates rollout Remote Rollout module labels Jul 13, 2026
@JoyboyBrian
JoyboyBrian marked this pull request as ready for review July 13, 2026 05:06
@JoyboyBrian
JoyboyBrian requested a review from BaiqingL as a code owner July 13, 2026 05:06

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@JoyboyBrian
JoyboyBrian merged commit fa9de8f into main Jul 13, 2026
16 checks passed
@JoyboyBrian
JoyboyBrian deleted the brian/fix-orjson-runtime-dependency branch July 13, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Dependency updates rollout Remote Rollout module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant