github stanfordnlp/dspy 3.1.0b1

pre-release14 hours ago

What's Changed

This is a pre-release for 3.1.0.

Optimizers & Evaluation

Features & Enhancements

Security & Serialization

Bug Fixes & Type Handling

  • Fix TypeError when tracking usage with Anthropic models returning Pydantic objects by @Copilot in #8978
  • Update old Anthropic model names by @TomeHirata in #8992
  • fix(XMLAdapter): Implement user message formatting by @BenMcH in #9003
  • Fix content input conversion for OpenAI Responses API by @Copilot in #8993
  • Refactor: update type hints for adapter and LM methods by @TomeHirata in #9025
  • fix(dspy): exclude gpt-5-chat from reasoning model classification by @mindful-time in #9033
  • fix(dspy): Example.toDict() fails to serialize dspy.History objects by @Copilot in #9047
  • Some continuous format fix by @chenmoneygithub in #8987

Documentation & Tutorials

  • Add documentation for provider-side prompt caching with Anthropic and OpenAI by @Copilot in #8970
  • [docs] Add Google-style docstrings for dspy/evaluate/metrics.py by @eramis73 in #8954
  • fix: broken PyPI downloads badge from pepy.tech in README and docs home page by @dushmanta05 in #8995
  • Document ToolCall.execute() availability from dspy 3.0.4b2 by @Copilot in #9004
  • fix(docs): add python language id to code block by @Ahmad8864 in #9023
  • docs: add note on Python version for pre-commit by @akshatvishu in #9028
  • chore(docs): update dspy.settings.configure and dspy.settings.context to dspy.configure and dspy.context by @isaacbmiller in #9060
  • docs: add documentation for async tool usage and error handling by @TomeHirata in #9054

Minor Fixes, Maintenance & CI

New Contributors

Full Changelog: 3.0.4...3.1.0b1

Don't miss a new dspy release

NewReleases is sending notifications on new releases.