Skip to content

feat: add per-message reasoning control - #15406

Closed
jacksonriding wants to merge 2 commits into
danny-avila:devfrom
jacksonriding:feat/reasoning-control-composer
Closed

feat: add per-message reasoning control#15406
jacksonriding wants to merge 2 commits into
danny-avila:devfrom
jacksonriding:feat/reasoning-control-composer

Conversation

@jacksonriding

@jacksonriding jacksonriding commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a compact reasoning control to the primary chat composer for the next message
  • resolve vendor-native reasoning parameters for OpenAI, Azure, Anthropic, Google, Bedrock, and configured custom/OpenRouter models such as Qwen
  • normalize categorical reasoning effort and numeric thinking budgets into a consistent scale-based interaction
  • keep overrides request-scoped while preserving them for regenerate, edit, continue, durable queue, and HITL resume flows
  • validate provider/model compatibility server-side and prevent the override from changing saved conversation defaults

Composer experience

  • replace the settings-style popover and long provider descriptions with a compact, focused control
  • use a draggable effort scale for categorical settings such as OpenAI reasoning effort
  • give token-budget providers the same scale treatment while retaining exact numeric entry and an explicit Auto state
  • derive numeric scale floors, ceilings, and steps from the active model so Gemini and Claude budgets stay within their supported ranges
  • show compact token values in the composer and at the ends of the scale
  • contain focus and pointer interaction inside the open modal popover so selecting or dragging does not feel like an outside click
  • use semantic surface, text, border, hover, and inverted roles throughout for light, dark, and custom-theme compatibility
  • preserve keyboard control and expose human-readable slider values such as Medium, High, Auto, and formatted token counts to assistive technology

Provider mapping

  • OpenAI and Azure reasoning models: reasoning_effort
  • adaptive Claude models: effort
  • manual-thinking Claude models: thinkingBudget
  • Gemini 3 and newer: thinkingLevel
  • Gemini 2.5: thinkingBudget
  • Bedrock: provider-family setting
  • custom and OpenRouter models: configured parameter definition

Test plan

  • 814 focused tests passed across client, API, data-provider, HITL, and queue paths
  • added focused composer tests for compact rendering, enum scales, numeric token scales, exact entry, Auto, focus containment, and accessible value text
  • Mongo-backed durable queue suite passed
  • client TypeScript check passed
  • shared-client build passed after extending the Slider primitive with aria-valuetext
  • semantic-token and contrast guardrails passed for shared light/dark theme roles
  • data-provider, data-schemas, and API package builds passed
  • staged ESLint, Prettier, import sorting, package validation, and circular-dependency checks passed
  • production npm audit found no high or critical advisories
  • manually started the modified frontend and API and verified both the UI and proxied config endpoint return HTTP 200

Closes #15242

@jacksonriding
jacksonriding force-pushed the feat/reasoning-control-composer branch from 97bf52b to 7411758 Compare August 31, 2026 12:11
@jacksonriding

jacksonriding commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author
image

Mapped appropriately for all models depending on what is supported

@github-actions
github-actions Bot changed the base branch from main to dev August 31, 2026 22:23
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for the contribution! LibreChat merges all changes into dev first — main only moves at release time — so this pull request's base branch was switched from main to dev automatically.

Nothing is needed from you; your commits, reviews and discussion are unchanged. If the diff now shows files you did not touch, rebase onto dev:

git remote add upstream https://github.com/danny-avila/LibreChat.git
git fetch upstream dev
git rebase upstream/dev
git push --force-with-lease

Maintainers: apply the target: main label and restore the base branch if this one genuinely belongs on main.

@berry-13

berry-13 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Hey @jacksonriding, thanks for the thorough implementation. I compared #15406 with #14473 and confirmed substantial overlap. All 51 feature files changed here are represented in #14473. Your request-scoped reasoning design, provider-aware numeric budgets, and propagation through regenerate, queue, edit, continue, and HITL were stronger than the persistent-setting approach previously used in #14473. I integrated those parts into #14473 while preserving your authorship, adapting them to the unified Composer/Bar, and retaining its Bedrock, Azure, durable queue, and feature-owned state improvements.

@berry-13 berry-13 closed this Sep 1, 2026
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.

[Enhancement]: UI Slider for Reasoning Effort

2 participants