Change8

3.1.0b1

📦 dspyView on GitHub →
8 features🐛 12 fixes🔧 12 symbols

Summary

DSPy 3.1.0b1 introduces several new features such as a File type, Reasoning capture, and Python 3.14 support, along with numerous bug fixes and security hardening, while renaming configuration helpers.

Migration Steps

  1. Replace uses of dspy.settings.configure with dspy.configure.
  2. Replace uses of dspy.settings.context with dspy.context.

✨ New Features

  • Add Disable Fallback option to ChatAdapter.
  • Add method to extract system message based on adapter and signature.
  • Introduce dspy.File type for handling file data.
  • Allow stream listener to accept any data type.
  • Support Python 3.14.
  • Introduce dspy.Reasoning to capture native reasoning from reasoning models.
  • Add guards against loading pickle (.pkl) files.
  • Add parameter to load_memory_cache to prevent automatic loading of .pkl files.

🐛 Bug Fixes

  • Fix zero-shot detection in MIPROv2 to respect .compile parameters.
  • Normalize 'x-wav' audio format to 'wav'.
  • Fix TypeError when tracking usage with Anthropic models returning Pydantic objects.
  • Update old Anthropic model names to current identifiers.
  • Implement user message formatting in XMLAdapter.
  • Fix content input conversion for OpenAI Responses API.
  • Exclude gpt-5-chat from reasoning model classification.
  • Fix Example.toDict() serialization of dspy.History objects.
  • Resolve continuous format handling issues.
  • Repair broken PyPI downloads badge in README and docs.
  • Add Python language identifier to code blocks in documentation.
  • Update documentation for async tool usage and error handling.

🔧 Affected Symbols

dspy.ChatAdapterdspy.Filedspy.StreamListenerdspy.Reasoningdspy.load_memory_cachedspy.settings.configuredspy.settings.contextdspy.MIPROv2dspy.Example.toDictdspy.Historydspy.XMLAdapterdspy.ToolCall.execute