New
3.1.0
What's Changed
This is a 3.1.0 official release. We are making the beta release 3.1.0beta1 official.
Optimizers & Evaluation
- Add tutorial for dspy-trusted-monitor using GEPA by @ZachParent in https://github.com/stanfordnlp/dspy/pull/8938
- Update gepa[dspy] dependency version to 0.0.18 by @LakshyAAAgrawal in https://github.com/stanfordnlp/dspy/pull/8969
- fix(MIPROv2): zero shot not taking .compile parameters into account before determining if the program was zero shot by @isaacbmiller in https://github.com/stanfordnlp/dspy/pull/8909
- Update gepa[dspy] dependency version to 0.0.22 by @LakshyAAAgrawal in https://github.com/stanfordnlp/dspy/pull/9042
- [docs] Add GEPA gepa_kwargs documentation by @GabrielLoiseau in https://github.com/stanfordnlp/dspy/pull/8998
- Update optimizer overview to include the description of SIMBA by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/9026
- Enable callback logging only for full eval on GEPA by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/9050
- Update Arbor Tutorials by @Ziems in https://github.com/stanfordnlp/dspy/pull/9007
- Update RL Tutorial by @Ziems in https://github.com/stanfordnlp/dspy/pull/9008
Features & Enhancements
- Add Disable Fallback Option in ChatAdapter by @Ziems in https://github.com/stanfordnlp/dspy/pull/8984
- Add a method to extract system message based on adapter and signature by @chenmoneygithub in https://github.com/stanfordnlp/dspy/pull/9006
- feat(File): add File type for handling file data by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/9014
- Allow stream listener to work on any type by @chenmoneygithub in https://github.com/stanfordnlp/dspy/pull/8833
- fix(audio): Normalize 'x-wav' audio format to 'wav' by @akshatvishu in https://github.com/stanfordnlp/dspy/pull/9017
- Support Python 3.14 by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/9041
- Introduce dspy.Reasoning to capture native reasoning from reasoning models by @chenmoneygithub in https://github.com/stanfordnlp/dspy/pull/8986
Security & Serialization
- Add guards against loading pkl files by @isaacbmiller in https://github.com/stanfordnlp/dspy/pull/9048
- Add param to load_memory_cache to stop pkl files without explicit loading by @isaacbmiller in https://github.com/stanfordnlp/dspy/pull/9055
Bug Fixes & Type Handling
- Fix TypeError when tracking usage with Anthropic models returning Pydantic objects by @Copilot in https://github.com/stanfordnlp/dspy/pull/8978
- Update old Anthropic model names by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/8992
- fix(XMLAdapter): Implement user message formatting by @BenMcH in https://github.com/stanfordnlp/dspy/pull/9003
- Fix content input conversion for OpenAI Responses API by @Copilot in https://github.com/stanfordnlp/dspy/pull/8993
- Refactor: update type hints for adapter and LM methods by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/9025
- fix(dspy): exclude gpt-5-chat from reasoning model classification by @mindful-time in https://github.com/stanfordnlp/dspy/pull/9033
- fix(dspy): Example.toDict() fails to serialize dspy.History objects by @Copilot in https://github.com/stanfordnlp/dspy/pull/9047
- Some continuous format fix by @chenmoneygithub in https://github.com/stanfordnlp/dspy/pull/8987
Documentation & Tutorials
- Add documentation for provider-side prompt caching with Anthropic and OpenAI by @Copilot in https://github.com/stanfordnlp/dspy/pull/8970
- [docs] Add Google-style docstrings for dspy/evaluate/metrics.py by @eramis73 in https://github.com/stanfordnlp/dspy/pull/8954
- fix: broken PyPI downloads badge from pepy.tech in README and docs home page by @dushmanta05 in https://github.com/stanfordnlp/dspy/pull/8995
- Document ToolCall.execute() availability from dspy 3.0.4b2 by @Copilot in https://github.com/stanfordnlp/dspy/pull/9004
- fix(docs): add python language id to code block by @Ahmad8864 in https://github.com/stanfordnlp/dspy/pull/9023
- docs: add note on Python version for pre-commit by @akshatvishu in https://github.com/stanfordnlp/dspy/pull/9028
- chore(docs): update dspy.settings.configure and dspy.settings.context to dspy.configure and dspy.context by @isaacbmiller in https://github.com/stanfordnlp/dspy/pull/9060
- docs: add documentation for async tool usage and error handling by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/9054
Minor Fixes, Maintenance & CI
- Remove unused notebook python file by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/8971
- Cache Ollama to speed up CI by @TomeHirata in https://github.com/stanfordnlp/dspy/pull/8972
- Clean out unused deps by @isaacbmiller in https://github.com/stanfordnlp/dspy/pull/8968
- docs: add note on Python version for pre-commit by @akshatvishu in https://github.com/stanfordnlp/dspy/pull/9028
- Bump DSPy version by @chenmoneygithub in https://github.com/stanfordnlp/dspy/pull/9061
New Contributors
- @ZachParent made their first contribution in https://github.com/stanfordnlp/dspy/pull/8938
- @eramis73 made their first contribution in https://github.com/stanfordnlp/dspy/pull/8954
- @dushmanta05 made their first contribution in https://github.com/stanfordnlp/dspy/pull/8995
- @akshatvishu made their first contribution in https://github.com/stanfordnlp/dspy/pull/9017
- @mindful-time made their first contribution in https://github.com/stanfordnlp/dspy/pull/9033
- @GabrielLoiseau made their first contribution in https://github.com/stanfordnlp/dspy/pull/8998
- @Ahmad8864 made their first contribution in https://github.com/stanfordnlp/dspy/pull/9023
Full Changelog: https://github.com/stanfordnlp/dspy/compare/3.0.4...3.1.0b1