Skip to content

v1.25.0

Choose a tag to compare

@mpangrazzi mpangrazzi released this 28 Sep 09:57
· 14 commits to main since this release
b127f8a

This release adds opt-in HTTP request headers to pipeline wrappers across REST and OpenAI-compatible endpoints. Wrappers can access caller metadata and forward credentials per request while preserving existing application inputs.

🔑 Request Headers

  • Access incoming headers in run_api, run_chat_completion, run_response, and their async variants.
  • Opt in by declaring headers: Headers | None = None, importing Headers from starlette.datastructures.
  • Header lookups are case-insensitive, and headers remain available throughout streaming.
  • Requires fastapi-openai-compat>=1.4.0.

🛡️ Input Compatibility

  • Injected headers are excluded from JSON/multipart bodies and OpenAPI/MCP input schemas. Request bodies and MCP tool arguments cannot override them.
  • Existing application parameters named headers keep their normal behavior. Declaring only **kwargs does not enable injection.
  • A2A, MCP, and direct calls leave the optional parameter at None; wrappers should handle missing credentials explicitly.
  • Injected headers are excluded from Hayhooks' automatic /run payload logs and trace tags.

🛠️ Deployment and Packaging

  • Fixed REST request/response model generation with postponed annotations, including streaming and multipart uploads.
  • Removed unused YAML model builders and reused the REST execution dispatcher for MCP calls.
  • Fixed wheel builds from source distributions by removing an obsolete inclusion of generated local Chainlit configuration.

🧪 Tests and Documentation

  • Added coverage for concurrent callers, streaming, route aliases, file uploads, input spoofing, legacy signatures, and non-HTTP calls.
  • Corrected the disconnect integration test's cleanup expectation for Haystack v2 and v3.
  • Fixed tracing type checks with optional dependencies installed or absent.
  • Updated the wrapper, OpenAI, MCP, and A2A guides with the typed header contract.

What's Changed

Full Changelog: v1.24.0...v1.25.0