Description
What happens
LLMRequest.reasoning.effort is documented as "translated to provider-native params at call time", but on the Cloudflare provider it never reaches Workers AI:
canonicalToLLMRequestcopiesrequest.reasoningonly intoproviderOptions.cerebras(dist/canonical.js, around line 191).- The Workers AI chat request built in
dist/providers/cloudflare.js(around lines 745–770) sendsmessages,temperature,max_tokens,top_pandfrequency_penalty, and nothing for reasoning.
So a caller can't lower the reasoning effort of @cf/openai/gpt-oss-20b or @cf/openai/gpt-oss-120b, which Workers AI accepts as reasoning: { effort: 'low' | 'medium' | 'high' }.
Why it matters
Reasoning tokens count against max_tokens. In a downstream app (version 1.23.0, pinned), an extraction-style prompt on @cf/openai/gpt-oss-20b at temperature 0.2 and 0.6 spent the whole 8,000-token budget on reasoning, with its trace repeating one line until the cap, and returned no answer text (finishReason: 'length', empty message). Measured 2026-11-06, one call per setting, on a ~900-token prompt. Adding "Reasoning: low" to the system prompt didn't change it. The app moved to gpt-oss-120b at temperature 0.8 to work around it.
Expected
On the Cloudflare provider, reasoning.effort maps to the Workers AI input for models that accept it (the gpt-oss family at least), and 'none' is rejected or ignored with a clear signal where unsupported. A test pins the mapping.
Related
#130 (Llama 3.3 reasoning: null schema drift) and #95 (separating reasoning from the message).
Activity
feat: Workers AI reasoning control and pinned-model integrity (Stackb…