Skip to content

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")

Calls to InputField(...) or OutputField(...) that pass prefix=, format=, or parser=.

Remove the deprecated keyword arguments. Use desc= for field instructions and Python type annotations or Pydantic types for output structure.

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.