Developer Tools

Haystack v2.30.1 adds Secret support for Azure endpoints

Switch Azure environments without changing pipeline code in Haystack

Deep Dive

deepset's Haystack, the popular open-source AI framework for building retrieval-augmented generation (RAG) pipelines, has released version 2.30.1. The key enhancement focuses on the AzureOpenAIChatGenerator component. Previously, the Azure endpoint URL and API version had to be hardcoded as plain strings or resolved at pipeline creation time. Now, these parameters accept deepset's Secret type, which defers resolution to runtime. For example, users can set Secret.from_env_var("AZURE_OPENAI_ENDPOINT") and Secret.from_env_var("AZURE_OPENAI_API_VERSION") in their pipeline definition.

This change dramatically simplifies deploying the same pipeline across different environments (e.g., development, staging, production). Instead of maintaining separate pipeline definitions or manually swapping values, teams can rely on environment variables to point to the correct Azure OpenAI instance. This aligns with standard DevOps practices and reduces the risk of misconfiguration. The release also includes other minor fixes and improvements, as seen in the 45 commits since the last stable version. For teams using Azure OpenAI with Haystack, this update removes a common friction point in CI/CD workflows.

Key Points
  • AzureOpenAIChatGenerator now accepts Secret for azure_endpoint and api_version parameters
  • Values can be resolved at runtime from environment variables (e.g., Secret.from_env_var("AZURE_OPENAI_ENDPOINT"))
  • Enables switching between dev/prod environments by changing environment variables, not pipeline definitions

Why It Matters

Simplifies CI/CD for AI pipelines by decoupling Azure endpoint config from code.

📬 Get the top 10 AI stories daily