dspy 3.5.0
- Source
- github.com
- Author
- isaacbmiller
- Date

Context
DSPy is a Python framework, started at Stanford, in which a developer declares what each language-model step takes in and returns, called a Signature, and DSPy writes the prompt, parses the reply and can optimize prompts against a metric. Version 3.5 changes that hidden prompt layer, and its release notes open with a warning to re-evaluate optimized programs. The main reason is a new default adapter, the component that turns a Signature into a prompt and parses the answer: XMLAdapter replaces ChatAdapter, so prompts, examples, output instructions and parsing all change even when a Signature does not. The upgrade guide says that configuring `dspy.ChatAdapter()` explicitly keeps the old field delimiters but does not undo the release's other changes.
Several other defaults move too. `model_type` now defaults to `"auto"`, which selects OpenAI's Responses API for OpenAI and Azure models, so chat-only endpoints, proxies and Azure deployments need `model_type="chat"` set explicitly. `dspy.ReAct`, the module for tool-using agents, is now the former ReActV2: it records a structured History and finishes through a typed `submit` tool instead of returning a trajectory dictionary, and the guide says old optimized agents must be recompiled. `CodeAct` and `ProgramOfThought` are removed in favor of RLM, a module in which the model works through a task by writing and running Python in a interpreter; RLM leaves experimental status along with Flex and the GEPA optimizer. Persistent caches also start over, because old entries no longer match, so the first runs after upgrading recompute results.
The release also makes DSPy much lighter to install. LiteLLM and OpenAI's Python library are now optional extras, and DSPy calls supported providers through a small bundled engine called lm15. The project's own measurements, comparing 3.3.0 with a 3.5 development snapshot, put the default install at 30.9 MiB instead of 206.7 MiB, with 25 dependencies instead of 65 and a fresh import in 0.49 seconds instead of 1.01. Code that relied on those packages arriving automatically now has to install `dspy[litellm]` or `dspy[openai]`, and users of hosted need `dspy[numpy,openai]`.
- XMLAdapter is now DSPy's default adapter, so prompts and the output contract for predictor calls change even when a program's Signature stays the same, according to the 3.5 release notes.
- On a 3.5 development snapshot, fresh-process import time fell from 1.01 s in DSPy 3.3.0 to 0.49 s, and non-DSPy dependencies dropped from 65 to 25.
- RLM and Flex interpreters now start from a precompiled standard library and cached snapshots: Deno startup plus first execution fell from 1.59 s to 0.45 s, and a Flex forward with a ready InterpreterPool took 0.10 s (medians of nine runs; readying the pool costs 0.55 s).
- RLM can now save and reload conversation History for later calls, but the release notes say it does not restore live interpreter variables.
- Disk caches now default to restricted loading and store plain NumPy arrays without pickle, and DSPy 3.5 removes the deprecated CodeAct and ProgramOfThought modules.
Checking sign-in…
Loading comments…


