Files
lakehouse/crates/gateway
rootandClaude Fable 5 6de15ad5f5 gateway/v1: tolerate reasoning-model responses on the openrouter lane
Reasoning models (GLM-5.x, deepseek-v4-pro) return content:null plus a
reasoning field when max_tokens exhausts mid-thought; ORMessageResp's bare
String made serde reject the whole body ('invalid openrouter response'),
taking down every reasoning model on the lane — including phase2's
configured z-ai/glm-5.2. content/reasoning are now Options; content stays
the only text returned (empty when null, so callers' schema validation +
retry budgets handle it deterministically); reasoning-only responses log a
warn with finish_reason. Unit test pins both shapes.

Found during the 2026-08-28 VIX founder-lane dogfood.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 17:07:12 -05:00
..