LibreChat/packages
JOJO 02a5b985e4
💭 fix: Default GPT-5.6 Reasoning Requests to Responses API (#14232)
* 💭 fix: Default GPT-5.6 Reasoning Requests to Responses API

GPT-5.6 models reject function tools combined with `reasoning_effort` in
/v1/chat/completions (400: "Function tools with reasoning_effort are not
supported ... To use function tools, use /v1/responses or set
reasoning_effort to 'none'"). Default `useResponsesApi` to `true` for
GPT-5.6 models on the OpenAI endpoint when a reasoning effort other than
'none' is requested, unless the user explicitly set `useResponsesApi`.

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

* 💭 fix: Address GPT-5.6 Responses API guard review feedback

- Skip the auto-switch for OpenRouter-backed OpenAI endpoint configs;
  OpenRouter keeps its own reasoning path
- Respect `dropParams: ['useResponsesApi']` as an explicit opt-out so
  Chat Completions requests never carry a nested reasoning payload
- Stop treating `dropParams: ['reasoning']` as dropping reasoning:
  `deleteConfigParam` only removes the nested object, so skipping the
  switch there would resend flat `reasoning_effort` and re-trigger the 400
- Reword docstring: reasoning without tools still works on Chat
  Completions; the default exists because tools bind after config time
- Reconcile with #14233: the Chat Completions mode/context omission test
  now opts out explicitly, and a new test locks in that the Responses API
  default carries reasoning mode/context in the nested reasoning object

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

* 💭 fix: Scope GPT-5.6 Responses API default to first-party OpenAI

- Skip the auto-switch for custom gateway base URLs (reverseProxyUrl/
  directEndpoint may expose only /v1/chat/completions); the Responses
  default now applies to canonical api.openai.com only
- Skip when reasoningFormat is 'disabled': no reasoning payload is sent,
  so there is no tool incompatibility to avoid and the request stays on
  the configured Chat Completions path
- Add coverage for custom gateway base URL, canonical base URL, and
  disabled reasoning format

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
2026-07-14 14:34:48 -04:00
..
api 💭 fix: Default GPT-5.6 Reasoning Requests to Responses API (#14232) 2026-07-14 14:34:48 -04:00
client 🧰 feat: Redesign Agent Builder with Unified Tools Marketplace, Skills & Orchestration (#13952) 2026-07-05 11:30:12 -04:00
data-provider ♨️ feat: Prewarm Stateful Code Sandboxes with Cold-Boot UX Feedback (#14239) 2026-07-14 10:25:37 -04:00
data-schemas 🧭 feat: Mid-Run Steering and Queued Messages for Agent Runs (#14220) 2026-07-14 10:11:10 -04:00