[fix]: Add GLM to prompt-based JSON fallback for structured outputs
Merged
CH
9mo ago+13+13+01234567890123456789-2-2-0123456789
GLM-4-Flash (Zhipu AI) doesn't support OpenAI's native structured outputs, causing 500s on extract. Refactors the per-model boolean checks into an extensible pattern list and adds "glm" to it.
why
what changed
test plan
Summary by cubic
Added GLM models to the prompt-based JSON fallback for structured outputs to prevent 500s on extract for GLM-4-Flash. Addresses STG-1470 and includes a changeset for a patch release.
- Refactors
- Replace per-model flags with an extensible pattern list (deepseek, kimi, glm) to trigger prompt-based JSON fallback when response_model is used.