3.0.0

stanfordnlp/dspy3.0.0Aug 12, 2025by okhat

AI Summary

Major version 3.0 release focusing on new optimizers (GEPA, SIMBA, GRPO via Arbor), Adapters & Types (extensibility), and observability (MLflow 3.0).

Key Highlights

  • New optimizers: GEPA (Genetic-Pareto), SIMBA, and GRPO (Arbor).
  • Adapters & Types: ChatAdapter, JSONAdapter, XMLAdapter, BAMLAdapter, Image, Audio.
  • Native observability with MLflow 3.0.
  • Async support and high-concurrency caching.
  • Stable save/load for programs.

Breaking Changes

  • Removed community retrievers.
  • Dropped Python 3.9 support.
  • Removed dspy.Program alias.
  • Various deprecations from 2.5/2.6 applied (functional/, dsp/ clients, legacy caches).

New Features

  • GEPA optimizer.
  • SIMBA optimizer.
  • GRPO optimizer (Arbor).
  • Adapters (Chat, JSON, XML, BAML).
  • Types (Image, Audio).
  • MLflow 3.0 integration.
  • Async support.

Full Release Notes

# DSPy 3.0.0

The work in the run up to **DSPy 3.0** has focused on new powerful optimizers (RL: dspy.GRPO via our new Arbor library; and reflective prompt evolution: dspy.GEPA and dspy.SIMBA), extensibility (dspy.Adapter & dspy.Type), reliability/observability for production (tight integration with MLflow 3.0), and more. Much of this work incubated during late 2.6 and matured in 3.0.

## ✨ Highlights across 2.6 β†’ 3.0

### Adapters & Types (extensibility without prompt plumbing)

* **Adapters**: built-in `dspy.ChatAdapter`, `dspy.JSONAdapter`, `dspy.XMLAdapter`, `dspy.BAMLAdapter`, token/status streaming, async paths, and intelligent fallback to native LLM structured outputs.
* **Types**: multi-modal I/O via `dspy.Image` and `dspy.Audio`; composite types (e.g., `list[dspy.Image]`, Pydantic models); higher-level I/O like `dspy.History` and `dspy.ToolCalls`. Custom types now β€œjust work” with adapters (`dspy.Type`).
* Tooling integrations: **MCP servers** and **LangChain tools** supported out-of-the-box.

### Modules, Runtime & DX

* **Better scalability**: `Module.batch` with thread-safe DSPy settings; native DSPy **async**; high-concurrency, configurable caches.
* **Smoother DX**: intermediate **status streaming**, output streaming from any layer, **usage tracking**, per-module history, rich callbacks.
* **Deployment/portability**: **stable save/load** (including the program), and you can **export the prompt management layer** via Adapters.
* **New/updated modules**: `dspy.CodeAct`, `dspy.Refine`, improved `ReAct`, a more reliable `PythonInterpreter`.

### Observability & MLOps

* **Native observability** with **MLflow 3.0**: tracing, optimizer tracking, and improved deployment flows (plus docs/tutorials).

### Optimizers

* **MIPROv2**: substantially more reliable with **automatic hyperparameter selection** and many fixes.
* **GRPO** (RL on DSPy programs): our new **Arbor** library for RL training of compound AI systems.
* **SIMBA**: powerful prompt optimizer that learns from custom feedback (great for agentic/long-horizon tasks).
* **GEPA (Genetic-Pareto)**: a new optimizer that builds a Pareto tree of prompts, uses NL reflection to extract/validate lessons, and can produce **shorter prompts** while **improving downstream performance**. Early results show **wins over MIPROv2** on several tasks and promising inference-time search behavior (see paper announcement for details).

Some of the above first landed in late 2.6 (e.g., early streaming, initial adapters/types improvements), and were consolidated/matured in 3.0.

---

## πŸ’₯ Breaking changes / notable removals

* **Remove community retrievers** (#8073). If you relied on unmaintained retriever integrations, migrate to custom code (or use Tool/MCP integrations).
* **Drop Python 3.9** support. 3.10–3.13 are supported.
* **Alias removed**: `dspy.Program` β†’ remove/replace (was cleaned up in 3.0 work).
* Various deprecations promised in 2.5 were applied during the 2.6.0 release candidates (e.g., old `functional/`, `dsp/` clients, legacy caches/examples/tests).

---

## πŸ†š Changes since `3.0.0b4`

**Optimizers**

* **Add GEPA (Genetic-Pareto) optimizer** (@LakshyAAAgrawal, #8624, #8628, #8633).

**Maintenance**

* Migrate GitHub Actions from `set-output` to `$GITHUB_OUTPUT` (@kurtmckee, #8557).

**New contributor**

* @LakshyAAAgrawal (first contribution in #8624).

**Full Changelog:** `3.0.0b4...3.0.0`

---

## πŸ“š 3.0.0 beta highlights (rollup)

* **b4**: MIPRO reliability fixes; updated **Arbor GRPO** integration; streaming end-marker; faster image JSON parsing; **BAMLAdapter**; mark **gpt-5** as reasoning model; vendor a lighter internal hasher.
  *New contributors:* @weklund, @vakinapalli, @tvdaptible, @jmhb0, @olesyash, @kurtmckee, @prrao87, @danielsparing, @apieum.
* **b3**: `dspy.Code`; PEP 604 unions in signatures; token streaming for XMLAdapter; `dspy.syncify` for running optimizers on async DSPy programs; Windows support for MIPROv2 confirm; real-LLM unit tests.
  *New contributors:* @LukasMurdock, @ken-dwyer, @grisaitis, @vacmar01, @fswair, @nillwyc, @asad-aali, @niklovescoding, @MaximeRivest, @brenorb.
* **b2**: Stream listener reuse; async paths for Chat/JSON adapters; error-message/QoL updates; **drop Python 3.9**; docs/tutorials; **rename `BaseType` β†’ `Type`**; remove `dspy.Program` alias; many cleanups.
  *New contributors:* @codingDuan, @Hangzhi, @poudro.
* **b1**: 3.0 β€œheads-up” + **remove unmaintained retrievers** (#8073); XML adapter; standardize/style improvements; async settings merge; MLflow tracing guide.
  *New contributors:* @brishin, @dmavrommatis.

---

## πŸ‘ Contributors since 2.6

Thank you to everyone who contributed code, docs, reviews, issues, and testing!

πŸŽ‰ = first-time contributor since 2.6.15

**@AkeemMcLennon**, **@aliirz**, **@amas0**, **@apieum** πŸŽ‰, **@arnavsinghvi11**, **@asad-aali** πŸŽ‰, **@asparagus**, **@assadyousuf** πŸŽ‰, **@BenMcH** πŸŽ‰, **@bjsi**, **@brenorb** πŸŽ‰, **@brishin** πŸŽ‰, **@BTripp1986** πŸŽ‰, **@carsonkahn-external** πŸŽ‰, **@cezarc1**, **@chakravarthik27**, **@charviupreti** πŸŽ‰, **@chenmoneygithub**, **@codingDuan** πŸŽ‰, **@CyrusNuevoDia**, **@danielsparing** πŸŽ‰, **@dbczumar**, **@dilarasoylu**, **@dimroc**, **@Dyadd**, **@emmanuel-ferdman** πŸŽ‰, **@erandeutsch**, **@estsauver**, **@fswair** πŸŽ‰, **@GabeDottl**, **@glesperance**, **@grisaitis** πŸŽ‰, **@hmoazam**, **@Harryllh**, **@Hangzhi**, **@hung-phan**, **@isaacbmiller**, **@itay1542**, **@Jdogtherock**, **@JHMuir**, **@jjjjw**, **@jinnovation**, **@jmho**, **@jmhb0** πŸŽ‰, **@kanjurer**, **@kalanyuz**, **@ken-dwyer** πŸŽ‰, **keyuchen21**, **@klopsahlong**, **@koptagel** πŸŽ‰, **@kurtmckee** πŸŽ‰, **@LukasMurdock** πŸŽ‰, **@laitifranz**, **@LakshyAAAgrawal** πŸŽ‰, **@lxdlam**, **@MaximeRivest** πŸŽ‰, **@MaxwellSalmon**, **@Miyamura80** πŸŽ‰, **@myz96**, **@neilbhutada**, **@niklovescoding** πŸŽ‰, **@nillwyc** πŸŽ‰, **@okhat**, **@olesyash** πŸŽ‰, **@poudro** πŸŽ‰, **@prrao87** πŸŽ‰, **@patcher9**, **@rcanand**, **@rifolio** πŸŽ‰, **@Samoed**, **@SanjanShiv** πŸŽ‰, **@srowen** πŸŽ‰, **@Shangyint**, **@stevapple**, **@tvdaptible** πŸŽ‰, **@TomeHirata**, **@tikoehle** πŸŽ‰, **@Timtech4u**, **@thomasahle**, **@ulgens**, **@vakinapalli** πŸŽ‰, **@vacmar01** πŸŽ‰, **@veronicalyu320**, **@vincentkoc**, **@weklund** πŸŽ‰, **@willsmithDB**, **@xinyij-goo** πŸŽ‰, **@yuruofeifei**, **@Ziems**, **@zbambergerNLP**, **@gkorland**, **@yanmxa**, **@mikeedjones**, **@b-d055**, **@mikeweltevredem**, **@ItzAmirreza**, **@GangGreenTemperTatum**, **@shermansiu**, **@dmavrommatis**, **@iPersona**, **@Krishn1412**, **@Y-1huadb**, **@B-Step62**, **@tkellogg**




**First-time contributors called out since 2.6.15 (rollup):**
@rifolio, @charviupreti, @BenMcH, @GangGreenTemperTatum, @koptagel, @Miyamura80, @tikoehle, @srowen, @assadyousuf, @xinyij-goo, @SanjanShiv, @emmanuel-ferdman, @Y-1huadb, @Krishn1412, @BTripp1986, @vincentkoc, @estsauver, @jmho, @JHMuir, @neilbhutada, @carsonkahn-external, @dimroc, @erandeutsch, @willsmithDB, @iPersona, @brishin, @dmavrommatis, @codingDuan, @Hangzhi, @poudro, @LukasMurdock, @ken-dwyer, @grisaitis, @vacmar01, @fswair, @nillwyc, @asad-aali, @niklovescoding, @MaximeRivest, @brenorb, @weklund, @vakinapalli, @tvdaptible, @jmhb0, @olesyash, @kurtmckee, @prrao87, @danielsparing, @apieum, **@LakshyAAAgrawal**.


---

## πŸ”— Compare

* Full changes: `2.6.27...3.0.0b1`, `3.0.0b1...3.0.0b2`, `3.0.0b2...3.0.0b3`, `3.0.0b3...3.0.0b4`, `3.0.0b4...3.0.0`.