Commit Graph

34 Commits

Author SHA1 Message Date
Lellansin Huang
78e03e3004 fix(gateway): forward OpenAI sampling params
- Forward temperature and top_p through OpenAI-compatible chat and responses gateway paths.
- Return OpenAI-compatible 400 errors for invalid sampling params and provider validation failures instead of collapsing them to 500s.
- Add regression coverage and changelog credit.

Co-authored-by: lellansin <lellansin@gmail.com>
2026-05-13 08:35:48 +01:00
Peter Steinberger
e2965b5f96 test: dedupe openresponses mock reads 2026-05-13 02:50:18 +01:00
Peter Steinberger
3598938458 test: dedupe openresponses mock calls 2026-05-12 17:09:07 +01:00
Peter Steinberger
7625a8b6d6 test: guard openresponses mock calls 2026-05-12 11:54:29 +01:00
Shakker
0924eb0731 test: tighten gateway array assertions 2026-05-09 05:54:12 +01:00
Shakker
6e2b1d6366 test: use openresponses command wait 2026-05-09 00:00:51 +01:00
Peter Steinberger
91a6372897 test: simplify openresponses event type collection 2026-05-08 22:58:30 +01:00
Tak Hoffman
2f26025085 fix(active-memory): allow active-memory to support custom recall tools (#77906)
* fix(active-memory): allow custom recall tools

* docs(active-memory): document custom recall tools

* docs(active-memory): note tools allowlist change

* fix(active-memory): constrain recall tool allowlist

* fix(active-memory): preserve lancedb recall defaults

* fix(active-memory): block non-memory recall tools

* fix(active-memory): satisfy bundled lint

* fix(active-memory): satisfy type-aware lint

* fix(tests): satisfy type-aware lint

* fix(tests): clear next type-aware lint batch

* fix(tests): clear lint and test type annotations

* docs(changelog): consolidate active memory entry

* docs(changelog): reclassify active memory tools entry
2026-05-08 16:12:48 -05:00
Peter Steinberger
82ef158403 test: clarify openresponses stream assertions 2026-05-08 12:07:16 +01:00
Peter Steinberger
9e58cc82c8 test: fix strict CI gates 2026-05-08 05:56:38 +01:00
Peter Steinberger
9ef37d1907 test: tighten assertions and harness coverage 2026-05-08 05:28:12 +01:00
mrinalgaur2005
2584d0d415 fix(gateway): preserve every client tool call when agent calls multiple tools per turn
Fixes #52288.

Co-authored-by: Mrinal Gaur <mrinalgaur2005@gmail.com>
2026-05-03 00:47:46 +01:00
Devin Robison
52ef42302e fix: tighten trusted tool media passthrough (#67303)
* fix: tighten trusted tool media passthrough

* changelog: tighten trusted tool media passthrough (#67303)

* address review: thread rawToolName into emitToolResultOutput and keep plugin-tool media passthrough

- Pass rawToolName through emitToolResultOutput params so the emit and
  collect calls no longer reference an out-of-scope identifier
  (ReferenceError on any verbose tool-output path).
- Widen builtinToolNames to all effective tool raw names for this run
  (core + bundled/trusted plugin tools), so plugin tools on the trusted
  media list still receive local MEDIA: passthrough. Admission-time
  client-tool conflict check keeps using the core-only set so unrelated
  plugin names do not spuriously reject client definitions; MEDIA
  passthrough is still gated by the raw-name set, so a client tool that
  normalize-collides with a plugin name cannot inherit its media trust.
- Add unit coverage for bundled-plugin raw-name passthrough and for
  case-variant plugin-name collisions.

* drop redundant String() casts flagged by oxlint no-useless-cast

The names from effectiveTools, client tool function names, and the
existingToolNames iterable are already typed as string, so wrapping them
in String(...) adds nothing and trips oxlint's no-useless-cast rule.
2026-04-15 13:12:44 -06:00
Peter Steinberger
e7db987ce6 test: trim heavy imports and harden ci checks 2026-04-10 19:23:10 +01:00
Peter Steinberger
d9b33205dc test: move disabled compat routes to http harness 2026-04-10 19:21:55 +01:00
Peter Steinberger
444cdd055d fix: stabilize main test gates 2026-04-10 12:14:36 +01:00
Lellansin Huang
aad3bbebdd fix: abort HTTP gateway turns on client disconnect (#54388) (thanks @Lellansin)
* fix: abort in-flight HTTP requests on client disconnect

Abort running agent commands when the HTTP client disconnects for both
/v1/chat/completions and /v1/responses endpoints.

- Listen on res "close" instead of req "close" (the request body is
  already consumed so IncomingMessage auto-destroys before we get here).
- Non-streaming: guard with !signal.aborted so the abort fires on
  genuine disconnects; a spurious abort after sendJson is harmless.
- Streaming: guard with !closed so normal res.end() completions do not
  abort post-turn work still in flight.
- Skip error logging and response writes when the signal is already
  aborted.

Made-with: Cursor

* fix: correct event listener name and improve error handling in HTTP requests

Updated the event listener for client disconnects to use the correct name and enhanced error handling logic. The changes ensure that abort signals are properly checked before logging errors and returning responses, preventing unnecessary operations on aborted requests.

Made-with: Cursor

* fix: use correct 'close' event name for non-streaming disconnect handler

* fix: watch socket close for HTTP aborts

---------

Co-authored-by: 冰森 <dingheng.huang@urbanic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 11:16:54 +05:30
Peter Steinberger
afca9540bf fix: add openai responses phase support 2026-04-05 10:58:49 +01:00
Mason
09016db731 fix: wrap untrusted file inputs (#60277)
Merged via squash.

Prepared head SHA: 56ce545786
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-04-05 01:54:48 +08:00
Peter Steinberger
1a75fc9e05 fix: align latest-main gate drift on #60221 2026-04-03 21:52:35 +09:00
Peter Steinberger
0633406ff6 fix(gateway): restore compat HTTP operator auth 2026-03-31 16:49:30 +09:00
Jacob Tomlinson
f0af186726 gateway: ignore bearer-declared HTTP operator scopes (#57783)
* gateway: ignore bearer-declared HTTP operator scopes

* gateway: key HTTP bearer guards to auth mode

* gateway: refresh rebased HTTP regression expectations

* gateway: honor resolved HTTP auth method

* gateway: remove duplicate openresponses owner flags
2026-03-30 20:04:33 +01:00
Jacob Tomlinson
17d0be02f2 fix(gateway): bind OpenResponses HTTP ingress as non-owner (#57778)
* fix(gateway): bind OpenResponses HTTP ingress as non-owner

Co-authored-by: bmendonca3 <208517100+bmendonca3@users.noreply.github.com>

* test(gateway): cover streaming OpenResponses non-owner ingress

---------

Co-authored-by: bmendonca3 <208517100+bmendonca3@users.noreply.github.com>
2026-03-30 17:05:29 +01:00
Michel Belleau
26f34be20c fix(gateway): /v1/responses tool schema should use flat Responses API format (#57166)
* gateway: fix /v1/responses tool schema to use flat Responses API format

* gateway: fix remaining stale wrapped-format tools in parity tests

* gateway: propagate strict flag through extractClientTools normalization

* fix(gateway): cover responses tool boundary

* Delete docs/internal/vincentkoc/2026-03-30-pr-57166-responses-tool-schema-followup.md

---------

Co-authored-by: Michel Belleau <mbelleau@Michels-MacBook-Pro.local>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-30 09:36:54 +09:00
Devin Robison
703e68a749 Fix HTTP OpenAI-compatible routes missing operator.write scope checks (#56618)
* Fix HTTP OpenAI-compatible routes missing operator.write scope checks

* Update src/gateway/http-endpoint-helpers.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Address Greptile feedback

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-28 15:22:21 -06:00
Vincent Koc
d10669629d feat(gateway): make openai compatibility agent-first 2026-03-24 18:06:24 -07:00
Vincent Koc
eaad4ad1be feat(gateway): add missing OpenAI-compatible endpoints (models and embeddings) (#53992)
* feat(gateway): add OpenAI-compatible models and embeddings

* docs(gateway): clarify model list and agent routing

* Update index.md

* fix(gateway): harden embeddings HTTP provider selection

* fix(gateway): validate compat model overrides

* fix(gateway): harden embeddings and response continuity

* fix(gateway): restore compat model id handling
2026-03-24 16:53:51 -07:00
CharZhou
a07dcfde84 fix: pass clientTools to runEmbeddedAttempt in /v1/responses agent path (#52171)
Merged via squash.

Prepared head SHA: 74519e7da6
Co-authored-by: CharZhou <17255546+CharZhou@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-03-22 22:05:00 +08:00
Josh Avant
de9f2dc227 Gateway: harden OpenResponses file-context escaping (#50782) 2026-03-19 22:02:13 -05:00
Peter Steinberger
369646a513 refactor(tests): dedupe openresponses http fixtures 2026-03-03 02:53:13 +00:00
Peter Steinberger
7066d5e192 refactor: extract shared sandbox and gateway plumbing 2026-03-02 23:16:47 +00:00
Peter Steinberger
e5931554bf test: tighten slow test timeouts and cleanup 2026-02-24 01:16:53 +00:00
Peter Steinberger
0cc327546b test(gateway): speed up slow e2e test setup 2026-02-24 00:59:52 +00:00
Peter Steinberger
aa14835607 test: reclassify gateway local suites from e2e 2026-02-22 11:48:46 +00:00