You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accept null reasoning fields in Groq, OpenAI and Cerebras adapters #138
Follow-up to #130 and the Cloudflare fix proposed in #134.
Problem
#130 reports a live failure on Cloudflare. For the providers below this is a suspected compatibility gap, not an observed failure: their current schemas would reject an explicit null, but we have no live failures from them. These response schemas still declare reasoning fields as type: 'string', optional: true:
OpenAI-compatible backends (vLLM-style servers in particular) can return these keys as explicit null. If these providers ever do, validation would throw SchemaDriftError. With fallback enabled, the error is hidden by switching to another provider; without fallback, the call fails.
Fix
Change each field to string-or-null, as #134 proposes for Cloudflare. The code after validation already handles null, because every adapter goes through joinReasoning. Update the matching internal interface types to string | null.
Tests
For each adapter:
a null reasoning field is accepted, and LLMResponse.reasoning is undefined;
a non-string, non-null value (for example 42) still throws SchemaDriftError.
Activity
feat: add Workers AI DeepSeek V4.1 Flash (#144)