Skip to content

Releases: stanfordnlp/dspy

3.1.3

05 Feb 16:18
4ef729d

Choose a tag to compare

What's Changed

RLMs

GEPA

  • Update gepa[dspy] dependency to version 0.0.26 adding support for cached evals in GEPA expected to reduce metric calls, fix MLFlow logging, and bug fixes by @LakshyAAAgrawal in #9238
  • Update gepa[dspy] version to 0.0.25 adding python==3.14 support by @LakshyAAAgrawal in #9224
  • Temporarily remove the GEPA tool optimization doc by @chenmoneygithub in #9220
  • fix(gepa): Remove enable_tool_optimization feature by @Ju-usc in #9223

Maintenance

Deferred to a later release (added then reverted before cutting this release):

New Contributors

Full Changelog: 3.1.2...3.1.3

3.1.2

19 Jan 14:16
64528a3

Choose a tag to compare

What's Changed

Maintenance

New Contributors

Full Changelog: 3.1.1...3.1.2

3.1.1

19 Jan 02:30
b65bf37

Choose a tag to compare

What's Changed

RLMs

  • feat(rlm): Add RLM Module and improve PythonInterpreter by @isaacbmiller in #9193
  • Use language in system instructions for dspy.Code fields by @mariusarvinte in #9106
  • Update dspy.RLM to improve reliability and avoid pydantic warnings by @okhat in #9210
  • fix(RLM): Change FinalAnswerResult to FinalOutput and remove RLM call by @isaacbmiller in #9212

GEPA

  • Fix GEPAFeedbackMetric Protocol missing 'self' parameter by @Copilot in #9111
  • feat(gepa): add tool description optimization for multi-agent systems by @Ju-usc in #8928
  • Update pyproject.toml to update gepa from 0.0.22 -> 0.0.24 by @LakshyAAAgrawal in #9161
  • Patch dspy.gepa to handle list[dict] output from a dspy.LM by @mariusarvinte in #9169

Adapters

  • Upgrade json_repair to fix parsing issue of underscore-style float number by @chenmoneygithub in #9088
  • Properly yield the last chunk in streaming by @chenmoneygithub in #9089
  • Avoid unwanted exception chaining when running async tool in sync context by @stevapple in #9092
  • Enhance StreamListener to support generic type annotations for output by @TomeHirata in #9112
  • FIX: streamify was appending StatusStreamingCallback directly to the shared settings.callbacks list by @glesperance in #9073
  • fix(BAMLAdapter): Use docstrings to describe BaseModels by @BenMcH in #9125
  • Fix Responses API structured outputs by @Olocool17 in #9130

Maintenance

  • Fix UsageTracker AttributeError when using ParallelExecutor with dspy.context by @Copilot in #9095
  • Update uv.lock dspy version to match the latest release by @chenmoneygithub in #9067
  • [docs] Add Google-style docstrings for dspy/adapters/chat_adapter.py ChatAdapter class #9063 by @azai91 in #9072
  • Fix ContextWindowExceededError after 3 retries in react loop by @Copilot in #9110
  • fix: skip merging when both usage entry values are None by @chizukicn in #9121
  • Fix: enforce positive memory_max_entries for in-memory cache by @mshr-h in #9128
  • Add typing to dspy.datasets.dataset by @max-muoto in #9143
  • Increase max_iters for dspy.ReAct by @chenmoneygithub in #9162
  • fix(dspy): prevent argument injection in LocalProvider subprocess calls by @Copilot in #9160
  • fix(dspy): populate InputField default values in Predict by @ritsuki1227 in #9167
  • fix(PythonInterpreter): Remove overly permissive read permissions and add strict allow by @isaacbmiller in #9081
  • Add save / load methods for DSpy settings by @WeichenXu123 in #9165

Docs

New Contributors

Full Changelog: 3.1.0...3.1.1

3.1.0

06 Jan 18:48

Choose a tag to compare

What's Changed

This is a 3.1.0 official release. We are making the beta release 3.1.0beta1 official.

Optimizers & Evaluation

Features & Enhancements

Security & Serialization

Bug Fixes & Type Handling

  • Fix TypeError when tracking usage with Anthropic models returning Pydantic objects by @Copilot in #8978
  • Update old Anthropic model names by @TomeHirata in #8992
  • fix(XMLAdapter): Implement user message formatting by @BenMcH in #9003
  • Fix content input conversion for OpenAI Responses API by @Copilot in #8993
  • Refactor: update type hints for adapter and LM methods by @TomeHirata in #9025
  • fix(dspy): exclude gpt-5-chat from reasoning model classification by @mindful-time in #9033
  • fix(dspy): Example.toDict() fails to serialize dspy.History objects by @Copilot in #9047
  • Some continuous format fix by @chenmoneygithub in #8987

Documentation & Tutorials

  • Add documentation for provider-side prompt caching with Anthropic and OpenAI by @Copilot in #8970
  • [docs] Add Google-style docstrings for dspy/evaluate/metrics.py by @eramis73 in #8954
  • fix: broken PyPI downloads badge from pepy.tech in README and docs home page by @dushmanta05 in #8995
  • Document ToolCall.execute() availability from dspy 3.0.4b2 by @Copilot in #9004
  • fix(docs): add python language id to code block by @Ahmad8864 in #9023
  • docs: add note on Python version for pre-commit by @akshatvishu in #9028
  • chore(docs): update dspy.settings.configure and dspy.settings.context to dspy.configure and dspy.context by @isaacbmiller in #9060
  • docs: add documentation for async tool usage and error handling by @TomeHirata in #9054

Minor Fixes, Maintenance & CI

New Contributors

Full Changelog: 3.0.4...3.1.0b1

3.1.0b1

18 Nov 00:26
a5671ef

Choose a tag to compare

3.1.0b1 Pre-release
Pre-release

What's Changed

This is a pre-release for 3.1.0.

Optimizers & Evaluation

Features & Enhancements

Security & Serialization

Bug Fixes & Type Handling

  • Fix TypeError when tracking usage with Anthropic models returning Pydantic objects by @Copilot in #8978
  • Update old Anthropic model names by @TomeHirata in #8992
  • fix(XMLAdapter): Implement user message formatting by @BenMcH in #9003
  • Fix content input conversion for OpenAI Responses API by @Copilot in #8993
  • Refactor: update type hints for adapter and LM methods by @TomeHirata in #9025
  • fix(dspy): exclude gpt-5-chat from reasoning model classification by @mindful-time in #9033
  • fix(dspy): Example.toDict() fails to serialize dspy.History objects by @Copilot in #9047
  • Some continuous format fix by @chenmoneygithub in #8987

Documentation & Tutorials

  • Add documentation for provider-side prompt caching with Anthropic and OpenAI by @Copilot in #8970
  • [docs] Add Google-style docstrings for dspy/evaluate/metrics.py by @eramis73 in #8954
  • fix: broken PyPI downloads badge from pepy.tech in README and docs home page by @dushmanta05 in #8995
  • Document ToolCall.execute() availability from dspy 3.0.4b2 by @Copilot in #9004
  • fix(docs): add python language id to code block by @Ahmad8864 in #9023
  • docs: add note on Python version for pre-commit by @akshatvishu in #9028
  • chore(docs): update dspy.settings.configure and dspy.settings.context to dspy.configure and dspy.context by @isaacbmiller in #9060
  • docs: add documentation for async tool usage and error handling by @TomeHirata in #9054

Minor Fixes, Maintenance & CI

New Contributors

Full Changelog: 3.0.4...3.1.0b1

3.0.4

10 Nov 17:41

Choose a tag to compare

3.0.4b2 has been running for a while without seeing issue, so we are making it an official 3.0.4 release.

The release note is the combination of 3.0.4b1 and 3.0.4b2.

What's Changed

Optimizers

Features & Enhancements

Bug Fixes & Type Handling

Documentation & Tutorials

Minor Fixes & Maintenance

New Contributors

Full Changelog: 3.0.3...3.0.4

3.0.4b2

21 Oct 23:30
097cd37

Choose a tag to compare

3.0.4b2 Pre-release
Pre-release

What's Changed

Features & Enhancements

Bug Fixes & Reliability

Security & Privacy

  • Exclude API keys from saved programs (#8941, @Copilot)

Refactors & Maintenance

Documentation

Tests & Stability

New Contributors

Full Changelog: 3.0.4b1...3.0.4b2

3.0.4b1

29 Sep 10:48
b71a118

Choose a tag to compare

3.0.4b1 Pre-release
Pre-release

What's Changed

GEPA + Other Optimizers

Custom Type

Image & Multimodal Support

Bug Fixes & Type Handling

Documentation & Tutorials

Minor Fixes & Maintenance

New Contributors

Full Changelog: 3.0.3...3.0.4b1

3.0.3

31 Aug 18:47
9725d4d

Choose a tag to compare

What's Changed

New Functionality

  • Introduce rollout_id for bypassing LM cache in a namespaced way by @okhat in #8745
  • Raise temperature when doing multiple rollouts (and warn otherwise) by @okhat in #8748

Optimizers

Maintenance

Full Changelog: 3.0.2...3.0.3

3.0.2

22 Aug 11:14
1263fd5

Choose a tag to compare

What's Changed

Optimizers

LMs & Adapters

Maintenance

New Contributors

Full Changelog: 3.0.1...3.0.2