Repository navigation
fix(reasoning): resolve 400 errors and capability mismatch for gpt-5.6-luna - #14059
Merged
diegosouzapw merged 6 commits intoSep 29, 2026
Conversation
…6-luna - Align policy capability check with provider stripping to correctly support reasoning effort on provider-prefixed models (e.g. openai/gpt-5.6-luna, github/gpt-5.6-luna) - Declare supportedThinkingEfforts in GPT_5_6_API_CAPABILITIES, opencode-zen, opencode-go, and github registries - Route gpt-5.6 family in opencode-zen to openai-responses format to prevent upstream Chat Completions 400 errors - Exclude ultra effort for Luna in ReasoningRoutingRules UI and clamp current effort - Add regression test coverage for Luna reasoning effort routing and capability gates
…iegosouzapw#14059 The branch's local eslint run had silently deleted allowlist entries for files this PR never touches (vertex registry/executor, several unrelated test files). Restore the file to match the current release/v3.8.51 tip. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
4 of 5 tasks
diegosouzapw
merged commit Sep 29, 2026
ceddca9
into
diegosouzapw:release/v3.8.51
6 of 7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an issue where configuring reasoning effort (such as
max/ultra) ongpt-5.6-lunaresulted in HTTP 400 errors ("Reasoning effort '...' is not supported by the configured target"), misrouted Chat Completions requests, or misleading capability warnings in the UI selector.Root Causes & Fixes
Model Capability & Registry Declarations:
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"]toGPT_5_6_API_CAPABILITIES(open-sse/config/providers/shared.ts).supportedThinkingEffortsin registries for GitHub Copilot, OpenCode Go, and OpenCode Zen.gpt-5.6family (sol,terra,luna) to usetargetFormat: "openai-responses", avoiding upstream Chat Completions 400 rejection when combining reasoning effort and tools.Reasoning Routing Policy Capability Gate:
src/lib/reasoningRouting/policy.ts::capabilityFor(), switched fromreplace(/^(?:codex|cx)\//, "")tomodelIdForRegistry.toLowerCase().openai/gpt-5.6-luna,github/gpt-5.6-luna) so they evaluate against the target model regex and static registry vocabulary as supported rather than throwing HTTP 400.UI Rules Editor & Selector (
ReasoningRoutingRules.tsx):supportsExtendedCodexEffort().ultraeffort from options when targeting Luna (isLunaTarget), accurately reflecting upstream support (Luna supports up tomax; only Sol/Terra supportultra).currentTargetEffortwithout causing cascading render warnings.Verification
tests/unit/luna-reasoning-effort-400.test.tscovering:openai-responsestarget format resolution foropencode-zen,github, andopenaimaxreasoning effort onopenai/gpt-5.6-luna,github/gpt-5.6-luna(supported)ultrareasoning effort ongpt-5.6-luna,codex/gpt-5.6-luna(unsupported)npm run typecheck:core: PASS (0 errors)npm run lint: PASS (0 errors)npm run check:cycles: PASS (0 cycles)node --import tsx/esm --test tests/unit/luna-reasoning-effort-400.test.ts: PASS (5/5)