Change8

DSPy

AI & LLMs

DSPy: The framework for programming—not prompting—language models

Latest: 3.3.125 releases11 breaking changes12 common errorsView on GitHub

Release History

View all versions →
3.3.1Breaking12 fixes16 features
Aug 21, 2026

DSPy 3.3.1 introduces significant improvements to `PythonInterpreter`, including managed runtime installation, enhanced isolation, and lifecycle visibility. The release also boosts optimizer throughput with GEPA 0.1.4, enhances adapter reliability, and ensures MCP SDK v2 compatibility.

3.3.0Breaking5 fixes7 features
Aug 3, 2026

DSPy 3.3.0 introduces Flex for experimental program structure optimization and ReActV2 for native tool-calling. It also advances towards a typed, provider-neutral LM system and decouples LiteLLM.

3.3.0b1Breaking1 fix6 features
May 28, 2026

DSPy 3.3.0b1 introduces the experimental ReActV2 module and moves towards a typed, provider-neutral LM boundary contract. This release also makes NumPy optional in the base install and updates GEPA integration to 0.1.1.

3.2.12 fixes
May 5, 2026

DSPy 3.2.1 focuses on bug fixes, particularly around async streaming and embedding calls, and includes numerous documentation and CI/CD improvements. The upper bound constraint on the litellm dependency has been removed.

3.2.026 fixes9 features
Apr 21, 2026

This release introduces significant decoupling from LiteLLM by moving capability checks to BaseLM and introducing a DSPy-owned error type, while also enhancing optimizer chaining with BetterTogether. Security and stability improvements were made across RLM, PythonInterpreter, and cache handling, including an opt-in restricted pickle mode for disk cache.

3.1.3Breaking8 fixes3 features
Feb 5, 2026

This release focuses on stabilizing RLMs, particularly around tool usage and message parsing, and updates the GEPA dependency to include bug fixes and cached eval support. A previously planned feature regarding native reasoning was reverted.

3.1.22 fixes1 feature
Jan 19, 2026

This maintenance release includes fixes for JSON parsing and RAG tutorial downloads, and exposes new configuration options for the Parallel module.

3.1.1Breaking19 fixes6 features
Jan 19, 2026

This release introduces the RLM Module, enhances GEPA for multi-agent systems, and includes numerous bug fixes across adapters, maintenance, and documentation.

3.1.0Breaking12 fixes12 features
Jan 6, 2026

DSPy 3.1.0 officially releases the beta, adding new adapters, file handling, reasoning support, Python 3.14 compatibility, and several optimizer and security enhancements, while fixing numerous bugs and renaming the settings API.

3.1.0b112 fixes8 features
Nov 18, 2025

DSPy 3.1.0b1 introduces several new features such as a File type, Reasoning capture, and Python 3.14 support, along with numerous bug fixes and security hardening, while renaming configuration helpers.

3.0.436 fixes25 features
Nov 10, 2025

DSPy 3.0.4 adds extensive GEPA enhancements, new Anthropic citation support, tool execution improvements, and numerous bug fixes while deprecating Image.from_* helpers.

3.0.4b213 fixes4 features
Oct 21, 2025

This release adds new tooling APIs, improves networking headers, and introduces several bug fixes and documentation updates.

3.0.4b1Breaking28 fixes18 features
Sep 29, 2025

DSPy 3.0.4b1 adds extensive GEPA enhancements, multimodal support, and new documentation, while introducing breaking changes to DummyLM, EvaluationResult location, and deprecating Image.from_* helpers.

3.0.3Breaking4 fixes5 features
Aug 31, 2025

dspy 3.0.3 adds rollout_id support, improves GEPA optimizer, updates caching behavior, and includes several bug fixes and maintenance updates.

3.0.23 fixes5 features
Aug 22, 2025

This 3.0.2 release adds support for custom chunk types, OpenAI response API, and gpt-5‑nano reasoning models, while fixing mlflow‑GEPA integration, BAMLAdapter issues, and an error‑message typo. It also introduces deprecation warnings for requires_permission_to_run and adds type hints for Module call methods.

3.0.12 fixes6 features
Aug 14, 2025

Version 3.0.1 introduces ConfigDict-based config, lazy gepa imports, improved error handling, flexible ToolCalls parsing, and several bug fixes.

3.0.0Breaking7 fixes13 features
Aug 12, 2025

DSPy 3.0 introduces powerful new optimizers, extensible adapters and types, async execution, and native MLflow 3.0 observability, while removing community retrievers, dropping Python 3.9 support, and cleaning up legacy APIs.

3.0.0b49 fixes8 features
Aug 11, 2025

This release adds several optimizer and adapter improvements, introduces new features like a custom BAMLAdapter and a gpt-5 reasoning model flag, and includes numerous bug fixes and maintenance updates.

3.0.0b37 fixes9 features
Jul 19, 2025

Version 3.0.0b3 restores the `datasets` dependency, adds several new features such as `dspy.Code`, token streaming for XMLAdapter, and `dspy.syncify`, and includes numerous bug fixes and API refinements.

3.0.0b2Breaking11 fixes18 features
Jul 1, 2025

DSPy 3.0.0b2 introduces new LM providers, async adapters, and extensive cleanup, but also removes several legacy APIs and drops Python 3.9 support, requiring code updates.

3.0.0b1Breaking8 fixes4 features
Jun 11, 2025

This release introduces several bug fixes, style standardization, and new features like a global max_errors setting. The main breaking change is the removal of unmaintained retriever integrations.

2.6.271 fix
Jun 3, 2025

Version 2.6.27 fixes the BaseType annotation parsing issue.

2.6.27a11 fix
Jun 3, 2025

This patch fixes the BaseType annotation parsing issue.

2.6.262 fixes1 feature
Jun 3, 2025

This release adds support for dspy.Tool and dspy.ToolCall field types and includes bug fixes for inspect_history and linting issues.

2.6.2511 fixes14 features
Jun 2, 2025

DSPy 2.6.25 introduces several new features such as a custom Signature base class, Audio handling, CodeAct module, and Python 3.13 support, along with numerous bug fixes and improvements.

Common Errors

BadRequestError11 reports

BadRequestError in dspy often arises from incorrect API usage, such as malformed requests, exceeding token limits, or unsupported model parameters. To fix it, carefully review your dspy program, ensuring your prompts respect the model's input format, the context length is within limits, and all specified parameters are valid for the chosen model. Inspect the detailed error message for specifics to guide adjustments.

AdapterParseError4 reports

AdapterParseError in dspy usually stems from the language model's response not conforming to the expected format specified by the adapter (e.g., JSON). Carefully inspect the LM's output and adjust your dspy.Signature or adapter configuration to accurately reflect the actual response structure, potentially using custom parsing logic if needed. Employ techniques like response cleaning (e.g., removing extraneous text) or more permissive parsing to handle variations in the LM's output.

ContextWindowExceededError3 reports

The ContextWindowExceededError in dspy arises when the input prompt plus generated output surpasses the language model's maximum token limit. Fix this by shortening input prompts (e.g., reduce context or examples provided), reducing the maximum length of generated responses using `max_tokens`, and employing techniques like summarization to compress information.

CodeInterpreterError3 reports
CodeExecutionError2 reports

The CodeExecutionError in dspy often arises from issues with how Python interpreters serialize and deserialize data, particularly with large integers exceeding JavaScript's safe integer limit (2**53) or non-JSON-safe values like NaN and Infinity. To fix this, ensure all data passed to or returned from the interpreter is strictly JSON-serializable, which may involve casting large integers to strings or representing NaN/Infinity with null or a specific sentinel value recognized by your application logic.

TypeError2 reports

The "TypeError: object of type 'int' has no len()" in dspy often arises when a function expects a sequence-like object (e.g., list, string) but receives an integer instead, particularly when dealing with usage tracking data or model outputs where length is being calculated. To fix this, ensure that the function receives the expected data type by either converting the integer to a string or list (if appropriate) or verifying the logic that produces the integer value in the first place. Check for incorrect assumptions or data types during usage entry merging or when handling Anthropic model responses.

Related AI & LLMs Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed