Skip to content

[Enhancement]: Allow custom parameters to be toggled from the chat UI (e.g., Thinking ON/OFF) #16325

Description

What features would you like to see added?

Currently, LibreChat's custom endpoint configuration only supports a fixed whitelist of parameters that can be exposed in the UI. While customParams.paramDefinitions lets you override metadata (default, range) for existing parameters, it does not allow adding new custom parameters that can be controlled per conversation from the chat interface.

This limitation makes it impossible to implement a simple toggle for backend-specific features such as enabling/disabling "thinking" mode in models like Gemma, Qwen, or DeepSeek, without resorting to external workarounds (e.g., running a proxy wrapper).

Use case:

I'm running a local llama.cpp server with a Gemma model that supports a "thinking" mode. The server expects a nested parameter:

"chat_template_kwargs": { "enable_thinking": true }

However, LibreChat can only send flat parameters from the UI, and the whitelist does not include enable_thinking or any nested object. As a result, I cannot expose a simple toggle in the chat interface to switch thinking on/off. The user must either:

  • Change the model alias (which reloads the model and is slow), or
  • Run a custom proxy that intercepts a flat parameter and translates it to the nested format.

Both are suboptimal for a feature that should be native.


More details

Proposed solution:

Allow users to define custom parameters that can be surfaced in the UI as toggles, sliders, or dropdowns, and optionally map them to nested request fields.

For example:

customParams:
  defaultParamsEndpoint: 'openAI'
  customParamDefinitions:
    - key: enable_thinking
      type: boolean
      label: "Thinking"
      default: false
      target: "chat_template_kwargs.enable_thinking"  # nested mapping

With this, LibreChat would show a switch in the parameters panel. When toggled, it would send:

{
  "chat_template_kwargs": { "enable_thinking": true }
}

This would enable a native, no‑reload toggle for any backend that uses nested parameters.

Alternatives considered:

  • Using existing reasoning_effort and mapping it server‑side. However, most local backends (e.g., llama.cpp) do not yet interpret reasoning_effort as a trigger for enable_thinking. A generic nested mapping would be more future‑proof.
  • Running a separate proxy (e.g., FastAPI wrapper) to translate parameters. This works but adds operational overhead and is not user‑friendly.

Related discussions/PRs:

Impact:

This enhancement would make LibreChat more flexible for self‑hosted, OpenAI‑compatible backends that expose non‑standard or nested parameters. It would also eliminate the need for external wrappers, simplifying deployments.


Which components are impacted by your request?

General

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions