Repository navigation
Release 0.1.15: DSPy 3.5 compatibility and pin - #14
Open
Superagentic-AI wants to merge 2 commits into
Open
Superagentic-AI wants to merge 2 commits into
Superagentic-AI wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pins
dspyto>=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.ymlpublish job is still missing).What changed
pyproject.toml/uv.lock: pindspy>=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: passmax_itersinstead of the removedmax_iterationsargument.sub_lmis unchanged.context["history"]is adspy.History, a JSON string, or a dict, it is passed into the RLM call. The returned history is stored ashistory_jsonin 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.pyproject.toml,rlm_code/__init__.py,docs/index.md,README.md, andCHANGELOG.md.Adapter breakage found
DSPy 3.5 rejects
dspy.RLM(..., max_iterations=...)withTypeError: RLM.__init__() got an unexpected keyword argument 'max_iterations'. The 3.5 signature ismax_iters(default 20), plusmax_llm_callsandsub_lm. That is now fixed.dspy.LM("openai/..."),dspy.LM("anthropic/..."), anddspy.LM("gemini/...")all construct successfully without LiteLLM or the OpenAI SDK installed (native lm15,engine="auto"). Nodspy[litellm]extra was added. Installdspy[litellm]only if a provider needs the compatibility engine.dspy.RLMis a stable top-level name in 3.5 (no longer experimental).dspy.contextanddspy.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 thatdoctor(),dspy.LM, anddspy.RLM(..., max_iters=..., sub_lm=...)construct).uv run pytest tests/ -v: 872 passed, 53 skipped, 0 failed in 15.31s. The skips are the existingpydantic-monty not installedcases intests/rlm/test_monty_interpreter.py.uv run ruff check rlm_code testsanduv 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
.github/workflows.CI
The first Pre-commit run failed because GitHub
ubuntu-latestis nowubuntu-26.04and no longer shipspython3.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 atpython3so the job can use the runner's system Python. Workflow files were not edited. Ruff Check was already green on the first run.