LibreChat/packages/api
Danny Avila 4b024ffd21
🎯 fix: Match the GPT-6 Cyber API Mode to an Exact Endpoint URL (#18071)
* 🚇 fix: Preserve Exact Cyber Endpoint API Contracts

* refactor: Name the Exact Chat Completions Check

Move the exact-URL test into `isExactChatCompletionsURL`, which states the
rule once and tolerates an unparseable URL on its own rather than relying
on the native-host classification having parsed it first.

Keep the summary's custom endpoint lookup inside the native Cyber branch,
where it was, and pass `directEndpoint` to the request shaping from there,
so a gateway summary does not resolve endpoint secrets it never uses.

Collect the request URL in the SDK test and assert it afterwards: an
assertion thrown inside the transport callback reaches the SDK as a
connection error. Cover the default for exact `/responses` URLs, base URLs
and paths that only contain `/chat/completions`, and an OpenRouter exact
URL.

* fix: Keep an Endpoint's Responses API Drop for Cross-Provider Cyber Summaries

A summary that targets another custom endpoint resolves that endpoint
through `getOpenAIConfig`, which applies a `useResponsesApi` drop by
removing the field. The native Cyber shaping that follows read the missing
field as "unset" and defaulted to the Responses API again, unless the
summary ran on the agent's own provider. An Anthropic agent summarizing
with GPT-6 Cyber on an exact Chat Completions endpoint that also drops
`useResponsesApi` therefore still sent a Responses body to that URL.

Record the drop as an explicit `false` on the resolved overrides. An
explicit `useResponsesApi` in the summary's own parameters still wins.

Cover summaries from an Anthropic agent, a built-in OpenAI agent and the
endpoint's own agent, with and without the drop, and with the summary
provider inferred from the agent.

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-12 07:20:00 -05:00
..
openapi ⬆️ feat: Migrate to Zod v4 (#17442) 2026-10-26 14:16:22 +01:00
src 🎯 fix: Match the GPT-6 Cyber API Mode to an Exact Endpoint URL (#18071) 2026-11-12 07:20:00 -05:00
types
.gitignore
babel.config.cjs
jest.config.mjs 🦿 chore: Bump Agents SDK to 4.2.1 (#17664) 2026-10-31 15:17:05 -04:00
jest.setup.cjs
package.json 🦠 chore: Upgrade Node.js and Undici to Security Releases (#18066) 2026-11-11 19:17:04 -05:00
tsconfig.build.json
tsconfig.json 🚸 fix: Align Image Authorization and Static Serving Paths (#17392) 2026-10-24 09:18:19 +02:00
tsconfig.openapi.json
tsconfig.spec.json
tsdown.config.mjs 🦦 fix: Bound Spreadsheet Text Extraction (#17824) 2026-11-09 08:27:47 -05:00