Commit Graph

124 Commits

Author SHA1 Message Date
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
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 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 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
Vincent Koc e94ece85b6 fix(anthropic): preserve opus fallback pricing 2026-07-25 19:30:49 +08:00
Vincent Koc 8373a55116 fix(anthropic): trust fallback boundary events 2026-07-25 19:30:49 +08:00
Vincent Koc a69001850b fix(anthropic): canonicalize fallback model identities 2026-07-25 19:30:49 +08:00
Vincent Koc aaea5c67ab test(anthropic): cover fallback serving transitions 2026-07-25 19:30:49 +08:00
Vincent Koc 604daecafc fix(anthropic): price fallback serving models 2026-07-25 19:30:48 +08:00
Vincent Koc 18d4128215 fix(anthropic): enable default fallback for opus 5 2026-07-25 19:30:48 +08:00
Peter Steinberger b0525e1a70 refactor(ai): split OpenAI Responses transport (#113569) 2026-07-25 01:23:28 -07:00
Peter Steinberger 3018e8b78a refactor: deduplicate micro helpers onto canonical homes (#113534)
* refactor: deduplicate micro helpers

* fix(ai): keep hash prefix helper internal
2026-07-25 00:41:01 -07:00
Vincent Koc b4598365d9 refactor(packages): reuse shared error coercion (#113529) 2026-07-25 14:59:59 +08:00
Peter Steinberger b82d8e56b6 fix(qa): require persisted results in runtime parity (#113499)
* fix(qa): bind runtime parity to fixture session

* fix(qa): narrow session store reader input

* test(qa): isolate runtime session selection regression

* fix(ci): restore env surface ratchet
2026-07-24 21:52:53 -07:00
Peter Steinberger 2a5ad61ce9 feat(system-agent): constrain planner JSON output at generation time (#113482)
* feat(system-agent): constrain planner JSON output

* fix(ai): align response format request typing

* fix(ai): preserve response format backend contracts
2026-07-24 21:00:28 -07:00
Peter Steinberger 5bea268128 feat(anthropic): complete Claude Opus 5 rollout (#113392)
* feat(models): add Claude Opus 5 support

* test(models): align Opus 5 setup fixtures

* test(models): update ambient Opus 5 detection

* fix(models): reconcile Opus 5 support with main
2026-07-24 14:55:36 -07:00
Jason (Json) 2ee8730450 feat(anthropic): add Claude Opus 5 model support (#113391)
* feat(anthropic): add Claude Opus 5 model support

Wire claude-opus-5 through the Claude 5 contract seams: adaptive-by-default
thinking with the full low..max effort range, default-sampling and prefill
stripping, streaming refusal contract, model-bound thinking replay, and 1M/128k
catalog metadata across anthropic, claude-cli, Vertex, Bedrock, and Mantle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(anthropic-vertex): normalize explicit Vertex Opus 5 model rows

Extend normalizeAnthropicVertexResolvedModel so user-configured Vertex Opus 5
rows regain reasoning, image input, 1M/128k limits, and the native thinking
map; update the live-model priority expectation and regenerate docs_map.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 14:47:08 -06:00
ooiuuii 89643f6401 fix(openai): fail fast on invalid TLS certificates (#111818)
* fix(openai): stop retrying TLS certificate failures

* fix(ai): centralize TLS certificate failover policy

---------

Co-authored-by: Altay <altay@hey.com>
2026-07-24 12:34:01 +03:00
Peter Steinberger acd92f6a3d chore(deps): refresh repository dependencies (#112453)
* build(deps): update QA broker dependency

* build(deps): refresh repository dependencies

* build(deps): reconcile rebased shrinkwraps

* test(plugins): remove stale loader test state

* test(deps): stabilize updated dependency coverage

* fix(swift): use caller-isolated TaskLocal overload

* build(deps): regenerate rebased shrinkwraps

* test(msteams): preserve DNS validation in fetch helper

* fix(deps): avoid vulnerable optional image stack

* test(deps): validate generated LRU override

* refactor(ui): extract chat resizable divider

* test(ui): update divider ownership path

* fix(matrix): retain restart-compatible SDK

* style(cron): format update test
2026-07-23 16:17:13 +00:00
Peter Steinberger 1c70136472 fix(ai): honor provider reasoning effort maps (#112632) 2026-07-22 06:11:03 -07:00
Leon-SK668 7767203be3 fix(ai): preserve Unicode in provider error bodies (#109786) 2026-07-22 02:15:50 -07:00
Arseniy Palagin 5451f48b82 fix(agents): tag completions pre-tool narration as commentary (#109057)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Arseniy Palagin <valeradzigurda3@gmail.com>
2026-07-21 17:13:14 -07:00
TUARAN 3c32f327a4 fix(anthropic): normalize unsupported inline images (#102537)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 11:31:24 -07:00
Peter Steinberger b4e27f8b3d refactor: move provider transports into packages/ai behind a typed host port (#111669)
* refactor(ai): invert plugin coupling behind the transport host port

* fix(ai): queue custom transport registrations until the host is configured

* refactor(ai): remove relocated transport sources from src/agents

* fix(ai): source core stream types from canonical packages and fix tarball fixtures

* fix(ai): invert plugin transport host wiring

* fix(ai): harden managed transport projection

* test(ai): register synchronous stream in transport mock

* fix(ai): lazily install transport runtime host

* fix(ai): preserve completion compat detection
2026-07-20 23:26:00 -07:00
Peter Steinberger 0f61091fed refactor: resolve OpenAI-completions provider compat from a declarative matrix (#112062)
* refactor(ai): resolve OpenAI-completions provider compat from a declarative matrix

* refactor(ai): keep compat matrix internals module-local
2026-07-20 22:44:29 -07:00
Yiğit ERDOĞAN dc2803210e fix(ai): agent lane drops OpenRouter cache-write tokens and under-counts context (#111435)
* fix(ai): provider-billed totals desync the cost breakdown and drop cache writes

`applyProviderReportedUsageCost` overwrote only `cost.total`, leaving the
per-component estimates in place, so `input + output + cacheRead + cacheWrite`
stopped summing to the total and the replaced estimate was unrecoverable. The
repo rebuilds that sum in four other places; this helper was the only writer
breaking it. Retain the replaced estimate in a new optional `cost.estimatedTotal`
instead of inverting the override: free OpenRouter models report `cost: 0`, and
`shouldPreserveRecordedZeroCost` depends on a provider-billed zero staying
authoritative, so holding the estimate in `total` would write phantom spend.

`parseTransportChunkUsage` also hard-coded `cacheWrite: 0` and never read
`prompt_tokens_details.cache_write_tokens`, while its plugin-sdk sibling reads it
and documents the contract. Writes were dropped from `cacheWrite` and wrongly
counted inside `input`. OpenRouter routes through this lane.

Fixing that shifts tokens out of `input`, which `resolveContextInputTokens` used
as a proxy for prompt size, so context-overflow and length-stop detection are
aligned with the Anthropic lane's `input + cacheRead + cacheWrite`.

Related: #9016

* @
refactor(ai): drop the retained estimatedTotal cost surface

ClawSweeper blocked the branch three review cycles running on the same P1: the
new `Usage.cost.estimatedTotal` field crossed both the plugin SDK and the closed
worker transcript schema, making it an upgrade contract that a bug-fix PR cannot
decide on its own.

Measurement settles it: the field was written in one place and forwarded through
four transport layers, but nothing ever read it. It also did not repair the
invariant it was introduced for -- `input + output + cacheRead + cacheWrite` still
disagrees with a provider-billed `total`; the field only parked the discarded
estimate beside it.

Removing it drops eight files, retires the compatibility merge risk, and leaves
the two fixes that carry real runtime evidence: OpenRouter `cache_write_tokens`
mapping and the context-overflow accounting that depends on it.
@

* refactor(agents): tighten OpenRouter usage contract

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-20 22:33:52 -07:00
ooiuuii 570f8b4d9e fix(errors): recover from Z.AI token-limit errors (#111744)
* fix(errors): classify Z.AI token-limit overflow

* fix(zai): own token overflow classification

* fix(zai): classify live prompt overflow errors

---------

Co-authored-by: Altay <altay@hey.com>
2026-07-20 17:11:40 +03:00