Commit Graph

276 Commits

Author SHA1 Message Date
Peter Steinberger
568ea29d2e refactor(plugins): inherit shared package boundary settings (#117474) 2026-08-01 09:11:09 -07:00
Peter Steinberger
dabba0ce10 fix(openrouter): apply image request transport policy (#117336)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 03:32:37 -07:00
Peter Steinberger
d92d68ac77 fix(providers): canonicalize model families and stream outcomes (#116998)
* fix(providers): canonicalize live model families and stream finalization

* test(openrouter): use canonical typed stream fixture

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 15:29:26 -07:00
Peter Steinberger
8203220bb4 fix(openrouter): honor documented video job lifecycle (#116986)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 11:53:29 -07:00
Peter Steinberger
be7db27702 fix(providers): preserve Bedrock accounting, reasoning, and OpenRouter budgets (#116896)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 09:02:12 -07:00
Peter Steinberger
5bfc65d7f4 refactor: remove 3,543 lines of redundant runtime and tests (#115961)
* refactor: remove 3,543 lines of redundant runtime and tests

* refactor: ratchet production environment variable budget
2026-07-29 11:43:41 -04:00
Alix-007
520e9fe1dd fix(openrouter): skip malformed video catalog rows (#111637) 2026-07-29 01:40:15 -04:00
Peter Steinberger
c092ec437c refactor: remove duplicate runtime and plugin paths (#115483) 2026-07-28 22:06:04 -04:00
Peter Steinberger
3ae29adffa refactor(providers): unify provider stream policy composition (#114929) 2026-07-28 01:10:17 -04:00
Peter Steinberger
778edf0a81 refactor(providers): consolidate compatible replay policies (#114669) 2026-07-27 14:15:53 -04:00
zengLingbiao
a8e52b49a0 fix(google): reject malformed base64 audio in Gemini TTS responses (#114041)
* fix(google): reject malformed base64 audio in Gemini TTS responses

* fix(media): validate provider audio payloads

Co-authored-by: zengLingbiao <zeng.lingbiao@xydigit.com>

* fix(xai): terminate malformed realtime audio

Co-authored-by: zengLingbiao <zeng.lingbiao@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 04:17:35 -04:00
Peter Steinberger
eec2c0cc26 refactor(providers): unify lifecycle-safe manifest registration (#114381)
* refactor(providers): canonicalize manifest-driven registration

* fix(zai): eliminate type-only SDK import side effects
2026-07-27 03:20:02 -04:00
Peter Steinberger
0642072b70 test(providers): consolidate catalog and realtime contract cases (#114352) 2026-07-27 01:55:20 -04:00
Peter Steinberger
603f839058 refactor(providers): collapse live model discovery onto shared projection hook (#113903)
* feat(plugin-sdk): add live catalog row projection

* refactor(providers): share live catalog projection

* fix(venice): keep live projection internal
2026-07-25 16:17:27 -07:00
Masato Hoshino
bdcc5d54a5 fix(agents): honor run abort signal in image and pdf tools (#112644)
* fix(agents): honor run abort signal in image and pdf tools

The image and pdf agent tools declared `execute: async (_toolCallId, args)`
and dropped the run abort signal that `wrapToolWithAbortSignal` supplies as
the third execute argument. The wrapper only races the execute promise, so an
aborted run kept sequentially downloading images/PDFs (up to the per-tool cap,
each up to the byte cap) and still issued a paid vision/PDF-model call for a
dead run.

Thread the signal into the existing `requestInit: { signal }` seam (which the
media fetch layer already merges into the download fetch) and add
`signal.throwIfAborted()` between sequential loop items and before the paid
model call. No new media-options signal field; non-abort behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agents): keep the pdf test suite under the lint ceiling; guard model dispatch

Follow-up on the abort-signal change, resolving the check-lint failure and a
review finding on the same seam.

max-lines
---------
Adding the two pdf abort tests pushed src/agents/tools/pdf-tool.test.ts to 1018
effective lines against a ceiling of 1000, failing check-lint. Resolved without
touching config/max-lines-baseline.txt — a suppression there would also have
tripped the max-lines ratchet.

- The new tests declared their own `describe` with `beforeEach`/`afterEach`
  hooks identical to the existing `describe("createPdfTool")`. They exercise
  that same tool, so they now live in it and the duplicated scaffolding is gone.
- `stubPdfToolInfra`, `createPdfModelRegistry` and `FAKE_PDF_MEDIA` moved to
  pdf-tool.test-support.ts, which already exists for exactly this. They go
  through `createPdfToolInfraStub(completeMock)` rather than being exported
  directly, because the stub wires the suite's own `complete` mock into the
  model registry and vi.mock handles are file-scoped. All 21 existing call
  sites are unchanged.

Abort propagation into model dispatch
-------------------------------------
The previous revision stopped cancellation at download boundaries and before
the first model call, but `runImagePrompt`/`runPdfPrompt` never saw the signal.
A run cancelled while the first provider request was in flight could still
issue the remaining ones — the image path dispatches `describeImage` once per
image in a sequential loop, so a dead run kept paying for every later image.

Both now take an optional `signal` and check it immediately before each
provider dispatch (3 sites in image-tool, 4 in pdf-tool).

Forwarding the signal further, into the provider transports themselves, is a
different seam and is deliberately left out of this PR.

Also declares `requestInit` on `ImageToolLoadWebMediaOptions`. The local facade
omitted it while the underlying loader accepts it (web-media.ts declares it and
forwards it to readRemoteMediaBuffer), so the option worked at runtime and only
compiled because spread properties skip excess-property checking. A non-spread
call site would not have.

tsgo core + core-test, oxlint, oxfmt clean; pdf-tool and image-tool suites 266
tests pass.

* test(agents): prove in-flight media aborts

* test(agents): narrow PDF loader options

* test(agents): reject abort mocks with errors

* fix(agents): propagate media cancellation

* test(agents): type PDF abort fixture

* test(agents): type prepared runtime snapshot

* fix(agents): normalize abort rejection errors

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-25 05:17:09 -07:00
Vincent Koc
749dbcb2a7 refactor(media): consolidate generated media byte limits (#113556) 2026-07-25 15:39:49 +08:00
Jason (Json)
55cf9523e0 feat: discover models from live provider catalogs (#112412)
* feat: discover models from live provider catalogs

* fix(provider-catalog): satisfy current catalog contracts

* fix(deps): update fast-uri past new advisory

* fix(deps): refresh fast-uri shrinkwraps

* fix(openrouter): satisfy provider catalog lint

* fix(agents): preserve refreshable catalog metadata

* test(agents): keep catalog fallback proof within lint budget

* fix(provider-catalog): honor live model contracts

* fix(minimax): type discovery headers explicitly

* docs(plugin-sdk): define live model discovery contract
2026-07-21 19:29:57 -06:00
Peter Steinberger
695491458e fix(providers): reject malformed UTF-8 usage responses (#112081)
Co-authored-by: wahaha1223 <304197929+wahaha1223@users.noreply.github.com>
2026-07-20 22:16:25 -07:00
Peter Steinberger
c7e7ac2728 refactor: remove expired plugin compatibility surfaces (#111451)
* docs(secrets): remove retired web credential paths

* refactor(web): remove retired provider compatibility paths

* refactor(providers): delete retired compatibility routes

* refactor(secrets): remove retired credential aliases

* refactor(plugin-sdk): delete retired compatibility surfaces

* docs(plugin-sdk): remove retired migration guidance

* chore(plugin-sdk): refresh rebased surface budgets

* chore(plugin-sdk): refresh API removal baseline

* refactor(compat): migrate retired internal callers

* chore(plugin-sdk): refresh current-main baselines

* test(config): migrate plugin-owned secret assertions

* test(gateway): narrow plugin secret refs

* fix(plugin-sdk): preserve private boundary type identity

* chore(compat): remove stale sweep references

* chore(lint): lower max-lines budget

* refactor(secrets): remove unused web helper

* build(plugin-sdk): drop removed compat entries

* chore(plugin-sdk): refresh rebased API baseline

* chore(plugin-sdk): use Linux API baseline hash

* fix(plugin-sdk): preserve private bundled build entries

* fix(plugin-sdk): package private runtime facades

* fix(plugins): preserve external credential contracts
2026-07-19 11:04:48 -07:00
Wynne668
491b87c936 fix(openrouter): preserve completed music when stream cleanup fails (#111056)
* fix(openrouter): preserve completed music when stream cleanup fails

* test(openrouter): clarify stream cleanup authority

* test(openrouter): propagate stream cancellation
2026-07-18 19:49:59 -07:00
Peter Steinberger
349f78776d fix(models): refresh bundled provider catalogs (#109410)
* fix(models): refresh bundled provider catalogs

* docs(models): refresh generated docs map

* fix(xiaomi): keep provider helper private

* chore(release): defer catalog release note
2026-07-16 16:47:25 -07:00
Alix-007
1c7ad75966 fix(openrouter): forward safe music request policy (#104835)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 00:40:45 -07:00
Peter Steinberger
e7cba0e4d5 fix: provider dead exports no longer block changed checks (#108592)
* fix(ci): clean provider dead exports

* test(extensions): satisfy provider contract types

* refactor(openai): tighten provider runtime factory
2026-07-15 22:33:54 -07:00
Peter Steinberger
0393189243 chore(plugins): gate deprecation hygiene in CI and purge internal deprecated usage (#108261)
* chore(plugins): gate deprecation hygiene in CI and purge internal deprecated usage

* fix(agents): migrate auth-profiles oauth import to OAuthProviderId

* fix(whatsapp): use durability param in delivery-recovery test

* chore(scripts): declare shouldRunDeprecationHygieneChecks in check-changed types

* test(plugins): update runtime-api guard for ssrf policy rename
2026-07-15 04:15:23 -07:00
Peter Steinberger
f81f9d8570 chore: enforce max-lines suppression ratchet (#107315)
* ci: enforce max-lines suppression ratchet

* chore: prune stale max-lines suppression

* fix: close max-lines ratchet enforcement gaps

* fix: harden max-lines ratchet checks

* fix(ci): satisfy max-lines ratchet checks

* style: format max-lines declarations

* fix(ci): match oxlint suppression grammar

* test: isolate max-lines git fixtures

* chore: prune resolved max-lines debt

* test: skip newline path fixture on Windows

* fix: harden max-lines suppression ratchet

* chore: refresh max-lines baseline

* fix: close max-lines ratchet bypasses

* fix: derive ratchet base from PR merge tree

* fix: support older Git in staged ratchet

* fix: align max-lines declarations and baseline

* chore: refresh max-lines baseline for current main

* fix: exclude generated wizard locales from max-lines

* chore: prune resolved max-lines debt
2026-07-14 09:27:02 -07:00
VectorPeak
79cc3c333b fix: OpenRouter OAuth denial redirects show provider errors (#105448)
* fix(openrouter): surface pasted OAuth redirect errors

Co-authored-by: chatgpt-codex-connector[bot] <261883814+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(openrouter): align callback OAuth error state checks

Co-authored-by: chatgpt-codex-connector[bot] <261883814+chatgpt-codex-connector[bot]@users.noreply.github.com>

* test(openrouter): initialize callback readiness

---------

Co-authored-by: chatgpt-codex-connector[bot] <261883814+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Altay <altay@hey.com>
2026-07-13 15:37:26 +03:00
Peter Steinberger
8310c565e0 feat(onboarding): add provider sign-in (#104502)
* feat(onboarding): add provider sign-in flows

* fix(oauth): keep callback compatibility

* fix(onboarding): reconcile lost auth outcomes

* fix(onboarding): lock auth cancellation at commit

* fix(onboarding): close provider auth lifecycle gaps

* fix(onboarding): make terminal auth failures dismissable

* fix(onboarding): satisfy native app checks

* fix(onboarding): reconcile absent auth sessions

* fix(onboarding): bound provider auth sessions

* fix(onboarding): open provider auth links safely

* test(onboarding): use scanner-safe auth fixtures

* revert: keep established onboarding auth fixtures

* fix(onboarding): close provider auth cancellation gaps

* fix(gateway): retain uncollected wizard results

* fix(onboarding): bind provider reconciliation attempt

* fix(i18n): avoid guessing moved string identities

* style(onboarding): normalize remote auth choices efficiently

* fix(protocol): refresh optional provider auth choices

* test(gateway): cover provider auth dispatch order

* refactor(macos): split onboarding setup support

* fix(macos): refresh merged native checks
2026-07-11 13:00:17 -07:00
xingzhou
03558dc008 fix(openrouter): Fusion prompt corrupts boundary emoji in model IDs (#104433)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-11 12:11:36 -07:00
Alix-007
b09f9b0482 fix(openrouter): apply request policy to video catalog requests (#102062)
* fix(openrouter): apply request policy to video catalog requests

* fix(openrouter): key video catalog cache by request policy

* test(openrouter): preserve auth literal types

* fix(openrouter): preserve catalog auth overrides

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-10 22:01:18 -07:00
Peter Steinberger
dba64d574f chore(release): set version to 2026.7.2 2026-07-11 04:00:49 +01:00
mikasa
ce6cb3b250 fix(openrouter): bound music SSE buffering (#101488)
* fix(openrouter): bound music SSE buffering

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

* fix(openrouter): align music stream bounds with media config

Co-authored-by: mikasa0818 <0668001030@xydigit.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 22:10:44 +01:00
Vincent Koc
3d206140f3 refactor: localize internal implementation constants (#101758) 2026-07-07 08:34:13 -07:00
Vincent Koc
1aeed5ec26 refactor(plugins): localize private config types (#101452) 2026-07-07 00:34:46 -07:00
snowzlmbot
53580e13a4 fix(usage): preserve provider-billed zero totals (#101177)
* fix(usage): preserve provider-billed zero totals

* fix(usage): harden provider-billed cost provenance

* fix(openrouter): retry delayed generation metadata

* fix(openrouter): satisfy retry lint

* refactor(openrouter): consume streamed billed cost

* chore: keep release notes out of contributor PR

---------

Co-authored-by: snowzlmbot <293528334+snowzlmbot@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-07 06:22:28 +01:00
Peter Steinberger
80537c1ba4 feat(macos): load provider catalog during AI onboarding (#101132)
* feat(macos): load onboarding providers from gateway

* test(crestodian): widen setup config mock

* fix(crestodian): satisfy onboarding lint gate

* chore(macos): refresh onboarding localization inventory

* test(plugins): cover guided Copilot secret metadata
2026-07-06 20:57:56 +01:00
lwy-2
f1f8c1ed16 fix(providers): bound successful OAuth and webhook responses (#98098)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-06 08:58:58 +01:00
Peter Steinberger
07e2d633cc feat: show auto-detected provider plans and billing (#100520)
* feat(providers): auto-discover usage billing

* feat(ui): show provider plans and billing

* fix(ui): translate provider billing labels
2026-07-06 04:53:09 +01:00
Dallin Romney
e6dec69403 refactor: consolidate image data URL formatting (#99715) 2026-07-03 17:09:30 -07:00
NianJiuZst
4d5d9dda92 fix: avoid DeepSeek-native thinking on OpenRouter V4 2026-07-02 22:50:58 -07:00
Dallin Romney
de34dfdbe8 refactor(plugins): consolidate record guards (#99361) 2026-07-02 22:12:53 -07:00
sunlit-deng
70cc909eea fix(openrouter): send explicit auth headers (#98187)
* fix(openrouter): send explicit auth headers

* test(openrouter): type stream mock calls
2026-06-30 18:03:14 -07:00
Vincent Koc
66e676d29b chore(release): close out 2026.6.11 on main 2026-06-30 11:31:08 -07:00
Alix-007
48f34b1d4d fix(openrouter): bound video response reads
Route OpenRouter video submit and poll success JSON through the shared bounded provider JSON reader, preserving malformed-response mapping and SSRF request policy coverage.
2026-06-28 11:19:47 -07:00
NIO
c0883a531d fix(openrouter): bound generation-cost JSON response reads (#97490) 2026-06-28 10:44:36 -07:00
NIO
527f8f0cbb fix(image-gen): bound image generation provider JSON response reads (#96495)
* fix(image-gen): bound image generation provider JSON response reads

Route success JSON reads through readProviderJsonResponse (16 MiB cap)
in openrouter, google, fal, minimax, openai, and vydra image generation
providers to prevent OOM from oversized or hostile endpoint responses.
Mirrors the response-limit campaign already applied to other provider paths.

AI-assisted.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(image-gen): size bounded JSON caps for inline image payloads

Signed-off-by: sallyom <somalley@redhat.com>

---------

Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: sallyom <somalley@redhat.com>
2026-06-26 07:08:30 -04:00
NIO
66e2fcc6f8 fix(speech): bound TTS/STT voice-list and transcription JSON response reads (#96496)
Route success JSON reads through readProviderJsonResponse (16 MiB cap) in
azure-speech, elevenlabs, microsoft, minimax/tts, xai/stt, and
openrouter/media-understanding to prevent OOM from oversized or hostile
endpoint responses. Mirrors the response-limit campaign already applied to
other provider paths.

AI-assisted.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 14:32:53 -04:00
mushuiyu886
5715b55000 fix(openrouter): bound video catalog JSON reads (#96505) 2026-06-25 14:17:01 -04:00
Vincent Koc
0671c08900 chore(release): close out 2026.6.10 on main (#96271)
* chore(release): close out 2026.6.10 on main

* chore(release): align native app metadata for 2026.6.10

* chore(release): sync Android 2026.6.10 notes

* docs(changelog): preserve 2026.6.9 history

* docs(changelog): preserve 2026.6.9 history
2026-06-24 11:51:14 +08:00
Patrick Erichsen
0feffda3fc fix(plugins): remove simpleicons icon color paths (#95987) 2026-06-23 12:16:02 -07:00
Patrick Erichsen
0a97f73402 feat: add bundled plugin icon manifest URLs (#95845) 2026-06-22 22:14:18 -07:00