LibreChat/packages/api
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
..
src 💭 fix: Default GPT-5.6 Reasoning Requests to Responses API (#14232) 2026-07-14 14:34:48 -04:00
types
.gitignore
babel.config.cjs
jest.config.mjs 📦 chore: npm audit fix (#13828) 2026-06-17 21:54:04 -04:00
jest.setup.cjs 🌱 fix: Inject Code-Tool Files Into Graph Sessions on First Call (+ read_file Sandbox Fallback) (#12831) 2026-04-27 08:56:39 +09:00
package.json 🧭 feat: Mid-Run Steering and Queued Messages for Agent Runs (#14220) 2026-07-14 10:11:10 -04:00
tsconfig-paths-bootstrap.mjs
tsconfig.build.json
tsconfig.json 📦 chore: npm audit fixes and Mongoose 8.23 TypeScript follow-ups (#12996) 2026-05-07 09:47:40 -04:00
tsconfig.spec.json 📦 chore: Update TypeScript Config for TS v7 (#12794) 2026-04-23 12:51:03 -04:00
tsdown.config.mjs 🪟 fix: Cross-Platform Absolute-Path Check in tsdown neverBundle Predicates (#13700) 2026-06-13 11:04:46 -04:00