dspy/deprecated-field-args
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| DSPy | warning | none, edit by hand | All versions |
The prefix, format, and parser arguments on dspy.InputField and dspy.OutputField are deprecated in DSPy and have no effect at runtime.
answer: str = dspy.OutputField(prefix="Answer:", desc="Short factual answer")answer: str = dspy.OutputField(desc="Short factual answer")What the rule reports
Section titled “What the rule reports”Calls to InputField(...) or OutputField(...) that pass prefix=, format=, or parser=.
How to fix it
Section titled “How to fix it”Remove the deprecated keyword arguments. Use desc= for field instructions and Python type annotations or Pydantic types for output structure.
Diagnostic message
Section titled “Diagnostic message”prefix, format, and parser on InputField/OutputField are deprecated and ignored in DSPy. Remove them or use desc and type annotations instead.See all rules in the DSPy pack.