3.0.3
Breaking Changes📦 dspyView on GitHub →
⚠ 1 breaking✨ 5 features🐛 4 fixes🔧 5 symbols
Summary
dspy 3.0.3 adds rollout_id support, improves GEPA optimizer, updates caching behavior, and includes several bug fixes and maintenance updates.
⚠️ Breaking Changes
- LiteLLM caching was removed from the LM class; code that relied on the deprecated LiteLLM cache must be updated to use the new caching mechanism or disable caching.
Migration Steps
- Remove any usage of the deprecated LiteLLM caching flags from `dspy.LM`.
- If you relied on the old cache behavior, configure caching explicitly using the new API.
- Update code that manually calls `forward` to rely on the patched behavior or adjust calls accordingly.
- When performing multiple rollouts, you may need to adjust temperature settings if you previously set them manually.
✨ New Features
- Added `rollout_id` parameter to allow namespaced bypass of the LM cache.
- Temperature is automatically increased for multiple rollouts and a warning is emitted when a single rollout is performed.
- GEPA optimizer upgraded: new version includes a progress bar and ensures failing metrics stop execution.
- Added type hints and corrected the docstring for the SIMBA optimizer.
- Reduced the `max_tokens` requirement for reasoning language models.
🐛 Bug Fixes
- Fixed `__call__` forwarding in the GEPA tutorial example.
- Patched the `forward` method handling to avoid warnings on explicit `forward` calls.
- Corrected Predict configuration merging logic and documented `rollout_id` usage.
- Replaced `ujson` with `orjson` for faster JSON handling.
🔧 Affected Symbols
dspy.LMdspy.GEPAdspy.SIMBAdspy.predictdspy.forward