Repository navigation
feat(model-access): let custom backends declare reasoning levels - #171
Merged
akemmanuel merged 1 commit intoOct 23, 2026
Merged
Conversation
Custom model connections already persist `reasoningEfforts`, and the composer only shows the effort selector when that list is non-empty. The custom backend editor, however, only exposed a reasoning on/off switch, so manually added backends could never offer levels such as low, medium, xhigh or max. Show a checkbox per reasoning level under the reasoning switch and keep the selection in canonical order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Problem
When a custom model connection is added in Settings → Providers, the editor only offers a reasoning on/off switch. The data model already supports
modelCapabilities[modelId].reasoningEfforts:EditableUpstreamModelhas the field,editCustomBackendDraft/buildCustomModelConnectionround-trip it, and the host validates it. The composer'sReasoningEffortSelectoronly shows levels from that list. Because the UI never writes the list, manually added backends can't offer levels likelow,medium,xhighormax.My use case is a local Anthropic-compatible proxy for Claude models (Meridian). Those models support
low…max, but in OpenGUI the only choices were on or off.Change
custom-backend.ts: addsREASONING_EFFORT_OPTIONS(the canonical order ofReasoningEffort) andtoggleReasoningEffort(). The helper keeps the selection in that order no matter which order the boxes are clicked.CustomBackendEditor.tsx: when reasoning is on, a checkbox row with all levels appears under the reasoning switch. It reuses the existingreasoningEffort.levels.*labels.providers.reasoningEffortsandproviders.reasoningEffortsHelpinen,deandes.modelCapabilities.No change to how the selection is saved: it uses the existing
buildCustomModelConnectionpath.Open question for you
On the Anthropic Messages route,
#streamAnthropicinpackages/harness/src/models/openai-chat.tsdoesn't seem to send the selected effort upstream; only the OpenAI Chat route setsreasoning_effort. If that's intended, the levels in this editor mainly matter for OpenAI-compatible routes. If not, I'm happy to follow up with a separate PR. I left it out here to keep this change small.Checks
pnpm run checkpasses.pnpm vp test src/components/SettingsProviders.test.ts src/lib/__tests__passes (80 tests).pnpm run test: 3 failures, none in files this PR touches. Run alone,shell.test.ts,strip-types-runtime.test.tsandemail-change.integration.test.tspass.openai-responses-websocket.test.ts(TTFT / connection reuse) also fails on unmodifiedmasteron my machine.🤖 Generated with Claude Code