DSPy 3.3.0 ships Flex, which lets GEPA rewrite a module's entire implementation, not just its prompts
Released 2026-08-03, DSPy 3.3.0 adds experimental `dspy.Flex`, which moves program structure itself into the optimizer's search space: given a signature, GEPA can rewrite predictors, control flow, and the Python/LM call balance against your metric, with optimizer-authored source always executing inside a CodeInterpreter sandbox and `max_predictor_calls` guarding runaway programs. The same release adds `dspy.ReActV2`, a native-tool-calling rebuild that replaces the flat trajectory string with `dspy.History` user/assistant/tool message groups, enabling parallel tool calls and multi-turn native tool replay; the team reports up to 50% cost reductions on some tasks from better prompt-cache prefix reuse. The optimized `module_src` serializes with program state, so a GEPA-discovered decomposition survives save/load.
↳ Follow the thread