How to get structured outputs in vllm?

The OpenAI client.responses.parse method with text_format=CalendarEvent is supported in vLLM for models that implement structured output, but Qwen3 support for this exact API is not explicitly documented in vLLM’s official sources. The vLLM test suite shows this works for models that support structured outputs and JSON schema, but model-specific support (like Qwen3) may vary and is not guaranteed for all models or all API variants—most examples use client.chat.completions.create with structured_outputs or response_format parameters instead. See test_structured_output_with_parse and structured outputs docs.

Would you like a step-by-step example for Qwen3 using the recommended API?

Sources:

Hint: Mention @RunLLM in the post for followups.