Commit Graph

150 Commits

Author SHA1 Message Date
Vincent Koc
1130f30445 fix(diagnostics): report provider HTTP status in timelines (#117403)
* fix(diagnostics): record provider response status

* fix(diagnostics): report managed Responses status
2026-08-01 23:36:20 +08:00
Yiğit ERDOĞAN
afe024e8c7 fix(ai): assistant text blocks are run together on replay (#115743)
Chat Completions replay flattened every assistant text block with an empty
separator, so two distinct blocks came back as one word-joined sentence. The
same message shape survives distinctly on the Anthropic, Responses and Mistral
lanes, and the string-content flattener for strict OpenAI-compatible servers
already joins with a newline.

Two blocks arise routinely: streaming opens a new text block after a tool call,
and cross-model replay converts a thinking block into a text block.
2026-08-01 02:23:08 -07:00
Peter Steinberger
b721cffa44 fix(inference): simplify lifecycle and preserve Codex tool identity (#117298) 2026-08-01 02:05:45 -07:00
Peter Steinberger
1f9ee89f25 fix(google): preserve canonical replay and provider error ownership (#117193)
* fix(google): preserve provider signatures and failure outcomes

* fix(google): satisfy SDK stream event and optional text types

* fix(google): preserve signed empty SDK response parts

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 22:52:45 -07:00
RileyJJY
c7917cca36 fix(google-vertex): ignore blank project env (#109515) 2026-07-31 22:03:40 -07:00
Peter Steinberger
cb16d739cf fix(inference): harden Codex streaming, cancellation, and live QA (#116012)
* fix(inference): harden Codex turns, streams, and live QA

* fix(inference): dispatch open CR-delimited response frames

* fix(inference): finish live goal and split streaming regressions

* fix(codex): wait for interrupted turn completion

* fix(codex): narrow terminal collector notification ownership

* fix(inference): harden completion authority and lifecycle

* fix(inference): use canonical source delivery contract

* test(inference): align lifecycle probes with current main

* style(inference): format source delivery verification

* fix(goals): prevent premature completion across staged work

* fix(qa): settle streamed goal turns before continuation

* fix(goals): require visible replies after goal completion

* test(qa): keep goal flow regressions within lint limits
2026-07-31 21:29:33 -07:00
Yiğit ERDOĞAN
ec5fb470c2 fix(ai): Codex stream shows internal parser text on a malformed frame (#116966)
* fix(ai): Codex stream shows internal parser text on a malformed frame

The Codex SSE parse boundary rethrew JSON.parse failures with its own
message, so the three consumers that key off the shared malformed-fragment
marker by exact string equality could not recognise it and the internal
parser wording reached the operator verbatim.

Mirror the canonical transport contract instead: a SyntaxError becomes the
shared marker with the original error kept as cause, and anything else is
rethrown untouched. The WebSocket twin is left alone because two open PRs
own that block today.

* fix(ai): preserve consumer SSE errors

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-01 09:34:09 +08:00
Peter Steinberger
d8ba00f8a2 fix(openai): clear ChatGPT SSE fallback per session (#117123)
* fix(openai): clear ChatGPT SSE fallback per session

* test(openai): prove ChatGPT fallback cleanup

* docs(openai): clarify fallback cleanup ownership
2026-07-31 18:24:46 -07:00
Peter Steinberger
f8aa383698 fix(mistral): reject incomplete streamed tool terminals (#117137)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 18:22:35 -07:00
Peter Steinberger
a7e0ebe8e6 fix(ai): preserve structured chat content and refusals (#117136)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 18:20:23 -07:00
Peter Steinberger
e4d6e5603d refactor(ai): unify Anthropic streaming policy and usage accounting (#117086)
* refactor(ai): unify Anthropic streaming policy and usage accounting

* fix(ai): align shared cache TTL types with Anthropic SDK
2026-07-31 16:28:53 -07:00
Peter Steinberger
ed84162454 fix(openai): canonical Chat cache-hit and billing accounting (#117043)
* fix(ai): preserve cached usage in managed chat completions

* test(ai): use canonical managed chat reasoning option

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 15:19:15 -07:00
Peter Steinberger
3cadc08593 fix(google): restore canonical Gemini and Vertex provider invariants (#117042)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 14:31:34 -07:00
Yiğit ERDOĞAN
c9932f3cca fix(ai): malformed Anthropic stream frames expose raw event payloads (#116938)
The provider stream path interpolated the rejected SSE frame and its raw lines
into the thrown error, so text the model had generated reached logs and the
operator's error surface. The transport path already answers this exact condition
with the shared MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE and keeps the
SyntaxError on cause, and the user-facing substitution in
formatRawAssistantErrorForUi matches that constant exactly. Align the provider
path with it so the same failure reads the same way on both paths.

The error-event branch is left as is: its payload is parsed downstream to build a
meaningful operator message, so redacting it would be a regression.

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-07-31 15:25:14 -05:00
Peter Steinberger
e64b7041ec fix(openai): recover missing terminal response output (#116910)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 09:35:15 -07:00
Peter Steinberger
4a8ce9c336 fix(openai): finalize Chat tool calls from authoritative terminals (#116922)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 09:21:40 -07:00
Peter Steinberger
d2047364a8 fix(google): preserve streamed termination and usage facts (#116822)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:29:40 -07:00
Peter Steinberger
754fddbc79 fix(anthropic-vertex): correct multi-region endpoints (#116757)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 04:50:24 -07:00
Peter Steinberger
0d40cfbb53 fix(google): surface blocked Gemini prompts (#116756)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 04:29:06 -07:00
Miorbnli
834fb2e3c2 fix(ai): prevent websocket cache clobber on concurrent acquire (#116216)
* fix(ai): prevent websocket cache clobber on concurrent acquire

The WebSocket session cache acquire path (expired or non-reusable cached
entry) used unconditional delete/set around the connectWebSocket() await.
A concurrent request could install a newer entry during that await, which
the resuming acquire then clobbered, orphaning the socket that carried the
real previous_response_id continuation and corrupting multi-turn Codex
conversations.

Mirror the release path's owner-checked helpers: delete via
deleteOwnedWebSocketSession, and install via a new setOwnedWebSocketSession
that only writes when the cache still matches what this acquire left behind
(the stale entry, or undefined after removing it / on first connect). A
different cached entry means a concurrent request already won the session.
The busy-cached branch is unaffected: it returns a transient socket and
never writes the cache.

* fix(ai): close CAS loser websocket promptly without leaking its socket

* fix(ai): correct verifyClient callback type in race regression test

* fix(ai): remove unused variable and fix lint in race regression test

* test(ai): prove concurrent websocket loser closes

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 09:36:33 +08:00
Josh Avant
ce67ffb70e feat(agents): add tool-free isolated completion (#114343)
* feat: add isolated pure-inference completion

* fix(google): block ambient system prompt writes

* docs: refresh generated map
2026-07-30 13:24:45 -05:00
pash-openai
e52354ea13 fix(build): pin typebox to a published release (#116333) 2026-07-30 09:58:51 +00:00
Yiğit ERDOĞAN
6ec3dbd92d fix(ai): tool calls fail when an unsupported schema keyword is nested (#115741)
* fix(ai): tool calls fail when an unsupported schema keyword is nested

The strip walked only properties, items, anyOf, oneOf and allOf, copying every
other value through untouched. A keyword the model rejects therefore survived
inside additionalProperties, prefixItems, patternProperties, contains,
propertyNames, not, if/then/else, dependentSchemas and $defs, and the request
was refused by the provider even though the strip reported success.

Walk the same containers the caller already enumerates in
agent-tools-parameter-schema.ts.

* fix(ai): cover all nested schema containers

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-29 23:08:19 +08:00
tiffanychum
4b09214866 fix(ai): avoid websocket cache clobber on stale reused release (#105634)
* fix(ai): avoid websocket cache clobber on stale reused release

* fix(ai): prefer-const holdFirstReuse in websocket cache race test

* fix(ai): avoid websocket cache release clobber

* fix(ai): add curly braces for websocket cache delete guard

* fix(ai): owner-check websocket cache deletes without LOC growth

* ci: bump plugin SDK public surface budget pins to match main tip

* fix(ai): satisfy curly lint for websocket cache owner delete

* ci: allowlist readonly state db and format SDK surface pins

* style: oxfmt plugin-sdk surface report

* ci: drop duplicate readonly state db kysely allowlist entry

* test(ai): prove cached websocket lease ownership

Move the contributor stale-release regression into the canonical cached transport suite and prove authenticated real WebSocket close, cancellation, and queued idle expiry cannot evict a replacement lease.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 07:52:04 -04:00
Peter Steinberger
4232126bba chore: update dependencies across workspace (#115677)
* chore(deps): update dependencies

* fix(deps): restore CI compatibility
2026-07-29 05:16:42 -04:00
Peter Steinberger
c5d0b7dd39 refactor: retire legacy provider and secret paths (#115655)
* refactor: retire legacy provider and secret paths

* fix: remove stale cache retention import

* test: remove retired secret marker fallback
2026-07-29 04:36:20 -04:00
Peter Steinberger
6090386dc7 fix: make Codex harness caching and benchmark parity exact (#115663) 2026-07-29 03:33:36 -04:00
Peter Steinberger
98a066c90e fix(agents): project llama.cpp-safe tool schemas (#115598)
Co-authored-by: Jithin Mohandas <mohandasjithin@gmail.com>
2026-07-29 01:33:32 -04:00
Peter Steinberger
e98675b4b2 refactor(code-mode): unify safe OpenAI tool filtering (#115460)
* refactor(code-mode): unify OpenAI tool surface filtering

* fix(code-mode): preserve transport visibility and test types
2026-07-28 21:12:43 -04:00
Peter Steinberger
388bcc43a1 fix: make Code Mode reliable across gateway and provider lifecycles (#115379)
* fix(code-mode): dispose suspended runs and propagate cancellation

* fix(code-mode): preserve request-visible provider tools

* test(code-mode): require real packaged gateway execution

* fix(gateway): load code mode cleanup only during shutdown
2026-07-28 15:21:54 -04:00
Peter Steinberger
641c82b5bd fix(qa): restore full-stack scenarios and truthful suite exits (#115290)
* fix(qa): restore full-stack scenarios and truthful suite exits

* test(qa): respect plugin boundaries and atomic media delivery
2026-07-28 13:00:22 -04:00
Peter Steinberger
d28fb52651 fix(openai): preserve incomplete Responses stream output (#115132)
* fix(openai): recover incomplete Responses stream output

* test: include incomplete SSE in transport discovery
2026-07-28 07:03:05 -04:00
Peter Steinberger
d1b8701e37 fix(openai): honor per-turn timeout and retry controls (#115017)
Honor existing per-turn timeout and retry controls across OpenAI Responses, Azure Responses, and OpenAI-compatible Chat Completions. Add real SDK HTTP regressions for all three transports.\n\nRefs: #114203
2026-07-28 05:04:51 -04:00
Peter Steinberger
0216fbd4e4 fix(providers): prevent idle timeouts during hidden reasoning (#114997) 2026-07-28 03:30:43 -04:00
Peter Steinberger
0297f0ed39 test(ai): freeze packed-package and stream parity contracts (#114843)
* test(ai): freeze provider and package parity

* refactor(ai): remove provider transport package cycles

* fix(ai): drop unused stream-options re-export
2026-07-27 23:43:57 -04:00
Peter Steinberger
b5bb29a36e fix(code-mode): preserve direct tools and secure suspended runs (#114778)
Preserve trusted policy-required message delivery and native image/computer tools across Code Mode catalogs and provider transports. Keep preferred Gemini capability metadata during live discovery, escape MCP declaration keywords, and reject suspended-run resumes with missing owner identity. Add before-and-after regressions for each user path. Closes #114753.
2026-07-27 18:47:33 -04:00
Peter Steinberger
9588a10f12 refactor(ai): unify Responses transport factories (#114357)
* refactor(ai): unify Responses transport factories

* style(ai): format Responses transport executor
2026-07-27 12:40:48 -04:00
Onur Solmaz
89c5b02832 revert(openai): remove loopback Codex proxy support (#114616)
Reverting PR from runaway clanker, sorry! Won't happen again!
2026-07-27 23:15:42 +08:00
Peter Steinberger
17ed69e103 fix(agents): preserve prompt caches across tool discovery (#114572) 2026-07-27 09:58:19 -04:00
Onur Solmaz
6f8a67120c feat(openai): support loopback Codex proxies (#114555)
* feat(openai): support loopback Codex proxies

* fix(openai): preserve Codex proxy routes

* fix(openai): enforce canonical Codex proxy path

* fix(openai): support opaque proxy capabilities

* test(openai): isolate proxy capability coverage

* fix(openai): confine proxy capabilities

* test(openai): type proxy image config
2026-07-27 13:31:04 +00:00
Harjoth Khara
92eb942822 fix(ai): safely format circular provider stream errors (#107800)
* fix(ai): terminate Anthropic streams on circular error objects

* test(ai): reject with a plain circular object without Promise.reject

* test(ai): pin Anthropic error-message semantics and drop totality overclaim

* test(ai): assert terminal event type in Anthropic error-message test

* fix(ai): preserve circular provider error details

---------

Co-authored-by: Altay <altay@hey.com>
2026-07-27 16:28:40 +03:00
Peter Steinberger
1564e86fcf refactor(ai): consolidate Anthropic streaming regression fixtures (#114511) 2026-07-27 08:36:34 -04:00
licheer-zte
97d3d60b51 fix(markdown): unify reasoning tag parsing (#113205)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 07:48:57 -04:00
Peter Steinberger
fdfe5125a3 fix(ai): unify Responses stream processing (#114263)
* refactor(ai): unify Responses stream processing

* fix(ai): preserve unindexed output boundaries

* refactor(ai): remove obsolete Responses helpers

* refactor(ai): trim canonical stream surface
2026-07-27 00:28:07 -04:00
Peter Steinberger
1759f4d5e6 refactor(ai): unify OpenAI completions compatibility (#114236)
* refactor(ai): unify OpenAI completions compatibility

* refactor(ai): make cache compat resolution explicit

* fix(ai): keep ModelStudio token field canonical
2026-07-26 22:59:15 -04:00
Peter Steinberger
7846a32757 test(ai): freeze Responses stream processor parity (#114230)
* test(ai): freeze Responses stream processor parity

* test(ai): align parity adapter output type
2026-07-26 22:13:18 -04:00
Peter Steinberger
a348a63cda refactor(ai): preserve abort reasons so restart recovery reads a code (#114219)
* refactor(ai): preserve abort reasons so restart recovery reads a code

* fix(ai): rethrow only coded abort reasons from transports

* test(agents): prove restart abort code reaches the recovery verdict
2026-07-26 21:54:44 -04:00
Peter Steinberger
f6131a4fbf build(deps): remove npm shrinkwrap; mirror pnpm lock into transient package locks (#114006)
* build(deps): remove npm shrinkwrap; mirror pnpm lock into transient package locks

npm 12 removed shrinkwrap (command + tarball/root loading). Delete all 82
committed npm-shrinkwrap.json files and stop publishing lockfiles; keep
pnpm-lock.yaml as the single reviewed dependency boundary. The generator
becomes scripts/generate-npm-package-lock.mjs and feeds plugin bundling via
a transient package-lock.json + npm ci (works on npm 11 and 12). Tarball
validation treats the published 2026.7.2 beta train as a shrinkwrap
transition; self-update npm detection now uses install topology instead of
the shipped shrinkwrap.

* fix(deps): repair lint, deadcode, and test-type lanes for the npm 12 migration

- sort integrity comparisons with an explicit comparator (oxlint)
- keep resolveBunGlobalNodeModules module-local (knip unused-export gate)
- model npm pack --json as npm<=11 array / npm 12 name-keyed object
- default calver destructuring in the tarball test fixture
2026-07-26 01:29:55 -04:00
Peter Steinberger
a95486cefc feat: session rail with read-only session companion in Control UI chat (#113698)
* feat(protocol): add session companion schemas

* feat(gateway): add session companion service

* feat(gateway): expose session companion rpc

* fix(gateway): harden companion runtime limits

* test(gateway): fix companion type assertions

* test(gateway): align companion test target

* feat(ui): replace observer HUD and side chat with session rail

* docs: session rail companion for control ui

* test(ui): align session rail client mock

* fix(ui): drop stale chat search import

* fix: satisfy session companion lint contracts

* refactor(gateway): isolate companion state contract

* fix(ui): keep session rail reachable while idle

* fix(agents): clamp derived openai prompt cache keys at boundary

* fix(ai): clamp chatgpt responses session_id affinity header

* fix(ci): align session companion branch gates

* fix(ui): require run id for sessionless terminal chat events

* fix(agents): scope internal run events to transcript

* chore: revert changelog edit (release generation owns changelog)
2026-07-25 08:14:32 -07:00
ralf003
123ba75ff0 fix(agents): extract Undici cause.code for ECONNRESET/ECONNREFUSED/ETIMEDOUT (#110485)
* fix(transport): extract error code from cause.code for Undici network errors

* fix(transport): traverse nested error causes

---------

Co-authored-by: Altay <altay@hey.com>
2026-07-25 15:47:41 +03:00