Compare commits

...

894 Commits

Author SHA1 Message Date
diegosouzapw
50ed892d2c Merge branch 'feat/quota-share-consent-lending' into feat/quota-panel-lending-patch 2026-11-21 14:28:41 -03:00
diegosouzapw
702afe1a23 fix(dashboard): use the kit eyebrow for the borrow mode label
The label was a hand-made uppercase span. The kit class gives the same look.
2026-11-21 14:27:18 -03:00
diegosouzapw
4a9f9f106e Merge branch 'feat/quota-share-consent-lending' into feat/quota-panel-lending-patch 2026-11-21 14:16:48 -03:00
diegosouzapw
cfbc093c1e Merge branch 'feat/quota-panel-port' into feat/quota-panel-lending-patch 2026-11-21 14:15:36 -03:00
diegosouzapw
b2a29f1117 Merge branch 'feat/self-service-quota-page' into feat/quota-panel-port 2026-11-21 14:10:53 -03:00
diegosouzapw
bd5880211c Merge branch 'feat/self-service-quota-api' into feat/quota-share-consent-lending 2026-11-21 14:09:25 -03:00
diegosouzapw
f50f014339 Merge branch 'fix/19904-percent-attribution-external-split' into feat/quota-share-consent-lending 2026-11-21 14:08:21 -03:00
diegosouzapw
e39434aea4 Merge branch 'feat/self-service-usage-api' into feat/self-service-quota-page 2026-11-21 14:03:25 -03:00
diegosouzapw
79bb9b89c3 Merge branch 'feat/self-service-quota-api' into feat/self-service-usage-api 2026-11-21 14:00:39 -03:00
diegosouzapw
6b9a7a3890 Merge remote-tracking branch 'origin/release/v3.8.55' into feat/self-service-quota-api 2026-11-21 13:58:05 -03:00
Diego Rodrigues de Sa e Souza
eaf57c1cc1 Merge pull request #19735 from serenity-X/pr/perf/or9r-b-call-log-overflow-index
perf(call-logs): add an ordered partial index for overflow cleanup
2026-11-21 13:53:21 -03:00
diegosouzapw
61537ad229 Merge remote-tracking branch 'origin/release/v3.8.55' into fix/19904-percent-attribution-external-split 2026-11-21 13:49:25 -03:00
Diego Rodrigues de Sa e Souza
a67b47475f Merge pull request #20937 from cheaper-inference/fix/merge-train-kea-qa-20261121
chore(release): dashboard QA train of 6 PRs for v3.8.55 (2026-11-21)
2026-11-21 13:45:45 -03:00
diegosouzapw
88d43c2e85 test(quota): drop the token write interleaving case the atomic call removes
A read can no longer land between the write time and the token count of one
token write, because both are set by one script.
2026-11-21 13:40:28 -03:00
diegosouzapw
3e6a991bfa fix(quota): write the attribution book and its expiry in one atomic call
The Redis book writes now run as Lua scripts through eval, as the charge does.
The token write runs HSET, HINCRBYFLOAT and EXPIRE in one script.
The commit runs HSETNX and, when the field is stored, EXPIRE in one script.
The compare before the commit and the confirmation after it are unchanged.
The client interface no longer lists the hash commands the store stopped calling.

The test fakes replay the two scripts through their own hash commands.
A new test checks that each book write sends one eval and no separate expiry.
2026-11-21 13:36:30 -03:00
diegosouzapw
e1fbff2d9f Merge remote-tracking branch 'origin/release/v3.8.55' into fix/19904-percent-attribution-external-split 2026-11-21 13:03:05 -03:00
Diego Rodrigues de Sa e Souza
ed6619fbba Merge pull request #20904 from cheaper-inference/fix/merge-train-f-20261121
chore(release): contributor train f of 43 PRs for v3.8.55 (2026-11-21)
2026-11-21 12:57:38 -03:00
diegosouzapw
cf32a07f93 Merge branch 'release/v3.8.55' into pr/perf/or9r-b-call-log-overflow-index
# Conflicts:
#	src/lib/db/migrationRunner/constants.ts
2026-11-21 12:42:51 -03:00
Diego Rodrigues de Sa e Souza
eaae2e9dc9 Merge pull request #20892 from cheaper-inference/fix/salvage-20225-v3855
fix: salvage the opt-in parts of #20225
2026-11-21 12:28:15 -03:00
Diego Rodrigues de Sa e Souza
43a3fe5812 Merge pull request #20899 from cheaper-inference/fix/salvage-20231-v3855
fix: salvage five independent fixes from #20231
2026-11-21 12:27:56 -03:00
Diego Rodrigues de Sa e Souza
b9c1bf0365 Merge pull request #20111 from RayJW/feat/mistral-prompt-caching
feat(sse): enable Mistral prompt caching on Chat and Responses paths
2026-11-21 12:10:57 -03:00
diegosouzapw
0a1a86f05e Merge branch 'release/v3.8.55' into fix/merge-train-kea-qa-20261121 2026-11-21 12:10:14 -03:00
Diego Rodrigues de Sa e Souza
47a8b2590f Merge pull request #20900 from cheaper-inference/fix/salvage-20604-v3855
fix(cli): add --p2c-latency-weight to resilience config set
2026-11-21 12:08:48 -03:00
Diego Rodrigues de Sa e Souza
2e48cdb256 Merge pull request #20895 from cheaper-inference/fix/merge-train-e2-20261121
chore(release): contributor train e2 of 18 PRs for v3.8.55 (2026-11-21)
2026-11-21 12:08:20 -03:00
Diego Rodrigues de Sa e Souza
ea64a83e2e Merge pull request #20890 from cheaper-inference/fix/test-policy-package-tests-v3855
fix(ci): accept new tests in a workspace package's own tests/ directory
2026-11-21 12:06:48 -03:00
Diego Rodrigues de Sa e Souza
2b90085225 Merge pull request #20652 from cheaper-inference/chore/derived-qg-reviewed-combo-skill-20261119
fix(ci): verify explicit OpenAPI routes and synchronize omni-inference
2026-11-21 11:37:51 -03:00
diegosouzapw
9c7b87dfcc fix(security): clear the four CodeQL alerts that train f brought in
CodeQL flagged four new high-severity alerts on this train:

- js/polynomial-redos in refreshCopilotToken (#20763): baseUrl is now
  trimmed with stripTrailingSlashes() from utils/urlSanitize.ts, the
  linear helper the repo already uses for this, instead of /\/+$/.
- js/incomplete-url-substring-sanitization x3 in the #20606 test: the fetch
  stubs matched "chatgpt.com" and "registry.npmjs.org" as substrings of the
  URL; they now compare the parsed hostname exactly.

No behavior change: the copilot and codex discovery tests that import these
files pass (416/416 node, 1/1 vitest).
2026-11-21 11:23:48 -03:00
diegosouzapw
392d88aee8 Merge branch 'release/v3.8.55' into fix/salvage-20604-v3855 2026-11-21 10:34:07 -03:00
diegosouzapw
53ccc79bf0 Merge branch 'release/v3.8.55' into fix/salvage-20231-v3855 2026-11-21 10:33:45 -03:00
diegosouzapw
c3b9ac7164 Merge branch 'release/v3.8.55' into fix/salvage-20225-v3855 2026-11-21 10:33:24 -03:00
diegosouzapw
162bf6d342 Merge branch 'release/v3.8.55' into fix/test-policy-package-tests-v3855 2026-11-21 10:33:04 -03:00
diegosouzapw
d6f6ab44fa Merge #20837 (head 00dae174) into KEA QA train 2026-11-21 10:29:52 -03:00
diegosouzapw
0b192e0db5 Merge #20821 (head e8c2057b) into KEA QA train 2026-11-21 10:29:51 -03:00
diegosouzapw
08e8a035a5 Merge #20836 (head 40abd1fe) into KEA QA train 2026-11-21 10:29:50 -03:00
diegosouzapw
f27304195a Merge #20834 (head 997e83f6) into KEA QA train 2026-11-21 10:29:47 -03:00
diegosouzapw
f12a635de2 Merge #20835 (head 6fe991c7) into KEA QA train 2026-11-21 10:29:44 -03:00
diegosouzapw
ddecb0a735 Merge #20826 (head 7c50da19) into KEA QA train 2026-11-21 10:29:43 -03:00
diegosouzapw
539e9f24ed Merge branch 'feat/quota-share-consent-lending' into feat/quota-panel-lending-patch 2026-11-21 10:28:14 -03:00
diegosouzapw
79f6436c3b Merge branch 'feat/quota-panel-port' into feat/quota-panel-lending-patch 2026-11-21 10:27:07 -03:00
diegosouzapw
a294d0a7c2 refactor(translator): move the client system relocation out of wrapInCloudCodeEnvelope
The Antigravity envelope builder grew to 81 counted lines once #20204 added
the model-turn-first case to the #9030 client-system relocation, one over the
max-lines-per-function cap of 80, and the complexity ratchet flagged it on
this train (4 -> 5 violations in the file). Move the relocation into
prependClientSystemParts(); the three cases (first turn is user, first turn
is model, empty history) are unchanged.
2026-11-21 10:17:15 -03:00
Diego Rodrigues de Sa e Souza
9821c21f5b Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-21 10:09:09 -03:00
Diego Rodrigues de Sa e Souza
3712be0df2 Merge pull request #20933 from cheaper-inference/docs/i18n-ui-decision-router-20261121
docs(i18n): localize Decision Router settings
2026-11-21 10:07:54 -03:00
diegosouzapw
a5a1864b34 docs(i18n): localize Decision Router settings 2026-11-21 09:56:25 -03:00
diegosouzapw
bfbd21e9a6 test(api): pin the trust proxy mode in the remote panel client test
The expected forwarding header assumes no peer is trusted as a proxy.
2026-11-21 09:46:45 -03:00
diegosouzapw
5dda158847 Merge branch 'feat/self-service-quota-page' into feat/quota-panel-port 2026-11-21 09:44:01 -03:00
diegosouzapw
3ccfe360a0 Merge branch 'feat/self-service-quota-api' into feat/quota-share-consent-lending 2026-11-21 09:39:55 -03:00
diegosouzapw
f3a3b2a18f Merge #20763 (head 6abef3e0) into contributor train f 2026-11-21 09:39:26 -03:00
diegosouzapw
6b92344ca4 Merge #20753 (head 70fad90b) into contributor train f 2026-11-21 09:39:24 -03:00
diegosouzapw
015a27d007 Merge #20712 (head d5ea5682) into contributor train f 2026-11-21 09:39:22 -03:00
diegosouzapw
6759dfb86b Merge #20667 (head 750e3cf4) into contributor train f 2026-11-21 09:39:19 -03:00
diegosouzapw
08c7418fab Merge #20662 (head 04f84e85) into contributor train f 2026-11-21 09:39:17 -03:00
diegosouzapw
ce301872ed Merge #20656 (head 1a1db0f7) into contributor train f 2026-11-21 09:39:16 -03:00
diegosouzapw
d231772837 Merge #20610 (head 50dfb9d0) into contributor train f 2026-11-21 09:39:13 -03:00
diegosouzapw
846b3447dd Merge #20606 (head 1b23c92d) into contributor train f 2026-11-21 09:39:11 -03:00
diegosouzapw
e5fa3242f3 Merge #20605 (head 3643900d) into contributor train f 2026-11-21 09:39:09 -03:00
diegosouzapw
bfa94c8a09 Merge #20602 (head bd588469) into contributor train f 2026-11-21 09:39:07 -03:00
diegosouzapw
cbd5b320fb Merge #20601 (head 8c91d2f8) into contributor train f 2026-11-21 09:39:05 -03:00
diegosouzapw
e5d2b39c86 Merge #20590 (head 9396d4e3) into contributor train f 2026-11-21 09:39:03 -03:00
diegosouzapw
38ecc2d6e8 Merge #20589 (head 7475d0cd) into contributor train f 2026-11-21 09:39:01 -03:00
diegosouzapw
9b5520f6e3 Merge #20584 (head 03d3ca6d) into contributor train f 2026-11-21 09:38:59 -03:00
diegosouzapw
a7c7ad2c95 Merge #20581 (head 98a60730) into contributor train f 2026-11-21 09:38:56 -03:00
diegosouzapw
14cd5adec9 Merge #20560 (head 6e862732) into contributor train f 2026-11-21 09:38:53 -03:00
diegosouzapw
9a09ec2ab5 Merge #20547 (head 19e08a44) into contributor train f 2026-11-21 09:38:50 -03:00
diegosouzapw
4777ed275a Merge #20507 (head 37f28cbf) into contributor train f 2026-11-21 09:38:48 -03:00
diegosouzapw
3d13dbf528 Merge #20486 (head ef02c753) into contributor train f 2026-11-21 09:38:46 -03:00
diegosouzapw
45b2b12001 Merge #20471 (head 3b2794e9) into contributor train f 2026-11-21 09:38:43 -03:00
diegosouzapw
3cdac64f5f Merge #20458 (head ac46104a) into contributor train f 2026-11-21 09:38:42 -03:00
diegosouzapw
0f475957f1 Merge #20355 (head c4a4f5e4) into contributor train f 2026-11-21 09:38:40 -03:00
diegosouzapw
3a69e6ce2d Merge #20346 (head f682521d) into contributor train f 2026-11-21 09:38:37 -03:00
diegosouzapw
daf345b46a Merge #20245 (head cd5ef453) into contributor train f 2026-11-21 09:38:35 -03:00
diegosouzapw
8734908997 Merge #20242 (head 00e66d2c) into contributor train f 2026-11-21 09:38:33 -03:00
diegosouzapw
fc96a502a9 Merge #20241 (head ab3bac13) into contributor train f 2026-11-21 09:38:31 -03:00
diegosouzapw
44bca20b64 Merge #20199 (head 8e72d917) into contributor train f 2026-11-21 09:38:29 -03:00
diegosouzapw
37d6bd6a80 Merge #20154 (head e73695c4) into contributor train f 2026-11-21 09:38:27 -03:00
diegosouzapw
caf31fb1ce Merge #20126 (head a6ef3f52) into contributor train f 2026-11-21 09:38:25 -03:00
diegosouzapw
7908b1bc04 Merge #19890 (head c026fbd3) into contributor train f 2026-11-21 09:38:23 -03:00
diegosouzapw
2147dc06dc Merge #19831 (head 8f5ad95a) into contributor train f 2026-11-21 09:38:21 -03:00
diegosouzapw
742eba615a Merge #19769 (head 0dcacf5e) into contributor train f 2026-11-21 09:38:19 -03:00
diegosouzapw
3131a94bd1 Merge #19761 (head db60bd3a) into contributor train f 2026-11-21 09:38:17 -03:00
diegosouzapw
05684d1461 Merge #19749 (head 2493627c) into contributor train f 2026-11-21 09:38:15 -03:00
diegosouzapw
c325950d00 Merge #19733 (head 84b3a395) into contributor train f 2026-11-21 09:38:13 -03:00
diegosouzapw
a01be28bc1 Merge #19727 (head ebf4ee4b) into contributor train f 2026-11-21 09:38:12 -03:00
diegosouzapw
0efae9e5bd Merge #19701 (head d3141089) into contributor train f 2026-11-21 09:38:09 -03:00
diegosouzapw
b43e1c0067 Merge branch 'feat/self-service-usage-api' into feat/self-service-quota-page
# Conflicts:
#	docs/reference/FEATURE_FLAGS.md
2026-11-21 09:38:08 -03:00
diegosouzapw
b858b1c5c1 Merge #19690 (head 0e228dab) into contributor train f 2026-11-21 09:38:08 -03:00
diegosouzapw
33f133c2bd Merge #19684 (head b7e971ff) into contributor train f 2026-11-21 09:38:07 -03:00
diegosouzapw
9828894024 Merge #19681 (head f33c524e) into contributor train f 2026-11-21 09:38:05 -03:00
diegosouzapw
4879f114ce Merge #19638 (head a8d10a4a) into contributor train f 2026-11-21 09:38:04 -03:00
diegosouzapw
4dbccddde3 Merge #19634 (head 4af29a42) into contributor train f 2026-11-21 09:38:02 -03:00
diegosouzapw
3be2b29395 Merge #19630 (head 34528b6f) into contributor train f 2026-11-21 09:38:00 -03:00
diegosouzapw
134adc6c46 Merge branch 'feat/self-service-quota-api' into feat/self-service-usage-api
# Conflicts:
#	docs/reference/FEATURE_FLAGS.md
2026-11-21 09:36:18 -03:00
diegosouzapw
f9c1ff3f04 Merge remote-tracking branch 'origin/release/v3.8.55' into feat/self-service-quota-api
# Conflicts:
#	docs/reference/FEATURE_FLAGS.md
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-21 09:32:50 -03:00
Diego Rodrigues de Sa e Souza
6d95edb3c9 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-21 09:29:00 -03:00
Diego Rodrigues de Sa e Souza
c564e25959 Merge pull request #20852 from cheaper-inference/feat/unified-decision-routing-v3855
feat(combo): add an opt-in decision router with pluggable deciders
2026-11-21 09:23:50 -03:00
diegosouzapw
d489d151a8 test(quota): build its own pool in the admin lending read test 2026-11-21 09:07:45 -03:00
diegosouzapw
c7760c3683 docs: state which lending refusals carry the reset time and Retry-After 2026-11-21 09:04:59 -03:00
diegosouzapw
f2e7067d80 fix(api): read the previous pool state right before the pool update
The audit metadata and the previous key ids are read on the line
before the synchronous updatePool. The awaited combo cleanup now runs
before these reads, so no other request can change the pool between
the read and the write.
2026-11-21 09:03:59 -03:00
diegosouzapw
11eb7c49be chore(changelog): name the salvage fragment after #20900 2026-11-21 08:59:57 -03:00
diegosouzapw
e397b48aa5 fix(db): keep pool schedules when a save keeps the same members
updatePool deletes the schedules only when the set of member
connections changes. The member rows still follow the submitted order.
Both member queries break a created_at tie by rowid, so the primary
connection stays first.
2026-11-21 08:59:22 -03:00
diegosouzapw
36e85230a4 chore(changelog): name the salvage fragment after #20899 2026-11-21 08:59:14 -03:00
diegosouzapw
6fe991c7a0 test(authz): let the guard's bypass list decide whether Resilience is reported as blocked (KEA-9357)
The reported-paths test pinned /api/resilience/connections and /api/skills/executions as
always blocked for a remote session. Whether they are is the route guard's decision (a GET
exemption or the manage-scope bypass list), and resolveDashboardLocalAccess already asks the
guard. The test now names only paths no configuration opens, and a new case sets the bypass
list both ways and checks the path is reported only while the list leaves it out.
2026-11-21 08:57:57 -03:00
RayJW
52a1322ffe docs: add changelog fragment for Mistral prompt caching 2026-11-21 12:49:35 +01:00
RayJW
2f1d765dff feat(sse): enable Mistral prompt caching on Chat and Responses paths 2026-11-21 12:49:35 +01:00
diegosouzapw
65cb17ae96 fix(api): stream the lending body and stop reading at 4096 bytes
The consent body is read with the bounded body reader. A body sent
without Content-Length is cancelled once it passes the cap.
The cap is counted in bytes, and the docs say so.
2026-11-21 08:46:03 -03:00
diegosouzapw
c154c1079d Merge branch 'feat/self-service-quota-api' into feat/quota-share-consent-lending 2026-11-21 08:38:59 -03:00
diegosouzapw
6f25dbb49e Merge branch 'fix/19904-percent-attribution-external-split' into feat/quota-share-consent-lending 2026-11-21 08:38:57 -03:00
diegosouzapw
420026a797 Merge #20372 (head fce14fe8) into contributor train e2 2026-11-21 08:31:00 -03:00
diegosouzapw
2819840bf1 Merge #20351 (head 8d848a34) into contributor train e2 2026-11-21 08:30:52 -03:00
diegosouzapw
83d2565f16 Merge #20347 (head c0cbf224) into contributor train e2 2026-11-21 08:30:43 -03:00
diegosouzapw
ba0f8eb125 Merge #20324 (head cd83c2fd) into contributor train e2 2026-11-21 08:30:36 -03:00
diegosouzapw
6093f2bab0 Merge #20293 (head a1ca8e91) into contributor train e2 2026-11-21 08:30:24 -03:00
diegosouzapw
3ad12c8f20 Merge #20240 (head fc0c4497) into contributor train e2 2026-11-21 08:30:10 -03:00
diegosouzapw
bcff48ab08 Merge #20238 (head 4e94e65c) into contributor train e2 2026-11-21 08:29:57 -03:00
diegosouzapw
fcc917c672 Merge #20211 (head c3049412) into contributor train e2 2026-11-21 08:29:45 -03:00
diegosouzapw
07fc19f468 Merge #20206 (head 5eba15a4) into contributor train e2 2026-11-21 08:29:39 -03:00
diegosouzapw
2a5738b81d Merge #20204 (head 65f82359) into contributor train e2 2026-11-21 08:29:33 -03:00
diegosouzapw
9960a983d3 Merge #20201 (head 1e7c336c) into contributor train e2 2026-11-21 08:29:27 -03:00
diegosouzapw
4e900ae045 Merge #20194 (head 1b2a4152) into contributor train e2 2026-11-21 08:29:20 -03:00
diegosouzapw
27d7cb97ca Merge #20167 (head 34f90c8a) into contributor train e2 2026-11-21 08:29:16 -03:00
diegosouzapw
7866bc4ebf Merge #20111 (head ad692750) into contributor train e2 2026-11-21 08:29:10 -03:00
diegosouzapw
07151e3f56 Merge #20096 (head 0aacc3d6) into contributor train e2 2026-11-21 08:29:05 -03:00
diegosouzapw
aae6e2c754 Merge #20095 (head db8e1035) into contributor train e2 2026-11-21 08:29:00 -03:00
diegosouzapw
3da987f450 Merge #19848 (head 346c8415) into contributor train e2 2026-11-21 08:28:56 -03:00
diegosouzapw
2f9367a10b Merge #19797 (head 25295a51) into contributor train e2 2026-11-21 08:28:51 -03:00
diegosouzapw
118e508f1a Merge branch 'feat/self-service-usage-api' into feat/self-service-quota-page 2026-11-21 08:24:57 -03:00
diegosouzapw
2c323129ef docs: say how the self-service usage answer names a model
The provider is returned as recorded. The model is the recorded name after its
last slash, and rows are grouped by it.
2026-11-21 08:24:07 -03:00
diegosouzapw
33bbca6e42 test(dashboard): compare the storage-access file list with forward slashes
The relative paths of the quota page files now use forward slashes on every platform before the comparison.
2026-11-21 08:09:53 -03:00
diegosouzapw
96c8873ed5 fix(dashboard): re-read the device key when the key store gains a listener
The key store kept a device key that another tab removed while no component listened. Adding a listener now re-reads the device entry. A key held in memory or in this tab's session is kept.
2026-11-21 08:09:12 -03:00
diegosouzapw
e0b766b9a0 fix(dashboard): name the pool of each model cap when caps come from several pools
Two pools capping the same model gave two identical rows. When the caps on screen come from more than one pool, each row now also names its pool. With one pool the rows stay as they were.
2026-11-21 08:08:28 -03:00
diegosouzapw
ab08444bd9 fix(dashboard): say when the spend-by-model list is cut
When the usage answer sets byModelTruncated, the by-model table adds one sentence. It says the list holds the 50 most used provider and model pairs, so a model's totals may be partial. The page fixtures carry the new field.
2026-11-21 08:07:52 -03:00
Diego Rodrigues de Sa e Souza
49e4a2d212 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-21 08:03:20 -03:00
diegosouzapw
3d64833f61 Merge release/v3.8.55 into feat/unified-decision-routing-v3855
# Conflicts:
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-21 08:03:08 -03:00
diegosouzapw
aa6866babb chore(changelog): name the salvage fragment after #20892 2026-11-21 07:59:08 -03:00
Diego Rodrigues de Sa e Souza
6d3f1d3f70 Merge pull request #20781 from cheaper-inference/feat/plugin-permission-model-opt-in
feat(plugins): opt-in Node.js permission model for plugin processes
2026-11-21 07:59:03 -03:00
diegosouzapw
48cbe84f6c chore(changelog): add the #20890 fragment 2026-11-21 07:56:26 -03:00
diegosouzapw
73a1b44745 fix(ci): accept new tests in a workspace package's own tests/ directory
check-pr-test-policy (from #20677) rejects any new test file outside tests/.
The @omniroute/* workspace packages run their own suites from
<package>/tests/ (52 files in opencode-plugin-v2, 29 in opencode-plugin,
1 in opencode-provider), so a new test there, such as the one in #18804,
was reported as misplaced. Accept @omniroute/<package>/tests/ as well;
any other location, including elsewhere inside a package, is still
rejected.
2026-11-21 07:55:45 -03:00
diegosouzapw
1d99bd91b7 test(quota): clear the attribution floor in the external usage suite
Its expected values assume the default floor, except inside withFloorEnv.
2026-11-21 07:52:29 -03:00
diegosouzapw
ad4f715d07 Merge release/v3.8.55 into feat/unified-decision-routing-v3855 2026-11-21 07:51:25 -03:00
diegosouzapw
31947f5bbb Merge branch 'feat/self-service-usage-api' into feat/self-service-quota-page 2026-11-21 07:50:49 -03:00
diegosouzapw
66d8d6ce7d fix(api): say when the self-service per-model list is cut
The usage answer gains a required byModelTruncated boolean. It is true when more provider and model pairs existed than the 50 that byModel keeps. A model whose pairs fall on both sides of the cut then shows partial totals. The schema, the OpenAPI spec and the quota-share guide describe the field.
2026-11-21 07:48:43 -03:00
diegosouzapw
2bd3c70d5c test(api): check the 200 and the per-model fields of the trimmed usage body
The test of keys outside the contract now asserts the 200 before it reads the body. It also checks that the first byModel row keeps exactly its documented fields.
2026-11-21 07:48:23 -03:00
diegosouzapw
6d918b7815 docs: say how the self-service usage builder reports model names
The module header said provider and model come back as recorded. The model is the recorded string after normalizeModelName, and rows are grouped by it.
2026-11-21 07:47:52 -03:00
diegosouzapw
aa1890d1f5 test(quota): assert the computed lag split and clear the attribution floor 2026-11-21 07:42:38 -03:00
diegosouzapw
80ff0f7aac test(quota): pin the quota store to SQLite in the attribution suites 2026-11-21 07:42:26 -03:00
diegosouzapw
c3275ec527 test(quota): bound the fallback data time from both sides 2026-11-21 07:42:12 -03:00
diegosouzapw
316c6c9b4b test(db): seed its own book in the unreadable key map test 2026-11-21 07:42:00 -03:00
diegosouzapw
13c731868e Merge branch 'feat/self-service-quota-api' into feat/self-service-usage-api 2026-11-21 07:40:50 -03:00
diegosouzapw
9b415c42d5 test(api): check the 200 before reading the trimmed quota view body
A fixed 500 body also lacks the extra keys, so the test now checks the status and the parsed view.
2026-11-21 07:31:48 -03:00
diegosouzapw
8eea618872 docs: say where external usage goes in the percent attribution floor row
Usage made outside OmniRoute first fills the capacity no key is allocated. Only
the rest is charged to every key by weight.
2026-11-21 07:31:21 -03:00
diegosouzapw
778eb8cc26 fix(api): read the self-service key's metadata from its row on every call
The scope and connection checks now read the key row, as the validation call does.
A change made in another process takes effect on the next call.
2026-11-21 07:30:27 -03:00
diegosouzapw
c726bb8685 fix(quota): give no plan reading for a Codex figure whose window reset
The Codex fetcher can serve a cached figure for up to a minute. Past the
window's reset that figure still describes the previous window, yet it was
dated now. It could then turn the attribution book on a pre-reset figure.

The saturation read now gives no plan reading for a window whose reset time is
not after the current time. The saturation value itself is unchanged.
2026-11-21 07:30:18 -03:00
diegosouzapw
be925cf53b fix(api): send a null reset time when the cached one does not parse
The account bar and the model windows share one helper for the reset time.
A value that does not parse as a date is sent as null.
2026-11-21 07:28:36 -03:00
diegosouzapw
606c2f0991 fix(api): take the key's allocation from the pool the quota view reads
The view now reads the key's allocation from the pool it fetched, after the awaits.
A pool the key has left since the allocation list was read is skipped.
2026-11-21 07:27:30 -03:00
diegosouzapw
50f29d352f fix(quota): record a reset time that an equal reading carries
An equal figure left a book without a reset time unchanged. A later higher
reading after that reset was then a rise, and growth was charged against the old
baseline and marks.

An equal figure now stores its reading's reset time when the book has none. It
changes only the reset time, the revision and the write time. A kept drop still
records nothing.
2026-11-21 07:26:24 -03:00
diegosouzapw
7a66fe22fe fix(api): report Claude's model-scoped windows in the self-service quota view
Claude keeps its per-model weekly windows in modelQuotas, apart from the plan windows.
The account resolver now returns them, normalized, when the quota view asks for them.
The view lists them in modelWindows with the same provider and plan-window rules.
The /v1/me/status response is unchanged.
2026-11-21 07:25:48 -03:00
diegosouzapw
7398c0e62e fix(db): keep the token counters a kept attribution book relies on
A timed usage-history reset deleted the books and the per-key token counters
separately by their write time. A short cutoff could delete a key's counter while
its book was kept, and the other keys were then charged for its use.

The timed reset now deletes the books first. It then deletes old counters only
for a pool connection that has no book left. The full reset is unchanged.
2026-11-21 07:24:00 -03:00
diegosouzapw
48e7dfdeb4 Merge branch 'feat/quota-share-consent-lending' into feat/quota-panel-lending-patch 2026-11-21 06:55:28 -03:00
diegosouzapw
fe990ab5b8 Merge branch 'feat/quota-panel-port' into feat/quota-panel-lending-patch 2026-11-21 06:55:14 -03:00
Diego Rodrigues de Sa e Souza
b7a561a2bb Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-21 06:50:08 -03:00
diegosouzapw
ee83674890 docs: say the quota panel port needs the main port under the development server
The development hot-reload socket is an upgrade request, which the panel port
refuses, so the page does not become interactive through it under next dev.
The docs test pins the three sentences to the role's upgrade rule.

Also reads the live WebSocket port with Number.parseInt.
2026-11-21 06:47:06 -03:00
diegosouzapw
f694453dfe Merge branch 'feat/self-service-quota-page' into feat/quota-panel-port 2026-11-21 06:44:52 -03:00
diegosouzapw
20a3622501 Merge branch 'feat/self-service-quota-api' into feat/quota-share-consent-lending 2026-11-21 06:43:17 -03:00
diegosouzapw
ed5561fcdb Merge branch 'fix/19904-percent-attribution-external-split' into feat/quota-share-consent-lending 2026-11-21 06:43:17 -03:00
Diego Rodrigues de Sa e Souza
93d0cbc243 Merge pull request #20650 from cheaper-inference/fix/qg-release-acceptance-live-20261119
fix(ci): bind shadow acceptance to the real checkout
2026-11-21 06:41:11 -03:00
diegosouzapw
6b22da3d7c Merge branch 'feat/self-service-usage-api' into feat/self-service-quota-page 2026-11-21 06:38:05 -03:00
diegosouzapw
7e188c5143 refactor(quota): compare the in-flight saturation read with undefined
The in-flight entry is a promise, so its presence check is explicit. Behavior
is unchanged.
2026-11-21 06:37:38 -03:00
diegosouzapw
72f2173897 refactor(api): make the self-service usage cache's promise handling explicit
A cached entry is a promise, so the hit check compares with undefined and
the expiry sweep marks its discarded reads with void. Behavior is unchanged.
2026-11-21 06:33:58 -03:00
diegosouzapw
aae2528153 Merge branch 'feat/self-service-quota-api' into feat/self-service-usage-api 2026-11-21 06:30:55 -03:00
diegosouzapw
f8aeb62932 fix(api): read the self-service Bearer token in linear time
The Authorization header was matched with a pattern whose whitespace and
token parts overlap. The token is now read by slicing the scheme off and
trimming the rest, with the same accepted and refused values.

The public API origin resolver builds its default environment in a
function instead of an object literal in the parameter list.
2026-11-21 06:30:23 -03:00
Diego Rodrigues de Sa e Souza
4fa27024bc Merge branch 'release/v3.8.55' into feat/self-service-usage-api 2026-11-21 05:51:27 -03:00
Diego Rodrigues de Sa e Souza
55ce1513dd Merge branch 'release/v3.8.55' into feat/self-service-quota-api 2026-11-21 05:51:24 -03:00
diegosouzapw
683d4e25ce docs: add changelog fragment for #20873 2026-11-21 05:33:26 -03:00
Diego Rodrigues de Sa e Souza
3f6c13948e Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-21 05:14:31 -03:00
Diego Rodrigues de Sa e Souza
34d175955c Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-21 05:14:30 -03:00
Diego Rodrigues de Sa e Souza
5c3ef759c3 Merge pull request #20870 from cheaper-inference/fix/merge-train-e1b-20261121
chore(release): contributor train e1b of 21 PRs for v3.8.55 (2026-11-21)
2026-11-21 05:12:06 -03:00
Diego Rodrigues de Sa e Souza
e3650eba68 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-21 04:02:53 -03:00
Diego Rodrigues de Sa e Souza
113601cb13 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-21 04:02:52 -03:00
Diego Rodrigues de Sa e Souza
a78e2a87cc Merge pull request #20749 from cheaper-inference/fix/qg-mcp-a2a-toggle-readiness-20261120
test(ui): synchronize MCP and A2A toggle fixtures
2026-11-21 04:02:05 -03:00
diegosouzapw
8414b3ad03 Merge #20088 (head 68b07075) into contributor train e1b 2026-11-21 03:46:44 -03:00
diegosouzapw
8e8c9ea23f Merge #20078 (head 0a94768e) into contributor train e1b 2026-11-21 03:46:43 -03:00
diegosouzapw
7ed80d6a59 Merge #19950 (head 00f2a34c) into contributor train e1b 2026-11-21 03:46:42 -03:00
diegosouzapw
3e63be6cb8 Merge #19949 (head 768b4aea) into contributor train e1b 2026-11-21 03:46:40 -03:00
diegosouzapw
3cfb61b269 Merge #19948 (head 1907e831) into contributor train e1b 2026-11-21 03:46:39 -03:00
diegosouzapw
09a94f4e6f Merge #19876 (head b871c074) into contributor train e1b 2026-11-21 03:46:37 -03:00
diegosouzapw
360ec203f8 Merge #19867 (head 9983d081) into contributor train e1b 2026-11-21 03:46:36 -03:00
diegosouzapw
141ed1b6d5 Merge #19763 (head f4eae213) into contributor train e1b 2026-11-21 03:46:35 -03:00
diegosouzapw
2a8d2d520f Merge #19750 (head 668c18fe) into contributor train e1b 2026-11-21 03:46:34 -03:00
diegosouzapw
1a30d83faf Merge #19724 (head 610fbaac) into contributor train e1b 2026-11-21 03:46:32 -03:00
diegosouzapw
1a19467176 Merge #19680 (head d1fa6a36) into contributor train e1b 2026-11-21 03:46:31 -03:00
diegosouzapw
8d030a8bd5 Merge #19678 (head a9b7506a) into contributor train e1b 2026-11-21 03:46:29 -03:00
diegosouzapw
17a0647e93 Merge #19670 (head efd935b2) into contributor train e1b 2026-11-21 03:46:26 -03:00
diegosouzapw
9103f74912 Merge #19669 (head d720f0e6) into contributor train e1b 2026-11-21 03:46:25 -03:00
diegosouzapw
f2aa022ed9 Merge #19667 (head 75535a76) into contributor train e1b 2026-11-21 03:46:23 -03:00
diegosouzapw
60383f4fa5 Merge #19592 (head fc4b408e) into contributor train e1b 2026-11-21 03:46:20 -03:00
diegosouzapw
5464f83a07 Merge #19583 (head 213be12d) into contributor train e1b 2026-11-21 03:46:19 -03:00
diegosouzapw
f381a8876a Merge #18738 (head 01781da0) into contributor train e1b 2026-11-21 03:46:17 -03:00
diegosouzapw
f65c9cceb0 Merge #18674 (head 9aa9b274) into contributor train e1b 2026-11-21 03:46:17 -03:00
diegosouzapw
bc7007b913 Merge #18626 (head 41c6c724) into contributor train e1b 2026-11-21 03:46:15 -03:00
diegosouzapw
7c5ea2388d Merge #18544 (head 039bfcf2) into contributor train e1b 2026-11-21 03:46:14 -03:00
diegosouzapw
647e9fc118 fix(api): harden the relayed quota panel write 2026-11-21 02:47:22 -03:00
Diego Rodrigues de Sa e Souza
b87bf33013 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-21 02:47:00 -03:00
Diego Rodrigues de Sa e Souza
913f200b34 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-21 02:46:59 -03:00
diegosouzapw
ac22738b29 test(api): make the quota panel write refusals close a kept-alive connection 2026-11-21 02:40:37 -03:00
Diego Rodrigues de Sa e Souza
1771948e1a feat(ci): omni-queue owner voice and signed merge commits (both off) (#20792)
* feat(ci): omni-queue owner voice and signed merge commits, both off

Owner voice (config `voice`, default "app"): with "owner", the queue's
comments and label removals on pull requests, the dashboard issue and its
comments, base-red comments and the tree-divergence issue go out with
OMNI_QUEUE_LAND_TOKEN (scripts/merge-queue/voice.mjs). Reads, commit
statuses, refs, the state branch and re-runs stay the App's. A missing
token or a 401/403 retries the same write with the App's token and records
one error event per tick. commentOnce trusts markers by the App or by the
owner's login read from the token itself (GET /user).

Signed merge commits (config landing.signing, default "none"): with "ssh"
and landing.actor "owner", composeCandidate signs every merge commit with
the key the tick job writes from the OMNI_QUEUE_SIGNING_KEY secret to a
0600 file under RUNNER_TEMP (removed by an always() step). git gets the
path as per-command configuration through the environment. A missing key
or a failed signature composes unsigned and records one error event per
batch.

The shipped config keeps both off and mode shadow.

* docs(changelog): add the fragment for the omni-queue owner voice and signed merges (#20792)

* test(ci): compare the signed commit's committer by prefix, not a built regex (#20792)
2026-11-21 02:39:36 -03:00
Diego Rodrigues de Sa e Souza
e07bc35c4c Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-21 02:39:27 -03:00
Diego Rodrigues de Sa e Souza
f7b9c46a54 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-21 02:39:26 -03:00
Diego Rodrigues de Sa e Souza
59e3965a8a test(ci): audit only git-tracked files for retired provider asset references (#20827)
The retired-asset audit in provider-assets-generic-fallback.test.mjs walked the
working tree at module load and read every text file whole. In the omni-queue
base check, "Fast Quality Gates" builds config/quality/test-impact-map.json
(gitignored, ~556 MB on release/v3.8.55) before running the whole unit suite,
and readFile(path, "utf8") on it threw "RangeError: Invalid string length"
(run 44795004759).

The audit now lists files with git ls-files (same scope rules; the old walk
stays as the fallback for a tree without git metadata), reads each file with a
64 MiB bound, and reports oversized or unreadable files by name instead of
aborting. A regression test builds a temporary git repository with an
untracked 600 MB sparse file in a walked directory.
2026-11-21 02:32:46 -03:00
diegosouzapw
73451c761b feat(api): relay the lending consent request on the quota panel port 2026-11-21 02:25:31 -03:00
diegosouzapw
39c9780928 test(docs): compare the documented page address as a literal 2026-11-21 02:04:34 -03:00
diegosouzapw
82723de621 fix(db): salvage six usage and DB fixes from #20225
Brings over the parts of #20225 that do not change any default:

- call logs: skip the "mark missing" UPDATE after a successful detail publish
- providers: read the CodeBuddy CN retry-at phrase (请于 <time> 后重试) as China Standard Time
- db settings: read the database size from page_size/page_count instead of per-table scans
- provider stats: filter wire observations on the row instead of a primary-key self-lookup
- usage: requests-by-provider-date sums archived total_requests and floors raw history at
  retention.usageHistory, like the main analytics route
- db: drop the two plain copies of the summary tables' provider/model/date index at boot,
  keeping the UNIQUE index the rollup upsert needs

Left out: the quota snapshot sweep reading retention.quotaSnapshots, because that setting's
built-in default is 7 days and the sweep's current default is 90; the owner kept 90.

The db-provider-stats planner assertion now accepts any timestamp index: the predicate reads
request_type, which the covering index does not hold.

Co-authored-by: serenity <295272363+serenity-X@users.noreply.github.com>
2026-11-21 02:00:19 -03:00
diegosouzapw
8e05499665 fix: salvage five independent fixes from #20231
Salvaged from #20231 by @serenity-X, without the two members the
maintainer declined (standalone launcher reading the default data-dir
.env, and Claude re-auth with a different accountUUID creating a new
connection).

- fix(models): image rows in GET /v1/models no longer inherit chat
  capabilities and token limits from the chat sibling whose id they
  start with.
- fix(guardrails): the opt-in credential masker also masks a value
  behind a label (DB_PASSWORD=..., client_secret: ..., ?api_key=...);
  error sanitization skips the new pattern, so default error bodies
  are unchanged.
- fix(network): the direct egress dispatcher picks the least loaded
  one-connection agent for the requested origin; equal loads rotate.
- fix(usage): Cline free-bucket models get all-zero price rows, so a
  USD-limited API key no longer fails closed after one request.
- perf(usage): the input-token plausibility check skips serializing
  the body when the reported count is within the fixed allowance.

Co-authored-by: serenity <295272363+serenity-X@users.noreply.github.com>
2026-11-21 01:54:47 -03:00
diegosouzapw
2c71a492da fix(cli): add --p2c-latency-weight to resilience config set
`omniroute resilience config set` had no flag for the p2c latency weight,
so the only way to set it was a hand-written PATCH /api/resilience call.
The flag validates 0..20 client side (the same bounds as
p2cLatencySettingsSchema) and sends { p2cLatency: { weight } }.

Salvaged from #20604 without its PATCH /api/settings 400 change, which
stays as it is today. Refs #20445.
2026-11-21 01:54:29 -03:00
diegosouzapw
466592d8d2 fix(decision): bound the decision timer delay at its call sites
CodeQL flags js/resource-exhaustion when a timer delay comes from
configuration without a visible upper bound at the call. The value was
already clamped to 100-5000 ms by the schema and clampDecisionTimeout,
but through a helper the analysis does not follow. Compare against
MAX_DECISION_TIMEOUT_MS where the timer is set (and where the transport
receives its timeout), so the bound is explicit. Behavior is unchanged.
2026-11-21 01:49:15 -03:00
diegosouzapw
9c37de15f3 Merge branch 'feat/quota-share-consent-lending' into feat/quota-panel-lending-patch
Two conflicts. The provider segment schema lives in the shared schema module since the
quota page landed, so the lending handler imports it from there and the handler keeps no
local copy. The environment variables table of the Quota Share guide keeps the rows of
both sides.
2026-11-21 01:37:43 -03:00
diegosouzapw
14081276a7 docs: add changelog fragment for #20856 2026-11-21 01:28:27 -03:00
diegosouzapw
8948e9dea2 docs: add changelog fragment for #20855 2026-11-21 01:25:48 -03:00
diegosouzapw
484a75278b fix(api): advertise the quota panel listener's own keep-alive 2026-11-21 01:25:43 -03:00
diegosouzapw
3e19558588 fix(api): close idle quota panel connections and reserve more base path segments 2026-11-21 01:22:49 -03:00
diegosouzapw
c7f8283600 docs: say how lending consent is withdrawn and when it comes back 2026-11-21 01:19:24 -03:00
Diego Rodrigues de Sa e Souza
6204e4082d Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-21 01:19:00 -03:00
Diego Rodrigues de Sa e Souza
0c85b5c548 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-21 01:19:00 -03:00
diegosouzapw
015795fcb7 fix(api): let a key holder withdraw lending consent in any borrow mode 2026-11-21 01:16:06 -03:00
diegosouzapw
f7238b64ed Merge branch 'feat/self-service-quota-page' into feat/quota-panel-port 2026-11-21 01:07:13 -03:00
diegosouzapw
993f826d25 fix(dashboard): answer the quota page's 404 in the proxy instead of rewriting
A rewrite to the not-found route is resolved against the origin the framework derives
for the request. With the server bound to a loopback address, or behind a proxy that
forwards the https scheme, that origin differs, the rewrite is followed as a request to
another server, and the 404 turned into a 500. The proxy now answers the 404 itself.
2026-11-21 01:06:26 -03:00
diegosouzapw
8074380924 fix(api): drop framework control headers on the quota panel port 2026-11-21 01:05:24 -03:00
diegosouzapw
615d2e6e70 refactor(api): pass the timeout check interval as a server option 2026-11-21 01:01:25 -03:00
Diego Rodrigues de Sa e Souza
76b26b8ead Merge pull request #20824 from cheaper-inference/fix/codeql-media-poll-clamp
fix(security): clamp media polling and guard syntx provider rules (CodeQL #1389, #1392)
2026-11-21 00:58:11 -03:00
Diego Rodrigues de Sa e Souza
c8688bcd69 Merge pull request #20820 from cheaper-inference/fix/admission-bypass-process-secret
fix(security): require the per-process token for the internal admission bypass
2026-11-21 00:57:59 -03:00
Diego Rodrigues de Sa e Souza
59bf5d718f Merge pull request #20819 from cheaper-inference/fix/codeql-operator-only-path-roots
fix(security): operator-only credential and denied roots for corpus and vault paths (CodeQL #1371, #1372, #1373)
2026-11-21 00:57:48 -03:00
Diego Rodrigues de Sa e Souza
78a20f38dc Merge pull request #20776 from cheaper-inference/fix/subscription-quota-400-status-gate
fix(security): gate subscription quota text on HTTP 400 behind a structured code
2026-11-21 00:57:36 -03:00
diegosouzapw
1fa5d296c9 docs: state the limits of the quota panel port 2026-11-21 00:50:04 -03:00
diegosouzapw
9c94b031cb docs: state only what the combo test shows about a share refusal 2026-11-21 00:49:41 -03:00
diegosouzapw
6a9e254d49 test(dashboard): load the lending badge test's components before its first case 2026-11-21 00:49:22 -03:00
diegosouzapw
6c93985be2 fix(api): bound the connections and timeouts of the quota panel listener 2026-11-21 00:47:18 -03:00
Diego Rodrigues de Sa e Souza
8736b8e086 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-21 00:35:38 -03:00
Diego Rodrigues de Sa e Souza
46d97cae33 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-21 00:35:37 -03:00
diegosouzapw
a5b3cac8bd test(docs): pin the quota panel port documentation 2026-11-21 00:23:23 -03:00
diegosouzapw
8e7622bbc0 chore(changelog): name the decision-router fragment after #20852 2026-11-21 00:20:37 -03:00
diegosouzapw
e214841a52 docs: describe consented lending in Quota Share 2026-11-21 00:19:53 -03:00
diegosouzapw
1bbf798d58 Merge release/v3.8.55 into feat/unified-decision-routing-v3855 2026-11-21 00:19:35 -03:00
diegosouzapw
526ca71249 docs: document the quota panel port 2026-11-20 23:52:00 -03:00
diegosouzapw
c2dc3dce09 feat(dashboard): choose a pool's borrow mode and show who lends 2026-11-20 23:44:19 -03:00
diegosouzapw
2d1568c160 fix(api): harden the quota panel role of the API bridge 2026-11-20 23:40:00 -03:00
diegosouzapw
6122d08762 feat(api): start the quota panel listener from QUOTA_PANEL_PORT 2026-11-20 23:35:01 -03:00
diegosouzapw
51fe47b9e1 feat(api): add a quota panel role to the API bridge 2026-11-20 23:23:40 -03:00
diegosouzapw
a423131bb4 feat(api): add the path allowlist of the quota panel port 2026-11-20 23:16:24 -03:00
diegosouzapw
bdc1e8cb3e fix(api): bound the lending deadline and the consent request body 2026-11-20 23:12:13 -03:00
diegosouzapw
976b622e4f fix(api): wait past the reset before a quota-share retry 2026-11-20 23:07:10 -03:00
diegosouzapw
d1a0ce9cf0 test(api): pin that a quota-share reset hint leaves the shared connection alone 2026-11-20 23:02:12 -03:00
Diego Rodrigues de Sa e Souza
0f5237563c Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 23:01:57 -03:00
diegosouzapw
396a2ee399 feat(api): let an API key holder set lending consent through the self-service route 2026-11-20 22:50:26 -03:00
diegosouzapw
eef149701f Merge branch 'fix/api-bridge-dot-segments' into feat/quota-panel-port 2026-11-20 22:49:06 -03:00
diegosouzapw
0a2d54239e feat(api): report lending consent in the self-service quota view 2026-11-20 22:39:59 -03:00
diegosouzapw
a362ab4216 fix(dashboard): rename the key store's confirm step and drop dead heading weights
The native dialog guard reads a bare confirm() call as the browser dialog, so the
key store's method is now confirmKey(). The kit's typography roles override weight
utilities on headings, so font-semibold on five headings did nothing and is removed.
2026-11-20 22:35:57 -03:00
diegosouzapw
88556d1cb6 fix(db): treat an unreadable lending deadline as expired 2026-11-20 22:26:07 -03:00
diegosouzapw
c3049412ff chore(changelog): credit the #20187 reporter and mention manage-scoped keys 2026-11-20 22:25:56 -03:00
diegosouzapw
2127d0a5ff test(api): cover manage-scoped and inference-only API keys on sync-models (#20187)
Graft the API-key case from #20302: a manage-scoped key passes
requireManagementAuth() and reaches the connection lookup (404), while
an inference-only key is rejected with 403 "lacks 'manage' scope". On
the base route the old isAuthenticated() guard answers the
inference-only key with 401 instead of the scope error, so the test
fails there.

Co-authored-by: Rafa Martins <rafacpti23@users.noreply.github.com>
2026-11-20 22:24:41 -03:00
diegosouzapw
e106a000a6 feat(api): tell a blocked quota-share key when capacity returns 2026-11-20 22:19:11 -03:00
diegosouzapw
b20ef9a801 feat(api): apply consented lending to percent quota windows 2026-11-20 22:09:40 -03:00
diegosouzapw
4f798385af feat(api): enforce consented lending for countable quota units 2026-11-20 22:05:35 -03:00
diegosouzapw
534810ac05 Merge remote-tracking branch 'origin/release/v3.8.55' into feat/unified-decision-routing-v3855 2026-11-20 22:05:04 -03:00
diegosouzapw
eb5b43e597 feat(api): add the pure borrow calculation for consented lending 2026-11-20 21:55:23 -03:00
diegosouzapw
51f9cbab6c docs: add changelog fragment for #20843 2026-11-20 21:54:56 -03:00
diegosouzapw
6460552cfc Merge release/v3.8.55 into fix/20187-sync-models-management-auth 2026-11-20 21:54:24 -03:00
diegosouzapw
e17307a932 feat(db): store lending consent per allocation and a borrow mode per quota pool 2026-11-20 21:53:49 -03:00
diegosouzapw
3f212def78 fix(dashboard): break long model ids at their own break points in the spend table 2026-11-20 21:53:40 -03:00
diegosouzapw
c0dc727530 fix(dashboard): fit the spend section of the quota page on narrow screens 2026-11-20 21:41:24 -03:00
diegosouzapw
e8673cde81 docs: say what the self-service quota page shows per card 2026-11-20 21:36:37 -03:00
diegosouzapw
66f7b3d4b9 fix(dashboard): drop the last answer of a refused key and keep block notices on screen 2026-11-20 21:34:36 -03:00
Diego Rodrigues de Sa e Souza
8399632bb5 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 21:30:12 -03:00
diegosouzapw
34f90c8a62 test(translator): cover a zero-parameter tool followed by a parameterized one
Graft the mixed-tool stream case from #20251: a tool_use with no
parameters closes with "{}" while the next tool_use keeps its streamed
arguments untouched, and message_delta still maps stop_reason tool_use to
finish_reason tool_calls (#20152).

Co-authored-by: Rafa Martins <rafacpti23@users.noreply.github.com>
2026-11-20 21:29:42 -03:00
Diego Rodrigues de Sa e Souza
fe56151a82 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 21:29:28 -03:00
diegosouzapw
9acef5ae62 test(authz): pin the locality stamp the dashboard layout reads on page requests (KEA-9357)
The dashboard layout decides which local-only features to replace with a
notice from the pipeline's peer-locality stamp on the page request. Nothing
tested that the stamp reaches a page: without it the session is "undecided"
and every local-only surface sends one request that can only be rejected.

Drives the real pipeline for dashboard page requests (remote, loopback,
private network), rebuilds the request headers a server component sees from
Next's override encoding, and checks resolveDashboardLocalAccess() on them.
2026-11-20 21:28:55 -03:00
diegosouzapw
40abd1fe4f refactor(dashboard): move the Media default-provider choice into helpers (KEA-9390)
The KEA-9390 change pushed two functions of MediaPageClient.tsx over the
complexity limit (the /api/providers handler 16 and switchTab 18, limit 15),
which the complexity ratchet counts in new-code mode (5 -> 7 violations in the
file).

Move the added logic into three module-level helpers of the same file:
listedProviders() (the providers a tab shows), preferredProvider() (the
connected-first choice) and providerToOpenOn() (what the connection list
changes once it loads). switchTab resolves the provider id once instead of
three times. LOCAL_PROVIDERS moves to module scope so the helpers can read it;
the exhaustive-deps directive it needed is gone with it.

No behaviour change. The file is back to its 5 pre-existing violations.
2026-11-20 21:22:43 -03:00
diegosouzapw
f6a368b4b9 Merge remote-tracking branch 'origin/feat/self-service-quota-api' into feat/quota-share-consent-lending 2026-11-20 21:17:51 -03:00
diegosouzapw
be0e396917 feat(dashboard): add the key's own usage to the self-service quota page 2026-11-20 21:05:59 -03:00
diegosouzapw
25295a51ad test(providers): assert Gemini 4 Carbon ids use thinkingLevel
Graft the isGeminiThinkingLevelModel assertion from #19809 so the bare,
Antigravity tier and vertex-prefixed Carbon ids stay on the thinkingLevel
path. Only the test is taken; the unverified vertex catalog row and CI
input-modality row from #19809 are intentionally left out.

Co-authored-by: Rafa Martins <rafacpti23@users.noreply.github.com>
2026-11-20 21:01:26 -03:00
diegosouzapw
410df5595f refactor(dashboard): keep the skills page within its complexity budget and drop an unused export (KEA-9359)
Follow-up to the local-only notices, for two new-code gates:
- OmniSkillsPageClient gained five branches for the executions local-only
  state. They move to a small helper (executionStat) and a child component
  (ExecutionsPanel), so the page function is back to its previous cyclomatic
  complexity. No behaviour change.
- LocalOnlyNotice exported the component twice; every caller uses the named
  export, so the unused default export is removed.
2026-11-20 20:57:05 -03:00
diegosouzapw
c0c07416f9 feat(dashboard): show per-model limits and block notices on the self-service quota page 2026-11-20 20:56:28 -03:00
diegosouzapw
8a96ca0fd2 Merge release/v3.8.55 into fix/gemini-4-carbon-registry
# Conflicts:
#	open-sse/config/antigravityModelAliases.ts
#	open-sse/config/antigravitySharedModels.ts
#	open-sse/config/providers/registry/gemini/index.ts
#	src/shared/constants/modelSpecs.ts
#	src/shared/constants/pricing/frontier-labs.ts
#	src/shared/constants/pricing/oauth-subscriptions.ts
#	src/shared/constants/pricing/shared-tiers.ts
2026-11-20 20:56:04 -03:00
diegosouzapw
997e83f685 refactor(dashboard): move the webhook forms' URL check and field messages into helpers (KEA-9386)
The inline validation added to the Custom, Slack and Discord forms pushed
their components over the complexity ratchet (new-code mode): function
length, cyclomatic and cognitive complexity.

No behaviour change. The debounced server check the three forms each
carried a copy of becomes the `useWebhookUrlCheck` hook, and what a field
shows under itself is derived by pure helpers in webhookFieldValidation.ts
(`webhookUrlFieldFeedback`, `webhookSecretFieldError`).
2026-11-20 20:48:41 -03:00
diegosouzapw
2d5fe880b1 Merge remote-tracking branch 'origin/release/v3.8.55' into feat/unified-decision-routing-v3855 2026-11-20 20:43:22 -03:00
Diego Rodrigues de Sa e Souza
ee1c974f45 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 20:09:12 -03:00
diegosouzapw
32d7af33be refactor(dashboard): share the window card and the number formatter of the quota page 2026-11-20 20:03:55 -03:00
diegosouzapw
28706c2d30 Merge release/v3.8.55 into fix/empty-tool-args-claude-stream 2026-11-20 20:00:01 -03:00
diegosouzapw
db9ca912c9 fix(dashboard): never draw a quota reading that has no meaningful scale 2026-11-20 19:59:58 -03:00
diegosouzapw
00dae1741a docs(changelog): add the fragment for #20837 2026-11-20 19:59:21 -03:00
diegosouzapw
f71e14d084 fix(quota): narrow the plan window entry before reading its fraction 2026-11-20 19:57:57 -03:00
diegosouzapw
4aad983d2f docs(changelog): add the fragment for #20836 2026-11-20 19:57:43 -03:00
diegosouzapw
764d1fbcdc Merge remote-tracking branch 'origin/release/v3.8.55' into feat/unified-decision-routing-v3855 2026-11-20 19:56:37 -03:00
diegosouzapw
d4456957e9 fix(dashboard): keep the typed API key out of the DOM and drop a refused key from storage 2026-11-20 19:52:13 -03:00
diegosouzapw
63b0a71365 feat(dashboard): show account, pool and own-share windows on the self-service quota page 2026-11-20 19:40:13 -03:00
diegosouzapw
b0308c6b54 docs(changelog): add the fragment for #20835 2026-11-20 19:30:01 -03:00
diegosouzapw
5454b20a1c docs(changelog): add the fragment for #20834 2026-11-20 19:29:29 -03:00
diegosouzapw
d1c42ce2df feat(dashboard): show when the API key expires on the self-service quota page 2026-11-20 19:28:51 -03:00
Diego Rodrigues de Sa e Souza
42573d7883 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 19:24:25 -03:00
diegosouzapw
3bb1f65d63 fix(dashboard): start a fresh self-service request when the key changes and keep each tab's key its own 2026-11-20 19:16:18 -03:00
diegosouzapw
8c22ca03b7 feat(dashboard): add the self-service quota page with its key form and states 2026-11-20 19:05:08 -03:00
diegosouzapw
856a8acc92 refactor(combo): split the decision router functions under the complexity limits
check:complexity-ratchets (new-code mode) flagged five new violations:
selectAsync, the combo-model decider, resolveDecisionApiKey (cyclomatic
17 > 15) and DecisionModelSection (289 lines, complexity 16). The
pre-decider checks and the answer checks of the strategy, the
preconditions and in-scope dispatch of the combo-model decider, and the
referenced-connection branch of the credential resolver move into
helpers; the builder section is split into settings, descriptions, test
and preview-hook pieces. Behavior is unchanged: the decision unit tests
and the builder UI tests pass as before.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
Co-authored-by: Alvin T. Veroy <551419+alvinveroy@users.noreply.github.com>
Co-authored-by: Rafa Martins <146174365+rafacpti23@users.noreply.github.com>
Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-20 18:52:49 -03:00
diegosouzapw
21c3a7a04b Merge remote-tracking branch 'origin/release/v3.8.55' into feat/plugin-permission-model-opt-in 2026-11-20 18:47:42 -03:00
diegosouzapw
d7727a7e99 Merge remote-tracking branch 'origin/release/v3.8.55' into fix/subscription-quota-400-status-gate 2026-11-20 18:47:10 -03:00
diegosouzapw
7f6351956e fix(i18n): serve the formValidation namespace to the forms that use it
The access-token, webhook and eval-suite forms read their inline messages
from the new formValidation namespace, but the per-section namespace map was
not regenerated, so the dashboard would not have sent those messages to the
client. Regenerated with `npm run gen:i18n-routes`; the drift test
tests/unit/i18n-route-namespaces.test.ts fails without it.
2026-11-20 18:43:14 -03:00
diegosouzapw
913000da90 feat(dashboard): add the browser client for the self-service quota routes 2026-11-20 18:42:51 -03:00
diegosouzapw
ce3a7e2b93 docs(combo): document the decision router and harden its typing and logs
Step 12 and integration: AUTO-COMBO.md gains the `decision` strategy
section (deciders, fields, flag, what leaves the box, failure reasons),
ENVIRONMENT.md and .env.example list OMNIROUTE_DECISION_API_KEY and the
COMBO_DECISION_ROUTER_ENABLED flag, openapi.yaml documents
POST /api/combos/decision-preview, and a changelog fragment is added.

Code: an upstream-reported model name only reaches the log when it looks
like a model id (no spaces, at most 100 characters); the failure branches
of the decision results name their variant explicitly, because
`strict: false` does not narrow the `ok` union (check:open-sse-typecheck
flagged them).

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
Co-authored-by: Alvin T. Veroy <551419+alvinveroy@users.noreply.github.com>
Co-authored-by: Rafa Martins <146174365+rafacpti23@users.noreply.github.com>
Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-20 18:37:40 -03:00
diegosouzapw
7c50da1952 docs(changelog): add the fragment for #20826 2026-11-20 18:34:47 -03:00
diegosouzapw
7e3564061a feat(dashboard): keep a self-service API key in the browser only after it is accepted 2026-11-20 18:33:49 -03:00
diegosouzapw
4625936608 chore(changelog): number the media polling fragment for #20824 2026-11-20 18:32:15 -03:00
diegosouzapw
496114f334 docs: add changelog fragment for #20822 2026-11-20 18:30:03 -03:00
diegosouzapw
f2573bedba fix(dashboard): keep local-only access undecided when the locality stamp is missing (KEA-9357)
resolveDashboardLocalAccess() read the page request through
getRequestPeerLocality(), which fails closed to "remote" when no trusted
signal is present. If the pipeline's locality stamp ever fails to reach the
dashboard layout, that default would hide every local-only feature from a
local operator.

Only an explicit stamp on the page request now decides "local" or "remote";
without it the session is "unknown", so pages ask once and the response
decides, as they already do behind a trusted private proxy.
2026-11-20 18:29:27 -03:00
diegosouzapw
7650672be5 docs: qualify the statements about percent attribution limits 2026-11-20 18:28:36 -03:00
diegosouzapw
e8c2057bcd docs(changelog): add the fragment for #20821 2026-11-20 18:26:01 -03:00
diegosouzapw
3e3d4ea62f fix(dashboard): keep Media from sending requests for unconnected providers (KEA-9390)
The Media page knew nothing about connections: every tab opened on the
alphabetically first provider (Adobe Firefly on Image) and "Generate" was
enabled whether or not anything could run it, so the request was sent only to
come back as "No credentials for image provider: adobe-firefly".

- mediaProviderConnection.ts: pure rule that reads the connection list the
  page already loads and says whether a provider is connected, needs no
  connection (local / keyless), is not connected, or cannot be decided. It is
  one-sided on purpose: "not connected" only when the server would certainly
  refuse (ids, aliases and connection-sharing ids are honoured; anything
  undecidable stays usable).
- MediaPageClient: open each tab on a connected provider when there is one,
  mark unconnected providers in the list, disable Generate for them and show
  why with a "Connect this provider" link; when nothing is connected the hint
  says so up front. Tabs no longer open on a hidden local provider.
- Copy: the credentials banner link no longer names a section ("Configure API
  keys in Providers" -> "Open provider connections").

No server change: the missing-credentials check already answers in
milliseconds without any upstream call.
2026-11-20 18:24:38 -03:00
diegosouzapw
c28fec4e9f chore(changelog): name the fragment after PR #20820 2026-11-20 18:23:37 -03:00
diegosouzapw
5e10e69877 docs: describe the self-service quota page and name it in the feature flag 2026-11-20 18:22:31 -03:00
diegosouzapw
0d56007238 fix(security): clamp media polling and guard syntx provider rules (CodeQL #1389, #1392)
Caller-supplied poll_interval_ms, timeout_ms and poll_timeout_ms on the
NanoBanana, Magnific, Black Forest Labs and RenderHour image handlers are
clamped (30 s interval, 10 min window) by a shared helper that never
shortens a default. The RenderHour poller passes the request abort signal
to sleep(). applySyntxProviderRules only runs own entries of the rules
table.
2026-11-20 18:22:31 -03:00
diegosouzapw
c003123b7e fix(api): let a remote dashboard read resilience state and skill executions (KEA-9357, KEA-9359)
Resilience > Connections and Skills > Executions could never load on a
dashboard reached remotely (managed instance, tunnel, reverse proxy): both
JSON reads sat behind the loopback-only tier although neither spawns anything.

- /api/resilience/connections stays LOCAL_ONLY and joins the default
  manage-scope bypass list next to /api/mcp/. A remote caller needs an
  authenticated dashboard session or a manage-scope key; an anonymous remote
  caller still gets 403 LOCAL_ONLY, also with requireLogin=false. An install
  that stored its own bypass list keeps it.
- GET /api/skills/executions is exempted by exact path and safe method, the
  shape /api/mcp/audit already uses (#13941). POST, which runs a skill and
  reaches the sandbox spawn, stays loopback-only (GHSA-jx89-f37j-pq89).

The default list lives in three places (route guard constant, runtime
snapshot default, settings default); a test now asserts they agree.
2026-11-20 18:16:24 -03:00
diegosouzapw
6ce4d83dcf feat(dashboard): add the strings of the self-service quota page 2026-11-20 18:15:34 -03:00
diegosouzapw
035b02bcd1 chore(changelog): number the fragment for #20819 2026-11-20 18:12:44 -03:00
diegosouzapw
b7585df814 fix(dashboard): plugins and embedded services show the local-only notice on a remote session (KEA-9385)
/api/plugins and /api/services/<name>/status (all but the read-only
CLIProxyAPI status) are local-only routes.

- Plugins: a remote session saw the "no plugins" empty state and a scan
  button that could only fail. It now gets the shared notice and no request.
- Services: each service tab polled its status every 5 s from several
  components and the card read "HTTP 403". useServiceStatus no longer fetches
  or polls a status the session cannot reach, the status card shows the
  notice, and the Services page replaces a local-only service tab with the
  notice so its lifecycle and log panels do not poll either. The CLIProxyAPI
  tab is unchanged.
2026-11-20 18:11:25 -03:00
diegosouzapw
edd7ecd731 fix(dashboard): make the eval case model optional and flag suite errors inline (KEA-9388, KEA-9389)
Quality > New suite refused to save a case whose "Model (optional)" was
empty, and reported every problem only as a toast ("This case has
validation errors") with nothing highlighted.

- The model is optional, as labelled: the save schema already takes a
  case without one and the runner resolves it (the run's model or combo
  target, else the case's model, else the default). The dialog no longer
  requires it and omits `model` from the request when empty, since the
  schema refuses an empty string. A hint under the field says what an
  empty model runs on; the default is now one constant shared by the
  runner and the hint.
- A refused save flags each missing field inline (suite name, case name,
  prompt, expected value), marks the required ones, and moves focus -
  and the dialog's scroll position - to the first of them. The messages
  clear as the fields are filled.
2026-11-20 18:11:09 -03:00
diegosouzapw
a7574e5497 refactor(dashboard): extract the quota progress bar into a shared component 2026-11-20 18:10:52 -03:00
diegosouzapw
125afba994 fix(dashboard): traffic inspector shows the local-only notice on a remote session (KEA-9360)
Every Traffic Inspector API (capture modes, sessions, the live socket, the
TPROXY status) is a local-only route. A remote session got an inspector that
looked ready but stayed empty, with silent 403s and a socket that kept
reconnecting.

The page now mounts the inspector workspace only when the session can reach
those routes; otherwise it keeps the header and shows the shared notice, with
no request and no socket. A local-only rejection of the capture-modes read
makes the same switch for sessions the server could not classify up front.
2026-11-20 18:09:36 -03:00
diegosouzapw
05359effd5 fix(dashboard): validate the webhook wizard's fields inline (KEA-9386)
On the configure step, Next was silently disabled while the destination
was empty; plain text such as "not-a-url" was reported 600 ms later as
"a blocked private address"; a URL or secret over the route's limits was
sent and the refusal reached the banner as "[object Object]".

- Next stays enabled: a refused click flags the fields inline and focuses
  the first one (all four integration kinds).
- A value that is not an http(s) URL, or is over the limit, is said at
  once next to the field, without a round trip. The limits (URL 2000,
  secret 500) are the ones the routes' Zod schemas already enforced, now
  shared through src/shared/constants/formLimits.ts. Nothing is cut: the
  secret field has no maxLength, and a 400-character key reaches the API
  whole.
- POST /api/webhooks/validate-url answers `invalid_url` for text that is
  not a URL instead of `blocked_private`.
- A validation refusal from the API is shown by its message.
2026-11-20 18:08:13 -03:00
diegosouzapw
96edc43be2 fix(dashboard): hand the OpenRouter stats over as a pending promise (KEA-9368)
Follow-up to the Providers first-paint fix. The page is frozen at 1985
lines (tests/unit/deprecated-provider-banner-13067.test.ts) and the
separate loader call grew it by three.

loadProviderPageData now starts the stats request with the essential
ones and returns it un-awaited as `openRouterProviderStats` (a promise
that never rejects), so the page keeps its size: one line swaps the
setter for `.then(setter)`. The first paint still never waits for it,
and the request starts in parallel again instead of after the paint.
2026-11-20 18:07:22 -03:00
diegosouzapw
e829d7e036 fix(dashboard): skills executions show the local-only notice instead of an empty list (KEA-9359)
/api/skills/executions is a local-only route. The Skills page parsed the
guard's 403 body as a result, so a remote session saw "No executions found",
0 executions and a 0% success rate.

The Executions tab and the skill inspector's Executions panel now show the
shared notice when the session cannot reach the route, the two execution
stats show a dash, and no executions request is sent once that is known.
A 200 still renders the list, so the page keeps working wherever the server
serves the read.
2026-11-20 18:06:47 -03:00
diegosouzapw
380b6a7786 fix(security): operator-only credential and denied roots for corpus and vault paths (CodeQL #1371, #1372, #1373)
POST /api/settings/local-corpus (rootPath) and POST /api/settings/obsidian/webdav
(vaultPath) now require an operator credential (dashboard session or local CLI) through
requireOperatorCredential; API keys of any scope and access tokens get 403. The webdav
route passes alwaysRequireAuth because /api/settings/obsidian is ALWAYS_PROTECTED.

Both roots also refuse the filesystem root, the home directory itself and the system
directories /etc /usr /bin /sbin /var /proc /sys /dev /boot /root (and below), compared
after path.resolve and realpath, with a fixed 400 message. The vault keeps its DATA_DIR
overlap refusal.
2026-11-20 18:05:40 -03:00
diegosouzapw
26cb8f9014 fix(dashboard): explain the access-token Name field inline (KEA-9387)
Create was silently disabled while Name was empty, and a name over the
route's 100-character limit was sent and came back as a generic
"Invalid request".

Create now stays enabled: a refused click flags Name inline (required,
or over the limit with the current count) and focuses it; an over-long
name is flagged as it is typed and is never cut or sent. The limit lives
in src/shared/constants/formLimits.ts and is the one the route's Zod
schema enforces. Validation messages come from a new shared
`formValidation` namespace (en.json only).
2026-11-20 18:04:53 -03:00
diegosouzapw
322fe4d8a3 Merge remote-tracking branch 'origin/release/v3.8.55' into feat/unified-decision-routing-v3855 2026-11-20 18:04:08 -03:00
diegosouzapw
1d11171379 fix(dashboard): database health card tells a failed or local-only check from "Attention needed" (KEA-9358)
/api/db/health is a local-only route, so on a remote dashboard the check
answers 403. The card read "no report" as unhealthy: "Attention needed" with
0 issues and 0 repairs, and "Run Auto-Repair" could only answer "HTTP 403".

- A session that cannot reach the route gets the shared local-only notice in
  the card, no auto-repair button, and no request (the 15 s poll skips it).
- With no report yet the status reads "Checking…"; when the check fails for
  another reason it reads "Check failed". Issues and repairs show a dash
  until a report exists. Only a real report can say "Attention needed".
2026-11-20 18:03:27 -03:00
diegosouzapw
72d97a1fcf refactor(api): tighten the quota page gate and its path tables 2026-11-20 18:01:31 -03:00
diegosouzapw
2217a81aa3 docs: state the limits of percent attribution as measured
All growth of the account figure since the baseline is split by tokens,
whenever it happened, so usage made outside OmniRoute while the pool is idle
can fall on the next key that routes. State that case, the percent cap that
applies below the saturation threshold, requests that do not end with status
200, and a book that keeps its state through a lower figure or a moved-back
reset time, with the numbers the tests pin. Describe the usage-history reset
as the remedy. Name only Claude and Codex in the migration comment, and drop
the semicolon from the floor variable text.
2026-11-20 18:01:08 -03:00
diegosouzapw
d0eb894d16 test(quota): pin the upgrade example of the quota share guide
With the account at 85% when the book opens, five keys of weight 20 each
start with 17 of their 20 used, and every key is still allowed.
2026-11-20 17:56:50 -03:00
diegosouzapw
1f45e2e62a test(quota): pin the documented limits of percent attribution
Pin five limits the quota share guide states: usage made while the pool is
idle is charged to the next key that routes when the book is open, a
percent cap can refuse a key far below the saturation threshold, a request
that does not end with status 200 records no tokens, a lower figure inside
an open provider window is not applied, and a reset time that moves back by
more than 30 minutes is an old reading.
2026-11-20 17:48:47 -03:00
diegosouzapw
e0020b7db1 fix(db): clear the percent attribution books with the usage history reset
The manual usage-history reset already clears quota_consumption, which is
what Quota Share counts for countable units. It now also clears the percent
attribution books and their token counters. A period reset removes only the
rows not written within that period, as for quota_consumption. The purge
route reports both counts. The reset touches the SQLite database only.
2026-11-20 17:46:46 -03:00
diegosouzapw
eec0dbba04 fix(security): require the per-process token for the internal admission bypass
isInternalAdmissionBypass() accepted the bypass header together with a
bearer equal to resolveSelfLoopBearer(), which is the deployment env key
when one is configured. That key is an ordinary API key clients hold, so
it proved nothing about where a request came from.

Apply the rule from #19292: only the per-process self-hop token (held in
memory on globalThis, compared in constant time) grants the bypass and
the internal upstream-start cap. The vision bridge describe call, the
only caller that sends the bypass header, now also sends the token; it
only does so for this process's own listener.
2026-11-20 17:35:35 -03:00
diegosouzapw
fc94dbf174 refactor(api): unwrap one escape level per pass in the API-only port path check 2026-11-20 17:27:44 -03:00
diegosouzapw
c2dcae2f6a feat(api): answer 404 for /quota while the self-service panel is off or the provider is unknown 2026-11-20 17:25:24 -03:00
diegosouzapw
9dd26ff009 fix(dashboard): show a clear notice for local-only features on a remote session (KEA-9357)
Local-only API routes (the route guard's LOCAL_ONLY tier) answer 403 to any
remote dashboard by design. Resilience > Connections showed a loading state
and then "This page is only accessible from localhost or LAN (LOCAL_ONLY).".

One source of truth for every such surface:
- the dashboard layout reads the authz pipeline's trusted peer-locality stamp
  and asks the route guard which registered dashboard paths a non-local
  session cannot reach (resolveDashboardLocalAccess), so a remote page knows
  before its first request;
- detectLocalOnlyRejection() recognises the guard's 403 body and remembers it
  for the session, for the cases the server cannot decide up front;
- useLocalOnlyBlocked(path) + <LocalOnlyNotice /> give pages one check and
  one plain-language message with no raw code and no retry.

Resilience > Connections now renders the notice on the first paint and sends
no request when the session is remote; a 403 that is not the local-only
rejection keeps the retryable error.

The route guard and every server-side tier are unchanged.
2026-11-20 15:05:01 -03:00
diegosouzapw
aedb69f89c feat(api): classify /quota as a public page in the authz pipeline 2026-11-20 14:57:04 -03:00
diegosouzapw
05fca3d432 fix(dashboard): label a combo's runtime config rows instead of raw keys (KEA-9368)
The combo detail page listed the stored settings under their config keys
("explorationRate", "routerStrategy", "candidatePool"), most visibly on
the built-in automatic routes.

Each row now shows a readable label: the English name from
comboControl.runtimeConfigLabel.<key> for every key the config schema
accepts, and the key spelled out in words for anything else (the schema
is passthrough, so a stored key can be one no message knows about).
2026-11-20 14:33:27 -03:00
diegosouzapw
23a39931cc fix(dashboard): paint Providers without waiting for OpenRouter stats (KEA-9368)
The Providers page kept its skeleton until five requests settled, one of
them /api/providers/openrouter-stats. That route answers from a 24h disk
cache, but with a cold, expired or unwritable cache it calls three
openrouter.ai endpoints (15s timeout each) before responding, and the
data only feeds the usage-rank chip on each card.

The stats now load beside the first paint (loadOpenRouterProviderStats)
instead of inside its gate; the cards gain the chip when it resolves.
2026-11-20 14:24:02 -03:00
diegosouzapw
6b543c35bc fix(dashboard): head the Analytics counts as "Used in this period" (KEA-9391)
The first block on Usage > Analytics showed Accounts, Providers, API Keys and
Models under the heading "Infrastructure". The four figures are distinct
entities that handled at least one request in the selected period and key
filter (summary.unique* and byProvider of /api/usage/analytics), so a workspace
with connections and keys but no traffic in the period read
"Infrastructure: 0 / 0 / 0 / 0".

The figures are unchanged; the heading now says what they count and a sentence
under it says that connections and keys without traffic are not included.
CompactStatGrid sections take an optional description and test id.
2026-11-20 14:08:07 -03:00
diegosouzapw
89cf2a3390 docs: describe the percent attribution book as shipped
Rewrite the percent section of the quota share guide to match the code:
the book keeps the baseline, the last figure and each key's token mark,
and each key's part of the growth is computed when the book is read.
Describe the transition rules, including a stored reset time that has
passed, when a book is used without a fresh reading, and the limitations
with their numbers. List QUOTA_PERCENT_MIN_TOKENS_PER_POINT in the
variables table and align the OpenAPI descriptions of the accounts entry.
2026-11-20 14:05:53 -03:00
diegosouzapw
93e7b4ed7d fix(dashboard): show stream errors in the Playground instead of ending silently (KEA-9392)
A chat turn that fails after /v1/chat/completions has committed to
200 text/event-stream (the handler outlived the early-keepalive threshold:
1 s, or 15 s for keyless providers) can only report the failure in-band, as a
`data: {"error":{...}}` frame. The Playground's Chat and Compare readers only
looked at `choices[0].delta.content`, so that frame was dropped: "Generating…"
ended with neither a reply nor an error, and the network panel showed no
4xx/5xx.

- chatTabEndpointRequest: add readStreamError() for the in-band failure shapes
  the engine emits (chat `error`, Responses `error` / `response.failed`).
- ChatTab: surface the in-band error, report a stream that closes without any
  content, drop the empty assistant bubble, and buffer lines across network
  chunks so a split error frame is still parsed.
- CompareTab: an in-band error fails the column instead of finishing it empty.

The server side is unchanged: tests pin that withEarlyStreamKeepalive already
delivers the error in-band on the slow path.
2026-11-20 14:00:30 -03:00
diegosouzapw
1a3b4201d8 feat(dashboard): add the decision router settings to the combo builder
Step 10: picking the `decision` router strategy shows a section that
writes `config.decision`: decider (TypeSafe System One, own decision URL,
one of the combo's models), base URL and wire for http, model,
connection ID, timeout (100-5000 ms), minimum confidence, per-model
descriptions with the generated cost-rank text as placeholder, and a
one-off Test decision through POST /api/combos/decision-preview. There is
no API-key field. English strings only in en.json. Adapted from the
#18555 DecisionModelSection and draft helpers.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
2026-11-20 13:46:43 -03:00
diegosouzapw
451a1f187c feat(api): add the decision preview route for the combo builder
Step 9: POST /api/combos/decision-preview (management auth) builds the
decision menu and the generated cost-rank descriptions for an unsaved
combo. With a prompt it runs one decision with the unsaved settings,
behind the same COMBO_DECISION_ROUTER_ENABLED flag (off = skipped,
nothing fetched); combo-model decisions only exist inside a live request
and are skipped. The body is validated with a strict schema (no apiKey),
failures are log-safe reasons, and errors go through sanitizeErrorMessage.
Adapted from the #18555 preview route.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
2026-11-20 13:29:36 -03:00
diegosouzapw
87b3300373 feat(combo): validate the decision block in the combo save schema
Step 8: comboRuntimeConfigSchema now validates `config.decision` and the
decision block under `config.auto` with the strict decision schema: the
decider and wire are closed enums, baseUrl is http(s) up to 500
characters without credentials, query or fragment, model up to 200,
timeoutMs an integer from 100 to 5000, minConfidence from 0 to 1, and at
most 50 descriptions (key up to 300, value up to 1000). There is no apiKey
field: `.strict()` rejects it, so no secret can be stored in a combo.
The rest of `config.auto` stays free-form as before.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
Co-authored-by: Rafa Martins <146174365+rafacpti23@users.noreply.github.com>
2026-11-20 13:27:20 -03:00
diegosouzapw
54424ff5db feat(combo): add the decision auto-router strategy behind a default-off flag
Step 7: a new `decision` strategy in the Auto router registry, next to
nadir. The combo's decision block (config.auto.decision, or
config.decision for top-level router knobs) names the decider:
systemone, http or combo-model. The answer narrows the pool to the chosen
model and rules picks the connection; every failure falls back to rules
with `decision(<kind>): fallback (<reason>)` in the log line, never a URL,
key, prompt or upstream body.

COMBO_DECISION_ROUTER_ENABLED (default false, warning level caution) gates
every decider: while it is off no decider is built, so no credential is
read and nothing is fetched. The jev strategy and its flag are untouched.

resolveAutoStrategy only forwards the parsed block plus the request seams
(signal, handleSingleModel, combos, allowlist) into the routing context.
New tests pin that combos without a decision block keep exactly today's
order and context with the flag on, and that a decision combo with the
flag off routes like the rules fallback with zero fetch. The flag count
tests and the FEATURE_FLAGS.md catalog move from 126 to 127; the strategy
list test gains `decision`.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
2026-11-20 13:24:24 -03:00
diegosouzapw
1a7d0fce41 feat(decision): add the in-process combo-model decider with a depth guard
Step 6: one of the operator's own provider models answers the routing
question through the combo's handleSingleModel, the way the fusion judge
runs. Combo references (auto, auto/*, configured combo names, ids without
a provider prefix) are refused; the call is non-streaming, tool-free,
temperature 0 with a 256-token budget and carries none of the client's
system prompt, tools or history; an AsyncLocalStorage depth guard refuses
a decision started inside a decision call; the timeout aborts the target.
Prompt and parser are the OpenAI-chat decision wire from #15641.

Co-authored-by: Alvin T. Veroy <551419+alvinveroy@users.noreply.github.com>
2026-11-20 12:52:26 -03:00
diegosouzapw
a509e23269 feat(decision): add the http decider for System One and OpenAI-chat URLs
Step 5: an operator classifier at its own URL, on the System One wire
(#18555) or the OpenAI chat-completions wire (#15641: strict JSON system
prompt, extractJsonObject, confidence defaults to 0). The base URL must be
http(s) without credentials, query or hash; a URL pointing at this gateway
is refused (recursion); a failure cools the endpoint down for 30 s; a
choice outside the menu or a refusal is a failure, never a route.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
Co-authored-by: Alvin T. Veroy <551419+alvinveroy@users.noreply.github.com>
2026-11-20 12:48:52 -03:00
diegosouzapw
083cb4fcd4 feat(decision): add the TypeSafe System One decider and credential rules
Step 4: the systemone decider asks TypeSafe through the base client
(#15278). Its key comes only from a stored connection by reference
(connectionId, inside the API key allowlist, the jevAsk pattern) or from
OMNIROUTE_DECISION_API_KEY; a referenced connection outside the allowlist
yields no key and never falls back to the environment. The credential
inventory gains the new call site (class B, like jevAsk).

Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-20 12:45:33 -03:00
diegosouzapw
6475dbfa0f docs: add changelog fragment for #20793 2026-11-20 12:44:20 -03:00
diegosouzapw
c041def596 fix(typesafe): send System One calls through the guarded decision transport
Step 3: the TypeSafe System One client used a bare fetch, read the body
with an unbounded response.json() and followed redirects. It now posts
through the decision transport: safeOutboundFetch with the provider
outbound guard, no retries, redirects refused, a 64 KB body cap and the
same status-only failures. Timeouts, results and the jev callers are
unchanged.

Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
Co-authored-by: Rafa Martins <146174365+rafacpti23@users.noreply.github.com>
2026-11-20 12:38:44 -03:00
diegosouzapw
c0e20104bc feat(decision): add the bounded, guarded decision transport
Step 2: every network decider leaves through one path. safeOutboundFetch
with the provider outbound guard, no retries, redirects refused
(redirect "error" on the seam, allowRedirect false on the fetch), a body
read capped at 64 KB, one timeout over the whole round trip, caller abort,
and status-only failures so an upstream body never reaches a log.

Co-authored-by: Rafa Martins <146174365+rafacpti23@users.noreply.github.com>
Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
2026-11-20 12:31:46 -03:00
diegosouzapw
cc6c2a5109 feat(decision): add decider contract, choice menu and user-text extractor
Step 1 of the unified decision routing: the shared types every decider
returns (never throws, log-safe failure reasons), the menu of unique pool
models with operator or cost-rank descriptions, the bounded extractor of
the last user message (chat/Claude messages and Responses input; never the
system prompt, tools or instructions), and the anti-recursion header.

Co-authored-by: Marcel Rösler <3178520+BelphegorPrime@users.noreply.github.com>
Co-authored-by: Alvin T. Veroy <551419+alvinveroy@users.noreply.github.com>
2026-11-20 12:29:24 -03:00
diegosouzapw
bd49e1bb34 fix(api): refuse a fragment marker in paths on the API-only port 2026-11-20 12:19:00 -03:00
diegosouzapw
3878af3bb4 test(quota): align test wording with the window-totals attribution
Rename a store test and correct two comments of the external-usage test so
they describe the growth since the window started, split by tokens routed
since then. Pin that a Codex window carrying fractionReported: false reads
as without it, and that a reset time is stored only when strictly ahead of
its reading. Pin that a reading taken before the stored reset and observed
after it leaves the book uncharged, and state that case in the doc of
observeLedger. Align the comment above the percent branch of enforce.
2026-11-20 12:16:57 -03:00
diegosouzapw
449bb033d0 docs: add changelog fragment for #20787 2026-11-20 11:55:24 -03:00
diegosouzapw
28945bcd84 fix(quota): turn the attribution book when its stored reset time has passed 2026-11-20 11:44:12 -03:00
diegosouzapw
69c4659799 docs(api): wrap a comment line in the usage contract 2026-11-20 11:41:53 -03:00
diegosouzapw
7386390a98 docs(api): narrow two statements about the usage view 2026-11-20 11:41:52 -03:00
diegosouzapw
c462690870 perf(api): keep fewer usage series in memory and drop expired ones on write 2026-11-20 11:41:51 -03:00
diegosouzapw
91fbc18468 docs(api): correct what the usage view states about retention, labels and prices 2026-11-20 11:41:44 -03:00
diegosouzapw
52d5965b62 perf(api): reuse a key's usage series for a minute and bound its window at now 2026-11-20 11:41:39 -03:00
diegosouzapw
d26695267f docs(api): say which providers count $0 in the usage view's billed cost 2026-11-20 11:41:34 -03:00
diegosouzapw
224cd6881e docs(api): name the usage route in the QUOTA_SELF_PANEL description 2026-11-20 11:41:33 -03:00
diegosouzapw
d6fea69530 feat(api): add GET /v1/me/usage with per-key usage series 2026-11-20 11:41:30 -03:00
diegosouzapw
6a2df0bacd feat(api): build per-key usage and cost series for self-service 2026-11-20 11:41:27 -03:00
diegosouzapw
1f1e79882c test(quota): pin percent attribution against a lagging account figure
Run the real quota-share gate against a simulated Claude account whose response headers never contain the usage of the request they belong to, with the real 30-second saturation cache and a moving clock: alternating heavy and light requests, tiny frequent requests next to rare large ones, sparse traffic shaped like the issue, a burst followed by silence, a long stream, and two figure sources of different precision.
2026-11-20 11:20:26 -03:00
diegosouzapw
b0af4e096d fix(quota): split percent plans by tokens routed since the provider window started
Wire the attribution to the window-total book: each key's part is the growth of the account figure since the provider window started, split by the tokens it routed since then and capped by the floor; the rest is external. The floor is configurable through QUOTA_PERCENT_MIN_TOKENS_PER_POINT (default 1000, read on every attribution). Bailian keeps its saturation value but has no plan-window reading: its quota read is not reachable from the quota-share path, so the fetcher returns to its previous shape.
2026-11-20 11:19:42 -03:00
diegosouzapw
78094c591a fix(api): validate the self-service key against its row and pin the e2e clock
The gate validated the key through the validation cache, which can keep
answering valid for up to a minute after a key's expiry. The gate has no other
expiry check, so it now reads the key row on every call.

The end-to-end test seeded consumption and read it back on the wall clock; an
hour or day boundary between the two would move a bucket and fail an exact
assertion. It now runs at a fixed mid-hour instant.
2026-11-20 11:15:17 -03:00
Diego Rodrigues de Sa e Souza
03bef29916 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 11:10:21 -03:00
Diego Rodrigues de Sa e Souza
d5b9af42f2 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 11:10:20 -03:00
diegosouzapw
4b65b9a5f4 fix(api): derive the quota pool reference through the shared fingerprint helper
The opaque pool reference was an inline HMAC-SHA256 over the key id and the
pool id. Code scanning reads an identifier named after an API key as a
password and flags the digest as an insufficient password hash. The project
keeps every such keyed digest on opaqueTokenFingerprint, so the derivation
moves there. The reference becomes "qpr_" plus 32 hex characters (128 bits);
no reference has been issued yet, so nothing depends on the previous form.
2026-11-20 11:06:35 -03:00
diegosouzapw
661bf4a716 chore(changelog): name the fragment after PR #20781 2026-11-20 11:01:23 -03:00
diegosouzapw
bcef9fe25f fix(quota): keep the attribution book as window totals instead of per-rise shares 2026-11-20 10:41:07 -03:00
diegosouzapw
a55e4a75ea feat(plugins): opt-in Node.js permission model for plugin processes
New feature flag PLUGIN_PERMISSION_MODEL_ENABLED (security, default off).
When it is on, pluginManager.activate() asks loadPlugin() to start the plugin
host with the Node.js permission model, built from the manifest by
buildPermissionModelArgs() (src/lib/plugins/permissionModel.ts):

- --permission (accepted by Node 22.22+, 24 and 26);
- --allow-fs-read for the generated host script and the plugin directory,
  plus the plugin data directory (plugin-data/<name> next to the plugin root)
  when file-read or file-write is declared;
- --allow-fs-write for the data directory only when file-write is declared;
- --allow-child-process only when exec is declared.

Workers, addons and WASI stay denied. network stays declarative because the
Node.js permission model does not gate outbound network access. With the flag
off the host argv and env are exactly as before.

PLUGIN_SDK.md gets a flag-off / flag-on permission table, PLUGIN_MARKETPLACE.md
and FEATURE_FLAGS.md document the flag, and the flag-count tests move to 127.
2026-11-20 10:29:23 -03:00
diegosouzapw
667e8bf086 chore(changelog): name the fragment after #20776 2026-11-20 10:26:33 -03:00
diegosouzapw
763fa9896d fix(security): gate subscription quota text on HTTP 400 behind a structured code
Apply the #20567 status contract to the subscription/plan quota text
signals ("usage limit reached", "plan limit", weekly/session usage
limits). On a 400 such a phrase now counts only with a structured
credit/quota code or for the message-only allow-listed providers
(command-code, bai, openai-compatible-*), so a phrase repeated from the
request no longer classifies as QUOTA_EXHAUSTED or puts a shared LLM or
search connection on hold. 429, 403 and every other status are
unchanged.

The status rule is extracted from isCreditsExhaustedForStatus into
quotaTextSignalCountsForStatus and reused by the classifier, the
fallback engine and the search cooldown.
2026-11-20 10:22:56 -03:00
Diego Rodrigues de Sa e Souza
8b6d316fa2 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 08:57:25 -03:00
Diego Rodrigues de Sa e Souza
26f2b46a09 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 08:57:25 -03:00
diegosouzapw
9f477404a6 docs: date quota share readings precisely and qualify the accounts units 2026-11-20 08:30:11 -03:00
diegosouzapw
fc3e7d1ecf docs: describe the percent attribution book in quota share 2026-11-20 08:22:03 -03:00
diegosouzapw
5cdc63499b test(quota): pin recording once per request and the percent cap across accounts
A request on the default Claude plan (two percent windows) writes its token
counter exactly once. In a pool of two accounts (effective limit 200) a percent
cap of 10 is reached when the key's attributed part of the serving account's
bar reaches 5 points, and each account is checked against its own book.

The header-fallback test now moves the clock past the two-minute drop
confirmation, so a failed read that reached the book as 0 would turn it and be
caught, and the below-threshold #19904 case asserts the 20 points it describes.
2026-11-20 08:08:26 -03:00
diegosouzapw
8a81cc1ae1 fix(quota): stop charging an attribution book that may belong to a past window
Without a plan-window reading (usage endpoint down, a stale answer, the
rate-limit-header fallback) the gate used to charge the stored attribution book
as current, however old it was: a key could be refused by its percent cap or
its fair share hours after the provider window that book describes had ended.

observeLedger now returns the stored book without a reading only while it can
still be the current window's book: its reset time is known and still ahead of
the clock, or it has no reset time and its last applied reading is at most 15
minutes old. Otherwise there is no book for that request and nothing is
attributed, which is the fail-open outcome. The stored book is left as it is;
the next reading turns or updates it through the transition. With a reading,
nothing changes.
2026-11-20 08:03:13 -03:00
diegosouzapw
876cd11e53 fix(quota): attribute percent plans from observed changes of the account figure
The per-key part of a percent plan window (Claude, Codex, Bailian) now comes
from each account's attribution book instead of a shadow token bucket kept in
the quota store's time windows. The store slices its windows at fixed
multiples of the window length and fades the previous slice out, while the
provider's window turns on the account's own clock, so the shadow bucket moved
a blocked key's usage onto the keys still working and kept charging a key for
a provider window that had already reset.

attributePercentDimension reads the plan-window figure next to the saturation
signal (one cached provider read), applies it to the book of (pool,
connection, window) and reports the book: the parts attributed to each key
(the base of the absolute cap) and an external part that first uses the
capacity no allocation claims and is then shared by weight. A provider without
a plan-window reading has no book and nothing is attributed. recordConsumption
adds the request's tokens to the key's counter once per request. Every store
or reading failure leaves the request allowed.

The strict/generous decision still uses getSaturation unchanged, and the
request path costs one book read per percent dimension and no write when the
reading repeats.
2026-11-20 07:46:42 -03:00
diegosouzapw
457acfaebc docs: add changelog fragment for #20767 2026-11-20 07:44:22 -03:00
diegosouzapw
501a583ca6 docs(api): correct three statements about the quota view and pin a fresh reading
The two figures derived from other keys are what enforcement applies to the
key, not something it tells the key. Refusals before the route are examples,
not a closed list. The comment on the account lookup said null where the code
returns an empty list. The end-to-end test now also asserts the account bar is
ok, so a silent upstream refresh would fail it.
2026-11-20 07:43:21 -03:00
Naresh
6abef3e0b0 refactor(oauth): type CopilotRefreshResult and extract GHE fallback helpers 2026-11-20 16:03:06 +05:30
RayJW
ad692750b8 docs: add changelog fragment for Mistral prompt caching 2026-11-20 11:32:14 +01:00
RayJW
1c7921df6a feat(sse): enable Mistral prompt caching on Chat and Responses paths 2026-11-20 11:32:13 +01:00
Diego Rodrigues de Sa e Souza
372c5bddd0 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 07:31:43 -03:00
Diego Rodrigues de Sa e Souza
58d5456411 Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 07:31:43 -03:00
diegosouzapw
7820a97384 test(quota): pin two interleavings of the attribution book and tighten its write guard
On the Redis store a commit that won its revision can still answer false when a
second writer stores the next revision on top of it before the confirmation;
observeLedger then re-reads and returns the newer state, and nothing is
attributed twice. A ledger read that lands between the two commands of a token
write (last-write time, then the increment) leaves those tokens pending for the
next rise instead of absorbing them. Both interleavings are now tests.

The ledgerCommit contract says that false on Redis does not mean the state was
not stored, and the write guard refuses a key entry with a negative part or
watermark, so the write guard and the read filter are one rule.
2026-11-20 07:28:01 -03:00
diegosouzapw
8f5539151f docs(api): say what the quota view shows, exactly 2026-11-20 07:26:28 -03:00
diegosouzapw
56d48d5663 fix(api): limit account bars to connections the key may use 2026-11-20 07:22:08 -03:00
diegosouzapw
cbc789305b fix(quota): keep a key's watermark when its token counter cannot be read 2026-11-20 07:20:00 -03:00
diegosouzapw
dff04a8134 test(api): run the quota view end to end on real rows 2026-11-20 07:17:14 -03:00
diegosouzapw
db3268a0a7 fix(quota): mark unreported Bailian windows without changing combo scoring 2026-11-20 07:15:32 -03:00
diegosouzapw
18bd13725f fix(quota): keep the percent attribution book behind both quota stores 2026-11-20 07:08:30 -03:00
diegosouzapw
3b9f28d8e4 fix(db): refuse unusable numbers at the attribution book's storage boundary 2026-11-20 06:52:52 -03:00
diegosouzapw
5b4efabf48 test(api): type the injected key store in the self-service gate test 2026-11-20 06:50:38 -03:00
diegosouzapw
d0e38ce62b docs(api): tighten the self-service quota API wording and pin its headers 2026-11-20 06:45:59 -03:00
diegosouzapw
32e98b5e09 refactor(api): keep the self-service gate fixed and inject only its key store 2026-11-20 06:44:27 -03:00
diegosouzapw
348cce66b1 docs(api): describe QUOTA_SELF_PANEL by what this change delivers 2026-11-20 06:43:09 -03:00
diegosouzapw
d02754eba2 fix(quota): keep the attribution book valid when a token counter is not a usable number 2026-11-20 06:40:55 -03:00
diegosouzapw
3ca0d8f761 fix(quota): never read a plan window the provider did not report, and date readings by their data 2026-11-20 06:39:11 -03:00
diegosouzapw
84063acff2 feat(api): add GET /v1/me/quota/{provider} for API key holders 2026-11-20 06:30:50 -03:00
diegosouzapw
df635413f2 fix(db): add the tables and retention of the percent attribution book 2026-11-20 06:25:02 -03:00
Naresh
f6b93c3540 fix(oauth): support GHE data residency copilot_internal/user fallback 2026-11-20 14:54:48 +05:30
diegosouzapw
b80a5f08d4 test(api): pin unknown block state when the quota store fails to load 2026-11-20 06:17:21 -03:00
diegosouzapw
fc8d36b97c fix(quota): add the state transition of the percent attribution book 2026-11-20 06:15:44 -03:00
diegosouzapw
28283eda0b fix(api): warn once when the public API origin setting is not an http(s) origin 2026-11-20 06:12:58 -03:00
diegosouzapw
4df35faf05 refactor(api): share one quota-store load between the quota view builders 2026-11-20 06:12:40 -03:00
diegosouzapw
98d5387cd0 fix(quota): expose the plan-window reading behind the saturation cache 2026-11-20 06:12:03 -03:00
Diego Rodrigues de Sa e Souza
6d03588cb9 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 06:10:16 -03:00
Diego Rodrigues de Sa e Souza
0c64e2aa0c Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 06:10:15 -03:00
diegosouzapw
b15c7b443a feat(api): report the public API origin to key holders 2026-11-20 05:57:42 -03:00
diegosouzapw
25d2aafc56 feat(api): report schedule windows and per-model caps in the self-service quota view 2026-11-20 05:48:57 -03:00
diegosouzapw
523ef28ded test(api): give the default-lookup test its own data directory 2026-11-20 05:43:17 -03:00
diegosouzapw
a5233debd8 test(api): run the quota view's default account lookup against a fresh cache 2026-11-20 05:36:37 -03:00
diegosouzapw
cf97c2b9ee fix(api): keep operator-named windows out of the quota view and flag reset readings
Model windows are listed only for providers with a plan-window mapping
(claude, anthropic, codex), whose other cache keys are model or surface
names. Other providers can key their cache by operator-chosen names or
upstream key and limit ids, so their model windows are now empty.

A cached reading whose reset time is already before the view's clock is
reported as stale, with its numbers kept. The builder now receives that
clock from the view.

A failed account lookup is still reported as unavailable, and now leaves
a warning in the server log.
2026-11-20 05:36:23 -03:00
diegosouzapw
840ff8ff8f feat(api): add per-account percent windows to the self-service quota view 2026-11-20 05:20:28 -03:00
diegosouzapw
3290609d6e test(api): pin that the quota view never carries another key's id 2026-11-20 05:15:09 -03:00
diegosouzapw
2930fdbb4c feat(api): build the self-service quota view for a key's pools 2026-11-20 05:08:06 -03:00
diegosouzapw
aded94e9bb docs: describe percent-plan attribution in quota share 2026-11-20 05:06:03 -03:00
diegosouzapw
7f37df27cb fix(api): make the pool ref input unambiguous and pin nested stripping 2026-11-20 05:00:11 -03:00
diegosouzapw
19cc54d9cd docs(quota): drop a reference to a removed constant 2026-11-20 04:56:53 -03:00
Diego Rodrigues de Sa e Souza
bb417eb1fb Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 04:53:50 -03:00
Diego Rodrigues de Sa e Souza
15a524d68f Merge branch 'release/v3.8.55' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 04:53:49 -03:00
diegosouzapw
7f17d1e52e feat(api): define the self-service quota contract and the opaque pool ref 2026-11-20 04:52:03 -03:00
Chirag Singhal
70fad90bd0 chore(changelog): add copilot English output fix fragment 2026-11-20 13:02:09 +05:30
Chirag Singhal
1e8823b7c5 fix(copilot): translate Spanish system prompt and help text
Translate the copilot system prompt, help response, knowledge examples, and create-combo guidance from Spanish to English. Keep the multilingual input-matching regexes so Spanish-speaking users are still classified correctly. Add a unit test that pins English output and the preserved matchers.
2026-11-20 13:00:46 +05:30
Diego Rodrigues de Sa e Souza
6e9f26d725 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 03:28:52 -03:00
Diego Rodrigues de Sa e Souza
8b91fd1ce7 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-20 03:28:51 -03:00
diegosouzapw
850f8e42d4 Merge commit '6a5dadd172195d2e1b39c6904f8f12af32192c91' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 03:27:36 -03:00
diegosouzapw
e8e2af304a Merge commit '4624250231f49ed118fb4522a9d735e4894322c6' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 02:22:53 -03:00
Diego Rodrigues de Sa e Souza
981285b1eb Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 01:57:14 -03:00
diegosouzapw
17293dfef7 Merge commit 'bd9b1324abb82f0e00066f631b6dd7744e5d975a' into fix/qg-mcp-a2a-toggle-readiness-20261120 2026-11-20 01:31:15 -03:00
diegosouzapw
401c55d26d refactor(api): extract the quota key model listing into a shared helper 2026-11-20 01:25:42 -03:00
diegosouzapw
d1e2315ecf refactor(quota): drop the unreachable percent fallback in the countable path 2026-11-20 01:24:59 -03:00
diegosouzapw
47760293e4 fix(api): report per-key percent attribution in the pool usage snapshot 2026-11-20 01:20:35 -03:00
diegosouzapw
ff18b6a7c2 fix(api): drop the address lockout from the self-service auth gate 2026-11-20 01:17:32 -03:00
Bl0ck154
01781da04c chore(upstream): reconcile Terra catalog with current release branch
Additive merge of cheaper-inference/OmniRoute release/v3.8.55; retain upstream's equivalent VS Code Terra effort recognition and keep provider catalog changes focused. Upstream's existing translated-doc whitespace is outside the PR delta.
2026-11-20 06:13:15 +02:00
Jacky Fong
a1ca8e9111 fix quality gates 2026-11-20 12:12:16 +08:00
diegosouzapw
1def86501e fix(quota): enforce per-key shares on percent quota plans 2026-11-20 01:05:23 -03:00
diegosouzapw
516c76684b feat(api): add QUOTA_SELF_PANEL flag and the self-service auth gate 2026-11-20 01:00:40 -03:00
diegosouzapw
9da1cb28aa fix(quota): fail open silently in percent attribution and guard the pool id on both stores 2026-11-20 00:48:06 -03:00
diegosouzapw
480c40c98e test(ui): synchronize MCP and A2A toggle fixtures 2026-11-20 00:37:15 -03:00
diegosouzapw
763541c5b5 fix(quota): read and write the percent shadow bucket on both quota stores 2026-11-20 00:35:23 -03:00
diegosouzapw
ae5f673c91 fix(quota): add the percent-plan attribution split for quota share 2026-11-20 00:26:11 -03:00
diegosouzapw
fa084e324f fix(api): refuse dot-segment paths on the API-only port 2026-11-20 00:10:11 -03:00
Diego Rodrigues de Sa e Souza
0ff88fa7b9 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-20 00:04:36 -03:00
Diego Rodrigues de Sa e Souza
6e82b457ed Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-20 00:04:35 -03:00
diegosouzapw
04f84e859c fix(dashboard): keep copilot-m365-web first in providerSupportsOAuth (#20573)
Restructure the keychain-only exclusion so the copilot-m365-web branch stays
the first, unconditional operand (copilot-m365-web is never keychain-only).
Same behaviour; keeps the m365-native-catalog-auth source contract.
2026-11-19 23:34:46 -03:00
Diego Rodrigues de Sa e Souza
2493e493c7 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 23:14:20 -03:00
Diego Rodrigues de Sa e Souza
f64643f540 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 23:14:20 -03:00
Diego Rodrigues de Sa e Souza
07024bc8ae Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 20:30:10 -03:00
Diego Rodrigues de Sa e Souza
27ffdecfb7 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 20:20:12 -03:00
serenity
b7e971ff97 fix(routing): cache a bare-model lookup only under the version it was read at
A catalog write can land while the lookup awaits, and a concurrent lookup can
then move the cache to the new version before this one stores its result.
Store the providers only when the model-catalog version is still the one
captured before the query, so a pre-write answer is never kept under the
post-write version.
2026-11-19 20:02:07 -03:00
diegosouzapw
22fa1077a1 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 19:24:10 -03:00
diegosouzapw
8c91d2f836 test(catalog): align synced-row body contract with #20415 (no placeholder context_length) 2026-11-19 18:57:36 -03:00
Diego Rodrigues de Sa e Souza
673b7b7920 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 18:56:30 -03:00
diegosouzapw
bd588469ae refactor(backup): extract schedule tick helpers to satisfy complexity ratchet (#20494) 2026-11-19 18:51:39 -03:00
Diego Rodrigues de Sa e Souza
d8f7fc2d1c Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 18:41:51 -03:00
Minxi Hou
d5ea56822e providers/oauth: sync models when a connection is created
A provider whose catalog is authoritative only advertises the models its
account returned on the last sync. A connection added through OAuth therefore
stayed active with an empty catalog until the six-hour scheduler reached it, and
every request for a model only that account has failed with "not available in
the active live catalog" until someone pressed sync by hand.

Both create paths now hand the connection to one shared trigger. Eligibility is
the scheduler's own predicate, so antigravity and agy connections qualify on
their default autoSync while API-key providers keep their explicit
autoFetchModels opt-in. The sync goes through the same loopback helper as the
scheduler, keeps the import semantics the API-key path had, and runs at most
once per connection per five minutes so a single sign-in cannot fire one sync
per path it touches.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
2026-11-19 15:15:42 -05:00
Diego Rodrigues de Sa e Souza
ed369ab631 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 17:06:49 -03:00
Diego Rodrigues de Sa e Souza
d61cb3d779 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 17:03:20 -03:00
Diego Rodrigues de Sa e Souza
7c7b65cc4f Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 16:37:57 -03:00
Diego Rodrigues de Sa e Souza
afb71db50a Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 15:25:05 -03:00
Diego Rodrigues de Sa e Souza
f463a50c92 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 15:25:03 -03:00
Diego Rodrigues de Sa e Souza
660abd192e Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 14:41:48 -03:00
Abhishek Divekar
0aacc3d654 docs(api): scope no-log header to every chat-family route
The header is read from clientRawRequest.headers in chatCore, which every route built on handleChat reaches: Chat Completions, Responses, Messages, Completions and the Gemini-compatible path. The previous wording limited it to chat and Responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 22:33:25 +05:30
Abhishek Divekar
e3e93d7287 docs(api): scope no-log header to chat and Responses
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 22:33:25 +05:30
Abhishek Divekar
441ac64b73 fix(api): drop prompt-derived usage context for header no-log
Resolve the effective no-log decision before agent-context extraction and pass it to resolveUsageAgentContext. A normal key sending x-omniroute-no-log: true now drops prompt-derived projectPath, gitBranch and path-derived projectName from usage attribution while keeping explicit header identifiers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 22:33:25 +05:30
Abhishek Divekar
fbe200d813 docs(changelog): add fragment for per-request no-log header
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 22:33:25 +05:30
Abhishek Divekar
8e60d2af75 feat(api): add per-request no-log header
Add x-omniroute-no-log as a per-request opt-out of call-log payload persistence. The header is ORed with the API key's no_log flag; the call log row keeps timestamp, model, status, duration and token counts, while request/response bodies, summaries and pipeline artifacts are omitted.

The header is stripped from executor client headers so it never reaches an upstream provider. Memory extraction and the semantic cache remain separate opt-outs (x-omniroute-no-memory / x-omniroute-no-cache).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 22:33:25 +05:30
Jacky Fong
55e72bc7e9 Change the Studio API key to "Studio" to avoid confusion on "FREE" plan_name 2026-11-20 00:23:51 +08:00
Diego Rodrigues de Sa e Souza
dc6d977d93 Merge branch 'release/v3.8.55' into chore/derived-qg-reviewed-combo-skill-20261119 2026-11-19 13:21:15 -03:00
Diego Rodrigues de Sa e Souza
da6ebce463 Merge branch 'release/v3.8.55' into fix/qg-release-acceptance-live-20261119 2026-11-19 13:06:33 -03:00
diegosouzapw
750e3cf4c6 fix(memory): skip a failing rerank model during a backoff window (#20535) 2026-11-19 12:51:21 -03:00
diegosouzapw
3eefe55eec fix(dashboard): stop Zed 'Add' from opening a dead-end OAuth modal (#20573) 2026-11-19 12:35:00 -03:00
diegosouzapw
1a1db0f7e9 fix(guardrails): log chat injection-guard blocks and name the matched rule ids (#20526) 2026-11-19 11:53:19 -03:00
diegosouzapw
5f2573a22d fix(ci): validate explicit routes and path parameters in OpenAPI 2026-11-19 11:31:55 -03:00
diegosouzapw
cac1cae3bd chore(docs): reconcile reviewed skills with the current release base 2026-11-19 11:25:04 -03:00
diegosouzapw
c99b06a882 fix(ci): bind shadow acceptance to the real checkout 2026-11-19 11:23:08 -03:00
diegosouzapw
09a914a133 docs(skills): synchronize reviewed VS Code combo routes 2026-11-19 10:36:47 -03:00
Timo Otten
a6ef3f5225 style(tests): apply Prettier to the zed-hosted tool-prefix regression test 2026-11-19 08:45:20 -03:00
diegosouzapw
33bd232991 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 08:31:29 -03:00
Praveen K Palaniswamy
9aa9b27457 test(images): import the combos module before the first Leonardo edit test
check:test-tla-order rejected the top-level await placed between test() calls:
under --test-force-exit the later tests can silently never run (#18045). Move
the combos.ts import up with the other top-level imports.
2026-11-19 08:20:50 -03:00
Stanley Tejakusuma
50dfb9d0d8 fix(sse): treat a withheld terminal as unseen until it is delivered
Address review of the empty-stream hold-back:
- mark the client terminal seen only when it reaches the client, so a client
  that leaves while it is withheld is recorded as a disconnect, not a completion
- skip the hold for a permitted empty turn so it is not delayed by the grace
- stop judging the upstream end after the client has left
- cover reasoning-only length, content_filter, empty-argument tool calls,
  Claude tool_use without input deltas and Responses function calls
2026-11-19 18:16:55 +07:00
diegosouzapw
a8d10a4a89 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 08:11:34 -03:00
diegosouzapw
5dbfad9be4 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 08:08:53 -03:00
Stanley Tejakusuma
70a0fab2a6 docs(sse): clarify the held-terminal grace comment 2026-11-19 17:57:11 +07:00
diegosouzapw
ab3bac1341 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:53:06 -03:00
Stanley Tejakusuma
ae003e3106 fix(sse): deliver the empty-stream error before the client terminal
An upstream stream that ends with no content was detected (#8649) only once
the reader reported done, so the translated terminal (data: [DONE],
message_stop, response.completed) had already reached the client and the
error frame landed behind it. The openai SDK stops at [DONE], so Pi recorded
an empty but successful finish_reason: stop and never retried.

Withhold a self-contained terminal while the stream still looks empty and
release or drop it once the stream is judged. A keep-alive upstream that
stays open after its terminal gets it released after a 1 s grace, exactly
as before.
2026-11-19 17:49:29 +07:00
diegosouzapw
fc0c4497a6 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:46:52 -03:00
diegosouzapw
90ebc88688 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:39:59 -03:00
diegosouzapw
4af29a4213 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:31:47 -03:00
diegosouzapw
668c18fed3 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:30:40 -03:00
sdfsdfw2
0a94768e38 style(dashboard): apply prettier to the banned keywords card and its test 2026-11-19 07:26:46 -03:00
diegosouzapw
34528b6f0c Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:25:34 -03:00
diegosouzapw
7cdaaddf62 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 07:17:26 -03:00
diegosouzapw
346c841505 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 06:52:03 -03:00
diegosouzapw
f339db01bc Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 06:39:30 -03:00
Tomas Fecko
c4a4f5e4d6 refactor(sse): move preflight window warnings into a helper
preflightQuota grew past the 80-line function cap once the expired-window
skip landed, which tripped the new-code complexity ratchet. The per-window
warning loop now lives in warnApproachingWindowCutoffs; behavior is unchanged.
2026-11-19 06:34:43 -03:00
diegosouzapw
cfbad7a0e3 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 06:23:18 -03:00
diegosouzapw
1b23c92de4 fix(providers): keep the stored Codex catalog when a degraded discovery returns a shorter list (#16714) 2026-11-19 06:22:07 -03:00
diegosouzapw
3643900d93 fix(pwa): restore English name and description in the PWA manifest (#20504) 2026-11-19 06:09:20 -03:00
Edo Sulai
7475d0cdcd fix(claude-web): ignore unhandled stream events gracefully
Anthropic Web periodically introduces new telemetry or metadata SSE events.
Previously, unexpected event types triggered an immediate fatal protocol
error in dispatchProtocolEvent, aborting the active text stream.
This changes unhandled events to fail open by returning null, allowing
the text stream to continue uninterrupted.
2026-11-19 16:07:30 +07:00
diegosouzapw
213be12dfa Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 06:06:47 -03:00
diegosouzapw
e71c4637d2 fix(backup): scheduled encrypted backups need and use --key-file (#20494) 2026-11-19 06:04:07 -03:00
diegosouzapw
638cc4de86 fix(catalog): do not advertise passthrough provider default as context_length (#20415) 2026-11-19 05:51:26 -03:00
diegosouzapw
039bfcf2b1 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 05:32:55 -03:00
diegosouzapw
41c6c72406 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 05:19:19 -03:00
diegosouzapw
9396d4e3c7 fix(providers): clamp Cohere reasoning_effort to high and learn its 422 wording (#20363) 2026-11-19 04:56:29 -03:00
diegosouzapw
03d3ca6d15 fix(providers): dedupe replayed Cloudflare Playground stream chunks (#18732) 2026-11-19 04:21:38 -03:00
Guan Gui
98a607305b docs(changelog): add fragment for #20581 2026-11-19 17:56:44 +11:00
diegosouzapw
0dcacf5e07 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 03:47:22 -03:00
diegosouzapw
efd935b29c Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 03:30:24 -03:00
Guan Gui
8072ca2feb fix(sse): copy Claude passthrough blocks before hoisting system messages
A combo replays the caller's request body on its next target, and
buildClaudePassthroughBody only shallow-copies it. Hoisting a marked
system/developer message moves its cache_control onto the preceding block
in place (#9436), so that block stays marked in the shared body. On the
next target the hoisted marker can't move again and is kept, and the
request carries 5 cache_control blocks, which Anthropic rejects: "A maximum
of 4 blocks with cache_control may be provided. Found 5."

Copy the blocks once, before any rewrite, instead of only before the
marker-less breakpoint injection.
2026-11-19 17:24:26 +11:00
Bl0ck154
75535a76a5 style(tests): restore Prettier 3.9 formatting of image route imports 2026-11-19 02:41:17 -03:00
diegosouzapw
e73695c4f8 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 02:34:01 -03:00
diegosouzapw
941ae91f12 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 02:25:04 -03:00
xiaoyaner0201
37f28cbfb7 fix(combo): keep every unit's status when an earlier reason carries a credential label
Each unit's reason was sanitized on its own and then the joined message was
sanitized again as a whole. The sanitizer redacts a credential label fail-closed,
so the second pass matched an already-redacted "Password: [REDACTED]" and cut
that unit's status and every later unit from the terminal message.

Sanitize the unit label on its own as well and stop re-sanitizing the joined
message: every upstream-derived part is already sanitized and the rest is fixed
text. Adds a RED->GREEN test.
2026-11-19 02:00:32 -03:00
diegosouzapw
92c289d042 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 01:57:22 -03:00
xiaoyaner0201
d720f0e6d8 fix(db): read, merge and write a reasoning rule update in one tick
update() awaited findById() between reading the row and running the
UPDATE, so two overlapping updates of the same rule could both read the
same base row and the second write dropped the first caller's fields.
Read the row synchronously so the read, merge, reference check and write
cannot interleave.
2026-11-19 01:53:45 -03:00
diegosouzapw
8d1f89789a Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 01:46:17 -03:00
diegosouzapw
33237e2c6c Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 01:43:27 -03:00
serenity
fce14fe8b4 fix(plugins): treat an in-place onRequest body rewrite as a rewrite
A hook that replaces a top-level body property in place and returns the same
object was remembered as a pass-through, so a failover attempt that got its
own top-level copy of the body skipped the hook and lost the rewrite. The gate
now compares the body's top-level property references before and after the
hook and only remembers an unchanged body. The changelog fragment states the
cases that still call the hook again.
2026-11-19 01:19:17 -03:00
serenity
cd5ef453ea docs(changelog): number the fragment (#20245) 2026-11-19 01:19:09 -03:00
Kiaro-Sama
19e08a4492 docs(changelog): format Anthropic fix as a bullet 2026-11-19 07:48:45 +03:30
serenity
67713adb33 fix(translator): copy the Claude content block whose tool id Pass 1.4 rewrites
prepareClaudeRequest sanitized tool_use / tool_result ids in place, so a
Claude-format caller block (shared with later combo targets) lost its
original id. The rewritten block is now a copy. The id assertion of the
normalized-values test no longer accepts a missing id coerced to a string.
2026-11-19 01:18:38 -03:00
diegosouzapw
8687b146ca Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 01:08:30 -03:00
serenity
c0cbf22446 fix(usage): keep Command Code extra credits out of the monthly-cap usage
With a known plan cap, used was cap minus ALL remaining credits, so purchased or
free credits hid an exhausted monthly allowance (used=0, 100% left). Used now
follows the monthly pool only; the extra credits still extend the total so the
account stays spendable for quota preflight.
2026-11-19 00:45:30 -03:00
diegosouzapw
6858939017 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 00:36:41 -03:00
diegosouzapw
09cbb1a389 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 00:36:03 -03:00
serenity
f682521dc5 test(command-code): isolate the default CLI version check from COMMAND_CODE_VERSION
COMMAND_CODE_VERSION is a supported override read at module load, so a developer
environment that sets it made the default-version assertions fail. Clear it before
the per-process import.
2026-11-19 00:32:08 -03:00
diegosouzapw
6cd6138ea5 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-19 00:23:48 -03:00
serenity
00e66d2c3e fix(responses): keep a placeholder message when skipped items leave none
An input of only a replayed image_generation_call is skipped item by item,
which left messages:[] and an upstream 400. Apply the empty-input placeholder
after conversion too, when no message survived.
2026-11-19 00:12:21 -03:00
serenity
4e94e65c65 fix(admission): honour the route's queueMs in the structural stage and close the test DB
- withChatAdmission passed CHAT_ADMISSION_QUEUE_MAX_MS to admitChatStructure
  even when the route set queueMs, so queueMs 0 could still wait and admit a
  busy request. The structure stage now gets the same wait as the byte stage
  (regression test: a lease freed during the wait is not taken).
- The structure test drains the call-log writes and resets the DB handle.
2026-11-18 23:58:59 -03:00
serenity
1e7c336c7b fix(qoder): count an image nested in a Claude tool_result as image input
hasQoderImageParts only read top-level content parts, so a Claude request whose
only image sat inside a tool_result (and that declared no tools) did not require
the HTTP transport, and selection could pick a PAT connection.
2026-11-18 23:54:49 -03:00
diegosouzapw
6241ac2524 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 23:51:15 -03:00
Dizzle
6e86273249 fix(syntx): report failed media reference uploads with explicit status
A data URL that could not be decoded or an upload that was rejected was silently dropped and generation continued without the reference; both now return an explicit 400 or 502 and the new cases fail without the change.
2026-11-19 03:45:00 +01:00
diegosouzapw
f3f689c269 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 23:43:38 -03:00
serenity
1b2a4152d0 fix(skills): inject no cached skill when the registry load fails
A failed loadFromDatabase leaves the previous load's entries in the registry,
and the request then advertised them through injectSkillsWithMetadata, so a
removed or changed skill could still reach the model. The request now skips
custom-skill injection after a failed load; client and memory tools stay as
they were.
2026-11-18 23:42:18 -03:00
diegosouzapw
81e6ee6983 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 23:30:00 -03:00
serenity
5eba15a417 fix(translator): keep Gemini 2.5 Pro thinking and Kiro orphan tool errors
- claude-to-gemini: an enabled numeric budget_tokens keeps its priority over
  output_config.effort "none", and Gemini 2.5 Pro (which cannot switch
  thinking off and answers 400 to a zero budget) keeps its upstream default.
  The existing gemini-2.5-pro effort=none test goes back to its base form.
- openai-to-kiro: a failed tool result whose tool call is missing from the
  history keeps the [tool_error: true] line when the builder turns it into
  text, since the status field is dropped with toolResults.
2026-11-18 22:53:04 -03:00
serenity
ebf4ee4ba1 fix(a2a): abort a task's signal when the TTL cleanup fails it
cleanupExpired marked an expired task failed and dropped its controller
without aborting it, so a running smart-routing fetch kept going until its
own timeout. Covered by a failing-then-passing fake-timer test.

Also clear OMNIROUTE_PORT (and restore the port env afterwards) in the
exact config-status test, which expects the default port.
2026-11-18 22:48:51 -03:00
diegosouzapw
31d443937b Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:45:27 -03:00
serenity
db60bd3aea docs(security): spell out the CCH hash-view replacements
Name the two hashView() patterns in order and note that the model
pattern stops at the first quote, so an escaped quote in a model value
is emptied only up to it, as the captured client does.
2026-11-18 22:42:00 -03:00
serenity
8e72d9176a fix(sse): skip the stripped proxy_ alias when a declared tool matches it in any case
The stream restorer matches tool names case-insensitively, so a search alias
for a declared proxy_search renamed an upstream SEARCH (a declared tool) to
proxy_search. Add the alias only when no declared name equals the stripped
name ignoring case.
2026-11-18 22:41:28 -03:00
diegosouzapw
62e876f89d Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:38:15 -03:00
diegosouzapw
f7637eea68 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:38:07 -03:00
serenity
610fbaac81 fix(security): budget the encoded-injection decode in bytes, not candidates
A count of 64 candidates let short decoy hex runs placed first use up the
budget, so a base64-encoded instruction after them was never decoded.
Budget decoded bytes instead, sized above what the 16 KB scan text can
produce over both layers, so no candidate is skipped. Covered by a
failing-then-passing decoy test plus a cost test for a text packed with
readable encoded runs.
2026-11-18 22:34:52 -03:00
diegosouzapw
2f6cfeadc2 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:31:31 -03:00
serenity
2493627c32 test(cache): drive a content_filter stream through the assembler into the store
The store guard test fed content_filter straight into the assembled body.
Push a passthrough content_filter stream and a translated Claude refusal
through the real stream assemblers and check the assembled body keeps the
reason and the streaming store refuses it.
2026-11-18 22:18:41 -03:00
diegosouzapw
71462bb859 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:18:03 -03:00
diegosouzapw
b5ab2b23b3 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:17:44 -03:00
serenity
84b3a39598 fix(codex): end the app-server turn when the event backlog overflows
A push that overflows the AsyncEventQueue backlog throws from the socket
notification and tool-call callbacks, outside run()'s catch. The error
escaped as an uncaught exception and the consumer waited for a terminal
event that never came. Route those pushes through a guard that pushes a
terminal error, closes the queue and settles the turn.
2026-11-18 22:07:43 -03:00
serenity
47a79fcba0 fix(gemini): keep the prose before a joined textual tool call
The joined-text retry cleared all accumulated text once it found a
[Tool call: ...] marker, so a reply such as "Let me check.\n[Tool call: x]
Arguments: {...}" kept the call but lost its preface. Return the text
before the marker from tryParseTextualToolCall and keep it as content.
2026-11-18 22:07:12 -03:00
diegosouzapw
e4ec4a15df Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 22:04:35 -03:00
diegosouzapw
18c91c9284 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 21:52:26 -03:00
Kiaro-Sama
b378f6cdf6 docs(changelog): number Anthropic target fix fragment 2026-11-19 01:48:51 +03:30
Kiaro-Sama
f2ffd482d2 fix(sse): keep max_tokens for Anthropic Messages targets 2026-11-19 01:47:58 +03:30
Afonso Dutra Nogueira Filho
db8e10356c fix(stream): arm the post-tool retry only for the latest turn's tool results
requestFollowsToolCalls() searched the whole history, so a tool exchange
that the assistant had already answered armed the buffered empty-turn
retry on every later follow-up and cost those turns incremental
streaming. Walk back from the newest entry and stop at the latest
assistant turn (assistant message, Responses function_call, Gemini model
turn): only tool results after it make the request a post-tool
continuation. A user or system note appended after the tool results
still counts. Covers all four client formats with negative and positive
cases (#20092).
2026-11-18 19:04:46 -03:00
diegosouzapw
f903dcf606 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 18:35:55 -03:00
ggdayup
68b0707532 fix(pricing): price Vertex Gemini 3 Flash, 2.5 Pro and 2.5 Flash Lite at their own rates
The new vertex default rows copied Pro rates onto gemini-3-flash-preview
($2/$12 instead of $0.50/$3), used a flat $2/$12 for gemini-2.5-pro
(Google bills $1.25/$10 up to 200K prompt tokens and $2.50/$15 above),
and set the 2.5 Flash Lite cached-input rate to $0.025 instead of $0.01.
Add the long_context tier for 2.5 Pro and a test that pins the rows.
2026-11-18 18:27:16 -03:00
diegosouzapw
6609bd451c Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD 2026-11-18 18:16:58 -03:00
Safeer Ahmad
b871c0747d style(antigravity): format the conversation session-id test with Prettier 2026-11-18 14:19:11 -03:00
diegosouzapw
b36604bf08 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD
# Conflicts:
#	open-sse/handlers/chatCore.ts
2026-11-18 14:07:32 -03:00
Bl0ck154
ff254bf503 chore(upstream): integrate current v3.8.55 security fixes for PR #19667 2026-11-18 19:04:23 +02:00
Bl0ck154
c026fbd391 chore(upstream): integrate current v3.8.55 security fixes for PR #19890 2026-11-18 19:04:11 +02:00
diegosouzapw
a9b7506a16 Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD
# Conflicts:
#	package-lock.json
#	package.json
2026-11-18 13:09:44 -03:00
diegosouzapw
8f5ad95a1f Merge remote-tracking branch 'origin/release/v3.8.55' into HEAD
# Conflicts:
#	package-lock.json
2026-11-18 10:49:44 -03:00
Afonso Dutra Nogueira Filho
a875abad85 Merge commit 'bc4b0c5f5190d4bf64be616225e2a4403ede6492' into fix/20092-empty-post-tool-continuation 2026-11-18 09:42:59 -03:00
bufftop25
f4eae2131b fix(auth): maintain OAuth tokens for inactive connections during background health check 2026-11-18 08:29:28 -03:00
xiaoyaner0201
10ff8372b2 chore(changelog): name the nested combo fragment after PR 20507 2026-11-18 18:40:42 +08:00
Chirag Singhal
ef02c75394 test(cli-runtime): satisfy no-explicit-any lint rule 2026-11-18 10:26:40 +00:00
Chirag Singhal
93327176d3 test(cli-runtime): cover claude healthcheck slower than 4s 2026-11-18 09:14:56 +00:00
xiaoyaner0201
a27e40fde7 fix(combo): redact connection ids before capping each unit's reason
The per-unit 300-char cap ran before connection-id redaction, so a UUID or
long hex id cut in half at the cap no longer matched and leaked most of its
characters. Redact first, then cap. The opencode free-tier label is now
decided on the full reason, so a signal past the cap keeps its label, and
the cap no longer leaves half of a surrogate pair.
2026-11-18 16:23:08 +08:00
Chirag Singhal
b9cff981a2 fix(cli-runtime): raise Claude CLI healthcheck timeout for Windows 2026-11-18 07:10:01 +00:00
xiaoyaner0201
892479ab70 fix(combo): keep every unit's reason when an earlier reason is multi-line or long
Each unit's reason is now collapsed to one line, sanitized on its own and capped
at 300 characters before the reasons are joined. The joined message is still
sanitized as a whole, but that pass keeps only the first line, caps at 4096
characters and treats a path span as running to the end, so a raw HTML 502 page,
a multi-line upstream error or an oversized body in an early unit used to hide
every later unit's reason.

Also split the terminal-body guards out of withRuntimeUnitOutcomes to keep it
under the complexity ratchet, and use neutral model names in the tests.
2026-11-18 13:26:14 +08:00
Kizuno18
3b2794e9b5 style(test): prettier on the Speechmatics provider test 2026-11-18 00:19:57 -03:00
Kizuno18
5e93b7d959 fix(audio): send Gladia uploads as "audio" and give Speechmatics a language
Both batch STT adapters fail on every real request:

- Gladia's /v2/upload reads the file from the "audio" multipart field.
  The adapter used the helper's default "file" field, so Gladia answered
  400 "Invalid parameter(s)" with validation_errors ["Missing audio file"]
  before any job was submitted.
- Speechmatics rejects a job config without transcription_config.language
  ("Job config JSON is invalid ... missing property 'language'"). The
  adapter sent only operating_point. It now passes the request's
  `language` field and falls back to "auto" (language identification).

The Gladia test mock now rejects uploads without the "audio" field, as the
live API does, and new Speechmatics tests check the submitted job config.
Both fixed request shapes were checked against the live APIs.
2026-11-18 00:18:18 -03:00
Dizzle
ac46104a48 fix(providers): accept keyless connections for providers marked optional in the registry
keyless providers declared optional in the registry were rejected by the connect form and API
2026-11-18 04:06:07 +01:00
serenity
51a6de526c refactor(shared): split provider index build and encoded-layer decode into helpers 2026-11-17 19:34:50 +03:30
serenity
cea9cc1a8a Merge release/v3.8.55 into this branch 2026-11-17 19:30:20 +03:30
serenity
c9445cfdf9 test(plugins): hoist the top-level await above the first test in the onRequest once-per-request suite 2026-11-17 19:01:07 +03:30
serenity
1feb352c2c Merge release/v3.8.55 into this branch 2026-11-17 18:59:44 +03:30
xiaoyaner0201
ac530de16b fix(combo): list every failed unit's reason when a nested combo fails
executeRuntimeUnitCombo returned only the last unit's response when every
unit failed. An earlier unit's real reason (an empty reply rejected by
quality validation, an HTTP 500) was dropped, so a last unit that was only
skipped before dispatch ("Model X is unavailable") became the only error
the client saw.

Record a {model, status, error, kind} entry per failed unit, mark the
loop's own pre-dispatch skips as kind "skipped", and when two or more
units failed rewrite the terminal error.message with formatComboOutcomes,
the same helper the flat attempt loop uses (#10314). Status, headers,
quota classification, diagnostics and the early-return paths (safety
stop, local pressure, client abort, protected priority target) are
unchanged; single-unit failures keep their exact message.
2026-11-17 22:22:16 +08:00
Bl0ck154
9fa9d49c2a refactor(codex-images): isolate bounded edit reference resolution helpers
Reduce PR #19667 new-code complexity without changing 16/128 input eligibility, serial SSRF-pinned fetching, the shared 20 MiB budget, cancellation, or request-shape errors. Keep the exact existing regression suite.
2026-11-17 11:46:42 +02:00
Bl0ck154
9983d081b7 chore(upstream): sync PR #19867 with active release/v3.8.55 2026-11-17 11:32:29 +02:00
Bl0ck154
1907e8310f chore(upstream): sync PR #19948 with active release/v3.8.55 2026-11-17 11:32:17 +02:00
Bl0ck154
768b4aea86 chore(upstream): sync PR #19949 with active release/v3.8.55 2026-11-17 11:32:06 +02:00
Bl0ck154
00f2a34c61 chore(upstream): sync PR #19950 with active release/v3.8.55 2026-11-17 11:31:56 +02:00
Bl0ck154
d1fa6a3611 chore(upstream): sync PR #19680 with active release/v3.8.55 2026-11-17 11:30:38 +02:00
Bl0ck154
f33c524eb5 chore(upstream): sync PR #19681 with active release/v3.8.55 2026-11-17 11:30:00 +02:00
Bl0ck154
e46f7b8c6a chore(upstream): sync PR #19890 with active release/v3.8.55 2026-11-17 11:28:55 +02:00
Bl0ck154
363219832e chore(upstream): sync PR #19667 with active release/v3.8.55 2026-11-17 11:28:43 +02:00
Bl0ck154
d59f97cb66 chore(upstream): sync PR #18738 with active release/v3.8.55 2026-11-17 11:26:55 +02:00
Bl0ck154
fc4b408ef7 chore(upstream): sync PR #19592 with active release/v3.8.55 2026-11-17 11:26:45 +02:00
Jacky Fong
0c0e627179 Merge branch 'cheaper-inference:release/v3.8.55' into feat/mistral-ai-quota 2026-11-17 11:07:38 +08:00
Praveen K Palaniswamy
36ed4d7e3a Merge remote-tracking branch 'upstream/release/v3.8.55' into feat/leonardo-image-edits
# Conflicts:
#	src/app/api/v1/images/edits/route.ts
2026-11-16 21:09:08 -05:00
serenity
d3141089e0 Merge release/v3.8.54 into this branch 2026-11-17 03:54:04 +03:30
serenity
0e228dabf5 Merge release/v3.8.54 into this branch 2026-11-17 03:37:36 +03:30
serenity
e492910c1d Merge release/v3.8.54 into this branch
# Conflicts:
#	open-sse/services/combo/promptCacheAffinity.ts
2026-11-17 01:59:56 +03:30
diegosouzapw
a9539085bd Merge main into release/v3.8.54 (generate-release 0a.0b back-merge) 2026-11-16 19:01:37 -03:00
Afonso Dutra Nogueira Filho
a0f418124b Merge commit 'e9c9f1dd84de6ca77cc35352709219e562a31c7f' into fix/20092-empty-post-tool-continuation
# Conflicts:
#	open-sse/handlers/chatCore/streamingTail.ts
2026-11-16 15:10:53 -03:00
serenity
bd14f5d70a docs(changelog): number the fragment (#20372) 2026-11-16 20:34:51 +03:30
serenity
e8882ba453 fix(plugins): run the onRequest hook once per client request
chat.ts calls handleChatCore again for each account-fallback attempt, and the
plugin onRequest gate ran inside handleChatCore, so a request that failed over
to a second account ran every onRequest plugin twice. A plugin that counts
requests (the rate limiter example in the plugin guide) counted a failover
twice and halved its real threshold; the shared 100 calls per second plugin
budget was spent twice too.

Remember a plain pass-through per client request (the headers snapshot that
chat.ts builds once) and per provider and model. A block or a body rewrite is
never remembered, so the next attempt still gets the plugin's answer, and a
caller without a headers snapshot is never remembered.

Finding: F-C3-33.
2026-11-16 19:45:26 +03:30
Tomas Fecko
7f3fe3228a fix(sse): release expired quota preflight windows 2026-11-16 14:01:18 +01:00
serenity
8d848a34f9 docs(changelog): number the fragment (#20351) 2026-11-16 16:10:53 +03:30
serenity
d224626a15 feat(qoder): add Sonus/Cantus static fallback model rows
The live /models catalog serves Sonus and Cantus under the opaque ids smodel and cmodel. The static registry listed neither, so those ids stopped resolving whenever the live catalog was unavailable. Add both rows (vision, reasoning, 180k max input); the live catalog still wins when it is reachable. They get no FREE_MODEL_BUDGETS twin: free-budget rows need audited evidence, so the free-catalog parity check now excludes the two static-only rows. Comparison-gap finding e0056.
2026-11-16 16:00:15 +03:30
serenity
cc64d40e80 docs(changelog): number the fragment (#20347) 2026-11-16 15:36:51 +03:30
serenity
535b0dfbf6 feat(usage): resolve Command Code short plan ids and credit caps
The /alpha/billing endpoints can report short plan ids (go, go-v1, goat, pro, pro-v1, provider, max, ultra, teams-pro) and every known plan has a fixed monthly credit cap. The usage fetcher knew only the long individual- ids and derived the credits total from period spend, so a short id showed a raw name and a capped plan showed a nonsense total whenever the usage summary lagged the credit pools. Map the aliases to their canonical ids and, when a plan cap is known, report total=cap and used=max(0, cap-remaining). Unknown plans keep the spend-derived total. Comparison-gap finding e0053.
2026-11-16 15:26:12 +03:30
serenity
bc154887f2 docs(changelog): number the fragment (#20346) 2026-11-16 15:25:44 +03:30
serenity
59d2d648b3 fix(command-code): align CLI-mimic headers with the official CLI 1.88.0
The /alpha/generate fallback and the API-key probe are the only paths that send CLI-mimic headers, and they still announced version 1.15.1 with x-cli-environment: external and no x-cli-surface, matching a CLI profile the upstream retired long ago. Align them with the current CLI 1.88.0 wire format (x-cli-environment: production, x-cli-surface: cli) through one shared buildCommandCodeCliHeaders helper used by both call sites; the chat path is unchanged. The COMMAND_CODE_VERSION override still wins. Comparison-gap finding e0003.
2026-11-16 15:15:07 +03:30
Tomas Fecko
7ab0e30474 Merge release/v3.8.54 into feat/expiry-first-deadline-order
Conflict in src/sse/services/auth.ts (imports only): keep isExpiryFirstDeadlineOrder
from this branch and isWorkspacePolicyBudget429 from #19314.

expiry-first-combo-ordering case 8 (#17829) pinned the old reading of a lapsed
reset as maximally urgent. With this PR a lapsed weekly reset counts as a refilled
window rolled forward one period, so the expected score is 1/167 instead of 3.2.
2026-11-16 10:59:00 +01:00
Bl0ck154
d3fed13791 chore: reconcile Codex plan header PR with current release 2026-11-16 09:14:57 +02:00
Bl0ck154
22c5dfb464 merge(release): refresh PR #19680 on current upstream baseline 2026-11-16 09:14:37 +02:00
Leon Kolchinsky
cd83c2fd2b docs(changelog): add maintenance fragment for #20324 2026-11-16 15:19:42 +11:00
Leon Kolchinsky
3954292aad test(sse): pin rotated item_id text-snapshot dedupe across more stream shapes
Adds eight cases for the GitHub Copilot rotating item_id fix (#19218, #19575),
each asserting the concatenated delta.content equals the answer exactly once:
stable ids, a message at output_index 1 behind a reasoning item, two messages
with stable and with rotating ids, a lost final delta recovered once, a
completed-only snapshot, and two guards that a new message reusing an
output_index after its own output_item.added stays separate. Cases 2, 4, 5
and 8 fail on the code before #19575; all pass on release/v3.8.54.
2026-11-16 15:19:12 +11:00
Jacky Fong
d49c83e4a2 update review 2026-11-16 02:49:54 +08:00
Jacky Fong
bc7be7c441 Add Mistral AI quota display logic for vibe and api 2026-11-16 02:04:50 +08:00
serenity
b9f185407e Merge release/v3.8.54 into this branch
# Conflicts:
#	tests/unit/db-migrationrunner-constants-split.test.ts
2026-11-15 21:01:49 +03:30
serenity
f4153f2761 Merge release/v3.8.54 into this branch
# Conflicts:
#	tests/unit/db-migrationrunner-constants-split.test.ts
2026-11-15 21:00:45 +03:30
serenity
c84fb3e15f Merge release/v3.8.54 into this branch 2026-11-15 20:54:07 +03:30
serenity
f1851e85aa Merge release/v3.8.54 into this branch 2026-11-15 20:52:58 +03:30
serenity
8106c1f68b Merge release/v3.8.54 into this branch 2026-11-15 20:50:06 +03:30
serenity
2b026970c7 Merge release/v3.8.54 into this branch 2026-11-15 20:36:55 +03:30
serenity
65f8235907 Merge release/v3.8.54 into this branch 2026-11-15 20:35:37 +03:30
serenity
963db893b4 Merge release/v3.8.54 into this branch 2026-11-15 20:23:22 +03:30
serenity
270a1c8c94 test(translator): snapshot the messages in the #7293 no-op check
The "already-compliant strict-provider request is a no-op" test compared
translateRequest's output with the caller's own `messages` array. That held
only because translateRequest edited the caller's message objects in place:
the xiaomi-mimo reasoning placeholder (9router#1321) was added to the output
and to the caller's assistant message alike, so the two sides could never
differ. Once translateRequest copies the messages and leaves the caller's
alone, the output carries the placeholder and the caller's array does not, and
the comparison failed.

Take a structuredClone of the messages before the call and compare against
that. The hoist still has to leave the system and user turns and the order
untouched. The one expected difference is the placeholder on the plain
assistant turn, which xiaomi-mimo requires on a reasoning-cache miss and which
translator-xiaomi-mimo-reasoning-replay-1321 already pins. The assertion count
is unchanged.
2026-11-15 19:54:25 +03:30
serenity
c227adf93f fix(executors): keep the stream deadline merge off AbortSignal.any
mergeAbortSignals now returns AbortSignal.any so a merge that never aborts leaves no
listener on a long-lived combo or client signal. The two stream deadline paths
(createStreamDeadlineSignal and withDeadlineSignal) depended on the old plain-controller
merge: Node pins an AbortSignal.any composite in a module-level set while it carries an
abort listener, and those paths hand the merged signal to listeners that close over the
request. A request that completed without aborting then stayed reachable with its whole
wire body, and the stream-deadline-signal "does not pin a completed request" test failed
(0 of 50 requests collected).

Add mergeAbortSignalsUnpinned, the plain-controller merge with the same abort-reason
contract, and use it in those two request-scoped deadline paths. Executor merges keep
AbortSignal.any. Cover the new function in merge-abort-signals-no-abort-leak.
2026-11-15 19:54:08 +03:30
serenity
f99a5c97f6 test(responses): update precedence tests that pinned the bare-leaf namespace filter
responses-additional-tools.test.ts pinned the old behaviour that the
previous commit on this branch changes on purpose. In "Responses -> Chat
gives top-level tools precedence over namespaced members" and "Responses ->
Chat enforces explicit precedence within additional_tools" a flat `exec`
and a custom `exec` inside the `commands` namespace were expected to
produce only `["exec"]`. That held only because the filter compared the
member's bare leaf with the flat names. The Chat conversion qualifies the
member as `commands__exec`, so it is a different tool and must reach Chat.

Both tests keep their intent (an explicit tool wins on a real collision)
and now assert it on a real collision: a flat `commands__run` removes the
member `commands.run`, which has the same Chat wire name. They also assert
that `commands__exec` is kept next to the flat `exec`, and that it is
listed as a custom tool name. No assertion is removed.
2026-11-15 19:52:54 +03:30
serenity
6c9d9030a2 Merge release/v3.8.54 into this branch 2026-11-15 19:35:22 +03:30
serenity
55ef1c2b81 Merge release/v3.8.54 into this branch 2026-11-15 19:34:57 +03:30
serenity
8943ae1d13 Merge release/v3.8.54 into this branch 2026-11-15 19:34:57 +03:30
serenity
557404ea1e chore(db): convert the 240 migration to a timestamp name
#20169 froze the 001-241 series and 240 now belongs to
240_provider_node_custom_json_config.sql on release/v3.8.54, so the
numbering gate rejected this PR's 240_skills_unique_owner_name_version.sql
as a duplicate. Rename it with npm run db:new-migration (same description,
same SQL; the header no longer states a number) and add a
RENAMED_MIGRATION_COMPATIBILITY entry, so a database that ran a build of
this PR moves its 240 row to the new stamp instead of skipping
provider_node_custom_json_config. The entry sits after the first entry, so
the positional spot-checks of the constants test stay put; the count goes
from 107 to 108. The migration test reads the new file name and drops the
number from its file and test names, and the changelog fragment no longer
names a migration number.
2026-11-15 19:09:35 +03:30
serenity
b3410f0f84 Merge release/v3.8.54 into this branch 2026-11-15 19:07:24 +03:30
serenity
5a0f8389c5 chore(db): convert the 238 migration to a timestamp name
#20169 froze the 001-241 series and 238 now belongs to
238_codex_connection_fences.sql on release/v3.8.54. Rename this PR's
migration with npm run db:new-migration (same description, same SQL),
and add a RENAMED_MIGRATION_COMPATIBILITY entry so a database that ran a
build of this PR moves its 238 row to the new stamp instead of skipping
codex_connection_fences. The entry sits after the first entry, so the
positional spot-checks of the constants test stay put; the count goes
from 107 to 108.
2026-11-15 19:00:14 +03:30
serenity
e5b4990f77 Merge release/v3.8.54 into this branch 2026-11-15 18:46:05 +03:30
diegosouzapw
c495b920e9 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 05:14:16 -03:00
diegosouzapw
a52f213ab7 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 05:14:00 -03:00
diegosouzapw
db6313add2 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 05:05:09 -03:00
diegosouzapw
589b6c7f34 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 05:03:02 -03:00
diegosouzapw
4a77e2a7ff chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 05:00:11 -03:00
diegosouzapw
ddc2f915ee chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 04:59:23 -03:00
diegosouzapw
0145450426 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 04:49:04 -03:00
diegosouzapw
7a7cd4a46e chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 04:48:51 -03:00
diegosouzapw
7efd90f6f4 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 04:48:35 -03:00
diegosouzapw
c5bdb10fe7 chore: restore derived counts in their original digits
The previous maintainer commit put the derived counts in the translated
README mirrors back to the merge-base values, but wrote them as ASCII
numbers where the mirror uses native digits (for example Persian). The
lines still differed from the base and kept conflicting. This commit
writes the merge-base text back exactly. No other change.
2026-11-15 04:39:07 -03:00
diegosouzapw
6c5ee6bf72 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 04:30:30 -03:00
diegosouzapw
5870041190 chore: restore the final newline the derived-values strip dropped
The previous maintainer commit put derived files back to the merge-base
version but read them through a trimming helper, so each restored file
lost its last newline and still differed from the base. This commit
makes those files byte-identical to the merge base again (or, for
line-level restores, puts the final newline back). No other change.
2026-11-15 04:05:49 -03:00
diegosouzapw
33f2764008 chore: restore the final newline the derived-values strip dropped
The previous maintainer commit put derived files back to the merge-base
version but read them through a trimming helper, so each restored file
lost its last newline and still differed from the base. This commit
makes those files byte-identical to the merge base again (or, for
line-level restores, puts the final newline back). No other change.
2026-11-15 04:05:12 -03:00
diegosouzapw
a4955dd11d chore: restore the final newline the derived-values strip dropped
The previous maintainer commit put derived files back to the merge-base
version but read them through a trimming helper, so each restored file
lost its last newline and still differed from the base. This commit
makes those files byte-identical to the merge base again (or, for
line-level restores, puts the final newline back). No other change.
2026-11-15 04:04:57 -03:00
diegosouzapw
136b3a7ffe chore: restore the final newline the derived-values strip dropped
The previous maintainer commit put derived files back to the merge-base
version but read them through a trimming helper, so each restored file
lost its last newline and still differed from the base. This commit
makes those files byte-identical to the merge base again (or, for
line-level restores, puts the final newline back). No other change.
2026-11-15 04:04:44 -03:00
diegosouzapw
e7f1c4893a chore: restore the final newline the derived-values strip dropped
The previous maintainer commit put derived files back to the merge-base
version but read them through a trimming helper, so each restored file
lost its last newline and still differed from the base. This commit
makes those files byte-identical to the merge base again (or, for
line-level restores, puts the final newline back). No other change.
2026-11-15 04:04:21 -03:00
diegosouzapw
807efa71da chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 03:44:18 -03:00
diegosouzapw
e819a84904 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 03:43:52 -03:00
diegosouzapw
290ff16850 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 03:43:39 -03:00
diegosouzapw
56a322a876 chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 03:43:29 -03:00
diegosouzapw
8fd464552e chore: drop derived values the release refresh now owns
Plan 2026-11-13 (derived numbers resolved only at release): feature PRs no longer write values
that depend on the state of the base. This commit restores the lines this PR changed only to
update such values (counts in docs, the llm.txt mirrors, the Stryker test list, the package
description, counts in agent-instruction files) to the text of the PR's merge base, so merging
the current base brings the values `npm run release:refresh-derived` maintains. Every other
change of the PR is untouched.
2026-11-15 03:43:05 -03:00
John Costa
50a8f69c71 Merge branch 'release/v3.8.54' into fix/empty-tool-args-claude-stream 2026-11-14 13:21:45 -08:00
tiangao88
c9c17b8584 fix(sse): sync opaque reasoning with current release sanitization 2026-11-14 18:46:08 +01:00
zerafachris
51678c67e2 fix(api): guard POST /api/providers/[id]/sync-models with requireManagementAuth (#20187) 2026-11-14 17:42:21 +01:00
serenity
bcb5520a8f docs(changelog): number the fragment (#20206) 2026-11-14 18:37:41 +03:30
serenity
0b7c0c60d8 docs(changelog): number the fragment (#20204) 2026-11-14 18:05:57 +03:30
serenity
f43b131c43 docs(changelog): number the fragment (#20201) 2026-11-14 17:34:05 +03:30
serenity
e9b28f3b87 docs(changelog): number the fragment (#20199) 2026-11-14 17:18:06 +03:30
serenity
4e2cf2d0a3 docs(changelog): number the fragment (#20194) 2026-11-14 16:30:20 +03:30
serenity
50835c40d6 fix(translator): copy the message list once so translateRequest leaves the caller's messages alone
translateRequest edits the message objects it is given: it strips echo fields
(reasoning_content, reasoning, refusal, annotations, cache_control) for an
OpenAI-format non-reasoner target, fills tool call ids and arguments
(ensureToolCallIds), sets tool_call_id on the matching tool message, and moves a
displaced tool result inside the messages array. A combo copies the body per
target with a shallow copy (#7847), so the message objects are shared. After
target 1 (a non-reasoner) stripped reasoning_content in place, a later reasoning
target that needs the client reasoning_content no longer received it.

Copy the messages, and each message's tool_calls and function object, once at
the entry of translateRequest (callerMessages.ts, 0.4 ms for a 12 MiB body).
The copy is one level deep. content is shared because the translator never
writes into it. Only the sites proven to mutate (probe with frozen bodies) are
covered; no deep clone.

Finding: F-C5-64.
2026-11-14 14:30:15 +03:30
serenity
3a9f9daaae fix(responses): skip a replayed image_generation_call input item
A follow-up Responses request that replays an image_generation_call item (the
image the model made on an earlier turn) failed with a 400 on a Chat
Completions target: "input item type 'image_generation_call' cannot be
represented in Chat Completions".

Skip that one type, as tool_search_call, tool_search_result and web_search_call
are skipped. The narrow slice is deliberate: item_reference, mcp_call and
computer_call_output still throw, because dropping them loses input
(item_reference cannot be resolved; mcp_call carries output). The existing test
that pins the 400 for those three is unchanged.

Finding: F-C5-69.
2026-11-14 14:28:55 +03:30
serenity
01f9d4e16e fix(responses): compare namespace members to flat tools by Chat wire name
collectResponsesTools dropped a namespace member whenever any flat tool or
additional_tools entry had the same bare leaf name. The Chat conversion
qualifies a member as <namespace>__<leaf>, so a flat "search" and
"mcp__github.search" are two different Chat tools, and the member was lost
for no reason. The opposite case also failed: a flat tool already named
"mcp__github__search" did not drop the member that flattens to the same name,
so two Chat tools with one name reached a strict upstream.

Compare the member's flattened wire name (flattenNamespaceToolName, the same
function the conversion uses) with the explicit names. The default "functions"
namespace keeps bare leaf names (#17890), so a flat "exec" still wins over
functions.exec, as the existing tests require.

Intended precedence is unchanged: explicit top-level declarations still win
on a real name collision.

Finding: F-C5-62.
2026-11-14 14:28:10 +03:30
serenity
1e96878591 fix(gemini): keep & as it is in a replayed tool result context
A tool result without a thought signature is replayed to Gemini as text inside a
<previous_tool_result_context> block. The content was escaped for &, < and >.
< and > are the tag breakout guard: they stop a result from closing or
reopening the block. & cannot open or close a tag, so escaping it only changed
what the model reads: "a && b" was sent as "a &amp;&amp; b", and shell, code and
URL results were harder to read.

Drop only the & escape from the content. The < and > escapes stay, so the
breakout guard is unchanged. The attribute escape (source="...") is untouched.
The existing assertion in openai-to-gemini-helpers-split.test.ts that pinned
the & escape for content is changed to match; the breakout tests in
translator-openai-to-gemini.test.ts pass unchanged.

Finding: F-C5-41.
2026-11-14 14:27:44 +03:30
serenity
799bcaf284 fix(admission): apply the structural admission check on withChatAdmission routes
withChatAdmission wraps /v1/messages, /v1/completions, /v1/api/chat,
/v1/providers/{provider}/chat/completions, /v1/relay/chat/completions,
/v1/antigravity and /v1/responses/{path}. It runs the byte admission
(admitChatRequest) only. A request that is small in bytes but heavy in
structure (200 or more messages, or 64 or more tools) took no heavyweight lease
there, while /v1/chat/completions and /v1/responses call admitChatStructure for
it (#9654). The byte budget bounds the body, not the concurrency of heavy
requests.

After admitChatRequest, read a small body once on a clone and pass it to
admitChatStructure with the lease the request already holds. It takes a lease
only for a structurally heavy body and keeps an existing one, so a body that
reached the large-body size is decided by the byte lease alone. A body that is
not JSON goes to the handler. The same controller and lease type are used, so
this is not a second admission path. A rejection is logged like the byte
rejection.

Changes default behaviour on these routes: a structurally heavy small request is
now shed with the retryable 503 while heavyweight capacity is busy and the heap
is under pressure (with a healthy heap it is admitted through the bounded
headroom budget). It costs one extra parse of a body under the large-body size.

Finding: F-C1-20.
2026-11-14 14:25:41 +03:30
serenity
356a91fdb4 chore(changelog): name the bundle fragments 0000-<slug> and make each a bullet
The publisher renames the 0000- placeholders to the PR number.
2026-11-14 14:13:34 +03:30
serenity
569049b7ae fix(gemini): keep the failure flag of an unsigned Claude tool result
Claude to Gemini wrote is_error into functionResponse.response.error for a
signed history (#19405), but a Claude history carries no Gemini signatures, so
the common path turns the tool result into context text. That text dropped the
flag: a failed call read like a success. claude-to-openai already keeps such a
failure visible with a `[tool_error: true]` marker; add the same marker to the
historical tool-result context.

Finding: F-C5-75 (the signed path was fixed in #19405).
(cherry picked from commit 1da069f2b5c0971fe30ee2baaf2df69d267bf1f8)
2026-11-14 14:13:34 +03:30
serenity
93e0e97977 fix(gemini): switch thinking off for a Claude "disabled" or effort "none" request
claude-to-gemini sent no thinkingConfig for thinking:{type:"disabled"} or
output_config.effort:"none". Gemini 2.5 then thinks dynamically and can spend the whole
maxOutputTokens on hidden thoughts, while the OpenAI path already sends an explicit
thinkingBudget 0 for reasoning_effort "none". Send the same off switch here through
buildGeminiThinkingConfig (it drops the zero budget for Flash-Lite, which answers 400).
Models with a thinking-level knob or a zero budget cap keep the upstream default.

One existing test pinned the old "skip" behaviour for effort "none"; it now pins the
explicit off switch.

Finding: F-C5-28
(cherry picked from commit 85d74dc563c62dd711dbea312884ca165b000b2d)
2026-11-14 14:13:34 +03:30
serenity
786ee5d6a0 fix(gemini): deliver a trailing tag prefix at the end of a Gemini stream as text
The Gemini to OpenAI translator holds text that ends in "<", "<t", "<th" ... in case it
opens a <think> tag. At finish nothing emitted the held text, so a stream that ended inside
code such as "Array<" lost its last 1 to 6 characters. Emit the held prefix as content at
finish.

Re-check id: F-C5-51.

(cherry picked from commit 9cf398c989089061bdf4781ff2343399a4916bda)
2026-11-14 14:13:34 +03:30
serenity
ccb20c992a fix(sse): keep signed Gemini image parts
A signed image part no longer takes the standalone-signature skip, so the image reaches OpenAI clients. Finding F-C5-23.

(cherry picked from commit e40f9c9dd7948e30c519a168d873555d70a04e8a)
2026-11-14 14:13:34 +03:30
serenity
2f82c8675c fix(kiro): send status error for a failed tool run from a Claude request
A Claude request pivots through OpenAI before it reaches Kiro. The OpenAI
tool role has no error flag, so claude-to-openai writes a "[tool_error: true]"
line at the start of the tool text. The Kiro builder hardcoded
status "success" for the tool role, so a failed tool run reached Kiro as a
success with a marker in the text. A direct Claude tool_result block already
mapped is_error to "error".

The Kiro builder now reads the marker at the start of a tool message, sends
status "error" and the original text without the marker. A marker in the
middle of the text is left alone.

Finding: 9rself-36 (the small fix, not new direct translators)
(cherry picked from commit c8e46b5134204de647ff8f5a57674403a9ca2c54)
2026-11-14 14:13:34 +03:30
serenity
327751424c fix(kiro): seed the conversationId from the user text, not the clock line
buildKiroPayload prepends `[Context: Current time is <ISO>]` to the final
content. With no pre-compression body and an empty history (turn 1) the
conversationId seed fell back to that content, so turn 1 got a fresh random id
on every call and a different one from turn 2 (which seeds from history[0]).
Keep the content before the clock line for the seed.

Finding: F-C5-80.
(cherry picked from commit abfc2cea324d86606e4433b62983f4b930774c34)
2026-11-14 14:13:34 +03:30
serenity
a16312ff66 fix(kiro): note an image that Kiro cannot take in the request text
Kiro accepts only inline image bytes, and only for Claude models. A remote image URL, or any
image for a non-Claude model, was dropped with nothing left in the text, so the model answered
as if no image was sent. Count the image blocks that were not attached and add one line to
the message text. The prettier pre-commit hook also reformatted three lines that were already
off in this file.

Re-check id: F-C5-42. A 400 instead of a note is a product choice; the note keeps today's
requests working.

(cherry picked from commit a107f54a33a98a105668cf717a28a574f9f9057f)
2026-11-14 14:13:33 +03:30
serenity
3887fe078c test(translator): update the mixed tool-result array test for native Gemini media
A tool result array that holds an image now sends the image as its own part and the text
as the function result (gemini-sampling-tools). The old test expected the array unchanged.
2026-11-14 14:11:53 +03:30
serenity
830a5983c8 chore(changelog): name the bundle fragments 0000-<slug> and make each a bullet
The publisher renames the 0000- placeholders to the PR number.
2026-11-14 14:11:53 +03:30
serenity
f4e3160a23 fix(translator): drop Claude Code's billing line from Gemini and Antigravity system prompts
What: openaiToGeminiBase now removes a leading "x-anthropic-billing-header:" line
from each system message before it becomes a systemInstruction part. The Antigravity
envelope builds on the same base, so both targets are covered.

Why: the Claude-to-OpenAI translator already strips this line. An OpenAI-format
client that forwards it (Claude Code behind an OpenAI-shape proxy) reached Gemini
and Antigravity with the line intact. It changes every turn, so it breaks the
prompt prefix cache. A system message that is only the line now leaves no empty
part.

Finding: e0204 (comparison re-check). The Hermes identity rewrite named in that
row has no source we can check, so it is not built.

(cherry picked from commit 90320ad461e165c5b86708bb68e0cc71069dca3f)
2026-11-14 14:11:53 +03:30
serenity
a4cdca8dd7 fix(antigravity): do not move client system text into a model turn
The #9030 relocation prepended the client system parts to contents[0] without
checking its role. When the history opens with an assistant turn (for example
system, assistant, user, or a truncated history), the system text became a
model utterance. Prepend into contents[0] only when it is a user turn,
otherwise insert a leading user turn.

Finding: F-C5-79.
(cherry picked from commit 16f665d8eedf86857feb79f193ceb764350d66b4)
2026-11-14 14:11:53 +03:30
serenity
ce0e54fb5f fix(sse): preserve Gemini tool media and model sampling rules
Keep image bytes out of function-response JSON and retain them as native media. Omit sampling fields removed by Gemini 4 while preserving older models. F-C5-16 and F-C5-21.

(cherry picked from commit 1aaf64c4e95e4191fdcab8c69f1b9cb655471f2c)
2026-11-14 14:11:53 +03:30
serenity
e3e6c76acd fix(translator): keep a bare block object as message content for Claude
What: the OpenAI to Claude translator now wraps a message `content` that is one
bare block object into a one-item array, for system turns (normalizeContentToString)
and user turns (getContentBlocksFromMessage).

Why: a system turn with a bare text block was read as "" and sent as an empty
system block. A user turn with a bare text block was dropped, and the request went
out with "." as its text. Array and string content are unchanged.

Finding: e0217 (comparison re-check). The 4-marker cache cap half of that row is
already on the tip.

(cherry picked from commit 36cb4e8ad29612e2ba8012ebe31c193f97eb2ebd)
2026-11-14 14:11:53 +03:30
serenity
d9cd7e2379 fix(sse): accept line breaks in base64 data URLs for Claude
The data URL regex ended in `(.+)$`, and `.` does not match a newline. A
MIME-wrapped base64 image became `{type:"url", url:"data:..."}`, which
Anthropic rejects, and the same regex for file parts dropped the attachment.
Match any character and strip white space from the payload.

Finding: F-C5-77.
(cherry picked from commit 5cea7bfcbdc77720a04517af5084f4598048d312)
2026-11-14 14:11:52 +03:30
serenity
a1588bcc4b fix(translator): three request-shape errors in the OpenAI to Claude translator
- thinking {type:"enabled"} without budget_tokens (the DeepSeek/GLM/Kimi shape) was sent
  as is; Anthropic answers 400 "budget_tokens: Field required". A missing or zero budget
  now gets the model's default budget (1024 minimum), then fitThinkingToMaxTokens fits it.
- An empty system or developer message produced system:[{type:"text",text:""}], which
  Anthropic rejects. Empty system parts are now dropped.
- temperature was dropped for every claude-(opus|sonnet)-4* model for every provider, and
  also when thinking was disabled. The name-based drop is for Claude OAuth, whose beta
  header forces thinking, so it now applies to that provider only, and the final guard
  skips thinking.type "disabled".

Findings: F-C5-25, F-C5-31, F-C5-30
(cherry picked from commit a3e0f3aa07f6ac67db1ad3a61c7dfdf68f9f0964)
2026-11-14 14:11:52 +03:30
serenity
f93666a3f2 fix(sse): drop Claude thinking when a tool call is forced
Anthropic rejects extended thinking with a forced tool choice. Reconcile the two fields in the shared OpenAI to Claude translator. F-C5-20.

(cherry picked from commit 56a8eaf7e97f697437c936b4a8c716a867e917f8)
2026-11-14 14:11:52 +03:30
serenity
f47bfe19d2 test(sse): let the wiring tests accept the served credentials in onRequestSuccess
rotation-success-bookkeeping reads the credentials of the account that served the request
(`served`) in onRequestSuccess. Two source-text tests pinned the old variable name.
Accept both names; the asserted calls are unchanged.
2026-11-14 14:10:27 +03:30
serenity
00b01d07ff chore(changelog): name the bundle fragments 0000-<slug> and make each a bullet
The publisher renames the 0000- placeholders to the PR number.
2026-11-14 14:10:27 +03:30
serenity
ec15e430a9 fix(sse): do not cool a pooled session down for a client abort
executeWithSessionPool reported a cooldown for any throw, including the caller's
AbortError, so a user who cancelled a request penalised a healthy session
(consecutiveFails and the back-off grow). Skip the cooldown for a local stream
lifecycle error (the same classifier the circuit breaker uses) and still release
the session.

Finding: F-C4-15.
(cherry picked from commit 3753fb6dd60a322f89a68571b8bb31311dec90ba)
2026-11-14 14:10:27 +03:30
serenity
c9f4704ccf fix(sse): keep client instructions that share a block with the Claude sentinel
stripClaudeSystemPrefixBlocks removed a whole system block when its text
started with the Claude Code sentinel. A client that sent the sentinel and its
own instructions in one block lost the instructions. Remove only the sentinel
prefix and drop the block when nothing else is left; the billing header block
is still removed whole.

Finding: F-C4-12.
(cherry picked from commit 9a653fa6c5003126d3fd68b1a116400f5a1ac5d3)
2026-11-14 14:10:27 +03:30
serenity
fdce326325 fix(sse): keep the CLI body-field order on a recovery retry
The first send goes through applyFingerprint, which builds an ordered body. The
live transformedBody keeps the client order, and serializeRetryBody used a
plain JSON.stringify, so every recovery retry (field downgrade, clamp) went out
in the client order although the code comment calls the order a fingerprint.
Serialize through applyFingerprint when the first send did.

Finding: F-C4-13.
(cherry picked from commit 593ddad140303b4a045eea29c60dca8ce72c1d35)
2026-11-14 14:10:27 +03:30
serenity
ca9b65ad86 fix(executors): use AbortSignal.any in mergeAbortSignals so no listener outlives the merge
The manual merge removed its two abort listeners only after an abort. A merge that never
aborted (one per fetch attempt or retry) left both listeners on the long-lived combo or client
signal. AbortSignal.any (Node 22 and later, the engines range) holds no listener on its inputs
and keeps the abort reason.

Re-check id: F-C1-24.

(cherry picked from commit 10b2067e5a3316e733ebc2499113f13a7b0deab8)
2026-11-14 14:10:27 +03:30
serenity
d019508f9b fix(qoder): refuse image input on a PAT connection instead of dropping it
A Qoder PAT connection runs the local qodercli binary and sends it text only.
The prompt builder replaced every image part with the text "[Image omitted]",
while the registry still declares supportsVision, so image requests were routed
to a PAT connection and the model answered without the picture.

Image requests now use the same rule as caller tools: credential selection skips
PAT connections (a combo goes on to its next target), and the executor answers
400 image_input_unsupported before it starts the CLI. HTTP connections still
forward images. The registry flag stays true because the HTTP transport serves
images; no image forwarding is added to the CLI path.

Finding: e0212.
(cherry picked from commit ef7e47491f45ec886540558eb7eeb4953a89308a)
2026-11-14 14:10:27 +03:30
serenity
d7f516d501 fix(routing): credit the account that served after a Codex 429 rotation
When a Codex request got a 429, the provider pipeline moved it to a sibling
account B. The pipeline rewrites the refreshed copy of the credentials, but
chat.ts and the onRequestSuccess hook kept reading the original object that
still named the failed account A. On success the handler then:
- set the selected-connection header to A,
- marked A quota-healthy for 30 minutes (A had just answered
  usage_limit_reached), and cleared its error state,
- left B's own error state in place.

Read the connection id from the refreshed credentials, which follow the
rotation, in the success path of chat.ts and in onRequestSuccess.

Finding: F-C3-26.
(cherry picked from commit 8d7c7880fd2dbcdefeef6e0c499d368fa281367a)
2026-11-14 14:10:27 +03:30
serenity
d017a93d2e fix(sse): keep combo target scope on redirect and free the OAuth slot on rule errors
Forward the redirected target pin and allow-list, and release the OAuth session slot before rethrowing a connection reasoning rule error, as the sibling stages do. Findings F-C1-17, F-C1-18.

(cherry picked from commit e0407e7ab2b0da9222e80164ccfdfe42e334af5a)
2026-11-14 14:10:27 +03:30
serenity
faeb7b6c6c chore(changelog): name the bundle fragments 0000-<slug> and make each a bullet
The publisher renames the 0000- placeholders to the PR number.
2026-11-14 14:09:46 +03:30
serenity
42c95f7abb fix(sse): restore a client tool named with a proxy_ prefix in Claude passthrough replies
The native Claude executor strips a leading "proxy_" from every tool name
before dispatch. The passthrough name ledger assumed the opposite: it mapped
"proxy_" + name back to name. A client tool literally named "proxy_search"
went upstream as "search", and the reply reached the client as "search".

Build the ledger from the executor's real behaviour as well: for a declared
tool whose name starts with "proxy_", map the stripped name back to the
declared name, unless the client also declared the stripped name itself.
The old prefixed entries stay, so a prefixed echo still restores.

Finding: F-C3-21.
(cherry picked from commit 04bf04a083dfa21d36e6c66508fafe27ecebff85)
2026-11-14 14:09:46 +03:30
serenity
6f58e85512 fix(sse): read epoch seconds and numeric strings in isTokenExpiringSoon
isTokenExpiringSoon passed the value to `new Date(...)`. An epoch in seconds
became a date in 1970 (a valid token looked expired). A numeric string
became an invalid date (an expired token looked valid). The shared
parseTokenExpiryMs already reads both forms and is used by
BaseExecutor.needsRefresh; use it here.

Finding: F-C3-40.
(cherry picked from commit 91567f50b3272d995e15445a6739e0c3b06b56e2)
2026-11-14 14:09:46 +03:30
serenity
e640bb4585 fix(sse): log the cooldown writes that were swallowed silently
excludeConnectionForCooldown ended its cooldown write in an empty catch, and
markCodexScopeRateLimited used `.catch(() => null)`. When the write failed the
connection was selected again with no trace of why. Keep the fallback behaviour
and warn with the sanitized message (Hard Rule 12: never the raw err.message).

Finding: F-C2-41 (two of the five sites; the executeProviderRequest and
chatStreamController catches are left).

(cherry picked from commit 0fa0b83d81320b38fba90b3a1716d27f3c9a85fb)
2026-11-14 14:09:46 +03:30
serenity
fe6142d218 fix(sse): cancel the native response body that the proxy fallback drops
In `fallback` mode the wrapper returned only the proxy leg's result when the
native answer had a retryable status, and never cancelled the native body, which
held its socket until GC. Cancel it before the proxy call.

Finding: F-C2-40 (the body-cancel half only; recording the native 429 cooldown
needs a design decision and is left).

(cherry picked from commit 58bc8bca8591e50a5ad05479a7627710c351e679)
2026-11-14 14:09:46 +03:30
serenity
f8b3e23552 fix(sse): swap credentials on an empty-turn retry instead of merging
The retry did Object.assign(deps.credentials, nextCreds). Keys that the next
connection's object does not define stayed from the first one: routing, an
exclusive lease, and the account-bound copilotSessionToken. Replace the keys
with the same helper that already restores the snapshot when the retry is
rejected.

Finding: F-C2-39.
(cherry picked from commit f94d8bfaff553297165fe35fa3a7dfb3af2a0985)
2026-11-14 14:09:46 +03:30
serenity
861d6f782e fix(sse): do not take an Android user agent for the Droid CLI
The Droid CLI check was `userAgent.includes("droid")`, which also matches
"Android". A Dalvik or mobile browser client was treated as the Droid CLI, so
a Responses-shaped body on a non-/responses endpoint kept the Responses
response format instead of collapsing to Chat Completions. Match the whole
word `droid`.

Finding: F-C3-22.
(cherry picked from commit 47946f644e202aa1fc5c947eec4f178f0cb1e6ad)
2026-11-14 14:09:45 +03:30
serenity
b8c4167ff2 chore(changelog): name the bundle fragments 0000-<slug> and make each a bullet
The publisher renames the 0000- placeholders to the PR number.
2026-11-14 14:08:21 +03:30
serenity
f7b0669038 fix(skills): renumber the unique-skill migration to 240
The tip took 239 (call_logs_pending_detail_index). Move the skills migration and its test to 240
and bump the migration count in the docs from 236 to 237 (count tokens only).
2026-11-14 14:08:21 +03:30
serenity
59acff1206 fix(sse): drop repeated tool names for DeepSeek models
DeepSeek answers a request with a repeated tool name with HTTP 400
"Tool names must be unique", on its own API and on every gateway that
serves a deepseek-* model. OmniRoute only de-duplicated names for Gemini,
so a client that sends the same tool twice (two MCP servers, a merged
tool list) got the 400.

finalizeTranslatedRequest now keeps the first definition of each name
when the upstream model id is deepseek-*, for both the Chat and the
flat Responses tool shape. Tools without a name and other models are
not changed. tool_choice and history refer to tools by name, so they
stay valid.

Finding 9rself-27.

(cherry picked from commit b788d06923dd28ca85c954c2f03eeeb7bde42bb7)
2026-11-14 14:08:20 +03:30
serenity
acd7b38f65 fix(sse): strip the Codex effort suffix conflict on a copy of output_config
A combo gives each target a shallow copy of the client body, so output_config is shared.
The Codex guard that drops output_config.effort when the model name already encodes
effort used `delete oc.effort` on that shared object, so a later target of the combo lost
the client's effort. The earlier fix for the same kind of leak covered the format strip
and the output_format write; this was the one site left. Copy before editing.

Finding: F-C3-20 (remaining part)
(cherry picked from commit 28f8adff362253f6213705ad62bb73f9eac7d58a)
2026-11-14 14:08:20 +03:30
serenity
abe4c8ab08 test(dedup): wait on events instead of timers in the joiner-abort test
The test slept 50 ms twice to let the shared call start and the joiner attach.
Under parallel CI load that raced and failed about 1 run in 5. Resolve a promise
when the shared call starts, and yield twice with setImmediate for the joiner.

(cherry picked from commit 2b0dc240af0b99018e634c4863aa8be39761e76b)
2026-11-14 14:08:20 +03:30
serenity
fb43755991 fix(sse): do not hand a dedup initiator abort to connected joiners
When the shared call rejects with a client-lifecycle error and this caller is still connected, run one own call. Finding F-C2-25.

(cherry picked from commit bad435263c939a5a2f470a2ee3f80bf65420850f)
2026-11-14 14:08:20 +03:30
serenity
7f8e26ee86 fix(sse): isolate probe key health and bound ModelScope retries
Apply the stream-path probe guard to non-streaming key health, cap Retry-After at 10 s, and end the retry sleep on client abort. The zero-remaining retry rule stays as is: an upstream test pins it as a temporary throttle. Findings F-C2-20, F-C2-26.

(cherry picked from commit 0721d42d6985d4ae70a6bfc28a741141c7f19795)
2026-11-14 14:08:20 +03:30
serenity
ce5ec63b44 fix(skills): one row per API key, name and version; register() upserts
skillRegistry.register() inserted a new row on every call and the skills
table had no unique key, so installing the same skill twice left
duplicate rows. unregister() deleted only the row it found in its cache,
so the other copies stayed.

Migration 239 removes old duplicates once (keeps the newest row per
api_key_id, name, version, and moves the run history of removed rows to
the kept row, because skill_executions.skill_id cascades on delete) and
adds a unique index. register() is now an upsert on that key: it updates
the row, keeps its id and created_at, and returns the same skill id.

The migration count in README, AGENTS.md, llm.txt and the translated
README and llm.txt files goes from 235 to 236 (count tokens only).
tests/unit/db-backups-skills-3500.test.ts used one fixed skill name for
all seeded rows; it now uses the row id, so the rows stay distinct.

Finding orsurf-06.

(cherry picked from commit 7e16b8ae162cb379ffb68d7da5e93a532d7b4efe)
2026-11-14 14:08:20 +03:30
serenity
cc6509270d fix(sse): log a failed memory-settings read
`getMemorySettings().catch(() => DEFAULT_MEMORY_SETTINGS)` turned a read error
into "memory disabled" for that request with no log line. Keep the fallback and
log the cause at debug.

Finding: F-C2-45 (settings-read half).
(cherry picked from commit 5741f108a4aaa6168d7cd278cb840161b01a37d1)
2026-11-14 14:08:20 +03:30
serenity
439b7e649a fix(memory): keep the prompt prefix for automatic-cache providers, survive a corrupt skill row
- cacheSafe came from hasCacheControl only. OpenAI, Codex and Azure cache an identical
  prefix from token 0 without any marker, so the per-query memory text was prepended at
  messages[0] and missed the cache on every turn. usesAutomaticPrefixCaching now also
  selects the cache-safe placement (just before the last user turn).
- skillRegistry.loadFromDatabase ran outside any try/catch, and JSON.parse(row.schema)
  threw on one bad row (a global skillsmp/skillssh row loads for every key), so every
  non-stream request of the key rejected. The registry now skips a corrupt row with a
  warning, and the caller treats a failed load as "no skills" like the memory block above it.

Not changed: for Claude with cache_control the memory text still lands in system[0]
(F-C2-28), and auto-mode skill selection per turn (F-C2-33). Both need a design decision.

Findings: F-C2-29, F-C2-30
(cherry picked from commit 2386a17176821102c0549a24166f85515c7ee926)
2026-11-14 14:08:20 +03:30
John Costa
94a7351f50 chore(changelog): name the #20152 fragment after its PR 2026-11-13 16:59:02 -08:00
John Costa
f43d6c21b4 fix(translator): stream "{}" arguments for Claude tool calls with no parameters
Anthropic sends no input_json_delta for a tool_use block whose tool takes
no input, so the Claude to OpenAI stream translator left the tool call's
arguments as "" (not valid JSON). On content_block_stop, emit "{}" for a
tool_use block that received no argument fragments, matching the
non-streaming path.

Fixes #20152
2026-11-13 16:58:05 -08:00
AiCapitan357
18383eec1c fix(usage): count provider URLs in pending byte accounting 2026-11-13 20:49:18 +00:00
diegosouzapw
c3b06459ed Merge commit '2f2c1957638c59c9f846dc2775488871df28a123' into mb-rafa-19848 2026-11-13 09:25:17 -03:00
Timo Otten
a95ec0c81f fix(executors): restore original tool names in zed-hosted Claude stream 2026-11-13 12:37:13 +01:00
serenity
31593544ac docs: restore the ETH donation address in the README mirrors
The migration-count bump in this PR also changed one digit of the ETH
donation address (...102337a84 -> ...102347a84) in 66 README files.
Put the original address back; the address now matches the base branch.
2026-11-13 11:06:21 +03:30
Afonso Dutra Nogueira Filho
83c22e36d9 fix(stream): arm empty-turn retry for post-tool continuations (#20092)
A mute upstream turn on a post-tool continuation silently breaks agentic
loops (#13600). FLUSH_EMPTY_RETRY_ENABLED already covers every path but
is opt-in, so the default behavior still forwards the empty turn.

Detect submitted tool results in the client request body (OpenAI
role tool/function, Claude tool_result, Responses function_call_output,
Gemini functionResponse) and arm the existing bounded retry for those
turns only; all other streams keep the flag-off path untouched.
2026-11-12 15:17:53 -03:00
sdfsdfw2
7b71e9a8ef fix(dashboard): polish banned keywords card load failure and positioning 2026-11-13 01:19:27 +08:00
Bl0ck154
b034e36442 merge(upstream): reconcile PR #19680 with current release without losing feature 2026-11-12 18:46:35 +02:00
Bl0ck154
386f5dab89 merge(upstream): reconcile PR #18738 with current release without losing feature 2026-11-12 18:46:29 +02:00
ggdayup
fe6363a033 fix(pricing): map Vertex AI LiteLLM buckets and add default rates 2026-11-12 23:54:32 +08:00
sdfsdfw2
6170f698f3 docs(changelog): add fragment for #20078 2026-11-12 19:55:49 +08:00
sdfsdfw2
009399f6d3 fix(dashboard): keep banned keywords editor available when resilience load fails 2026-11-12 19:37:18 +08:00
sdfsdfw2
d143840867 refactor(dashboard): move custom banned keywords to Resilience page 2026-11-12 18:59:42 +08:00
André Almeida
c0196bb0d9 test(db-backups): bind the chunked limit to the route handler
The limit test only called readUpload, a module-private helper, so nothing tied the streaming bound to the route a client actually reaches. This one posts through POST with an operator credential and a request whose body has no content-length, and asserts the 413 arrives before the stream is drained: on the base the handler answers 400 only after buffering all 64 MB.
2026-11-11 22:52:52 -03:00
André Almeida
23cff495ce ci: retrigger (provider-create-binding flake in shard 5/8) 2026-11-11 20:18:43 -03:00
André Almeida
b64e2f5024 chore(quality): point the provider-asset manifest at a commit that still exists
check:provider-asset-provenance fails on every branch, base included, with 'auditedCommit object does not exist: 959ff4dd'. The release branch was force-pushed and dropped that commit, so the gate can no longer resolve its snapshot.

895c0f357 is the commit that produced the current public/providers tree (no later commit touches those paths); every blob id under public/providers is identical between it and HEAD, so the audit claim still holds. auditedAt is unchanged.
2026-11-11 19:05:21 -03:00
André Almeida
c382afa4db ci: retrigger after the Actions artifact incident 2026-11-11 18:14:35 -03:00
André Almeida
a30c673d5d chore(deps): carry the critical audit fix so this PR can land on its own
Same two-file change as #19965 (fast-xml-parser override to ^5.12.0, mongoose chain to its patched lines). audit --audit-level=critical exits 0. Identical bytes, so merging any of these first makes the others' copy a no-op.
2026-11-11 16:26:08 -03:00
Minxi Hou
0fabf5fe8a feat(search): forward Tavily max_age_hours
Tavily added max_age_hours in October 2026 so a search can cap how old the
cached copy of each result is: 1 to 720 hours, 0 to always fetch live, -1 to
never fetch live. The provider_options bag drops any key that is not on the
allow-list, so callers had no way to send it.

The field now passes through with that exact value set, and anything outside
it (721, a fraction, a string) is dropped instead of forwarded.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
2026-11-11 13:35:24 -05:00
André Almeida
a79d716c42 docs(changelog): fragment for #19831 2026-11-11 14:30:58 -03:00
André Almeida
a5ae3a8b6a fix(db-backups): bound the import body while it streams
The pipeline's body-size guard only reads Content-Length, so an upload sent chunked (no such header) skipped it and the raw branch buffered whatever arrived before the size was checked at all.

Count the bytes as they arrive and answer 413 as soon as the configured ceiling is crossed. The multipart branch keeps formData(), which needs the parsed parts; the raw branch is the one Bug #770 exists for and the one that can be bounded.
2026-11-11 14:30:58 -03:00
Bl0ck154
819d029701 test(openrouter): assert malformed regex stripping and counter
Port the focused fork regression for invalid pattern predicate evaluation,
correct removal counts and input immutability. No runtime changes.
2026-11-11 17:31:15 +02:00
Bl0ck154
f063a25349 test(gemini): verify cached input stays bounded by prompt tokens
Port the existing fork regression to protect already upstreamed usage clamping.

No production or live working tree changes.
2026-11-11 17:26:57 +02:00
Bl0ck154
600fc6f07b test(media): prove pinned fetch returns before response body ends
Port the focused fork regression without fork-only runtime changes.
No builds or production modification on the VPS; off-host CI validates.
2026-11-11 17:26:37 +02:00
Bl0ck
c1fae14635 docs(changelog): describe agy timeout alias guard 2026-11-11 14:00:23 +02:00
Bl0ck
a887d9eea7 fix(antigravity): preserve agy alias response-start timeout evidence 2026-11-11 14:00:11 +02:00
Bl0ck
779244c344 fix(antigravity): preserve agy alias response-start timeout evidence 2026-11-11 14:00:08 +02:00
Bl0ck
fed1553d5a test(antigravity): preserve agy alias response-start timeout evidence 2026-11-11 14:00:05 +02:00
Bl0ck
89f10fe685 test(antigravity): preserve agy alias response-start timeout evidence 2026-11-11 14:00:02 +02:00
Safeer Ahmad
619c595385 fix(antigravity): keep the conversation session on non-streaming server-tool follow-ups
The follow-up leg of a non-streaming server-owned tool loop re-translates the next
source body without antigravitySessionKey, so it fell back to the account-wide
sessionId and could evict a parallel conversation's cache. chatCore now resolves
the key once at function scope and passes it to runNonStreamingResponse, whose
follow-up translation forwards it. Adds docstrings for the session helpers.

Review: CodeRabbit on #19876.
2026-11-11 14:55:40 +05:00
xiaoyaner0201
4370081fde refactor(db): drop unused reasoning rule type re-exports
knip flags ReasoningEffortMode, ReasoningRuleScope and ReasoningTargetKind as
new dead exports in the touched facade. No importer uses them through
src/lib/db/reasoningRoutingRules; they remain exported from the domain
repository contract.
2026-11-11 17:42:35 +08:00
Safeer Ahmad
c64ce472ab chore(changelog): fragment for #19876 2026-11-11 14:09:15 +05:00
Safeer Ahmad
b8fa424900 fix(antigravity): scope the upstream sessionId per conversation, not per account
The OpenAI->Antigravity envelope derived request.sessionId from the account
email alone (#13305), so every conversation running in parallel on one
account shared a single Cloud Code session. Parallel coding-agent tasks then
evicted each other's prompt cache: on a live 8-task opencode run against
gemini-4-carbon-medium, tokens_cache_read collapsed from ~280k to 10,443/None
and 250k-380k uncached prefills took 250-589s (two 600s pre-header 504s),
while the same conversation alone on an account finished 255k-271k cached
turns in 11-14s.

chatCore now passes the resolved conversationId (falling back to the
session-affinity key) into translateRequest as antigravitySessionKey, and the
envelope hashes account + conversation. One conversation keeps one stable
session across turns (cache reuse is preserved), parallel conversations get
distinct sessions, and requests with no conversation key keep the old
account-derived id.
2026-11-11 14:07:30 +05:00
Bl0ck154
037a8455aa fix(images): resolve hosted Codex remote edit refs within 128/20MiB bounds 2026-11-11 10:38:51 +02:00
Bl0ck
dbb882582e test(cursor): freeze live reset countdown during markup equality assertion 2026-11-11 10:31:59 +02:00
Bl0ck154
87a464842d merge(upstream): reconcile Terra model support with current release 2026-11-11 10:30:10 +02:00
Bl0ck
cad3cc79ad chore(tests): sync Stryker tap fixtures with current release 2026-11-11 10:29:03 +02:00
Bl0ck154
078d8a4bbd docs(changelog): format hosted image references entry as bullet 2026-11-11 10:28:12 +02:00
serenity
82c438ba63 docs(changelog): drop the provider update entry fixed upstream
Upstream #15201 fixed the same lost-update race in providers.ts, so this PR
no longer changes that file. Keep the concurrent-fields test as a regression
guard; drop the changelog line that claimed the fix.
2026-11-11 10:20:44 +03:30
serenity
bc789a54d0 revert(sse): leave the CCH signer change to #19761
The CCH hash-view change in this bundle and #19761 fix the same signer.
#19761 is the complete version: its view also covers model and max_tokens
keys nested in tool schemas, proven against 46 captured requests from
Claude Code 2.1.322 (this version fails 1 of them). Drop the change here
so the two PRs do not conflict; the other five fixes in this bundle stay.
2026-11-11 10:19:23 +03:30
serenity
e82c0ae548 refactor(db): extract the family delete loop from pruneBackupDirectory
The snapshot-lease guard added one branch to pruneBackupDirectory and pushed
it over the cyclomatic and cognitive limits of the new-code complexity
ratchet. Move the per-family unlink loop into deleteFamilyFiles. Behaviour
is unchanged: the same files go, and an emptied portable directory is still
removed only when at least one file was deleted.
2026-11-11 09:29:16 +03:30
serenity
9ebbb85ba0 Merge remote-tracking branch 'origin/release/v3.8.54' into ci/19690 2026-11-11 09:26:40 +03:30
serenity
da59578377 refactor(sse): split the CCH hash-view scanner into methods
normalizeCchInput was one 117-line function, and the object parser inside it
reached cognitive complexity 17. Both broke the new-code complexity ratchet.
Move the scanner into a small class with one method per JSON construct, and
split the member parse out of parseObject. The hash view is unchanged: the
golden vectors still pass.
2026-11-11 09:24:38 +03:30
serenity
bf5b2f9d48 Merge remote-tracking branch 'origin/release/v3.8.54' into ci/19684
# Conflicts:
#	open-sse/services/claudeCodeCCH.ts
2026-11-11 09:20:05 +03:30
serenity
fbaea978f7 Merge remote-tracking branch 'origin/release/v3.8.54' into ci/19701
# Conflicts:
#	src/lib/db/providers.ts
2026-11-11 09:15:01 +03:30
Diego Rodrigues de Sa e Souza
5f92b1a991 Merge branch 'release/v3.8.54' into fix/preserve-opaque-reasoning-20261110 2026-11-11 02:12:16 -03:00
Diego Rodrigues de Sa e Souza
61f97072d6 Merge branch 'release/v3.8.54' into pr/fix/or9r-hd-data-dir-xdg-identity 2026-11-11 02:12:13 -03:00
Diego Rodrigues de Sa e Souza
f22e98e6fb Merge branch 'release/v3.8.54' into pr/fix/or9r-bundle-hd-db 2026-11-11 02:12:09 -03:00
Rafa Martins
f721fba4ec fix(security): remove unsafe-eval from production csp script-src 2026-11-11 00:45:15 -03:00
小妍儿 ✨
8fa9f60e61 docs(changelog): add Gemini 4 Carbon registry fragment
Signed-off-by: 小妍儿 ✨ <258399167+xiaoyaner0201@users.noreply.github.com>
2026-11-11 04:22:37 +08:00
小妍儿 ✨
a45e4a8dee test(providers): assert Carbon tiers get the declared Antigravity output cap
Signed-off-by: 小妍儿 ✨ <258399167+xiaoyaner0201@users.noreply.github.com>
2026-11-11 04:21:28 +08:00
小妍儿 ✨
0fbc46f906 fix(providers): register Gemini 4 Carbon tiers, pricing and bare alias
Gemini 4 Carbon (2026-11-10) is advertised by the live Antigravity catalog for
Ultra plans at gemini-4-carbon-{low,medium,high} and to paid Gemini API keys as
gemini-4-carbon. With no registry entries the tiers routed but were recorded as
unpriced, the bare id was rejected by the live-catalog check, and the output cap
fell back to the conservative default.

Adds GEMINI_4_CARBON_PROMO_PRICING ($2/$10 introductory, same as Argon, kept as
its own constant), the Antigravity shared-model tiers, a bare -> medium alias,
a modelSpecs entry, and the gemini API-key catalog row.

Signed-off-by: 小妍儿 ✨ <258399167+xiaoyaner0201@users.noreply.github.com>
2026-11-11 04:06:16 +08:00
小妍儿 ✨
612506ddf9 test(providers): cover Gemini 4 Carbon registry, pricing and aliases
Signed-off-by: 小妍儿 ✨ <258399167+xiaoyaner0201@users.noreply.github.com>
2026-11-11 04:06:16 +08:00
AiCapitan357
db53e1369b fix(combo): keep deactivated accounts out of cooldown recovery 2026-11-10 18:40:57 +00:00
diegosouzapw
bf7a8aca0d Merge release/v3.8.54 into fix/18045-property-force-exit-preload 2026-11-10 15:21:02 -03:00
serenity
bab377439c docs(changelog): number the fragment (#19761) 2026-11-10 21:45:54 +03:30
Bl0ck154
f4787d6b40 merge: sync upstream release into PR #18738 without losing changes 2026-11-10 19:33:19 +02:00
Bl0ck154
f8d4f71c9b merge: sync upstream release into PR #19667 without losing changes 2026-11-10 19:32:44 +02:00
Bl0ck154
86932f5e2f merge: sync upstream release into PR #19680 without losing changes 2026-11-10 19:32:40 +02:00
Bl0ck154
6e290f82bf merge: sync upstream release into PR #19681 without losing changes 2026-11-10 19:32:37 +02:00
Bl0ck
c5178f36b0 merge: sync Codex plan diagnostics with upstream release/v3.8.54 2026-11-10 19:18:14 +02:00
serenity
1d038f69b9 docs(changelog): number the fragment (#19750) 2026-11-10 20:39:25 +03:30
serenity
bc6d0b9eb9 perf(claude): cache the final tool-result turn of an agent loop
An OpenAI-format tool loop sent to Claude ends with the results of the last
assistant turn's tool calls. They sit after that turn's cache breakpoint, so
they are billed as fresh input, and the next call sends them again.

prepareClaudeRequest rebuilds every message marker, so the policy must live
there. Add markFinalToolResults: when the final user turn holds a tool_result
and fewer than 4 markers exist, mark its last block with the tail marker (same
5m class as the other tail markers). The next call then reads those tokens
from cache at 0.1x. A request with no follow-up pays a one-time 0.25x write
premium on those tokens. Client-managed (passthrough) markers are not changed,
and the 4-marker limit still holds: enforceCacheControlBlockLimit and the new
helper share one marker walk.
2026-11-10 20:28:46 +03:30
serenity
c3d487d728 docs(changelog): number the fragment (#19749) 2026-11-10 20:28:30 +03:30
serenity
568906175f fix(cache): do not store a content_filter reply in the semantic cache
The cache already refuses a truncated reply (finish_reason length), because a
temperature 0 entry pinned for the TTL is served to every identical request
and no retry can clear it. A moderation block has the same trap: upstream
re-asks it and a false-positive block can clear, but a cached one cannot.

Treat content_filter, and its Claude spelling refusal, like length in the
shared isTruncatedCompletion set. The non-streaming and the streaming store
both use it, so both are covered.
2026-11-10 20:17:51 +03:30
serenity
e590e62086 fix(sse): sign the Claude Code CCH token with the seed and body view of the real client
OmniRoute hashed the raw body with seed 0x6e52736ac806831e. A loopback
capture of the real client does not match that: 9 of 9 bodies from Claude
Code 2.1.322 (1.9 KB to 74 KB) and 3 of 3 from 2.1.252 carry a token that
equals xxHash64 with seed 0x4d659218e32a3268, masked to 20 bits, over the
body with cch=00000, every model string value emptied and every numeric
max_tokens member removed. The OmniRoute token differed in every case.

Use that seed and that view. The view uses plain text matching, as the
client does: the captures with model and max_tokens keys inside a tool
schema only match when the view reaches nested keys too.

The golden test uses two bodies captured from 2.1.322 with a synthetic
device id. It puts the placeholder back, signs, and expects the captured
token.

Built on the head of #19021, which changes the same file.
2026-11-10 20:00:15 +03:30
serenity
52c59f3d7e docs(changelog): number the fragment (#19735) 2026-11-10 19:28:43 +03:30
serenity
e3509d52c2 perf(call-logs): add an ordered partial index for overflow cleanup
selectOverflowArtifactPaths lists artifact rows by timestamp DESC, id DESC
and skips the newest maxEntries. The only artifact index is ordered by
path. Without planner stats SQLite scans idx_cl_timestamp and sorts ties
in a temporary B-tree. After ANALYZE it picks the path index and sorts
every artifact row. Each rotation pass pays this again.

Add idx_cl_artifact_overflow_order on (timestamp DESC, id DESC), limited to
rows with an artifact path. The query plan becomes one index scan with no
sort, with and without stats. The index holds only artifact rows, so
writes to the other rows are not affected. Additive only: the query and
its callers are unchanged.
2026-11-10 19:18:01 +03:30
serenity
5386936931 docs(changelog): number the fragment (#19733) 2026-11-10 19:17:31 +03:30
diegosouzapw
1a50f78356 docs(changelog): add fragment for batch E2E startup isolation 2026-11-10 12:41:15 -03:00
diegosouzapw
3a4da7066a Merge release/v3.8.54 into fix/batch-e2e-startup-isolation
# Conflicts:
#	src/instrumentation-node.ts
2026-11-10 12:37:09 -03:00
serenity
5f7ccb3b7b perf(models): memoize the global model lookup used by timeout resolution
getProviderModel falls back to getGlobalModel for every model that is not
listed under its own provider: custom, passthrough and OpenAI-compatible
models. That fallback walked the whole provider registry up to three
times per call (exact id, vendor-prefix base name, startsWith scan), and
the first two phases also built and sorted a candidate list. The calls
run per request and per combo target. The exact-id and scoresAs lookups
already had a memo cleared on registry change. getGlobalModel had none.

Add a memo for getGlobalModel in the same place. The registry Proxy
already clears the lookup memos on every set and delete, so the new memo
is dropped on the same events. Misses are stored too, because custom
models always miss. The memo is capped, since the key is a client model
id.

(cherry picked from commit 5b328823af143b6dc55d7e72f016a3090ad4d1bb)
2026-11-10 19:06:50 +03:30
serenity
3c0664edd6 fix(gemini): parse split textual tool calls and tag tool-only cut streams
The buffered Gemini/Antigravity SSE parser tried the `[Tool call: name]`
text convention on each stream part alone. That marker is usually split
over several parts, so a split call stayed plain text and the client got
no tool call. Now the parser also tries the joined text once the stream is
read, and turns a match into one tool call.

A native functionCall part did not count as content. A stream that held
only tool calls and ended without a finishReason or [DONE] was not seen as
cut, so it carried no truncation tag and a combo could not fail over. A
native call now counts as content. The cut tag is set and the complete
calls are kept.

(cherry picked from commit e27dfcd33c1f88144febf39b232f36adf7534db6)
2026-11-10 19:06:50 +03:30
serenity
a50d19a760 fix(translator): map Gemini content roles to the right OpenAI role
The Gemini to OpenAI request translator mapped only role "user" to a user
message. Every other value became an assistant message, including an omitted
role (the role field is optional in single-turn requests) and the roles
"function" and "tool" that some clients use for tool results. A request
without a role therefore reached the upstream as an assistant turn.

Map "user", "function" and "tool" to user. When the role is omitted, infer
it from the parts: a functionCall or a thought part means assistant,
anything else means user. Infer the role before thought parts are split
out, so visible text next to a thought stays assistant. Other roles stay
assistant. Tool-call id pairing is unchanged.

(cherry picked from commit 7148ca7f575adca57251810ba5bd819adc645636)
2026-11-10 19:06:50 +03:30
serenity
f1d45b7292 fix(codex): cap the adapter event backlog by retained size
AsyncEventQueue capped the backlog at 10000 events and ignored event size.
A fast producer behind a slow client could hold 10000 large text deltas, or
10000 tiny ones, without a byte limit.

Count the retained string length of each buffered event and reject a push
that would pass 32 Mi UTF-16 code units. Merge an adjacent text or thinking
delta of the same type and phase into the last buffered event, up to 64 Ki
code units, so many tiny deltas stop using one slot each. Tool, phase and
error events never merge. A terminal error event is always accepted so an
overflow still reaches the consumer. Consuming an event returns its share
of the budget.

(cherry picked from commit 35dbd95f19a648e45df54c6ea89b5f6658720c7f)
2026-11-10 19:06:50 +03:30
serenity
1d988fbefb docs(changelog): number the fragment (#19727) 2026-11-10 18:55:25 +03:30
serenity
c2f3172dbd fix(a2a): stop a smart-routing task's upstream call when it is cancelled
The earlier commit in this bundle made the task manager abort a per-task
signal on cancel (getTaskSignal). No handler read that signal, so the
upstream /v1/chat/completions call kept running until the 30 s timeout.

executeSmartRouting now passes getTaskManager().getTaskSignal(task.id) to
routeFetch. routeFetch combines it with the 30 s timeout through
AbortSignal.any, so the call ends on whichever comes first. A task with no
live signal behaves as before. Smart routing is the only A2A skill that
calls routeFetch; the other skills make no upstream fetch.

Tests: new a2a-smart-routing-cancel-signal test. Before this change the
fetch signal was not aborted when the task was cancelled.
2026-11-10 18:44:39 +03:30
serenity
6890911fc0 perf(models): memoize single-model capability lookups
With models.dev sync off (the default) the all-row capability cache is
never primed, so every getSyncedCapability call prepared a SELECT and ran
the CREATE TABLE IF NOT EXISTS guard again, for hits and misses alike. One
chat request makes about nine such calls.

Remember each (provider, model) result, misses included, in a bounded map.
The map is dropped when the model catalog cache version moves (every
capability write already calls invalidateDbCache for model-capabilities) or
when the database instance changes. The map is cleared whole at 4096
entries, because model names come from request bodies. The table guard
runs once per database instance.

(cherry picked from commit 7a3f07c1b57bf9bcbdaa3e98d96c12e5c071b153)
2026-11-10 18:44:39 +03:30
serenity
44cbf62d73 fix(quota): charge Redis usage counters and set TTL atomically
RedisQuotaStore.consume sent INCRBYFLOAT, EXPIRE, EXPIRE and MGET as four
round trips. A crash or disconnect after INCRBYFLOAT left a counter with no
expiry, so the usage window never reset for that key.

Run the charge, both TTL refreshes and the previous-bucket read in one Lua
EVAL. The sliding-window result is unchanged.

(cherry picked from commit 6e193197ce9e3173dab1ceb0f6ff438075da59ed)
2026-11-10 18:44:39 +03:30
serenity
17d79392a4 fix(guardrails): keep signed and encrypted blobs intact in credential redaction
The opt-in credential masker ran every catalog pattern over every
string. Short-prefix patterns (hf_, r8_, sk-, gh*_, npm_, AIza) match
random base64url often enough to rewrite a signed thinking block or an
encrypted reasoning blob. A rewritten signature fails provider
verification when the client replays the turn.

Inside signature, thoughtSignature, thought_signature, encrypted_content
and similar fields, and inside any string that is one long base64 run
(256 chars or more), apply only the long-prefix patterns (PEM key, JWT,
AWS, Anthropic, sk-proj, Stripe, SendGrid, Slack, connection string).
Normal text still gets the full catalog.

(cherry picked from commit 34951c47e88f9308a78bce0ce09dff3fc5e93e81)
2026-11-10 18:44:39 +03:30
serenity
da57bfa4c0 fix(cli-tools): check each tool's own config fields in the batch status
The batch status (used by the CLI tools overview) searched a tool's config for
marker text. For Claude any ANTHROPIC_BASE_URL counted, so a stale localhost
port, a foreign HTTPS host and the direct Anthropic URL all showed as
configured. For Droid, OpenClaw, Cline and Kilo, any file that contained
"omniroute", "sk_omniroute" or "localhost:<port>" anywhere showed as
configured, even in a note or an unrelated provider. The expanded card of each
tool reads specific fields, so the two views disagreed.

The batch check now reads the same field each tool's settings route reads
(Claude env.ANTHROPIC_BASE_URL, Droid customModels "custom:OmniRoute-N",
OpenClaw models.providers.omniroute, Cline openai provider + openAiBaseUrl,
Kilo router entry in auth.json) and requires a loopback host on this API port.
An OmniRoute entry that points elsewhere is reported as "other" for Claude,
Droid and OpenClaw, which the card already shows. Codex, Hermes, omp, Pi,
WhyCodes, Qwen and Grok Build keep their existing checks.

(cherry picked from commit ecba932321d14e7558b3c9d0da88007af9959a96)
2026-11-10 18:44:39 +03:30
serenity
6fc5de6790 fix(a2a): abort a task's signal when it is cancelled
cancelTask only set state=cancelled. The handler kept running and, when it
finished, updateTask threw "Invalid transition: cancelled -> completed". A
handler that failed after the cancel threw "cancelled -> failed" the same way,
which turned a client cancel into a 500 on message/send.

Give every live task an AbortController, abort it when the task becomes
cancelled, and expose its signal through getTaskSignal. After a cancel, a late
"failed" is ignored and a late "completed" is refused with a "cancelled" error
that carries no artifacts. Other invalid transitions still throw as before.

Handlers must read getTaskSignal to stop their own work; the skill wiring is a
separate change.

(cherry picked from commit f3abb2ea54cc93f36b18114a59b712edd6d94388)
2026-11-10 18:44:38 +03:30
serenity
1c79a825bd docs(changelog): number the fragment (#19724) 2026-11-10 18:32:53 +03:30
serenity
3384c13632 test(stryker): list the bundle's covering tests in tap.testFiles 2026-11-10 18:22:11 +03:30
serenity
672437cbb5 perf(providers): index providers by alias and id for O(1) lookup
resolveProviderId calls getProviderByAlias, which looped over every
provider section and compared alias and id on each entry. A miss, for
example an openai-compatible-* id, scanned the whole catalog of about
380 providers and then returned the input. Circuit-breaker names,
target gates, quota lookups and failure records call it on every
routing step.

Build one Map from alias and id to provider on first use. A key is
claimed by the first provider in section order whose alias or id
equals it, the same rule as the old scan, so an alias that equals
another provider's id (poe) keeps resolving as before. Only the
internal lookup changes: ALIAS_TO_ID and getProviderById are untouched.

(cherry picked from commit a95c42fda203fabf12cf226431340d1c2c6f57f1)
2026-11-10 18:22:11 +03:30
serenity
3982e38e39 fix(pii): refuse custom regexes that run slowly on a long character run
The custom PII pattern gate relied on safe-regex alone. safe-regex is a
static star-height check and accepts overlapping alternations such as
(a|aa)+$, which take exponential time on a run of one character. Such a
pattern passed save, preview and runtime compile, then froze the event
loop on the first matching text.

After the static check, run the pattern on seven 64-character runs
(letter, non-ASCII letter, digit, space, dash, underscore, dot) under a
100 ms vm deadline. A pattern that is cut off is refused as unsafe.
The same gate covers save, preview and the runtime skip of stored rows.

(cherry picked from commit e45b0378848f3428ce7d9ae62b63641cc4e50370)
2026-11-10 18:22:11 +03:30
serenity
be1efe54ef fix(resilience): require all half-open probes to pass before closing
A HALF_OPEN circuit breaker closed on the first probe success, whatever
`halfOpenRequests` was. One lucky probe could restore a flapping
provider, and the setting had no effect above 1.

The breaker now counts probe successes in the HALF_OPEN episode and
closes when `halfOpenRequests` of them have passed. A probe failure
still reopens the breaker. The count resets on every state change and
when a stale probe lease is renewed. The default (1) behaves as before.

(cherry picked from commit f2d231c43c41ed330d733231fe4ffb812d16d91d)
2026-11-10 18:22:11 +03:30
serenity
c31ec5bc46 fix(security): scan base64, hex and percent-encoded text for prompt injection
detectInjection matched the surface text only. "Ignore all previous
instructions" wrapped in base64, hex or percent-encoding passed the guard
with no detection, even in block mode. The only rule that mentioned encoding
(encoding_evasion) needs the words "base64 decode" next to "instruction".

detectInjection now also decodes encoded runs in the scanned text, to two
layers, and runs the injection patterns on what they decode to. A hit keeps
the rule's severity and is reported as "decoded:<rule>", so the block
threshold, logging and the guard treat it like the plain form.

Bounds: the input is still the 16 KB scan window. A run needs 24 base64
characters or 12 hex bytes, at most 64 decode attempts run per request, and
a run that decodes to binary (a hash, a token, random data) is dropped. The
run patterns are single character classes, so they are linear. Worst case on
a 16 KB window is about 0.6 ms in the benchmark, and no benign sample (hashes,
random base64, kebab-case paths, form data) produced a hit.

(cherry picked from commit 838f618f8ba16be77af64147a1128eb9075f51fd)
2026-11-10 18:22:11 +03:30
serenity
a389dea7f7 docs(changelog): number the fragment (#19701) 2026-11-10 16:51:19 +03:30
serenity
3e8af882e1 fix(db): delete call-log artifact files in the retention pass
cleanupCallLogs removed expired call_logs rows with a bare batched DELETE.
The body file each row points at (artifact_relpath) stayed on disk. Only the
request-driven orphan scanner removes such files, and it checks a few
entries per rotation and runs only when new call logs arrive. On an idle
gateway the expired bodies stayed.

For call_logs, each batch now picks its rows first, deletes exactly those
rowids, and then removes their files. A failed delete leaves the file of a
row that still exists. Other tables keep the old single statement.

(cherry picked from commit aef70539cc90467cfc720f3a32a245ec0bc82df0)
2026-11-10 16:40:30 +03:30
serenity
931931879b fix(providers): read the connection row after the awaited credential guard
updateProviderConnection read the row, awaited the management-password
guard, then merged the old snapshot into a full-row UPDATE. Two updates
to different fields that overlapped on that await both merged against the
same old row, and the second write restored the first field to its old
value.

Move the SELECT after the await. From the read to the write there is no
await left, so the merge always starts from the newest row.

(cherry picked from commit e1f7c379657f0cae813ece1ad5c38a374537e907)
2026-11-10 16:40:30 +03:30
serenity
f117509f97 perf(db): archive usage history one day at a time during retention
The retention rollup reads every token-shape group before its cutoff with one
all() call, prices each group in one Promise.all, and only then reduces the
groups to daily rows. After a long backlog, such as a retention cut or a
stopped scheduler, one pass held every group of every expired day in memory.

cleanupUsageHistory now runs the rollup and the delete for one UTC day at a
time, oldest first. A pass holds one day of groups. The rollup still runs
before the delete of the same day boundary, and a failed rollup still stops
the delete. The daily totals are the same as before.

Pricing inside one day is still unbounded. That needs a change in
aggregateHistory.ts, which another change set already edits.

(cherry picked from commit 581da00fe608facde621eac989f10daa167860ce)
2026-11-10 16:40:30 +03:30
serenity
502989a019 fix(db): prune exclusive lease and provider quota reset history
exclusive_connection_leases gets one row per exclusive lease. Expire, release
and invalidate only change its state. provider_quota_reset_events gets one row
per observed quota reset. Neither table had a DELETE path, so both grew without
limit.

Scheduled cleanup now deletes lease rows whose ended_at is older than the
call-log retention window, and reset events whose window reset time is older
than that window. A live lease has no ended_at, so it is never deleted. The
current quota window and the last window stay, because the window start
lookup reads them.

(cherry picked from commit 47fc76062f1ecf1378c43cba3e59573e0386d111)
2026-11-10 16:40:30 +03:30
serenity
148803a443 fix(db): keep spend inside an active budget window during retention cleanup
Dollar budgets add up domain_cost_history rows from the start of the current
daily, weekly or monthly window. Scheduled cleanup deleted rows older than
retention.domainCostHistory (30 days by default) without looking at that window.
On the last day of a 31-day month, the first-day spend was older than the cutoff.
Cleanup deleted it and the key got that allowance back. A shorter retention
setting did the same to weekly and daily windows.

Lower the cutoff to the earliest active budget window start. Rows outside every
window still follow the retention setting.

(cherry picked from commit 8c9f07f06cb080266b304756d5a8cb5b24298d62)
2026-11-10 16:40:30 +03:30
serenity
f82405c48c docs(changelog): number the fragment (#19690) 2026-11-10 16:39:54 +03:30
serenity
3b45a9666e fix(db): hold a snapshot lease for the whole migration run
The earlier commit in this bundle added acquireSnapshotLease and made
pruneBackupDirectory skip a leased snapshot. Nothing took a lease, so the
change had no effect.

runMigrations now takes a lease on the restore point after each
createPreMigrationBackup and releases it in a finally block. A backup prune
from any call site or process keeps the snapshot until the upgrade ends,
whether it succeeds or throws. The run is split into runMigrations (lease
owner) and runMigrationsLeased (the existing body); the body is unchanged.

The portable snapshot durability test treated every renameSync as the
snapshot publication. The lease file is also written by rename, so the test
now ignores lease files.

Tests: new db-migration-runner-snapshot-lease test. A prune during the
upgrade deleted the restore point before this change. The lease is gone
after a successful run and after a failed run.
2026-11-10 16:28:52 +03:30
serenity
e61cf4e814 perf(auth): remember unknown API keys for 30 seconds
validateApiKey cached only valid keys. A client that kept sending a key with
no row paid one SQLite lookup per request, and each miss also re-ran the
legacy secret backfill scan.

Keep a separate hash -> time map for keys with no row. It has a 30 second
TTL and its own size cap, so a flood of bad keys cannot evict valid entries.
createApiKey drops the entry for the new key; every other write path
(import, regenerate, revoke, delete, restore) already calls
clearApiKeyCaches, which now clears this map too. bypassCache neither reads
nor writes it.

(cherry picked from commit 733221f645806bef716c22596be96831918e5bde)
2026-11-10 16:28:52 +03:30
serenity
1e4f58699a fix(db): refuse to restore a backup made under another storage key
A restore under a different STORAGE_ENCRYPTION_KEY loads every row,
but each stored credential is encrypted under the old key and cannot
be read. The operator sees a successful restore and then dead accounts.

Write a key fingerprint (sha256: plus the first 16 hex of the key's
SHA-256) into the database just before each manual, automatic and
pre-restore copy. On restore, read it from the backup and refuse,
before any live file is touched, when it differs from the running
key. The message names both fingerprints and never the key. A backup
with no fingerprint (older, or made with encryption off) restores as
before. restoreDbBackup takes { allowKeyMismatch: true } for a key
rotation. A failed fingerprint write only logs a warning; the backup
is still taken.

(cherry picked from commit 3fd751a499513009b0bc21cefe1dc58a8e3830ca)
2026-11-10 16:28:52 +03:30
serenity
3967c00886 fix(db): check the full postcondition before a migration is skipped or recorded
The runner treats a migration as already applied when one sentinel schema object
exists, and the duplicate-column recovery writes the ledger row even when the
replay left columns missing. Three effects followed from a ledger gap:

- 005 and 027 were skipped when only one of their columns existed, so the other
  columns and indexes were never created.
- 012 added the cache tokens to usage_history.tokens_input a second time, which
  inflates the stored billing history.
- A recovery that failed for another reason after a duplicate column was
  recorded as applied with columns still missing.

Check every column and index that 005 and 027 add. Skip 012 once any later
migration is in the ledger, because later rows already store the total. After
duplicate-column recovery, roll back the ledger row and fail the migration when
a column the file adds is still missing. The leftovers test now builds a schema
that has the column, as the case it describes.

(cherry picked from commit 74492d37e3b9676145cade5ddd1aaf094644225d)
2026-11-10 16:28:52 +03:30
serenity
dbf44e92eb fix(db): let backup pruning honour a lease on an in-flight migration snapshot
Count and age pruning treat a pre-migration snapshot like any other
backup family. The migration runner avoids pruning itself, but
backupDbFile, createManagedDbBackup and the scheduled cleanup prune
the same directory from other call sites and other processes. The
only protection was a temp-directory marker that disappears when the
snapshot is published, which is before the migrations finish. A
restore point in use could be deleted mid-upgrade.

Add acquireSnapshotLease(backupDir, snapshotPath). It writes a small
lease file (pid and snapshot name) next to the snapshot and returns a
release function. pruneBackupDirectory skips every family named by a
lease whose process is alive and whose file is under a day old, and
removes leases of dead processes. Without a lease nothing changes.

The migration runner has to take and release the lease. That change
is in a separate file and is not part of this commit.

(cherry picked from commit f094abe1958b52136a09cf0ee84db0017bb43e6f)
2026-11-10 16:28:52 +03:30
serenity
8b5dd232db docs(changelog): number the fragment (#19684) 2026-11-10 15:54:57 +03:30
serenity
8d54b0cf80 docs(security): state the status gate on permanent ban detection
checkFallbackError no longer gives a permanent verdict to a banned-signal
body on HTTP 408, 429 or 5xx, because a transient status that only quotes a
ban phrase is not a ban. BAN_DETECTION.md still said the permanent
terminalization fires at any HTTP status. The line now names the three
excluded statuses.

Checks: check-docs-sync, check-docs-frontmatter, check-fabricated-docs,
check-docs-symbols and prettier pass.
2026-11-10 15:43:54 +03:30
serenity
9804c0743d test(stryker): list the bundle's covering tests in tap.testFiles 2026-11-10 15:43:54 +03:30
serenity
cd0a826fdf perf(combo): index provider accounts once in prompt-cache expansion
expandPromptCacheAffinityTargetsFromConnections looked up the authType of
every scoped account with a linear find over the same provider list. For
one unpinned target that is O(accounts^2); for T targets it is
O(T x accounts^2). Auto combos run this expansion on every request.

Build one id -> connection index per provider on first use and read
authType from it. The first entry wins for a duplicate id, as the find
did. Output order, connection ids and execution keys are unchanged.

(cherry picked from commit 1762b693cc16c34ad066f328a224b0d79b16bb57)
2026-11-10 15:43:54 +03:30
serenity
46ec337e02 perf(gemini): stop copying the rate-limit windows on every request
The Gemini RPM and TPM trackers pruned expired entries with
Array.slice(i), which copies the whole remaining window on every
request. Cost per request grew with the number of requests in the last
60 seconds, and the published limits reach 16000 RPM. The map keys also
stayed after traffic stopped.

Each window now keeps a head index. Expiring an entry moves the index.
The array is compacted only when the dead prefix is at least half of it.
A window with no live entries is deleted from its map. The 60 second
cutoff is unchanged.

(cherry picked from commit a73eabdf2f6b6c9866f00985ac52ffb525557881)
2026-11-10 15:43:54 +03:30
serenity
5ca58be468 perf(routing): cache the active-provider lookup for a bare model id
Bare-model resolution asked the database which active providers carry the
model, with two json_each scans over every connection's synced and custom
model catalog, on every request. The work grew with catalog size, not with
the size of the lookup.

Keep the answer per model id and drop it when the model catalog cache
version moves. Every connection write (create, update, delete) and every
synced or custom model write already bumps that version, and the write
paths that skip it only touch cooldown, error and token fields. The map is
capped at 1000 ids because ids come from clients.

(cherry picked from commit db48f5fba5537b2c9d723a31692bc55583e023b1)
2026-11-10 15:43:54 +03:30
serenity
6879415086 fix(resilience): park unpaid DashScope keys and ignore ban phrases on transient statuses
A DashScope key with no balance answers 400 Arrearage, and a key without the
model service answers 403 AccessDenied.Unpurchased. Both stay true until the
owner pays. The first got no cooldown (shouldFallback false) and the second a
3 s auth cooldown, so the dead key was hit again and again. Both now return
credits_exhausted with a 1 h cooldown, matched on the vendor code or its exact
sentence and only on 400 and 403.

isAccountDeactivated is a substring match with no status check. A 408, 429 or
5xx body that only quotes a ban phrase (a relay echoing an old error, a
throttle message) gave the account a one-year permanent cooldown. The permanent
verdict now needs a status other than 408, 429 and 5xx. 401 and 403 keep it.

(cherry picked from commit 846e42ae792fafc6cdafc385dffe3fdaeacd4516)
2026-11-10 15:43:54 +03:30
serenity
338cd93393 fix(claude-code): sign the same body view as the native client
The CCH token was xxHash64 of the raw request body with seed
0x6e52736ac806831e. The native Claude Code client hashes a different
view of the body and uses a different seed, so the token never matched
what a real client sends.

Seed: the Claude Code binary stores the four xxHash64 initial-state
words for seed 0x4d659218e32a3268 next to its "cch=00000" routine. The
seed 0x6e52736ac806831e is not in the binary, neither as a seed nor as
state words.

View: the native client drops "max_tokens", "fallbacks" and
"fallback_credit_token" members at every depth and empties "model"
string values. It keeps the comma before a trailing run of two or more
dropped members. The bytes of the sent body do not change except for the
five digits.

The new test pins 24 vectors from Claude Code 2.1.220 (published in the
CLIProxyAPI signer tests) and the view rules. The vectors reproduce
only with the new seed and the new view.

(cherry picked from commit be5c1f05f4476cb97a2524c106b84671e034858f)
2026-11-10 15:43:53 +03:30
serenity
52ea27d843 fix(admission): rotate virtual lanes and keep same-tenant order
With per-tenant virtual lanes on, dispatchLanes rebuilt the lane list in
Map order on every release. One release frees one slot, so the first lane
took it and the loop returned before any later tenant was looked at. A
lone tenant waited behind the whole backlog of the tenant ahead of it.

A lane that is served now moves to the end of the Map, which makes the Map
order the round-robin cursor. Dispatch also repeats rounds while capacity
remains and a lane was served, so spare capacity is not left idle.

The direct-admission fast path checked only the shared queue. With lanes
on, older work waits in its lane while the shared queue is empty, so a
newer request from the same tenant was admitted ahead of it. The fast
path now also requires that the tenant's own lane is empty. Other
tenants still bypass a lane head that does not fit, so the bounded bypass
stays and no head-of-line block spans tenants.

(cherry picked from commit 143b576c215d356dc9e44c85b8137d344f1813e9)
2026-11-10 15:43:53 +03:30
Bl0ck
f5f2f29fe3 docs(changelog): note isolated stale combo catalog failures 2026-11-10 13:44:32 +02:00
Bl0ck
5aa9732196 test(combos): preserve badges when a provider catalog throws 2026-11-10 13:44:21 +02:00
Bl0ck
d336a9651e fix(combos): keep healthy stale-model badges on catalog lookup errors 2026-11-10 13:44:03 +02:00
Bl0ck
79da76e719 test(providers): scope async credential probes to their originating POST 2026-11-10 13:30:29 +02:00
AiCapitan357
71893b283f fix(deps): upgrade Next.js to 16.4.6 for November security fixes 2026-11-10 10:48:15 +00:00
xiaoyaner0201
952ca75e68 chore(changelog): number reasoning routing repository entry 2026-11-10 17:51:05 +08:00
Bl0ck
602671430e style(tests): align route imports with Prettier 2026-11-10 11:48:50 +02:00
Bl0ck
9b629504d9 docs: explain independent hosted and dedicated image input bounds 2026-11-10 11:41:59 +02:00
Bl0ck
fe157b413a test(images): forward 128 hosted references and reject 129 2026-11-10 11:41:56 +02:00
Bl0ck
03e1c29c4b fix(images): lift verified Codex hosted edit reference guard to 128 2026-11-10 11:41:54 +02:00
Bl0ck
f0e8c12f17 docs(codex): document opt-in selected plan response header 2026-11-10 11:28:46 +02:00
xiaoyaner0201
1cf48f6323 fix(db): invalidate reasoning rule cache before awaiting persistence 2026-11-10 16:29:01 +08:00
tiangao88
d167095b87 Merge remote-tracking branch 'upstream/release/v3.8.54' into fix/preserve-opaque-reasoning-20261110 2026-11-10 07:58:35 +01:00
xiaoyaner0201
08d5907f59 refactor(db): extract reasoning routing rule repository 2026-11-10 14:40:41 +08:00
serenity
c13f4e3eb0 docs(changelog): number the fragment (#19634) 2026-11-10 09:33:21 +03:30
serenity
17db3c6555 fix(cli): keep an XDG install's database when an empty ~/.omniroute appears
With DATA_DIR unset, every default-data-dir resolver returned any existing
~/.omniroute first. Other code creates ~/.omniroute/<sub> directly, so an
XDG (or %APPDATA%) install with its database in the platform dir moved to a
new empty database on the next start.

The legacy dir now wins unless the platform dir holds storage.sqlite and the
legacy dir does not. Fresh installs, legacy installs and installs where both
dirs hold a database keep the old choice. The rule is applied the same way in
the six resolver copies, so the CLI and the server pick the same database.
2026-11-10 09:22:52 +03:30
serenity
d54295769e docs(changelog): number the fragment (#19630) 2026-11-10 09:01:00 +03:30
serenity
7d1203ee0b fix(skills): bound the server tool execution replay table
Every server-owned tool call inserted a row into server_tool_executions and
finalized it. Nothing deleted a row, so the table grew with tool traffic.

On claim, at most once per 5 minutes per database handle, delete rows older
than 30 days (the replay horizon) and rows beyond the newest 10,000 that are
older than one day. A running claim with a live lease and the last day of
rows are never deleted, so a client retry still replays instead of running a
tool twice. A failed sweep is logged and does not fail the claim.

(cherry picked from commit 75a124806cac37606adea371848901a239150eb8)
2026-11-10 08:50:25 +03:30
serenity
796168e075 perf(db): bootstrap compression-combo tables once per DB instance
chatCore calls listCompressionCombos() on every request, and each call ran
the full bootstrap: two CREATE TABLE IF NOT EXISTS, three CREATE INDEX IF
NOT EXISTS, an INSERT OR IGNORE seed and the legacy-seed upgrade check. The
INSERT OR IGNORE takes the SQLite write lock even when the seed row exists.
While another process (CLI, backup, second instance) held the write lock,
each request blocked the event loop for the full busy_timeout and then
failed the lookup with "database is locked".

Latch the bootstrap per DB instance in a WeakSet. The latch is set only
after the bootstrap succeeds, so a failed bootstrap retries on the next
call, and a restore or reset (a new instance) bootstraps again.

(cherry picked from commit bf57d38ab82cca51d2538381d17fa945150c543d)
(cherry picked from commit 70ce760302fe028fec6f5762df20828903f659d9)
2026-11-10 08:50:25 +03:30
serenity
a2c68a5088 fix(db): drop a node's customModels row on node delete
A compatible node's custom models are stored in key_value under the
'customModels' namespace keyed by the node id. deleteProviderNode
removed only the provider_nodes row, so the node's model list outlived
the node. deleteProviderConnectionsByProvider already purges the synced
models and discovery state of a deleted provider, but not this row, so
the management listings (GET /api/provider-models, /api/pricing/models)
kept returning it. Delete the customModels row inside the node delete.
Canonical providers are unaffected: their rows are keyed by provider
name, never by a node id.

Port of 9router a8f63f4d.

(cherry picked from commit 93a805880008de0eaec44af5715f40648e55cf2b)
(cherry picked from commit c40729cda0a93eedbc1706a76fc5ce8a80d747e4)
2026-11-10 08:50:24 +03:30
diegosouzapw
155652bef2 fix(providers): clear #19583 mutation and cognitive-complexity gates
- list expiry-first-deadline-order and -session-spreading tests in
  stryker tap.testFiles (they cover quotaScoring.ts and sse/services/auth.ts)
- extract windowUsableCap() from resolveUsableAndReset so the lapsed-window
  cap stays under the cognitive-complexity limit (same behaviour)
- move pickExpiryFirstConnection's JSDoc back above its function
2026-11-10 01:43:26 -03:00
diegosouzapw
0d0e46707e Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD 2026-11-10 01:05:35 -03:00
Praveen K Palaniswamy
95d9902bf0 fix(images): reject extra references for a Leonardo combo edit target
A combo edit routed to Leonardo uploaded only the first reference and dropped
the rest, while the single-model route answers 400. The combo branch now
returns the same 400, so the combo moves on to its next provider.
2026-11-09 21:54:35 -05:00
tiangao88
ed8309c01c fix(sse): preserve opaque metadata through generic text-tail flushes 2026-11-10 01:54:16 +01:00
tiangao88
07ab573b9f fix(sse): preserve opaque reasoning records and index context 2026-11-10 01:41:26 +01:00
Tomas Fecko
b6b31604b0 fix(providers): keep expiry-first deadline picks out of OAuth session spreading
After a strategy picks an account, getProviderCredentials moves the request to
a peer OAuth account with fewer foreign sessions in flight. Under
`expiryFirstOrder: "deadline"` that undid the decision: on a two-account
Claude pool every parallel Claude Code conversation after the first was moved
to the account whose week resets two days later, so it kept being spent.
Deadline order now keeps its pick; the default rate order still spreads.
2026-11-09 21:54:08 +01:00
Bl0ck
ba4f6cdda9 fix(codex): do not surface stale account plan on no-credentials response 2026-11-09 22:48:58 +02:00
Bl0ck
26464e5b70 fix(codex): correct plan sanitizer and format diagnostics 2026-11-09 22:48:18 +02:00
Bl0ck
d69bad2c11 fix(codex): correct plan sanitizer and format diagnostics 2026-11-09 22:48:14 +02:00
Bl0ck
1fbd5f0c45 fix(codex): correct plan sanitizer and format diagnostics 2026-11-09 22:48:11 +02:00
Bl0ck
0e3d307e17 docs(changelog): note opt-in Codex plan troubleshooting header 2026-11-09 22:47:10 +02:00
Bl0ck
e108c0dc7e docs(codex): document disabled-by-default account plan response diagnostics 2026-11-09 22:46:49 +02:00
Bl0ck
0fecfd8165 test(codex): verify plan header opt-in and sanitization 2026-11-09 22:46:03 +02:00
Bl0ck
e4fd2574bf feat(codex): report current selected account plan to telemetry 2026-11-09 22:46:00 +02:00
Bl0ck
fd1dcad9bb feat(codex): gate account plan header behind opt-in allowlist 2026-11-09 22:45:57 +02:00
Bl0ck
76518d6507 feat(codex): declare optional selected-plan diagnostics header 2026-11-09 22:45:54 +02:00
Tomas Fecko
53ce8e3653 fix(providers): roll lapsed session-only resets forward in expiry-first
A session whose reset already passed was only skipped when a longer window
existed. For a session-only account the past reset stayed negative and its
stale fraction still capped `usable`, so deadline order ranked it as already
expiring. A lapsed session is now refilled with its next reset one 5h period
later, like weekly and monthly windows. Adds two regression tests.
2026-11-09 21:24:45 +01:00
Tomas Fecko
2aba63fe7e docs(changelog): add fragment for #19583 2026-11-09 19:54:23 +01:00
Tomas Fecko
9debe722cf feat(providers): expiry-first deadline order and lapsed-reset handling
A longer quota window whose reset already passed comes from a stale quota
read. expiry-first scored it as "expires now" (deadline floored to
minHours), so a stale account looked like the most urgent one and took the
traffic: on 2026-11-06/07 a Claude Team account whose last read still carried
the previous Friday's weekly reset drained ahead of a Max account resetting two
days later. A lapsed weekly/monthly window is now treated as refilled, with its
next reset one nominal period later; a lapsed window of unknown length keeps no
deadline.

Adds `expiryFirstOrder: "deadline"` (provider override or global): accounts
that still hold quota are spent strictly by the nearest deadline, a spent 5h
session or exhausted window is skipped until it refills, and deadlines within
`expiryFirstDeadlineTieMinutes` (default 60) rotate least-recently-used. The
default stays the per-hour rate. Provider strategy overrides now reach the
expiry-first config, and the settings schema accepts both keys per provider.
2026-11-09 19:24:56 +01:00
diegosouzapw
40e27525c6 fix(images): send the request size on Leonardo edits
/v1/images/edits passed only the prompt to the Leonardo handler, so every
edit came back 1024x1024 whatever size the client asked for, while
/v1/images/generations already maps size to width/height. Pass size on the
single-model and combo edit paths; the route test now asserts 576x1024.
2026-11-09 05:09:04 -03:00
diegosouzapw
394d56b82b Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD
# Conflicts:
#	src/app/api/v1/images/edits/route.ts
2026-11-09 04:36:56 -03:00
diegosouzapw
9c982b1aaf test(images): route the Leonardo edit result download through the pinned media fetch stub
The release now downloads Leonardo results through the guarded media fetch
(DNS resolve + pinned agent), so the edit tests stub the lookup and the pinned
fetch the same way the other Leonardo tests do, and wait for call-log saves
before closing the DB.
2026-11-07 19:53:44 -03:00
diegosouzapw
55466d43cf Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD
# Conflicts:
#	open-sse/handlers/imageGeneration/providers/leonardo.ts
#	open-sse/handlers/videoGeneration/leonardoHandler.ts
#	tests/unit/leonardo-image-model-id.test.ts
#	tests/unit/leonardo-video-generation.test.ts
2026-11-07 19:49:54 -03:00
Bl0ck154
2f5532d7e0 test(combo): keep uncataloged ceiling coverage after Terra registration
Signed-off-by: Bl0ck154 <36800583+Bl0ck154@users.noreply.github.com>
2026-11-07 23:00:47 +02:00
Bl0ck154
d17b135642 Merge release/v3.8.54 into feat/gpt61-terra-upstream-20261102; resolve Stryker registrations 2026-11-07 21:27:53 +02:00
Bl0ck
aedc445cb0 test(openai): cover Terra sampling in native and translated Responses 2026-11-07 21:05:43 +02:00
Bl0ck
783e35d292 fix(openai): strip Terra logprobs only for active reasoning 2026-11-07 21:05:20 +02:00
Bl0ck
5b721ffb9d fix(openai): keep Terra sampling when reasoning is disabled 2026-11-07 21:05:05 +02:00
Bl0ck154
1b44f42a4b Merge remote-tracking branch 'upstream/release/v3.8.53' into audit/pr18738-quality-20261102
Signed-off-by: Bl0ck154 <36800583+Bl0ck154@users.noreply.github.com>
2026-11-02 20:34:30 +02:00
Bl0ck154
8bf129e62e fix(quality): avoid added Fast multiplier complexity and include coverage test
Signed-off-by: Bl0ck154 <36800583+Bl0ck154@users.noreply.github.com>
2026-11-02 20:34:30 +02:00
Praveen K Palaniswamy
55f499c284 Merge branch 'fix/leonardo-image-model-id' into feat/leonardo-image-edits 2026-11-02 11:37:27 -05:00
Praveen K Palaniswamy
bb51084f7e Merge remote-tracking branch 'upstream/release/v3.8.53' into fix/leonardo-image-model-id 2026-11-02 11:37:17 -05:00
Bl0ck154
296f7a0219 docs(changelog): format Terra model fragment as release bullet 2026-11-02 17:19:05 +02:00
Bl0ck154
18e24bda3a Merge current release/v3.8.53 into GPT-6.1 Terra model support
Signed-off-by: Bl0ck154 <36800583+Bl0ck154@users.noreply.github.com>
2026-11-02 17:12:10 +02:00
Bl0ck154
9505140652 test(models): type Responses translation regression result 2026-11-02 00:57:53 +02:00
Bl0ck154
0491633369 fix(models): preserve Terra effort-only Codex Responses requests 2026-11-02 00:56:57 +02:00
Bl0ck154
85b3cfedb2 feat(models): register GPT-6.1 Terra for OpenAI API and Codex 2026-11-02 00:54:57 +02:00
Praveen K Palaniswamy
cde7a030aa docs(changelog): add Leonardo image edits 2026-10-31 11:12:38 -04:00
Praveen K Palaniswamy
8c600b7ac9 feat(images): support Leonardo reference-image edits on /v1/images/edits (#18671)
/v1/images/edits rejected every Leonardo model, although Leonardo does
image-to-image on its generations call. Upload the edit reference through
Leonardo's init-image flow (presigned S3 form post, no Leonardo token sent
to S3) and generate with init_image_id and init_strength 0.3, on both the
single-model and the combo edit paths. Edits are call-logged under
/v1/images/edits.
2026-10-31 11:01:30 -04:00
Praveen K Palaniswamy
6deb70bb83 docs(changelog): add the Leonardo image and video fix 2026-10-31 10:46:32 -04:00
Praveen K Palaniswamy
02df761457 fix(sse): send Leonardo video to the text-to-video endpoint and return the mp4
The video handler posted an image-generation body (modelId "phoenix",
num_frames) to /generations, which Leonardo rejects with 400 "Unexpected
variable num_frames", so leonardo video never worked. Submit to
/generations-text-to-video with a model enum and resolution, read
motionVideoGenerationJob, poll the generations status URL, and download
motionMP4URL (url is a jpg thumbnail). The catalog lists Motion 2.0 and
Motion 2.0 Fast; the old phoenix id maps to Motion 2.0.
2026-10-31 10:45:29 -04:00
Praveen K Palaniswamy
ce3be09269 fix(sse): send Leonardo image requests a platform-model UUID, not the catalog id
Leonardo's v1 generations API takes a platform-model UUID as modelId. The
handler sent the catalog id (phoenix, sdxl), which Leonardo answers with
HTTP 500 "internal error", so every leonardo/* image request failed.
Map phoenix and sdxl to the Phoenix 1.0 and SDXL 1.0 UUIDs; a raw UUID
passes through so any Leonardo model can be used.
2026-10-31 10:30:49 -04:00
ahmedgo17390
18c2af93a5 test(batch): isolate E2E worker startup 2026-10-30 22:16:32 +03:00
ahmedgo17390
92ead552ec test: protect property runner reports 2026-10-29 13:26:33 +03:00
989 changed files with 65359 additions and 2623 deletions

View File

@@ -241,6 +241,17 @@ PORT=20128
# API_HOST=0.0.0.0
# DASHBOARD_PORT=20128
# Dedicated port for the self-service quota page (/quota/{provider}). Unset means no listener.
# The port relays only that page, its two API routes and its build assets to the main port.
# Every other path answers 404. GET and HEAD are relayed without a body.
# One JSON PATCH of the quota view is also relayed, with a body of at most 4096 bytes.
# A value that is not a port from 1 to 65535 opens nothing and logs a warning.
# So does a value equal to the dashboard port, the API port or the live WebSocket port.
# The port serves plain HTTP. Keep it on 127.0.0.1 and put a TLS reverse proxy in front of it.
# Used by: src/lib/quotaPanelBridge.ts, src/lib/apiBridgeServer.ts
# QUOTA_PANEL_PORT=20133
# QUOTA_PANEL_HOST=127.0.0.1
# Connection backpressure: cap concurrent in-flight chat connections (503 + Retry-After when full).
# Used by: src/sse/utils/backpressure.ts — disabled when unset/0.
# OMNI_MAX_CONCURRENT_CONNECTIONS=0
@@ -891,6 +902,19 @@ ALLOW_API_KEY_REVEAL=false
# Default: https://api.getnadir.com
# OMNIROUTE_NADIR_BASE_URL=https://api.getnadir.com
# Opt-in for the `decision` auto-combo router strategy (feature flag; a dashboard DB
# override wins). While off, decision combos read no credential, make no call and route
# with the rules strategy.
# Used by: open-sse/services/autoCombo/decisionStrategy.ts
# Default: false
# COMBO_DECISION_ROUTER_ENABLED=false
# Key for the `decision` router's network deciders (systemone, http), used when the
# combo's config.decision.connectionId is unset (and, for systemone, no typesafe
# connection is in scope). A combo never stores a key. Sensitive.
# Used by: open-sse/services/decision/credentials.ts
# OMNIROUTE_DECISION_API_KEY=
# Weekly window for per-API-key USD usage limits.
# Used by: src/lib/usage/apiKeyUsageLimits.ts (request enforcement, key usage-limit
# status, @@om-usage). Values: provider | calendar | Default: provider
@@ -978,6 +1002,14 @@ NEXT_PUBLIC_BASE_URL=http://localhost:20128
# Do not include /v1; if included accidentally it will be normalized away.
# OMNIROUTE_PUBLIC_BASE_URL=http://192.168.0.15:20128
# Origin of the inference API as key holders reach it, reported by
# GET /v1/me/quota/{provider}. Set it when the API is served from a different
# origin than the dashboard, for example behind API_PORT. Falls back to
# OMNIROUTE_PUBLIC_BASE_URL; with neither set the API reports no base URL.
# An invalid value yields no base URL and does not fall back to
# OMNIROUTE_PUBLIC_BASE_URL.
# OMNIROUTE_PUBLIC_API_BASE_URL=https://api.example.com
# Absolute provider plugin manifest URL advertised to sidecar clients.
# Used by: open-sse/config/providerPluginManifestUrl.ts. When unset, OmniRoute
# derives the URL from request origin or HOST/PORT using OMNIROUTE_PUBLIC_PROTOCOL.
@@ -2613,6 +2645,13 @@ APP_LOG_TO_FILE=true
# Used by: src/lib/healthzLag.ts (event-loop stall sampler). Disabled by default;
# logs sizes and inflight count only, never bodies or heap snapshots.
# OMNIROUTE_EVENT_LOOP_STALL_THRESHOLD_MS=0 stops that sampler, and this diagnostic with it.
# Optional response header for troubleshooting Codex OAuth plan eligibility.
# OFF by default: when enabled, API callers can see the recognized subscription tier
# of the selected Codex connection in X-OmniRoute-Selected-Connection-Plan.
# Do not enable on public/multi-tenant gateways if this account metadata is private.
# Arbitrary/unrecognized plan values and non-Codex requests never get this header.
# OMNIROUTE_CODEX_PLAN_RESPONSE_HEADER=0
# OMNIROUTE_HEAP_DIAGNOSTICS_ENABLED=0
# Heap-use threshold in MiB for the opt-in diagnostic (default: 900).
# A high-heap log is rate-limited to once per 60 seconds.
@@ -3939,6 +3978,13 @@ INSPECTOR_INTERNAL_INGEST_TOKEN=
QUOTA_STORE_DRIVER=sqlite
# QUOTA_STORE_REDIS_URL= # ex.: redis://localhost:6379 (apenas quando driver=redis)
# QUOTA_SATURATION_THRESHOLD=0.5 # 0..1; >= threshold ativa modo strict (sem empréstimo)
# Tokens routed through OmniRoute that explain at most one percent point of a
# percent-based plan window when Quota Share splits it between keys. Default 1000.
# Set it close to what one point costs on your plan. A higher value moves more of
# the usage made outside OmniRoute from the active keys to all keys, by weight.
# Too high a value under-charges their own usage.
# Used by: src/lib/quota/percentAttribution.ts
# QUOTA_PERCENT_MIN_TOKENS_PER_POINT=1000 # finite and >= 1, otherwise the default
# QUOTA_SOFT_DEPRIORITIZE_FACTOR=0.7 # 0..1; multiplicador do score quando soft policy ativa
# STATUS_SOFT_DEPRIORITIZE_FACTOR=0.5 # 0..1; multiplicador do score p/ provider esgotado (credits_exhausted/rate_limited) quando preflight cutoff OFF (#4540)
# QUOTA_CONSUMPTION_RETENTION_DAYS=14 # GC de buckets quota_consumption.updated_at antigos

View File

@@ -22,7 +22,11 @@ name: omni-queue
# • Both jobs run in the `omni-queue` environment, which holds the App's credentials and the
# owner's OMNI_QUEUE_LAND_TOKEN and admits the default branch only, by its exact name: a
# workflow on a candidate branch cannot read them. The App writes omni-queue/land, the status release rulesets
# require, so its private key is the root of trust. The land token reaches the tick only.
# require, so its private key is the root of trust. The land token reaches the tick only
# (the landing with landing.actor "owner"; the comments, label removals and issues with
# config voice "owner"). The owner's merge-commit signing key (OMNI_QUEUE_SIGNING_KEY,
# config landing.signing "ssh") reaches one step of the tick, which writes it to a 0600 file
# under RUNNER_TEMP; the job's last step removes it, whatever happened.
# • action=bless (the explicit emergency exit): the tick writes omni-queue/land on ONE commit
# for a hotfix, sync-back or base repair, after checking that both the dispatcher
# (github.actor) and whoever triggered the run (github.triggering_actor, the re-runner of a
@@ -235,10 +239,35 @@ jobs:
echo "name=${login}"
echo "email=${id}+${login}@users.noreply.github.com"
} >> "$GITHUB_OUTPUT"
# config.landing.signing "ssh": the owner's SSH signing key, for the queue's merge commits
# (scripts/merge-queue/compose.mjs reads it at compose.signingKeyPath(RUNNER_TEMP) and hands
# git the path as per-command configuration, never as an argument). The key exists only in
# this step's environment and in a file only the runner user can read; it is never
# printed. Without the secret nothing is written and a tick that is asked to sign composes
# unsigned, with one `error` event per batch. This step never fails the job: a key it
# cannot write is the same case (signing never blocks the queue).
- name: Write the merge-commit signing key
env:
OMNI_QUEUE_SIGNING_KEY: ${{ secrets.OMNI_QUEUE_SIGNING_KEY }}
run: |
set -uo pipefail
if [ -z "${OMNI_QUEUE_SIGNING_KEY:-}" ]; then
echo "no merge-commit signing key in the environment: nothing written"
exit 0
fi
umask 077
if ! { mkdir -p "$RUNNER_TEMP/omni-queue-signing" \
&& chmod 700 "$RUNNER_TEMP/omni-queue-signing" \
&& printf '%s\n' "$OMNI_QUEUE_SIGNING_KEY" > "$RUNNER_TEMP/omni-queue-signing/signing-key" \
&& chmod 600 "$RUNNER_TEMP/omni-queue-signing/signing-key"; }; then
rm -rf "$RUNNER_TEMP/omni-queue-signing"
echo "::warning::the merge-commit signing key could not be written: merge commits stay unsigned"
fi
# Inputs travel through env and are assembled into an argv array: no expression is ever
# expanded inside the script body. Scheduled, workflow_run and pull_request_target ticks
# pass no base (the tick discovers the bases with work). The owner's land token is used
# only by the landing itself when config.landing.actor is "owner" (never printed).
# by the landing itself when config.landing.actor is "owner", and by the queue's comments,
# label removals and issues when config.voice is "owner" (never printed).
# GITHUB_ACTOR and GITHUB_TRIGGERING_ACTOR are the runner's own default variables, named
# here because a bless is checked against both: the original dispatcher, whose inputs a
# re-run keeps, and whoever triggered this run (the re-runner of a re-run).
@@ -265,3 +294,8 @@ jobs:
if [ -n "${INPUT_SHA:-}" ]; then args+=(--sha "$INPUT_SHA"); fi
fi
node scripts/merge-queue/tick.mjs "${args[@]}"
# Last step, whatever happened before it (failure, cancellation): the signing key leaves
# the runner. Needs no secret; nothing to remove is not an error.
- name: Remove the merge-commit signing key
if: always()
run: rm -rf "$RUNNER_TEMP/omni-queue-signing"

View File

@@ -20,6 +20,7 @@ jobs:
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ github.sha }}
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
@@ -28,17 +29,13 @@ jobs:
- uses: ./.github/actions/npm-ci-retry
with:
cache: "false"
- name: Emit shadow acceptance report
run: |
node scripts/quality/validate-release-acceptance.mjs \
--plan tests/fixtures/release-acceptance/plan-lint.json \
--manifests tests/fixtures/release-acceptance/shadow-manifests \
--out release-acceptance-report.json
- name: Validate and retain the live gate inventory
run: node scripts/quality/release-acceptance/run-shadow.mjs "$RUNNER_TEMP/release-acceptance-shadow"
continue-on-error: true
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: release-acceptance-report
path: release-acceptance-report.json
if-no-files-found: ignore
path: ${{ runner.temp }}/release-acceptance-shadow/
if-no-files-found: error
retention-days: 30

View File

@@ -11,7 +11,7 @@ import {
writeFileSync,
} from "node:fs";
import { createCipheriv, createDecipheriv, randomBytes, scryptSync } from "node:crypto";
import { dirname, join, extname, basename } from "node:path";
import { dirname, join, extname, basename, resolve } from "node:path";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
import { resolveDataDir } from "../data-dir.mjs";
@@ -56,6 +56,7 @@ export function registerBackup(program) {
.option("--cron <expr>", t("backup.auto.cronOpt"), "0 3 * * *")
.option("--cloud", t("backup.cloudOpt"))
.option("--encrypt", t("backup.encryptOpt"))
.option("--key-file <path>", t("backup.keyFileOpt"))
.option("--retention <n>", t("backup.retentionOpt"), parseInt)
.action(async (opts) => {
const exitCode = await runBackupAutoEnableCommand(opts);
@@ -192,7 +193,16 @@ export async function runBackupCommand(opts = {}) {
let passphrase = null;
if (opts.encrypt) {
if (opts.keyFile) {
passphrase = readFileSync(opts.keyFile, "utf8").trim();
try {
passphrase = readFileSync(opts.keyFile, "utf8").trim();
} catch (err) {
console.error(`Cannot read key file ${opts.keyFile}: ${err?.code || "read error"}`);
return 1;
}
if (!passphrase) {
console.error(t("backup.noPassphrase"));
return 1;
}
} else {
passphrase = await promptPassphrase();
if (!passphrase) {
@@ -336,11 +346,29 @@ function getSchedulePath() {
export async function runBackupAutoEnableCommand(opts = {}) {
const schedulePath = getSchedulePath();
let keyFile;
if (opts.encrypt) {
// A scheduled run has no TTY, so an encrypted schedule needs a key file.
// Persist the absolute PATH only (never the passphrase): the server cwd
// differs from the CLI cwd.
if (!opts.keyFile) {
console.error("Encrypted automatic backups need --key-file <path> (no TTY on a schedule).");
return 1;
}
keyFile = resolve(String(opts.keyFile));
try {
if (!readFileSync(keyFile, "utf8").trim()) throw new Error("empty");
} catch {
console.error(`Key file ${keyFile} is missing, unreadable or empty.`);
return 1;
}
}
const schedule = {
enabled: true,
cron: opts.cron || "0 3 * * *",
cloud: !!opts.cloud,
encrypt: !!opts.encrypt,
...(keyFile ? { keyFile } : {}),
retention: opts.retention || null,
updatedAt: new Date().toISOString(),
};
@@ -375,7 +403,10 @@ export async function runBackupAutoStatusCommand() {
console.log(` cron: ${schedule.cron}`);
console.log(` cloud: ${schedule.cloud ? "yes" : "no"}`);
console.log(` encrypt: ${schedule.encrypt ? "yes" : "no"}`);
if (schedule.keyFile) console.log(` key-file: ${schedule.keyFile}`);
console.log(` retention: ${schedule.retention ?? "unlimited"}`);
if (schedule.lastRunAt) console.log(` last run: ${schedule.lastRunAt}`);
if (schedule.lastError) console.log(` last error: ${schedule.lastError}`);
return 0;
}

View File

@@ -187,8 +187,17 @@ export function registerResilience(program) {
.option("--threshold <n>", t("resilience.config.threshold"), parseInt)
.option("--reset-timeout <ms>", t("resilience.config.resetTimeout"), parseInt)
.option("--base-cooldown <ms>", t("resilience.config.baseCooldown"), parseInt)
.option("--p2c-latency-weight <0-20>", t("resilience.config.p2cLatencyWeight"), parseInt)
.action(async (opts, cmd) => {
const body = {};
if (opts.p2cLatencyWeight != null) {
const w = opts.p2cLatencyWeight;
if (!Number.isInteger(w) || w < 0 || w > 20) {
process.stderr.write("Error: --p2c-latency-weight must be an integer from 0 to 20\n");
process.exit(1);
}
body.p2cLatency = { weight: w };
}
if (opts.threshold != null) body.threshold = opts.threshold;
if (opts.resetTimeout != null) body.resetTimeoutMs = opts.resetTimeout;
if (opts.baseCooldown != null) body.baseCooldownMs = opts.baseCooldown;

View File

@@ -22,29 +22,41 @@ export function getLegacyDotDataDir(homeDir = safeHomeDir()) {
return path.join(homeDir, `.${APP_NAME}`);
}
function hasDatabase(dir) {
try {
return fs.statSync(path.join(dir, "storage.sqlite")).isFile();
} catch {
return false;
}
}
export function getDefaultDataDir() {
const homeDir = safeHomeDir();
const legacyDir = getLegacyDotDataDir(homeDir);
if (fs.existsSync(legacyDir)) {
try {
if (fs.statSync(legacyDir).isDirectory()) {
return legacyDir;
}
} catch {
// Ignore stat errors and continue to the platform default.
}
let legacyIsDir = false;
try {
legacyIsDir = fs.statSync(legacyDir).isDirectory();
} catch {
// Ignore stat errors and continue to the platform default.
}
let platformDir = null;
if (process.platform === "win32") {
const appData = process.env.APPDATA || path.join(homeDir, "AppData", "Roaming");
return path.join(appData, APP_NAME);
platformDir = path.join(appData, APP_NAME);
} else {
const xdgConfigHome = normalizeConfiguredPath(process.env.XDG_CONFIG_HOME);
if (xdgConfigHome) platformDir = path.join(xdgConfigHome, APP_NAME);
}
const xdgConfigHome = normalizeConfiguredPath(process.env.XDG_CONFIG_HOME);
if (xdgConfigHome) return path.join(xdgConfigHome, APP_NAME);
return legacyDir;
// An existing legacy dir wins, unless the platform dir holds the database and the legacy dir
// does not: other code creates ~/.omniroute/<sub> directly, and that alone must not move an
// XDG/APPDATA install to an empty database.
if (legacyIsDir && !(platformDir && !hasDatabase(legacyDir) && hasDatabase(platformDir))) {
return legacyDir;
}
return platformDir ?? legacyDir;
}
export function resolveDataDir() {

View File

@@ -973,7 +973,8 @@
"description": "Manage resilience config",
"threshold": "Failure threshold",
"resetTimeout": "Reset timeout in ms",
"baseCooldown": "Base cooldown in ms"
"baseCooldown": "Base cooldown in ms",
"p2cLatencyWeight": "p2c latency weight, 0 (off) to 20"
}
},
"nodes": {

View File

@@ -0,0 +1 @@
- **feat(images):** `/v1/images/edits` supports Leonardo: the reference image is uploaded through Leonardo's init-image flow and the generation is guided by it (`init_image_id`, `init_strength` 0.3), instead of the edit being rejected as unsupported. Leonardo takes one reference image; more than one returns 400, and a combo moves on to its next provider rather than editing with the first image only ([#18674](https://github.com/cheaper-inference/OmniRoute/pull/18674), closes [#18671](https://github.com/cheaper-inference/OmniRoute/issues/18671))

View File

@@ -0,0 +1 @@
- **feat(providers):** `expiry-first` treats a lapsed weekly/monthly reset (stale quota read) as refilled instead of "expires now", and gains an opt-in `expiryFirstOrder: "deadline"` (per provider) that spends the account whose quota is lost first while it has quota ([#19583](https://github.com/diegosouzapw/OmniRoute/pull/19583)) — thanks @feci

View File

@@ -0,0 +1 @@
- **feat(api):** add the per-request `x-omniroute-no-log` header to omit request/response payloads from call logs while keeping timestamp, model, status, duration and token counts ([#20096](https://github.com/cheaper-inference/OmniRoute/pull/20096))

View File

@@ -0,0 +1 @@
- **feat(sse):** Mistral now counts as an automatic-prefix-caching provider (cache-aware compression guard, cache stats) and gets a stable `prompt_cache_key` on both Chat Completions and Responses bodies ([#20111](https://github.com/cheaper-inference/OmniRoute/pull/20111)) — thanks @RayJW

View File

@@ -0,0 +1 @@
- Command Code short plan ids (go, goat, pro, ultra, teams-pro) now resolve to their plan names, and known plans show their fixed credit cap as the quota total. ([#20347](https://github.com/cheaper-inference/OmniRoute/pull/20347))

View File

@@ -0,0 +1 @@
- Qoder's Sonus (smodel) and Cantus (cmodel) are now in the static model fallback, so the ids stay routable when the live catalog is unavailable. ([#20351](https://github.com/cheaper-inference/OmniRoute/pull/20351))

View File

@@ -0,0 +1 @@
- **feat(api):** self-service quota API for API key holders, off by default behind the new `QUOTA_SELF_PANEL` feature flag. `GET /v1/me/quota/{provider}` returns the quota-share pools the key is allocated in for that provider, with the key's fair share and consumption per window, the schedule windows and per-model caps it is under, and its expiry. Account bars and per-model windows need the `self:account-quota` scope and a provider the key's settings share, and only cover connections the key may use. A number that cannot be read is reported as unavailable or `null`, never as zero. Pool display names and schedule labels are shown to key holders as the administrator wrote them. The key needs the `self:usage` scope and is read from headers only. New optional `OMNIROUTE_PUBLIC_API_BASE_URL` sets the API origin reported to key holders ([#20767](https://github.com/cheaper-inference/OmniRoute/pull/20767)).

View File

@@ -0,0 +1 @@
- **feat(plugins):** Opt-in `PLUGIN_PERMISSION_MODEL_ENABLED` feature flag (off by default) runs each plugin process under the Node.js permission model built from its manifest: reads confined to the plugin directory, writes only to its data directory with `file-write`, child processes only with `exec`; `network` stays declarative

View File

@@ -0,0 +1 @@
- **feat(api):** `GET /v1/me/usage?range=1d|7d|30d|90d` returns the usage and cost series of an API key's own requests: totals, one entry per UTC day, per day and model, per provider-and-model pair (the 50 with the most requests) and per provider. Each entry carries the billed cost, where flat-rate subscriptions count $0, next to the list price. The range defaults to `30d`, and `coverage` reports the window and the operator's raw usage-history retention setting. Rows are selected by the calling key's id only, and a built series is reused for 60 seconds per key and range, with at most 64 kept in memory. The route shares the `QUOTA_SELF_PANEL` feature flag, the `self:usage` scope and the header-only authentication of `GET /v1/me/quota/{provider}` ([#20787](https://github.com/cheaper-inference/OmniRoute/pull/20787))

View File

@@ -0,0 +1 @@
- **feat(ci):** omni-queue can speak as the owner and sign its merge commits, both off by default. With `voice: "owner"` in `config/merge-queue/config.json`, the queue's comments and label removals on pull requests, the dashboard issue and its comments, base-red comments and the tree-divergence issue go out with `OMNI_QUEUE_LAND_TOKEN`; statuses, refs, the state branch, re-runs and reads stay the App's, and a missing or refused token falls back to the App with one `error` event. With `landing.signing: "ssh"` (owner actor only), every merge commit the queue composes is signed with the owner's key from the `OMNI_QUEUE_SIGNING_KEY` environment secret, and a missing key composes unsigned with one `error` event per batch ([#20792](https://github.com/cheaper-inference/OmniRoute/pull/20792))

View File

@@ -0,0 +1 @@
- **feat(dashboard):** self-service quota page for API key holders at `/quota/{provider}`, off by default behind the `QUOTA_SELF_PANEL` feature flag. The holder types the key and sees its share of each quota-share pool per window and how full the account is (with the `self:account-quota` scope). The page also shows the per-model limits of each account, notices for a schedule block or a per-model cap, and the key's own usage. A reading the API cannot provide is shown as unavailable with its reason, never as zero. The key is sent only as a request header, kept in `sessionStorage` unless "Remember on this device" is chosen, removed from storage when refused, and can be forgotten in one click. While the flag is off every `/quota/*` path answers 404 ([#20843](https://github.com/cheaper-inference/OmniRoute/pull/20843))

View File

@@ -0,0 +1 @@
- **feat(combo):** new `decision` router strategy for Auto combos: a decider picks the model for each request and `rules` picks the account. The decider can be TypeSafe System One, your own decision URL (System One or OpenAI chat format), or one of the combo's own models called in process. Only the last user message (up to 8000 characters) and the model menu are sent; the key comes from a stored connection inside the API key's allowed connections or from `OMNIROUTE_DECISION_API_KEY`, never from the combo. Calls go through the outbound guard with no redirects, a 64 KB answer cap and a 2 s default timeout (5 s max), and any failure routes with `rules`. Off by default behind `COMBO_DECISION_ROUTER_ENABLED`; combos without a decision block do not change. The combo builder gets the settings and a Test decision button, and the TypeSafe client now uses the same guarded transport — thanks @BelphegorPrime, @alvinveroy, @rafacpti23 and @miguelenes

View File

@@ -0,0 +1 @@
- **feat(api):** Quota Share pools can opt into consented lending. In `consent` mode a `hard` key passes its share only within the idle share other keys agreed to lend. Key holders set a percentage and an optional deadline with `PATCH /api/v1/me/quota/{provider}`. The default mode, `saturation`, is unchanged. A refusal at a key's share or at the pool ceiling now says when capacity returns, when the reset time is known or can be estimated. A chat refusal then also carries `Retry-After`. An embeddings refusal carries the sentence only. An absolute cap refusal carries neither ([#20855](https://github.com/cheaper-inference/OmniRoute/pull/20855))

View File

@@ -0,0 +1 @@
- **feat(api):** `QUOTA_PANEL_PORT` opens a dedicated port for the self-service quota page. It relays only the page, its two API routes and their aliases, and its build assets. Every other path answers 404, and only GET and HEAD are relayed. The port is off by default and binds to `127.0.0.1` unless `QUOTA_PANEL_HOST` is set ([#20856](https://github.com/cheaper-inference/OmniRoute/pull/20856))

View File

@@ -0,0 +1 @@
- **feat(api):** The quota panel port (`QUOTA_PANEL_PORT`) now relays the request that saves a key's lending choice: a JSON `PATCH` of the quota view, with one `Content-Length` from 1 to 4096 bytes. The port reads the whole body before it contacts the main port, and waits at most 5 seconds for it. Every other method, body and upgrade is still refused ([#20873](https://github.com/cheaper-inference/OmniRoute/pull/20873))

View File

@@ -0,0 +1 @@
- Add an opt-in `X-OmniRoute-Selected-Connection-Plan` response header for Codex account-routing troubleshooting (`OMNIROUTE_CODEX_PLAN_RESPONSE_HEADER=1`), off by default with an explicit plan allowlist.

View File

@@ -0,0 +1 @@
- **feat(models):** add GPT-6.1 Terra to OpenAI API and Codex model catalogs, including Responses-only tool routing, supported reasoning tiers, verified token pricing, long-context rates, and Codex aliases.

View File

@@ -0,0 +1 @@
- fix(providers): a Codex discovery with a failed client-version refresh no longer shrinks the stored synced catalog (#16714)

View File

@@ -0,0 +1 @@
- fix(providers): Cloudflare Playground (cfp) no longer emits duplicated content deltas when upstream replays chunks (`replay: true` or repeated `seq`) (#18732)

View File

@@ -0,0 +1 @@
- **perf(db):** chat requests no longer re-run the compression-combo table bootstrap and default seed on every call, so a request no longer stalls for up to 2 s with "database is locked" while another process holds the SQLite write lock ([#19630](https://github.com/cheaper-inference/OmniRoute/pull/19630))

View File

@@ -0,0 +1 @@
- **fix(db):** Deleting a compatible provider node now also deletes its custom model list, so no orphaned model rows are left behind. ([#19630](https://github.com/cheaper-inference/OmniRoute/pull/19630))

View File

@@ -0,0 +1 @@
- **fix(skills):** the server tool replay table no longer grows without limit; rows older than 30 days and rows beyond the newest 10,000 (never the last day, never a live claim) are removed. ([#19630](https://github.com/cheaper-inference/OmniRoute/pull/19630))

View File

@@ -0,0 +1 @@
- **fix(cli):** an XDG or %APPDATA% install keeps using its own database when an empty `~/.omniroute` folder appears, instead of silently switching to a new empty database on the next start. ([#19634](https://github.com/cheaper-inference/OmniRoute/pull/19634))

View File

@@ -0,0 +1 @@
- **fix(admission):** with per-tenant virtual lanes on, a freed slot now rotates across tenants instead of always serving the first lane, and a newer request no longer jumps an older request queued in its own lane. ([#19684](https://github.com/cheaper-inference/OmniRoute/pull/19684))

View File

@@ -0,0 +1 @@
- **fix(resilience):** a DashScope key with no balance (400 `Arrearage`) or without the model service (403 `AccessDenied.Unpurchased`) now parks as credits exhausted instead of being retried every few seconds; a ban phrase quoted inside a 408, 429 or 5xx body no longer gives the account a one-year permanent cooldown ([#19684](https://github.com/cheaper-inference/OmniRoute/pull/19684))

View File

@@ -0,0 +1 @@
- **fix(db):** automatic and manual backup pruning now skips a migration restore point that a running upgrade still holds, once the upgrade takes its lease; a lease left by a dead process is ignored. ([#19690](https://github.com/cheaper-inference/OmniRoute/pull/19690))

View File

@@ -0,0 +1 @@
- **fix(db):** a migration that was left out of the ledger now repairs every missing column and index it adds, no longer adds cache tokens to usage history a second time, and no longer gets recorded as applied when a column it adds is still missing. ([#19690](https://github.com/cheaper-inference/OmniRoute/pull/19690))

View File

@@ -0,0 +1 @@
- **fix(db):** restoring a database backup made under a different `STORAGE_ENCRYPTION_KEY` is refused with a message that names both key fingerprints, instead of loading credentials that cannot be read. Pass `allowKeyMismatch` for a key rotation. ([#19690](https://github.com/cheaper-inference/OmniRoute/pull/19690))

View File

@@ -0,0 +1 @@
- **fix(db):** Retention cleanup no longer deletes spend that an active daily, weekly or monthly API-key budget window still counts, so a 31-day month cannot reopen its used allowance. ([#19701](https://github.com/cheaper-inference/OmniRoute/pull/19701))

View File

@@ -0,0 +1 @@
- **fix(db):** Scheduled cleanup now prunes ended exclusive-connection lease rows and past provider quota-reset events, so these two history tables stop growing forever. ([#19701](https://github.com/cheaper-inference/OmniRoute/pull/19701))

View File

@@ -0,0 +1 @@
- **fix(db):** the scheduled call-log retention pass now also deletes the request/response body files of the rows it removes, so an idle gateway no longer keeps expired bodies on disk. ([#19701](https://github.com/cheaper-inference/OmniRoute/pull/19701))

View File

@@ -0,0 +1 @@
- **fix(security):** the prompt-injection guard now decodes base64, hex and percent-encoded text in a request and scans the result, so an instruction hidden in an encoded string is scored like the same instruction in plain text. ([#19724](https://github.com/cheaper-inference/OmniRoute/pull/19724))

View File

@@ -0,0 +1 @@
- **fix(resilience):** a circuit breaker with `halfOpenRequests` above 1 now needs that many probe successes in a row before it closes, so one lucky probe no longer restores a flapping provider. ([#19724](https://github.com/cheaper-inference/OmniRoute/pull/19724))

View File

@@ -0,0 +1 @@
- **fix(pii):** a custom PII regex that backtracks for exponential time on a long run of one character, such as an overlapping alternation, is now refused when you save or test it, instead of freezing the gateway. ([#19724](https://github.com/cheaper-inference/OmniRoute/pull/19724))

View File

@@ -0,0 +1 @@
- **fix(a2a):** cancelling an A2A task now aborts the task's signal and a task that finishes after a cancel is refused with a clear "cancelled" error, instead of failing with "Invalid transition: cancelled → completed". ([#19727](https://github.com/cheaper-inference/OmniRoute/pull/19727))

View File

@@ -0,0 +1 @@
- **fix(cli-tools):** the CLI tools overview no longer shows Claude, Droid, OpenClaw, Cline and Kilo as configured when their config only mentions OmniRoute in unrelated text, or points at another host or port. The badge now follows the same fields the tool's own settings page reads. ([#19727](https://github.com/cheaper-inference/OmniRoute/pull/19727))

View File

@@ -0,0 +1 @@
- **fix(guardrails):** opt-in credential redaction no longer rewrites signed thinking blocks, encrypted reasoning or long base64 blobs because random bytes look like a short-prefix key, so replayed signatures stay valid. Full-format keys inside them are still redacted. ([#19727](https://github.com/cheaper-inference/OmniRoute/pull/19727))

View File

@@ -0,0 +1 @@
- **fix(quota):** the Redis quota store now charges a usage counter and sets its expiry in one atomic call, so a crash between the two steps can no longer leave a counter that never expires. ([#19727](https://github.com/cheaper-inference/OmniRoute/pull/19727))

View File

@@ -0,0 +1 @@
- **fix(codex):** The Codex ChatGPT Web and app-server adapters now cap the buffered event backlog by retained text size and merge adjacent small text deltas, so a fast producer behind a slow client can no longer grow memory without bound. ([#19733](https://github.com/cheaper-inference/OmniRoute/pull/19733))

View File

@@ -0,0 +1 @@
- **fix(gemini):** a non-streaming Gemini or Antigravity reply whose `[Tool call: ...]` text arrives in several stream parts now returns one tool call, and a tool-only stream cut before its finish reason is now marked as cut so a combo can try the next target. ([#19733](https://github.com/cheaper-inference/OmniRoute/pull/19733))

View File

@@ -0,0 +1 @@
- **fix(translator):** Gemini requests now map content roles `function` and `tool` to user messages, and infer a missing role from the parts, so single-turn Gemini requests without a role no longer reach the upstream as assistant messages. ([#19733](https://github.com/cheaper-inference/OmniRoute/pull/19733))

View File

@@ -0,0 +1 @@
- **fix(cache):** The semantic cache no longer stores a reply that ended in a content filter block (`content_filter`, or Claude `refusal`), so a false-positive block can clear on retry instead of being served from cache for the whole TTL. ([#19749](https://github.com/cheaper-inference/OmniRoute/pull/19749))

View File

@@ -0,0 +1 @@
- **fix(sse):** Claude Code CCH signing now uses the seed and the body view of the real client (verified on Claude Code 2.1.252 and 2.1.322), so the `cch=` token in the billing header equals the token the real client sends for the same body. ([#19761](https://github.com/cheaper-inference/OmniRoute/pull/19761))

View File

@@ -0,0 +1 @@
- **fix(providers):** Gemini 4 Carbon is registered like Argon — `gemini-4-carbon-{low,medium,high}` on Antigravity/AGY and `gemini-4-carbon` on the Gemini API key are priced at the published $2/$10 introductory rate, the bare id aliases to `-medium`, and the tiers get the declared 65535 output cap instead of the 16384 fallback ([#19797](https://github.com/cheaper-inference/OmniRoute/pull/19797), closes [#19796](https://github.com/cheaper-inference/OmniRoute/issues/19796)) — thanks @xiaoyaner0201

View File

@@ -0,0 +1 @@
- **fix(db-backups):** a chunked import upload is refused at the configured size while it streams, instead of being buffered in full and rejected afterwards ([#19831](https://github.com/cheaper-inference/OmniRoute/pull/19831)) — thanks @AndreAlmeidaDC

View File

@@ -0,0 +1 @@
- **fix(security):** strip `'unsafe-eval'` from the Content-Security-Policy `script-src` directive in production builds while retaining it strictly in development mode for React Fast Refresh and HMR ([#19836](https://github.com/cheaper-inference/OmniRoute/issues/19836)).

View File

@@ -0,0 +1 @@
- **fix(antigravity):** parallel conversations on one account no longer share a single Cloud Code session and evict each other's prompt cache — the upstream `sessionId` is now derived from account + conversation ([#19876](https://github.com/cheaper-inference/OmniRoute/pull/19876)) — thanks @adevwithpurpose

View File

@@ -0,0 +1 @@
- **fix(dashboard):** move the custom banned-keyword editor back to the Resilience settings tab (next to Auto Disable) instead of Security, and harden its save/load path: keywords appear only after the server accepts the PATCH, a failed settings load surfaces an error instead of a misleading empty list, the 200-character limit is enforced in the UI, and removals match by keyword value rather than index. The editor now also stays available when `/api/resilience` fails to load ([#20078](https://github.com/cheaper-inference/OmniRoute/pull/20078)) — thanks @sdfsdfw2

View File

@@ -0,0 +1 @@
- **fix(translator):** streamed chat completions from Claude models now return `"{}"` as the arguments of a tool call that takes no parameters, matching the non-streamed response. Before, the arguments were an empty string, which is not valid JSON. ([#20152](https://github.com/cheaper-inference/OmniRoute/issues/20152))

View File

@@ -0,0 +1 @@
- Guard `POST /api/providers/[id]/sync-models` with `requireManagementAuth()` when not called with an internal model-sync token so validated management subjects (local CLI token, scoped `oma_` access tokens, manage-scoped API keys, internal service token) are accepted consistently and inference-only keys get 403 ([#20187](https://github.com/cheaper-inference/OmniRoute/issues/20187)) — thanks @wsk0715

View File

@@ -0,0 +1 @@
- **fix(sse):** in a combo, the Codex effort-suffix guard no longer removes the client's `output_config.effort` from the request body that the next combo target reads. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(sse):** let a deduplicated request run its own upstream call when the first caller disconnects. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(sse):** requests to DeepSeek models (`deepseek-*`, on any provider) keep only the first definition of a repeated tool name, because DeepSeek answers a repeated name with HTTP 400 "Tool names must be unique". Other models are not changed. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(sse):** a failed memory-settings read is logged at debug level; the request still runs with memory off, as before, but the cause is now visible. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(memory):** memory injection no longer puts the per-query memory text at the head of an OpenAI, Codex or Azure prompt (it broke automatic prefix caching on every turn), and one corrupt skill row no longer makes every non-streaming request of an API key fail. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(sse):** stop probe key-health writes on non-streaming calls and cap ModelScope retry waits. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(skills):** registering the same skill again (same API key, name and version) now updates the existing row and keeps its id and run history, instead of adding a duplicate. A migration removes old duplicates once (keeps the newest) and adds a unique index. ([#20194](https://github.com/cheaper-inference/OmniRoute/pull/20194))

View File

@@ -0,0 +1 @@
- **fix(sse):** A Claude passthrough request whose tool is named with a leading `proxy_` (for example `proxy_search`) gets the same tool name back in the reply; the executor strips that prefix upstream and the reply used to show the stripped name. ([#20199](https://github.com/cheaper-inference/OmniRoute/pull/20199))

View File

@@ -0,0 +1 @@
- **fix(sse):** an Android user agent (Dalvik, mobile browsers) is no longer taken for the Droid CLI, so a Responses-shaped body sent to a non-`/responses` endpoint by such a client is converted back to Chat Completions as before. ([#20199](https://github.com/cheaper-inference/OmniRoute/pull/20199))

View File

@@ -0,0 +1 @@
- **fix(sse):** the empty-turn retry on another connection now replaces the request credentials instead of merging into them, so keys that only the first connection defines (lease routing, a Copilot session token) are not sent to the second. ([#20199](https://github.com/cheaper-inference/OmniRoute/pull/20199))

View File

@@ -0,0 +1 @@
- **fix(sse):** when the upstream-proxy fallback drops a failed native response and retries through CLIProxyAPI or Dario, the dropped response body is cancelled at once instead of holding its socket until garbage collection. ([#20199](https://github.com/cheaper-inference/OmniRoute/pull/20199))

View File

@@ -0,0 +1 @@
- **fix(sse):** a failed connection-cooldown write (geo-blocked or project-required connection) and a failed Codex scope-cooldown persist are logged as warnings instead of being dropped, so a connection that is selected again can be traced to the failed write. ([#20199](https://github.com/cheaper-inference/OmniRoute/pull/20199))

View File

@@ -0,0 +1 @@
- **fix(sse):** `isTokenExpiringSoon` now reads a token expiry given in epoch seconds or as a numeric string, so a valid token is no longer reported as expiring (seconds) or as never expiring (numeric string). ([#20199](https://github.com/cheaper-inference/OmniRoute/pull/20199))

View File

@@ -0,0 +1 @@
- **fix(sse):** keep the combo target pin on safety-net redirects and release the OAuth slot when a connection reasoning rule fails. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(sse):** the retry that follows a rejected field or a clamped limit on a CLI-fingerprinted upstream (Claude Code) keeps the CLI body-field order of the first send instead of the client order. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(sse):** when a client sends the Claude Code sentinel and its own instructions in one system block, only the sentinel is replaced; the client's instructions are kept instead of being deleted with the block. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(sse):** a client abort during a request on a pooled-session provider (for example llm7) no longer puts the healthy session into cooldown; only real upstream failures do. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(executors):** merged abort signals no longer leave listeners on the long-lived request signal when nothing aborts. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(qoder):** A Qoder PAT connection runs the local `qodercli`, which gets text only, so an image in the request was replaced by the text `[Image omitted]` and the model answered blind. Image requests now skip PAT connections (a combo goes on to its next target), and a PAT call that still gets an image answers 400 `image_input_unsupported` before it starts the CLI. HTTP connections still forward images. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(routing):** After a Codex 429 moves a request to a sibling account, the selected-connection header, the quota-healthy mark and the error-state reset name the account that served the request, not the account that was rate limited. ([#20201](https://github.com/cheaper-inference/OmniRoute/pull/20201))

View File

@@ -0,0 +1 @@
- **fix(antigravity):** client system text is no longer placed into a `model` turn when the conversation history starts with an assistant message; it goes into its own leading `user` turn. ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(translator):** A message whose `content` is one bare block object (not an array) no longer loses its text when OpenAI-format requests are sent to Claude. ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(sse):** disable Claude thinking when an OpenAI request forces a tool call. ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(sse):** keep tool-result media as Gemini media parts and omit sampling parameters removed by Gemini 4. ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(translator):** Claude Code's rotating `x-anthropic-billing-header:` line is now dropped from the system prompt of OpenAI-format requests sent to Gemini and Antigravity, so it no longer breaks prompt-cache prefixes. ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(sse):** an OpenAI image or file part given as a base64 data URL that contains line breaks (MIME-wrapped base64) is now sent to Claude as a base64 block with the breaks removed, instead of an invalid URL source (images) or a silent drop (files). ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(translator):** OpenAI to Claude requests no longer send `thinking: {type: "enabled"}` without a budget or an empty system text block, and keep `temperature` for API-key and compatible Claude providers and when thinking is disabled. ([#20204](https://github.com/cheaper-inference/OmniRoute/pull/20204))

View File

@@ -0,0 +1 @@
- **fix(gemini):** a Claude request with `thinking: {type: "disabled"}` or `output_config.effort: "none"` now switches thinking off for Gemini 2.5 Flash models, as the OpenAI path does, instead of letting the model think and spend the output budget. Gemini 2.5 Pro cannot switch thinking off and keeps its default, and an enabled `budget_tokens` still wins over `effort: "none"`. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(gemini):** a failed Claude `tool_result` in a history without Gemini thought signatures keeps a `[tool_error: true]` marker in the context text, so the model can tell a failed call from a successful one. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(sse):** keep Gemini image parts that carry a thought signature. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(gemini):** a trailing `<` or partial `<think` prefix at the end of a Gemini stream is now delivered as text instead of being dropped. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(kiro):** the Kiro `conversationId` of a single-message request no longer depends on the clock (the timestamp line was part of its seed), so turn 1 and turn 2 of a conversation share one id and the upstream session cache can hit. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(kiro):** a Kiro request now says in the text when an image was left out (remote image URL, or a model that takes no images), so the model does not answer as if none was sent. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(kiro):** A Claude request whose `tool_result` has `is_error: true` now reaches Kiro with `status: "error"` and the original tool text, not `status: "success"` plus a `[tool_error: true]` line. ([#20206](https://github.com/cheaper-inference/OmniRoute/pull/20206))

View File

@@ -0,0 +1 @@
- **fix(translator):** `translateRequest` no longer edits the message objects the caller gives it. A combo shares message objects between its targets, so an earlier target's edits (stripping `reasoning_content` for a non-reasoning model, filling tool call ids and arguments, moving a late tool result) changed what a later target received; a reasoning model that needed the client `reasoning_content` then lost it. The messages and their tool calls are now copied once at entry (about 0.4 ms for a 12 MiB body). ([#20245](https://github.com/cheaper-inference/OmniRoute/pull/20245))

View File

@@ -0,0 +1 @@
- The Command Code /alpha/generate fallback and key probe now mimic the official CLI 1.88.0 (production environment, cli surface) instead of the stale 1.15.1 external profile. ([#20346](https://github.com/cheaper-inference/OmniRoute/pull/20346))

View File

@@ -0,0 +1 @@
- fix(providers): clamp Cohere reasoning_effort to `high` and learn its "Use 'high' instead" 422 so auto routing no longer burns fallbacks (#20363)

View File

@@ -0,0 +1 @@
- **fix(plugins):** a plugin `onRequest` hook that lets a request through unchanged is no longer called again when that request fails over to another account of the same provider and model, so request-counting plugins no longer count a failover twice. A block, a body rewrite (in place or a new body), a new provider or model, or a caller without a headers snapshot still calls the hook again. ([#20372](https://github.com/cheaper-inference/OmniRoute/pull/20372))

View File

@@ -0,0 +1 @@
- fix(catalog): `/v1/models` no longer advertises a passthrough provider's default context window as `context_length` for uncataloged models (#20415)

View File

@@ -0,0 +1 @@
- **fix(providers):** accept keyless connections for providers marked optional or none in the registry ([#20458](https://github.com/cheaper-inference/OmniRoute/pull/20458)) — thanks @maxmad64bis

View File

@@ -0,0 +1 @@
- fix(backup): `backup auto enable --encrypt` now requires `--key-file` and scheduled encrypted backups use it instead of silently skipping every run (#20494)

View File

@@ -0,0 +1 @@
- fix(pwa): restore English name and description in the PWA manifest, which declares lang en (#20504)

View File

@@ -0,0 +1 @@
- **fix(combo):** when every unit of a nested combo fails, the error message now lists each failed unit's reason (an empty reply rejected by quality validation, an HTTP 500, a pre-dispatch skip) instead of only the last unit's, which was often just "Model X is unavailable". Each reason is collapsed to one line, sanitized, has connection identifiers redacted and is then capped at 300 characters; at most 5 units are listed, the rest as `(+N more)`. Status code, headers, quota classification and diagnostics are unchanged ([#20507](https://github.com/cheaper-inference/OmniRoute/pull/20507))

Some files were not shown because too many files have changed in this diff Show More