Change8

Migrating to DSPy 3.0.3

Version 3.0.3 introduces 1 breaking change. This guide details how to update your code.

Released: 8/31/2025

1
Breaking Changes
4
Migration Steps
5
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

dspy.LMdspy.GEPAdspy.SIMBAdspy.predictdspy.forward

Breaking Changes

Issue #1

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

  1. 1
    Remove any usage of the deprecated LiteLLM caching flags from `dspy.LM`.
  2. 2
    If you relied on the old cache behavior, configure caching explicitly using the new API.
  3. 3
    Update code that manually calls `forward` to rely on the patched behavior or adjust calls accordingly.
  4. 4
    When performing multiple rollouts, you may need to adjust temperature settings if you previously set them manually.

Release Summary

dspy 3.0.3 adds rollout_id support, improves GEPA optimizer, updates caching behavior, and includes several bug fixes and maintenance updates.

Need More Details?

View the full release notes and all changes for DSPy 3.0.3.

View Full Changelog