What's Changed
RLMs
- feat(rlm): Add RLM Module and improve PythonInterpreter by @isaacbmiller in #9193
- Use
languagein system instructions fordspy.Codefields 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.gepato handlelist[dict]output from adspy.LMby @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_entriesfor in-memory cache by @mshr-h in #9128 - Add typing to
dspy.datasets.datasetby @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
- [doc] Correct conversation history tutorial example by @zhiyanliu in #9071
- fix: Resolve broken hover-nlp/hover dataset by @vincentkoc in #9069
- Fix missing Real-World Examples and Experimental RL Optimization sections on tutorials page by @0xRaduan in #8982
- Refactor ReflectiveExample TypedDict documentation by @LakshyAAAgrawal in #9133
- [Automatic] Update api reference by @chenmoneygithub in #9135
- Replace ujson with orjson in docs by @togimoto in #9148
New Contributors
- @zhiyanliu made their first contribution in #9071
- @azai91 made their first contribution in #9072
- @0xRaduan made their first contribution in #8982
- @Ju-usc made their first contribution in #8928
- @mariusarvinte made their first contribution in #9106
- @Olocool17 made their first contribution in #9130
- @chizukicn made their first contribution in #9121
- @mshr-h made their first contribution in #9128
- @max-muoto made their first contribution in #9143
- @togimoto made their first contribution in #9148
- @ritsuki1227 made their first contribution in #9167
- @WeichenXu123 made their first contribution in #9165
Full Changelog: 3.1.0...3.1.1