Haystack (gateway)
Haystack (gateway)
Route Haystack’s OpenAI-compatible LLM calls through the Respan gateway to use 250+ models from different providers. No separate OpenAI provider key is required.
Setup
Switch models
Change the model parameter on OpenAIGenerator to use another OpenAI model through the same gateway-backed endpoint.
OpenAIGenerator is Haystack’s OpenAI-compatible generator. This page avoids showing Claude or Gemini inside that OpenAI-named component; use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.
See the full model list.
Prompt management
Use Respan prompt management to store the prompt template on the platform, then pass the managed prompt_id and variables through Haystack’s generation_kwargs.extra_body.prompt. Use schema_version: 2 for all new integrations.
Haystack still requires a runtime message for OpenAIChatGenerator. The Respan gateway reads extra_body.prompt, renders the managed prompt from the platform, and uses the prompt variables for the final model request.
See the full Haystack examples.