rules/dspy/deprecated-two-step-adapter.md
dspy.TwoStepAdapter is deprecated in DSPy 3.5 and will be removed in DSPy 3.6.
diff
| 1 | -adapter = dspy.TwoStepAdapter(extraction_lm) |
| 2 | +adapter = dspy.JSONAdapter() |
What the rule reports
Calls to TwoStepAdapter(...) through a module attribute or direct import in files that import dspy.
How to fix it
Use dspy.JSONAdapter() for models that support structured outputs, or dspy.XMLAdapter() for models that do not.