Skip to content

fix: accept reasoning effort none when translating to Messages - #806

Merged
alongubkin merged 1 commit into
mainfrom
alon/alien-1123-ai-gateway-rejects-reasoning-effort-none-when-translating-to
Sep 30, 2026
Merged

alongubkin merged 1 commit into
mainfrom
alon/alien-1123-ai-gateway-rejects-reasoning-effort-none-when-translating-to

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Fixes ALIEN-1123.

Problem

The gateway translates OpenAI requests (Chat Completions or Responses) to Anthropic Messages for Claude models served that way, such as Bedrock Claude. The translator rejects any field Messages can't represent, and reasoning_effort was on that list unconditionally. So a request with reasoning_effort: "none" (Responses: reasoning: { effort: "none" }) failed with a 400, and some OpenAI clients send that value by default.

Fix

"none" asks for no reasoning, which is what a Messages request without thinking already does, so it's representable without loss. The translator now accepts reasoning_effort when it's null or "none" and drops it, the same way it already handles default-valued store, background and truncation. Any other effort (low, high, …) is still rejected, since mapping those to thinking budgets is a separate decision.

Tests

  • New reasoning_effort_none_needs_no_reasoning_in_messages: a Responses request with effort none translates to Messages with no reasoning field; effort high is still rejected.
  • cargo test -p alien-ai-gateway passes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adjusts protocol translation for reasoning effort parameter.

The PR appears safe to merge; no actionable regression was identified.

Summary

The PR allows reasoning_effort values of null or "none" when translating to Messages, removes the field from the outgoing request, and retains rejection of other effort values. The new test covers the Responses translation path and rejection of "high".

Reviews (1) · Last reviewed commit: "fix: accept reasoning effort none when t..."

@alongubkin
alongubkin merged commit 8c0d831 into main Sep 30, 2026
29 checks passed
@alongubkin
alongubkin deleted the alon/alien-1123-ai-gateway-rejects-reasoning-effort-none-when-translating-to branch September 30, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant