Skip to content

v9.4.1

Latest

Choose a tag to compare

@kennethreitz kennethreitz released this 10 Nov 02:22
66d342f

[v9.4.1] - 2026-11-09

A patch release: a declared response model no longer turns a handler that
writes its own body into a 500, and a response with no body stays empty.

Fixed

  • response_model= (and an inferred return annotation) validates and
    serializes the structured channel only: a returned value, or resp.media.
    A handler that assigns resp.content, resp.text, resp.html, a file, or
    a stream sends that body unchanged. The model stays on the OpenAPI
    operation and on the MCP tool outputSchema. response_model=False still
    removes it from both. Previously those routes 500'd unless they opted out,
    and opting out also dropped outputSchema.
  • A response that never sets a body is empty. It is no longer
    content-negotiated into JSON null. Assign resp.media = None to send a
    JSON null on purpose.
  • MCP tool descriptions taken from a docstring use the prose above a line
    that is exactly ---. The OpenAPI YAML below that line is left out. A
    docstring that is only that YAML uses its operation summary, or is empty
    when it has none. An explicit description= is kept as given, and OpenAPI
    still reads the YAML block.

https://pypi.org/project/responder/9.4.1/