unstale

pypi / dspy

dspy

What changed in dspy 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

71 breaking10 security9 deprecations103 new APIs and options2 performance40 behavior and defaults71 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

dspy 3306 changes

Breaking changes 71

  • Overdue Audio factory aliases are removed.

    3.5.0release notes

  • The deprecated CodeAct API is removed for DSPy 3.5.

    3.5.0release notes

  • ReAct is now ReActV2, with structured History and a typed submit tool.

    3.5.0release notes

  • Overdue Image factory aliases and the deprecated constructor download/verify shim are removed.

    3.5.0release notes

  • The deprecated ProgramOfThought API is removed for DSPy 3.5.

    3.5.0release notes

  • Restricted loading is now the default for disk caches, and plain NumPy arrays are stored without pickle.

    3.5.0release notes

  • XMLAdapter now formats and parses predictor calls by default, changing prompts and the output contract even when your Signature stays the same.

    3.5.0release notes

  • The bundled metadata snapshot now follows LiteLLM 1.105.0; offline setups may lose capability flags for still-routable models, changing structured-output, native-tool, and reasoning behavior.

    3.4.1release notes

  • The private shim file moved to dspy/primitives/_facade_shim.py, so the old module no longer imports.

    3.4.1release notes

  • Flex bridge shim constants and helpers moved here; imports from dspy.predict.flex.bridge now raise ImportError.

    3.4.1release notes

  • Signatures can no longer declare input fields named history or tools; the constructor raises ValueError because ReActV2 supplies both itself.

    3.4.1release notes

  • History replay now passes main_request= to format_user_message_content; custom adapter overrides must accept main_request: bool = False.

    3.4.1release notes

  • GEPA now requires reflection_lm to be a dspy.LM or another dspy.BaseLM that can return parseable JSON; plain functions fail and leave the program unoptimized.

    3.4.1release notes

  • Null Score level descriptions are rejected when defining signatures or setting criteria, and saved programs containing them no longer load or run successfully.

    3.4.1release notes

  • Custom engines own their connections; client settings belong on the engine, and DSPy rejects those settings on LM construction, copying, and calls with custom engines.

    3.4.0release notes

  • Importing this module now raises a migration error.

    3.4.0release notes

  • The experimental 3.3 LM request and response exports are removed; use dspy.lm15.Request and dspy.lm15.Response instead.

    3.4.0release notes

  • Rejects empty development sets with a descriptive ValueError.

    3.4.0release notes

  • experimental=True no longer makes ordinary prompt calls return typed responses; use an explicit request.

    3.4.0release notes

  • The typed_lm forward contract is rejected; use explicit lm15 requests for typed responses.

    3.4.0release notes

  • ReActV2 output fields cannot use this name because it collides with metadata.

    3.4.0release notes

  • The name is reserved for RLM runtime configuration; using it as an RLM signature input raises ValueError.

    3.4.0release notes

  • Replaces RLM's live-interpreter call-time override with a keyword-only interpreter_factory input, and reserves that input name.

    3.4.0release notes

  • Schemas derived from Pydantic models require all properties as OpenAI expects; caller-supplied raw schemas remain unchanged.

    3.4.0release notes

  • Requires Pydantic 2.11.0 or later.

    3.4.0release notes

  • RLM call-time overrides now require a keyword-only zero-argument interpreter factory; live interpreter instances and positional factory overrides raise TypeError.

    3.4.0release notes

  • Single failures now propagate as their original exceptions; groups containing multiple failures remain groups.

    3.4.0release notes

  • Propagates producer failures instead of silently ending; streamify unwraps a single nested task-group failure while multiple failures remain grouped.

    3.4.0release notes

  • URL downloads now default to a 30-second request timeout instead of potentially waiting forever; pass timeout=None to retain unbounded behavior.

    3.3.1release notes

  • Setting max_reflection_cost now raises clearly because DSPy's GEPA adapter does not support it, rather than silently providing an ineffective budget.

    3.3.1release notes

  • Sandbox startup ignores ambient Node and Deno project configuration, pins Pyodide, validates Deno versions, protects bundled runtime files, and revokes Deno-cache access after startup.

    3.3.1release notes

  • The direct BaseLM constructor now defaults max_tokens to None instead of 1000.

    3.3.0release notes

  • The direct BaseLM constructor now defaults temperature to None instead of 0.0.

    3.3.0release notes

  • Shallow-copies subclass-owned attributes while separately copying DSPy-owned mutable runtime containers; subclasses relying on deep copies should override copy or copy state explicitly.

    3.3.0release notes

  • When tracked, this value is now a dictionary keyed by validation instance id with lists of candidate and Prediction pairs.

    3.3.0release notes

  • No longer retries with an alternate output format after an LMError; provider and transport failures propagate directly.

    3.3.0release notes

  • TwoStepAdapter uses this exception for local extraction or parsing failures instead of ValueError.

    3.3.0release notes

  • Serialization and format output now use DSPy's native {name, args} call shape instead of the prior OpenAI-style shape.

    3.3.0release notes

  • Uses SHA-256 instead of xxhash64, so hash strings, hash-derived fine-tuning filenames, and deterministic bootstrap trace selection may change; LM response-cache keys are unaffected.

    3.3.0release notes

  • Now returns a compiled DSPy module.

    3.3.0release notes

  • Now contains a list of compiled DSPy modules rather than instruction dictionaries.

    3.3.0release notes

  • The download_images and verify options were removed from encode_image; use resource construction or an explicit factory instead.

    3.3.0release notes

  • Now returns a dictionary keyed by validation instance id.

    3.3.0release notes

  • Construction and validation no longer interpret locator-shaped strings as instructions to read local files or fetch remote URLs.

    3.3.0release notes

  • Explicitly reads and embeds a local image; constructing or validating Image values no longer performs implicit I/O.

    3.3.0release notes

  • Downloads the resource and returns an embedded data URI; use Image(url) for a non-downloading provider-fetched reference.

    3.3.0release notes

  • The download option was removed; choose reference construction or an explicit factory instead.

    3.3.0release notes

  • The LangChain extra now requires LangChain Core 0.3.0 or newer.

    3.3.0release notes

  • NumPy is no longer installed with base dspy; NumPy-backed features require the numpy extra.

    3.3.0release notes

  • OpenAI 1.66.2 is now the supported minimum.

    3.3.0release notes

  • Now has type dict[Any, set[int]].

    3.3.0release notes

  • No longer exposes a constructor-owned interpreter attribute or preserves sandbox state across calls; each invocation creates and shuts down a fresh interpreter unless one is caller-owned.

    3.3.0release notes

  • Passing this through GEPA's gepa_kwargs now raises ValueError; use instruction_proposer for custom proposal behavior.

    3.3.0release notes

  • Validates its execution namespace at construction and rejects unexpected invocation fields instead of ignoring them.

    3.3.0release notes

  • The RLM constructor parameter was renamed to max_iters.

    3.3.0release notes

  • Replaces the RLM constructor's max_iterations parameter to match other iterative DSPy modules.

    3.3.0release notes

  • Raises dspy.AdapterParseError rather than ValueError for local extraction or parsing failures; extraction-LM failures propagate as dspy.LMError.

    3.3.0release notes

  • Now has type list[dict[Any, float]], keyed by validation instance id.

    3.3.0release notes

  • An empty language-model response now raises AdapterParseError instead of silently returning None.

    3.2.0release notes

  • Introduces a DSPy-owned context-window error in place of the LiteLLM error, supporting decoupling from LiteLLM.

    3.2.0release notes

  • Both metrics now return dspy.Prediction.

    3.2.0release notes

  • Changes the messaging format to JSONRPC.

    3.1.3release notes

  • Removes the enable_tool_optimization feature.

    3.1.3release notes

  • Changes tools to take a list instead of a dict and properly serializes None/null values.

    3.1.3release notes

  • Replaces FinalAnswerResult as the RLM final output type.

    3.1.1release notes

  • Removes the RLM __call__ method.

    3.1.1release notes

  • BaseType was renamed to Type.

    3.0.0release notes

  • Unmaintained community retriever integrations were removed; migrate to custom code or use Tool/MCP integrations.

    3.0.0release notes

  • The dspy.Program alias was removed; replace its use.

    3.0.0release notes

  • Custom types work with adapters; the type API is named dspy.Type.

    3.0.0release notes

  • Python 3.9 is no longer supported; Python 3.10–3.13 are supported.

    3.0.0release notes

Security 10

  • LM calls made for sandboxed code accept generation parameters only; sandboxed code cannot set model, api_base, api_key, or headers.

    3.4.1release notes

  • Request handling rejects recursive execution through the interpreter's own host tools, uses unpredictable request IDs, prevents diagnostic desynchronization, and protects host-tool identity from guest mutation.

    3.3.1release notes

  • Interpreter file mounts with distinct host paths can no longer silently collide at the same sandbox basename.

    3.3.1release notes

  • Serializes sanitized LM state, excluding API keys and supporting legacy saved states.

    3.3.0release notes

  • Loads serialized LM state and requires explicit opt-in before importing trusted custom LM classes.

    3.3.0release notes

  • Opt-in restricted cache deserialization limits allowed pickle types to reduce arbitrary code execution risk from malicious or corrupted cache files.

    3.2.0release notes

  • Prevents argument injection in subprocess calls.

    3.1.1release notes

  • Removes overly permissive read permissions and adds strict allow rules.

    3.1.1release notes

  • Adds guards against loading pkl files and a load_memory_cache parameter to prevent loading them without explicit permission.

    3.1.0release notes

  • API keys are excluded from saved programs.

    3.0.4release notes

Deprecations 9

  • The old ReActV2 name is deprecated until 3.6; use dspy.ReAct.

    3.5.0release notes

  • TwoStepAdapter is deprecated in DSPy 3.5.

    3.5.0release notes

  • Custom BaseLM.forward() and aforward() integrations still execute with DeprecationWarning and are scheduled for removal in 3.5; implement the engine interface.

    3.4.0release notes

  • LegacyEngine, AsyncLegacyEngine, and custom complete_legacy() shortcuts still execute with DeprecationWarning and are scheduled for removal in 3.5.

    3.4.0release notes

  • Public OpenAI-style messages= calls still execute in 3.4 but emit DeprecationWarning and are scheduled for removal in 3.5; use explicit requests.

    3.4.0release notes

  • Constructing dspy.CodeAct now emits DeprecationWarning; it is scheduled for removal in DSPy 3.5, and the notes recommend dspy.RLM for new code.

    3.3.1release notes

  • Constructing dspy.ProgramOfThought now emits DeprecationWarning; it is scheduled for removal in DSPy 3.5, and the notes recommend dspy.RLM for new code.

    3.3.1release notes

  • Using prefix, format, and parser kwargs in InputField or OutputField now emits a deprecation warning.

    3.2.0release notes

  • Image from_* helpers are deprecated in favor of the flexible constructor.

    3.0.4release notes

New APIs and options 103

  • Adds a BoundingBox type with automatic Jev image support.

    3.5.0release notes

  • RLM can crop images with Pillow and send mixed text/image subqueries from its Python REPL.

    3.5.0release notes

  • Interpreters can be started ahead of need, enabling a ready pool for Flex and RLM execution.

    3.5.0release notes

  • RLM code can import dspy and build Predict, ChainOfThought, ReActV2, and nested RLM sub-agents; sub-agents run on the host and only JSON crosses the interpreter boundary.

    3.4.1release notes

  • Configure GEPA's instruction proposer with skills, additional_instructions, base_instructions, max_chars, truncate_history_outputs, and adapter.

    3.4.1release notes

  • Restoring saved custom engines requires enabling this option; the notes advise enabling it only for trusted state.

    3.4.0release notes

  • Adds async ReActV2 execution.

    3.4.0release notes

  • Adds an experimental typed choice among described alternatives, exposing the selected value, option probabilities, and confidence.

    3.4.0release notes

  • Adds the experimental Choice type for working with TypeSafe/Jev.

    3.4.0release notes

  • Allows replacing the default interpreter factory globally or through configuration; explicitly supplied non-default factories retain precedence.

    3.4.0release notes

  • Adds an optimizer that fits Boolean thresholds, Score cuts, and Choice weights against a program metric without rewriting instructions, criteria, or demonstrations.

    3.4.0release notes

  • Adds a TypeSafe Jev backend through the existing lm= interface; Predict translates signatures, inputs, demonstrations, and field criteria into Jev decision requests.

    3.4.0release notes

  • Adds code_proposer= for custom Flex source proposals, complementing instruction_proposer=.

    3.4.0release notes

  • Exposes bundled native LM request, response, and streaming types without requiring a separate installation.

    3.4.0release notes

  • Lets developers declare an OpenAI- or Anthropic-compatible HTTP service's endpoint, authentication, and capabilities instead of writing a custom engine.

    3.4.0release notes

  • Adds a persistent CPython subprocess interpreter for trusted generated code, compatible with RLM and Flex and not requiring Deno.

    3.4.0release notes

  • Custom backends can implement complete(Request) -> Response and be supplied through engine=, with async_engine= available for async execution.

    3.4.0release notes

  • Adds native lm15 and explicit litellm engine selection; auto prefers native execution for supported routes and representable inputs.

    3.4.0release notes

  • Adds a custom Flex code_proposer hook to GEPA.

    3.4.0release notes

  • Adds a persistent LocalInterpreter.

    3.4.0release notes

  • Adds an experimental Boolean decision type exposing .value, .probability, and .confidence.

    3.4.0release notes

  • Adds the experimental Noul type for working with TypeSafe/Jev.

    3.4.0release notes

  • Allows predictor decision rules such as Boolean thresholds to be set locally, so identical requests can reuse cached evidence.

    3.4.0release notes

  • Experimental ReActV2 now supports async calls, including async prediction, async tools, and final submission.

    3.4.0release notes

  • Adds the experimental ReAnchor calibration optimizer for Predict.

    3.4.0release notes

  • Adds an experimental rubric scoring type exposing a continuous value, ordinal level, rubric probabilities, and confidence.

    3.4.0release notes

  • Adds the experimental Score type for working with TypeSafe/Jev.

    3.4.0release notes

  • Adds an optional installation extra requiring typesafe-sdk>=0.6.0,<1.0.0; it is not included in the base installation.

    3.4.0release notes

  • An optional managed Deno runtime can be installed with this extra; DSPy prefers the managed binary when present while retaining system Deno and custom-command support.

    3.3.1release notes

  • GEPA supports multi-proposal sampling, selection, acceptance, tracking, and checkpoint-state contracts through gepa_kwargs; resumed proposal sampling restores RNG state.

    3.3.1release notes

  • Callbacks expose interpreter execution, sandbox-to-host tool calls, and interpreter process startup and shutdown, retaining ancestry across modules, interpreters, tools, and LM calls.

    3.3.1release notes

  • DSPy's MCP bridge supports SDK v1 and v2 field names, v1 ClientSession, and the v2 high-level Client without changing default tool-result semantics.

    3.3.1release notes

  • Metrics can report named objective scores and select objective-aware frontiers through gepa_kwargs; tracked results expose aggregate scores and per-objective candidate and maximum metadata.

    3.3.1release notes

  • Setting result_mode to structured opts into machine-readable MCP results, returning structuredContent exactly when supplied and otherwise falling back to existing content conversion.

    3.3.1release notes

  • Custom load_state overrides should accept this option for compatibility with module-valued parameter leaves.

    3.3.0release notes

  • Explicitly reads and embeds local audio.

    3.3.0release notes

  • Explicitly downloads and embeds remote audio.

    3.3.0release notes

  • Defines an explicit typed contract for new custom LM implementations: accept an LMRequest and return an LMResponse.

    3.3.0release notes

  • Submitted-code failures now raise this exception, a subclass of CodeInterpreterError.

    3.3.0release notes

  • Install this extra to use NumPy-backed features such as embeddings, KNN/KNNFewShot, SIMBA, and other optimizer or retrieval paths.

    3.3.0release notes

  • Enables trying the typed LM return path.

    3.3.0release notes

  • Adds an experimental module whose implementation GEPA can rewrite, including predictors, control flow, DSPy primitives, and the balance between Python and LM calls.

    3.3.0release notes

  • Provides structured user, assistant, and tool messages for ReActV2 history instead of a single trajectory string.

    3.3.0release notes

  • Provides a DSPy-normalized exception to catch instead of provider-specific LM errors.

    3.3.0release notes

  • Introduces a typed, provider-neutral request object for custom language-model implementations.

    3.3.0release notes

  • Introduces a typed, provider-neutral response object for custom language-model implementations.

    3.3.0release notes

  • Adds an experimental ReAct implementation built around native tool calling, structured history, and tool-result replay.

    3.3.0release notes

  • Can optionally be stored with ToolCalls to preserve tool results and replay native tool-call history.

    3.3.0release notes

  • Explicitly reads and embeds a local file.

    3.3.0release notes

  • Adds the typed_lm contract marker for custom language models.

    3.3.0release notes

  • ProgramOfThought, CodeAct, and RLM accept a zero-argument callable that creates a fresh CodeInterpreter for each invocation.

    3.3.0release notes

  • Adds an optional sixth GEPA metric parameter for scoring how a result was produced.

    3.3.0release notes

  • Derives a signature with additional instructions without mutating the original.

    3.3.0release notes

  • Exposes capability properties so custom language model backends can integrate with DSPy without adapters importing LiteLLM.

    3.2.0release notes

  • Accepts arbitrary optimizers as keyword arguments and chains them via strategy strings, evaluating each step on a valset and returning the best program.

    3.2.0release notes

  • Input values that mismatch declared signature types and extra fields now log warnings; this option disables those warnings.

    3.2.0release notes

  • Adds a retriever API for accessing similarity scores.

    3.2.0release notes

  • Adds a verify parameter to allow bypassing SSL verification for images.

    3.2.0release notes

  • Adds file output support and fixes the return type.

    3.2.0release notes

  • Adds XMLAdapter to dspy.ai.

    3.2.0release notes

  • Exposes the straggler_limit parameter in Parallel.

    3.1.2release notes

  • Exposes the timeout parameter in Parallel.

    3.1.2release notes

  • Adds methods to save and load DSpy settings.

    3.1.1release notes

  • Adds the RLM module for developers to use.

    3.1.1release notes

  • Supports generic type annotations for output.

    3.1.1release notes

  • Adds tool description optimization for multi-agent systems.

    3.1.1release notes

  • ChatAdapter gains an option to disable fallback.

    3.1.0release notes

  • Adds a File type for handling file data.

    3.1.0release notes

  • Introduces dspy.Reasoning to capture native reasoning from reasoning models.

    3.1.0release notes

  • A method extracts the system message based on the adapter and signature.

    3.1.0release notes

  • Adds support for the Anthropic Citation API.

    3.0.4release notes

  • GEPA supports custom component selection logic.

    3.0.4release notes

  • DummyLM takes an adapter at initialization.

    3.0.4release notes

  • Adds save and load support to Embeddings.

    3.0.4release notes

  • Exposes EvaluationResult as dspy.evaluate.EvaluationResult.

    3.0.4release notes

  • Pass custom keyword arguments to gepa.optimize using gepa_kwargs.

    3.0.4release notes

  • GEPA supports a custom instruction proposer, including handling for dspy.Image.

    3.0.4release notes

  • Adds MLflow support for GEPA.

    3.0.4release notes

  • Adds ToolCall.execute for smoother tool execution.

    3.0.4release notes

  • The prompt management layer can be exported via Adapters.

    3.0.0release notes

  • Caches are configurable and support high concurrency.

    3.0.0release notes

  • Audio is available as a multimodal I/O type.

    3.0.0release notes

  • A built-in BAML adapter is available.

    3.0.0release notes

  • A built-in adapter supports chat-formatted I/O, async paths, streaming, and fallback to native LLM structured outputs.

    3.0.0release notes

  • CodeAct is available as a module.

    3.0.0release notes

  • GEPA adds a Genetic-Pareto prompt optimizer using a Pareto tree and natural-language reflection to extract and validate lessons.

    3.0.0release notes

  • GRPO enables reinforcement learning on DSPy programs through the new Arbor library.

    3.0.0release notes

  • History is available as a higher-level I/O type.

    3.0.0release notes

  • Image is available as a multimodal I/O type.

    3.0.0release notes

  • A built-in JSON adapter supports async paths and fallback to native LLM structured outputs.

    3.0.0release notes

  • Refine is available as a module.

    3.0.0release notes

  • SIMBA is a prompt optimizer that learns from custom feedback.

    3.0.0release notes

  • syncify runs optimizers on async DSPy programs.

    3.0.0release notes

  • ToolCalls is available as a higher-level I/O type.

    3.0.0release notes

  • A built-in XML adapter supports token streaming.

    3.0.0release notes

  • Tooling integrations support LangChain tools out of the box.

    3.0.0release notes

  • Tooling integrations support MCP servers out of the box.

    3.0.0release notes

  • Native observability integration provides tracing, optimizer tracking, and improved deployment flows.

    3.0.0release notes

  • Batch module execution is available with thread-safe DSPy settings.

    3.0.0release notes

  • DSPy supports native async execution.

    3.0.0release notes

  • Output can be streamed from any layer.

    3.0.0release notes

  • Intermediate status can be streamed during execution.

    3.0.0release notes

  • Usage tracking is available.

    3.0.0release notes

Performance 2

  • Shares the corpus table across queries to reduce memory use; the FAISS path is unchanged.

    3.4.0release notes

  • Image.format is cached to improve throughput.

    3.0.4release notes

Behavior and default changes 40

  • Flex is no longer experimental.

    3.5.0release notes

  • GEPA is no longer experimental.

    3.5.0release notes

  • RLM can save and reload conversation History for later calls; live interpreter variables are not restored.

    3.5.0release notes

  • RLM is no longer experimental.

    3.5.0release notes

  • LiteLLM is now optional; DSPy calls supported providers through the lightweight lm15 engine while retaining compatibility execution.

    3.5.0release notes

  • The default API-family selection is now automatic rather than explicitly selecting chat or responses.

    3.5.0release notes

  • CoT and RLM prefer native reasoning, with a plan fallback; an explicit plan can be requested when useful.

    3.5.0release notes

  • The OpenAI Python library is now an optional dependency.

    3.5.0release notes

  • Tools can return images, files and other DSPy content parts on supported provider routes.

    3.5.0release notes

  • When instruction_proposer is omitted, GEPA now uses InstructionProposer(), which sends structured reflective examples through dspy.Predict with a JSONAdapter.

    3.4.1release notes

  • Replayed turns keep output-format reminders, making each turn's prompt a prefix of the next one for prompt caching.

    3.4.1release notes

  • Tool argument defaults are stored in JSON form for types such as Enum, Decimal, dates, Path, tuples, sets, pydantic models, and dataclasses, while omitted arguments retain their original Python defaults.

    3.4.1release notes

  • The RLM call budget now includes llm_query, llm_query_batched, and every sub-agent LM call; each requested completion uses one slot.

    3.4.1release notes

  • On Python 3.10–3.13, adapters now render PEP 604 union annotations like typing.Union; parsing is unchanged, but prompts differ.

    3.4.1release notes

  • Samples labeled demonstrations independently per predictor.

    3.4.0release notes

  • Cache implementations load only when their tiers are enabled, allowing both tiers to be disabled without constructing filesystem-backed storage.

    3.4.0release notes

  • Provider adaptations are now recorded in LM history.

    3.4.0release notes

  • Native n answers use separate sequential requests and may bill input tokens more than once; LiteLLM can be selected for its native n behavior.

    3.4.0release notes

  • When an LM omits an output field, declared defaults, default factories, and None-allowing annotations now provide fallbacks; missing required outputs still raise AdapterParseError.

    3.3.1release notes

  • CodeInterpreterError is now a DSPyError while retaining RuntimeError compatibility.

    3.3.1release notes

  • Optimizer compile runs now receive callback start and end coverage.

    3.3.1release notes

  • When a strategy produces multiple candidates, DSPy can evaluate them concurrently while sharing the existing num_threads budget between candidate-level and example-level concurrency.

    3.3.1release notes

  • XMLAdapter formats and parses nested Pydantic models, typed dictionaries, lists, mappings, nullable fields, and unions as nested XML while retaining compatibility with the previous JSON-inside-XML representation.

    3.3.1release notes

  • Flex runs optimizer-authored source in a CodeInterpreter sandbox using PythonInterpreter by default.

    3.3.0release notes

  • RLM now invokes user tools through dspy.Tool, applying tool argument validation and coercion, default handling, and callbacks.

    3.3.0release notes

  • Legacy output from the Responses model path now uses the Chat Completions-compatible tool-call shape and always includes the text key.

    3.3.0release notes

  • The upper bound on the litellm dependency was removed, allowing use of later versions.

    3.2.1release notes

  • Optuna is no longer a required dependency; install it with pip install dspy[optuna] to use MIPROv2 or BootstrapFewShotWithOptuna.

    3.2.0release notes

  • Uses BaseModel docstrings as descriptions.

    3.1.1release notes

  • Increases the max_iters value.

    3.1.1release notes

  • Callback logging is enabled only for full evaluations on GEPA.

    3.1.0release notes

  • A stream listener can now work on any type.

    3.1.0release notes

  • Custom types can be streamed and use the native response.

    3.0.4release notes

  • Adds a DSPy User-Agent header.

    3.0.4release notes

  • DummyLM answer dictionary values can be any type, supporting a wider range of signatures.

    3.0.4release notes

  • The default max_tokens value is now None.

    3.0.4release notes

  • The default temperature is now None.

    3.0.4release notes

  • MIPROv2 is more reliable and now supports automatic hyperparameter selection.

    3.0.0release notes

  • ReAct has been improved.

    3.0.0release notes

  • Save/load is stable and includes the program.

    3.0.0release notes

Fixes and other changes 71

  • BootstrapFewShot now honors metric_threshold=0.0.

    3.5.0release notes

  • ChainOfThought now honors reasoning dictionaries.

    3.5.0release notes

  • Flex now supports class-based signatures.

    3.5.0release notes

  • majority() can vote on non-string field values.

    3.5.0release notes

  • MIPROv2.compile now respects seed=0.

    3.5.0release notes

  • Raises a ValueError naming student predictors without an LM instead of failing later with AttributeError; set the LM on each student predictor.

    3.4.1release notes

  • When a JSON value contains an item pydantic cannot serialize, that item renders as str(item) instead of converting the whole value to a Python repr.

    3.4.1release notes

  • Fixes a 3.4.0 import crash that could occur when DSPy lazily imported LiteLLM.

    3.4.1release notes

  • DSPy now supports Python 3.15; on that version, LiteLLM and GEPA are not installed, LiteLLM fallback routes are unavailable, and dspy.GEPA raises ImportError.

    3.4.1release notes

  • Streamed chunks no longer include whitespace around field markers, so joined chunks equal the parsed field value.

    3.4.1release notes

  • Hashing is order-insensitive to match equality, and copying preserves the input/label split.

    3.4.0release notes

  • Coerces non-string Literal members during parsing.

    3.4.0release notes

  • Is omitted when no tools are sent to the language model.

    3.4.0release notes

  • Use the async call when invoking an async tool inside a running event loop; a synchronous call raises ValueError even with async/sync conversion enabled.

    3.4.0release notes

  • Honors the remaining batch deadline instead of resetting the timeout on each queue read.

    3.4.0release notes

  • End callbacks receive terminating BaseException values such as cancellation and interruption instead of incorrectly reporting those operations as successful.

    3.3.1release notes

  • Passing eval_kwargs=None now matches the documented optional contract.

    3.3.1release notes

  • Valid zero-valued sizes and seeds are now honored.

    3.3.1release notes

  • When an LM omits an output field, declared defaults, default factories, and None-allowing annotations now provide fallbacks; missing required outputs still raise AdapterParseError.

    3.3.1release notes

  • A completed task returning None is now correctly treated as complete.

    3.3.1release notes

  • The property gives RLM an accurate description of the Pyodide environment, including state persistence and unavailable native process capabilities.

    3.3.1release notes

  • ReAct preserves ContextWindowExceededError after trajectory truncation is exhausted.

    3.3.1release notes

  • Tool defaults and NoneType annotations serialize correctly across the sandbox boundary.

    3.3.1release notes

  • Custom headers are now forwarded to LiteLLM streaming completions in async streaming LM calls.

    3.2.1release notes

  • Per-call caching=False is now honored for both synchronous and asynchronous embedding calls.

    3.2.1release notes

  • No longer includes JSON schema for DSPy custom types in prompts.

    3.2.0release notes

  • Tool calls use kwargs-only dispatch, the JS bridge returns structured errors, stdout parsing skips non-JSON lines, and subprocess restarts replay tool and mount registration.

    3.2.0release notes

  • Handles error responses from the ColBERTv2 server.

    3.1.3release notes

  • Fixes enable_read_paths when multiple files are used.

    3.1.3release notes

  • Fixes code fence parsing in RLMs.

    3.1.3release notes

  • Handles dict responses in RLM for reasoning models.

    3.1.3release notes

  • Fixes RLM getting stuck on imports.

    3.1.3release notes

  • Fixes large variable injection.

    3.1.3release notes

  • Fixes the request header in streaming mode.

    3.1.3release notes

  • Updates the DSpy settings save and load methods.

    3.1.2release notes

  • Avoids unwanted exception chaining when an async tool runs in a sync context.

    3.1.1release notes

  • Uses the language value in system instructions for dspy.Code fields.

    3.1.1release notes

  • Handles list[dict] output from a dspy.LM.

    3.1.1release notes

  • Fixes the Protocol definition by adding the missing self parameter.

    3.1.1release notes

  • Enforces a positive value for the in-memory cache entry limit.

    3.1.1release notes

  • Populates InputField default values.

    3.1.1release notes

  • Fixes ContextWindowExceededError after three retries.

    3.1.1release notes

  • Fixes structured outputs for the Responses API.

    3.1.1release notes

  • No longer appends StatusStreamingCallback directly to the shared settings.callbacks list.

    3.1.1release notes

  • Ensures streaming yields the last chunk.

    3.1.1release notes

  • Fixes parsing of underscore-style float numbers.

    3.1.1release notes

  • Skips merging when both usage entry values are None.

    3.1.1release notes

  • Fixes an AttributeError when using ParallelExecutor with dspy.context.

    3.1.1release notes

  • Updates old Anthropic model names.

    3.1.0release notes

  • Fixes a TypeError when tracking usage with Anthropic models that return Pydantic objects.

    3.1.0release notes

  • The x-wav audio format is normalized to wav.

    3.1.0release notes

  • Fixes issues with continuous format.

    3.1.0release notes

  • Fixes serialization of dspy.History objects.

    3.1.0release notes

  • Zero-shot detection now takes .compile parameters into account before determining whether the program was zero shot.

    3.1.0release notes

  • Fixes content input conversion for the OpenAI Responses API.

    3.1.0release notes

  • Python 3.14 is supported.

    3.1.0release notes

  • Excludes gpt-5-chat from reasoning model classification.

    3.1.0release notes

  • Implements user message formatting for XMLAdapter.

    3.1.0release notes

  • Fixes error handling in dspy parallel.

    3.0.4release notes

  • Headers are updated when specified.

    3.0.4release notes

  • Fixes parsing of doubly encoded base types in json.parse.

    3.0.4release notes

  • Fixes escaping when JSON mode is used without structured outputs.

    3.0.4release notes

  • Falls back to the memory cache when disk is unavailable.

    3.0.4release notes

  • Fixes selection between task_model and prompt_model.

    3.0.4release notes

  • Fixes chunk loss during long streaming with the native response field.

    3.0.4release notes

  • Fixes unexpected parsing of Optional[str] fields when strings contain brackets or braces.

    3.0.4release notes

  • Fixes response_format handling for the responses API.

    3.0.4release notes

  • Adds a fallback when the end marker is missing during streaming.

    3.0.4release notes

  • Fixes XML adapter markers.

    3.0.4release notes

  • History is available per module.

    3.0.0release notes

  • PythonInterpreter is more reliable.

    3.0.0release notes