Migrating to DSPy 2.6.18
Version 2.6.18 introduces 2 breaking changes. This guide details how to update your code.
Released: 4/18/2025
2
Breaking Changes
4
Migration Steps
10
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
dspy.settings.num_threadsdspy.settings.provide_tracebackdspy.settings.max_history_sizedspy.Tooldspy.TwoStepAdapterdspy.utils.json_regexdspy.optimizers.SIMBAdspy.GroundedProposerdspy.streamingevaluate.pyBreaking Changes
●Issue #1
num_threads moved from module-level to global settings; update code to use dspy.settings.num_threads instead of the previous location.
●Issue #2
provide_traceback moved into global settings; update references to dspy.settings.provide_traceback.
Migration Steps
- 1Replace any direct usage of num_threads with dspy.settings.num_threads.
- 2Replace any direct usage of provide_traceback with dspy.settings.provide_traceback.
- 3If you relied on the previous OpenAI version constraint, ensure your environment meets the new openai version requirements.
- 4Review custom adapters for compatibility with the new TwoStepAdapter pattern if applicable.
Release Summary
Version 2.6.18 adds a TwoStepAdapter, default args for tools, streaming support, and several bug fixes, while moving key settings into a global configuration and relaxing the OpenAI version constraint.
Need More Details?
View the full release notes and all changes for DSPy 2.6.18.
View Full Changelog