Skip to content

Release 0.1.15: DSPy 3.5 compatibility and pin - #14

Open
Superagentic-AI wants to merge 2 commits into
mainfrom
release/0.1.15-dspy35
Open

Superagentic-AI wants to merge 2 commits into
mainfrom
release/0.1.15-dspy35

Conversation

@Superagentic-AI

@Superagentic-AI Superagentic-AI commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pins dspy to >=3.5,<3.6, updates the DSPy RLM adapter for the 3.5 constructor, and bumps the package to 0.1.15.

This PR does not merge, tag, or publish to PyPI. After merge, a separate release step is still needed (the release.yml publish job is still missing).

What changed

  • pyproject.toml / uv.lock: pin dspy>=3.5,<3.6 (locked at 3.5.0). LiteLLM is no longer a transitive dependency, which matches DSPy 3.5 making it optional.
  • rlm_code/rlm/frameworks/dspy_rlm_adapter.py: pass max_iters instead of the removed max_iterations argument. sub_lm is unchanged.
  • Optional RLM History passthrough: if context["history"] is a dspy.History, a JSON string, or a dict, it is passed into the RLM call. The returned history is stored as history_json in episode metadata and the step observation so a later run can reload it. History replays conversation evidence only; it does not restore live interpreter variables.
  • Version bump to 0.1.15 in pyproject.toml, rlm_code/__init__.py, docs/index.md, README.md, and CHANGELOG.md.
  • Version checker minimum-recommended and latest-known DSPy versions raised to 3.5.0.

Adapter breakage found

DSPy 3.5 rejects dspy.RLM(..., max_iterations=...) with TypeError: RLM.__init__() got an unexpected keyword argument 'max_iterations'. The 3.5 signature is max_iters (default 20), plus max_llm_calls and sub_lm. That is now fixed.

dspy.LM("openai/..."), dspy.LM("anthropic/..."), and dspy.LM("gemini/...") all construct successfully without LiteLLM or the OpenAI SDK installed (native lm15, engine="auto"). No dspy[litellm] extra was added. Install dspy[litellm] only if a provider needs the compatibility engine.

dspy.RLM is a stable top-level name in 3.5 (no longer experimental). dspy.context and dspy.History (model_dump_json / model_validate_json) work as documented.

Tests

Ran on the box with uv sync --locked --dev (CPython 3.11.16, dspy 3.5.0, litellm not installed).

  • uv run pytest tests/rlm/test_dspy_rlm_adapter.py -v: 6 passed (mocked adapter tests, History coerce/serialize against real dspy 3.5, and a no-network smoke test that doctor(), dspy.LM, and dspy.RLM(..., max_iters=..., sub_lm=...) construct).
  • uv run pytest tests/ -v: 872 passed, 53 skipped, 0 failed in 15.31s. The skips are the existing pydantic-monty not installed cases in tests/rlm/test_monty_interpreter.py.
  • uv run ruff check rlm_code tests and uv run ruff format --check rlm_code tests: clean.
  • pre-commit run --all-files --show-diff-on-failure: all hooks passed.

RLM was constructed but not invoked, so Deno/Pyodide was not required.

Changelog note

0.1.15 is the first intended PyPI release since 0.1.13. The notes include the 0.1.14 GitHub Actions dependency bumps, which were tagged on GitHub but not published to PyPI.

Not in this PR

  • No merge, git tag, GitHub Release, or PyPI publish.
  • No edits to .github/workflows.

CI

The first Pre-commit run failed because GitHub ubuntu-latest is now ubuntu-26.04 and no longer ships python3.12. That pin lived in .pre-commit-config.yaml (default_language_version: python3.12) and is unrelated to the DSPy change. A follow-up commit points hooks at python3 so the job can use the runner's system Python. Workflow files were not edited. Ruff Check was already green on the first run.

Pin dspy to >=3.5,<3.6, switch the DSPy RLM adapter to max_iters,
and add optional History save/reload passthrough.
GitHub ubuntu-latest is now 26.04 and no longer ships python3.12,
which broke the pre-commit job. Point hooks at python3 instead.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant