3.0.4
📦 dspyView on GitHub →
✨ 25 features🐛 36 fixes⚡ 1 deprecations🔧 13 symbols
Summary
DSPy 3.0.4 adds extensive GEPA enhancements, new Anthropic citation support, tool execution improvements, and numerous bug fixes while deprecating Image.from_* helpers.
Migration Steps
- Replace any usage of Image.from_* helpers with the Image constructor
- Instantiate DummyLM with an adapter argument (e.g., DummyLM(adapter=your_adapter))
- If using the responses API, ensure the developer role is set in request headers
✨ New Features
- Add custom instruction_proposer support to GEPA with multimodal (dspy.Image) handling
- GEPA: Add custom component selection logic support
- Add MLFlow integration with GEPA
- Update optimization overview with data split guidance
- Add comprehensive instruction_proposer documentation and examples for GEPA
- Introduce gepa_kwargs for passing custom kwargs to gepa.optimize
- Propagate callback metadata during GEPA minibatch evaluation
- SIMBA improvements
- Add Anthropic Citation API support
- Add API reference for citations and document
- Allow custom type to be streamed and use native response field
- Add ToolCall.execute for smoother tool execution
- Add DSPy User-Agent header
- Update request headers when specified
- Arbor GRPO sync update
- Cache Image.format for better throughput
- Add test with ReAct that includes an Image tool
- Add save/load functionality to Embeddings
- Automatic llms.txt generation via mkdocs-llmstxt plugin
- Add Learn MCP documentation page
- Add documentation page to learn tool usage in DSPy
- Add tracing banner in new tutorials
- Add docstring for Adapter class
- Google‑style docstrings for Example class and Signature methods (prepend/append/insert/delete)
- Improve tutorial sidebar behavior (do not auto‑expand all tutorials)
🐛 Bug Fixes
- Fix GEPA usage tracking with tuple outputs
- Fix typo in GEPA warning
- Fix module and feedback mismatch (#8703)
- Fix value parsing and add tests
- Parse doubly‑encoded base type in json.parse
- Fix unexpected parsing of Optional[str] fields when string contains brackets or braces
- Use mcp.ClientSession for type hint
- Fix type hint for callpreprocess
- Allow DummyLM answer dict values of any type
- Fix crash when usage tracker is enabled with non‑prediction output
- Fallback to memory cache when disk is not available
- Avoid unnecessary cache key computation in LM
- Display metric=0 in evaluation table
- Fix chunk loss in long streaming with native response field
- Make buffer condition more precise
- Add fallback on missing end marker during streaming
- Escape logic in JSONAdapter when JSON mode but no structured outputs
- Fix XML adapter markers
- Fix test_xml_adapter_full_prompt
- Fix responses API
- Fix response_format handling for responses API
- Fix error handling in dspy parallel
- Set default temperature and max_tokens to None in LM
- Select between task_model and prompt_model in MIPROv2
- Exclude API keys from saved programs
- Use developer role in response API
- Fix CSV output handling (#8688)
- Add experimental annotation support
- Fix spelling error in DatasetDescriptor Prompt
- Expose EvaluationResult as dspy.evaluate.EvaluationResult
- Include built‑in types in DSPy API references
- Change DummyLM to take an adapter at initialization
- Refactor URL construction in ArborReinforceJob to use urljoin
- Update type hint of ClientSession
- Fix linting issues in LM
- Deflake the real LM test
🔧 Affected Symbols
GEPAToolCall.executedspy.ImageImage.from_*DummyLMEvaluationResultArborReinforceJobClientSessionSignatureAdapterEmbeddingMIPROv2LM⚡ Deprecations
- Deprecate Image from_* helpers in favor of the flexible Image constructor