Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kosong/src/providers/openai-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function isFunctionToolCall<T extends { type: string }>(
export function thinkingEffortToReasoningEffort(effort: ThinkingEffort): string | undefined {
switch (effort) {
case 'off':
return undefined;
return 'none';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate none to models that support reasoning effort

This maps the global off state to a wire value for every OpenAI-compatible request. ConfigState.provider always calls .withThinking(this.thinkingEffort), and non-thinking or unknown aliases resolve to off; then the OpenAI legacy/responses providers send any non-undefined value as reasoning_effort/reasoning.effort. For OpenAI configs using models such as gpt-4.1/gpt-4o, or gateways that do not accept none, the previously valid “thinking off” request now includes reasoning_effort: "none" and is rejected as an unsupported parameter/value. Please emit none only when the selected model/provider declares support for that disable value, otherwise keep omitting the parameter.

Useful? React with 👍 / 👎.

case 'low':
return 'low';
case 'medium':
Expand Down