Commit Graph

1577 Commits

Author SHA1 Message Date
Diego Rodrigues de Sa e Souza
ce802fa296 feat(compression): playground fidelity-gate toggle + lane rejection display 2026-06-27 02:56:06 -03:00
Diego Rodrigues de Sa e Souza
8df1aff301 feat(compression): preview route accepts fidelityGate flag (playground) 2026-06-27 02:56:06 -03:00
Diego Rodrigues de Sa e Souza
d9d8cfa777 feat(compression): wire per-step fidelity gate into stacked pipeline (opt-in) 2026-06-27 02:56:06 -03:00
Diego Rodrigues de Sa e Souza
bccdfac449 feat(compression): fidelityGate config + rejected breakdown fields 2026-06-27 02:56:06 -03:00
Diego Rodrigues de Sa e Souza
5dacaa7f4d feat(compression): pure per-step fidelity checker (4 invariants, fail-open) 2026-06-27 02:56:06 -03:00
Diego Rodrigues de Sa e Souza
5b8bd727f0 feat: salvage batch 2 — diagnostics null-guard (#5096) + observed quota reset windows (#5025) (#5141)
* fix(diagnostics): null-guard content blocks in detectMalformedNonStream

A null (or non-object) entry in a Claude-native `content` array made the
non-stream classifier throw `TypeError: Cannot read properties of null
(reading 'type')`, crashing the malformed-response detection path. Guard
before type-asserting each block: a null/non-object block is simply skipped.

Two regression tests added (null block among valid blocks → null; only-null
blocks → empty_choices).

Salvaged from closed PR #5096 (base-stale; only the defensive guard — the
Claude-shape recognition it also carried already landed via #5108).

Co-authored-by: herjarsa <herjarsa@users.noreply.github.com>

* feat(quota): persist observed provider quota reset windows

Adds `provider_quota_reset_events` (migration 108) + `db/quotaResetEvents.ts`
to record real upstream weekly-quota window transitions whenever a quota
refresh shows the reset rolling to a new cycle (different day, later resetAt).
`apiKeyUsageLimits` now prefers the observed window start over the inferred
`resetAt − 7d`, falling back to snapshot inference when no event is recorded
yet. `quotaCache.setQuotaCache` records the transition opportunistically.

`recordProviderQuotaResetEventIfChanged` only fires for the primary weekly
window (not daily/sonnet), is idempotent (INSERT OR IGNORE on the unique
window key), and no-ops when the reset didn't actually roll. 4 unit tests
(tests/unit/lib/quota-reset-events.test.ts).

Salvaged from closed PR #5025 (which bundled this with two unrelated
features + a colliding migration 104). Renumbered to 108; module re-exported
from localDb (Rule #2).

Co-authored-by: Witroch4 <175152067+Witroch4@users.noreply.github.com>

---------

Co-authored-by: herjarsa <herjarsa@users.noreply.github.com>
Co-authored-by: Witroch4 <175152067+Witroch4@users.noreply.github.com>
2026-06-27 02:39:28 -03:00
diegosouzapw
9fc84f4ea1 fix(kiro): retire claude-sonnet-4.5 from catalog + pin 400 model-unavailable test (#5140)
Extracted the real change from #5140 (the bot PR regenerated the entire
freeModelCatalog.data.ts + touched package-lock.json; only the targeted
edits are kept here):
- remove claude-sonnet-4.5 from the Kiro registry entry
- remove the matching kiro free-model catalog row
- pin Kiro's verbatim 400 "Invalid model..." to isModelUnavailableError

Closes #4484
2026-06-27 02:33:36 -03:00
Randi
50e6621101 Fix resilience settings page response mapping (#5139)
Integrated into release/v3.8.38. Thanks @rdself for the fix and the regression test.
2026-06-27 02:22:45 -03:00
Diego Rodrigues de Sa e Souza
3654ae50b3 fix(providers): complete grok-cli OAuth wiring + zenmux-free web-session metadata
Base-red repair for #5020 (grok-cli) and #5105 (zenmux-free), surfaced by the
full CI on the release PR (#5078) — the PR->release fast-path does not run the
oauth-providers-config / web-session-credentials / provider-consistency gates.

- grok-cli: register in OAUTH_PROVIDERS (providers.ts canonical list, fixes
  check:provider-consistency), add OAUTH_PROVIDER_IDS.GROK_CLI + GROK_CLI_CONFIG
  in oauth constants (provider config now sourced there, not a local literal),
  align oauth-providers-config.test.ts (EXPECTED_PROVIDER_KEYS + config map).
- zenmux-free: declare its web-session credential requirement (full Cookie header)
  in WEB_SESSION_CREDENTIAL_REQUIREMENTS.

Local: oauth-providers-config 27/27, web-session-credentials 4/4, grok-cli-oauth
7/7, check:provider-consistency OK, +115 OAUTH_PROVIDERS tests green.
2026-06-27 01:29:15 -03:00
Ramel Tecnologia - Rafa Martins
58d1311454 feat(sidebar): add support for colored menu icons (#3812)
Integrated into release/v3.8.38 (recreated on tip — fork had unrelated history; added getSidebarIconAccent regression test, Rule #18). Clean 2-file UI feature.
2026-06-27 01:22:22 -03:00
Diego Rodrigues de Sa e Souza
1677ef55e1 fix(proxy): make SOCKS5 handshake timeout tunable via SOCKS_HANDSHAKE_TIMEOUT_MS (#5109) (#5137) 2026-06-27 01:14:38 -03:00
Diego Rodrigues de Sa e Souza
7b718134e0 fix(providers): add MiniMax M3 & Nemotron 3 Ultra to Cline catalog (#3321) (#5136) 2026-06-27 01:13:11 -03:00
Diego Rodrigues de Sa e Souza
454eb75b31 fix(api): resolve /v1/models/{id} case-insensitively (#5082) (#5135) 2026-06-27 01:12:17 -03:00
Diego Rodrigues de Sa e Souza
c4fc33480c fix(services): embed WS proxy honours LIVE_WS_HOST; reject empty messages early (#5110) (#5133) 2026-06-27 00:14:58 -03:00
Diego Rodrigues de Sa e Souza
b8cc4feef1 fix(proxy): repair one-click Deno & Cloudflare relay deployments (#5128) (#5132) 2026-06-27 00:13:55 -03:00
Diego Rodrigues de Sa e Souza
86b8938e2c fix(security): exact-host Anthropic baseUrl check (CodeQL js/incomplete-url-substring-sanitization #674) (#5130)
The anthropic-compatible Bearer-fallback gate decided whether a configured baseUrl
targeted the official api.anthropic.com host via a substring `.includes("api.anthropic.com")`.
A look-alike upstream such as `https://api.anthropic.com.evil.test` or
`https://evil.test/?x=api.anthropic.com` matched the substring and was wrongly treated as
official, suppressing the Bearer fallback meant for third-party gateways
(CodeQL #674, js/incomplete-url-substring-sanitization, high).

Replace the substring test with an exported `isOfficialAnthropicBaseUrl()` helper that
parses the URL and compares the hostname for exact equality. Empty baseUrl stays official;
scheme-less hosts are parsed with an assumed https://; an unparseable baseUrl falls back to
third-party (Bearer emitted) as the safer default. Behavior for legitimate official/third-party
baseUrls is unchanged.

Adds tests/unit/anthropic-official-baseurl-host.test.ts covering official, look-alike,
scheme-less, and unparseable inputs plus a static guard that the substring pattern is gone.
2026-06-26 23:14:17 -03:00
Jan Leon
c0830c95ab Hydrate quota cache and scope auto combo candidates (#5015)
Integrated into release/v3.8.38 (rebased on tip). Kept core quota-cache hydration + auto-combo candidate scoping + combos UI; dropped out-of-scope toolCloaking refactor (conflicted with #4813 stripEnumDescriptions — took tip) and the unrelated sse-auth test split. Added quota-cache-hydrate-5015 regression test (Rule #18); combo-account-allowlist 8/8 + hydration 2/2 green.
2026-06-26 22:51:25 -03:00
KooshaPari
09ac615894 fix(resilience): harden quota and model lockout edge cases (#5093)
Integrated into release/v3.8.38 (rebased on tip). TRUST-BUT-VERIFY: dropped the PR's 0dd7df641 'fix unit gates' commit which reverted #5122 reasoning-replay (preserveReasoningContent) + re-introduced #4849 O(n^2) growth, and restored 5 tests it had realigned. Kept only the 3 declared resilience fixes (quota cutoff guard, gemini MIME, model-lockout maxCooldownMs); 23/23 green.
2026-06-26 22:46:19 -03:00
Diego Rodrigues de Sa e Souza
9fd630c34b chore(test): reconcile golden snapshot + apikey count for new providers
#5020 (grok-cli), #5065 (factory), #5105 (zenmux-free) added providers but did
not regenerate tests/snapshots/provider/translate-path.json (now +3 entries) nor
bump the APIKEY_PROVIDERS count (159->160 for the factory gateway). Test-only
reconciliation; no production change.
2026-06-26 22:44:43 -03:00
KooshaPari
004c0c4fd1 feat(providers): add Factory (factory.ai) as a subscription gateway provider (#5065)
Integrated into release/v3.8.38 (rebased on tip; added factory registry test for PR Test Policy + fixed check:env-doc-sync phantom FACTORY_API_KEY; factory loads in PROVIDERS, no Zod issue — that flag was a false positive)
2026-06-26 22:36:03 -03:00
fulorgnas
2eefe2f76d feat: Add Grok Build (xAI) provider with OAuth import-token flow (#5020)
Integrated into release/v3.8.38 (rebased on tip; Hard Rule #11 fix — Grok public client_id now via resolvePublicCred(grok_id), 3 literals removed; grok-oauth 7/7 + check:public-creds green)
2026-06-26 22:31:40 -03:00
Randi
9e2c2817da fix(streaming): harden long OpenAI-compatible SSE streams (#5124)
Integrated into release/v3.8.38 (rebased on tip; streamHandler conflict with #5007 disconnect-guard resolved — both coexist, stream-handler 22/22 green)
2026-06-26 22:27:11 -03:00
Diego Rodrigues de Sa e Souza
4bdbaa0062 fix(usage): dedupe request-usage logging and debounce stats (#4940)
Integrated into release/v3.8.38 (rebased on tip; DB-handle hang was stale-base artifact — resetDbInstance already closes the handle, test green 5/5; file-size drift consolidated at release; CHANGELOG re-injected)
2026-06-26 22:22:00 -03:00
Diego Rodrigues de Sa e Souza
57bed419c4 feat(mcp): web-session robustness — cookie dedup (PR6) + browser-pool observability (PR7) (#3368) (#5121)
Integrated into release/v3.8.38 (rebased on tip; cookie-dedup branch extracted to findExistingCookieConnection helper → complexity-neutral; CHANGELOG added)
2026-06-26 22:20:09 -03:00
Diego Rodrigues de Sa e Souza
594aa94945 feat(dashboard): click-to-edit model alias in provider page (#5119)
Integrated into release/v3.8.38 (rebased on tip, i18n scope verified, CHANGELOG re-injected)
2026-06-26 22:09:29 -03:00
Diego Rodrigues de Sa e Souza
c9fe0fb7a1 feat(providers): add ZenMux Free session-cookie provider (#5105)
Integrated into release/v3.8.38 (rebased on tip, CHANGELOG re-injected)
2026-06-26 22:08:28 -03:00
Diego Rodrigues de Sa e Souza
2b0e1dfd94 fix(sse): convert Gemini body to OpenAI format in antigravity MITM handler (#4845)
Integrated into release/v3.8.38 (rebased on tip, CHANGELOG re-injected)
2026-06-26 22:07:04 -03:00
Jan Leon
25b65ac34a Track final connection IDs in failover logs (#5016)
Integrated into release/v3.8.38
2026-06-26 22:04:39 -03:00
Jan Leon
b8070ed3a8 Ignore disconnect races during in-band stream error handling (#5007)
Integrated into release/v3.8.38
2026-06-26 22:04:33 -03:00
Diego Rodrigues de Sa e Souza
d6f402e0ad test(golden): redact OmniRoute app version from translate-path snapshot (#5126)
Coverage shard golden unblock for #5078.
2026-06-26 20:31:41 -03:00
Diego Rodrigues de Sa e Souza
fe8f1dac0f test(golden): redact live Node version from provider translate-path snapshot (#5125)
Final golden unblock for #5078.
2026-06-26 20:02:33 -03:00
Diego Rodrigues de Sa e Souza
58d942829f fix(translator): preserve reasoning-replay reasoning_content + repair 3 release-green test reds (#5122)
Repairs 3 release-green test reds + test-masking; unblocks #5078.
2026-06-26 19:12:46 -03:00
Diego Rodrigues de Sa e Souza
05071c011c test(release): relocate 2 orphan test files into the collected flat tests/unit dir (#5120)
Unblocks Lint (test-discovery) on #5078. Integrated into release/v3.8.38.
2026-06-26 17:26:40 -03:00
Diego Rodrigues de Sa e Souza
68aeb89327 feat(dashboard): expose Fusion judgeModel + fusionTuning in the combo editor (#5074)
Base-reds fixed (#5117); Fusion editor + file-size rebaseline. Integrated into release/v3.8.38.
2026-06-26 17:15:38 -03:00
Diego Rodrigues de Sa e Souza
cfaba4410f fix(responses): default text.format for openai-compatible responses providers (#5101)
Base-reds fixed (#5117); default text.format + file-size rebaseline. Integrated into release/v3.8.38.
2026-06-26 17:13:19 -03:00
Diego Rodrigues de Sa e Souza
135b5daaa5 fix(translator): forward image tool_result blocks as image_url (#5100)
Base-reds fixed (#5117); image tool_result→image_url. Integrated into release/v3.8.38.
2026-06-26 17:11:15 -03:00
Diego Rodrigues de Sa e Souza
800b04ad6d fix(sse): repair release base-reds — malformed-response false positives + header casing + stale tests (#5117)
Repairs the release/v3.8.38 base-reds; unblocks #5078.
2026-06-26 16:30:51 -03:00
Diego Rodrigues de Sa e Souza
d486ed1643 fix(db): translate pt-BR SQLite driver-fallback log lines to English (#5103) (#5115) 2026-06-26 16:15:13 -03:00
Diego Rodrigues de Sa e Souza
db68c9b790 fix(diagnostics): treat non-streaming Claude messages shape as valid output (#5108) (#5116) 2026-06-26 16:14:14 -03:00
Diego Rodrigues de Sa e Souza
11cb8f0976 feat(providers): allow local/private provider URLs by default with scoped metadata-safe guard (#5066) (#5107) 2026-06-26 14:10:09 -03:00
Diego Rodrigues de Sa e Souza
cc6741dd8c fix(dashboard): surface detailed credential-validation error in add-connection modal (#5088) (#5106) 2026-06-26 14:09:41 -03:00
Diego Rodrigues de Sa e Souza
5315e73be5 fix(combo): fail over on empty-content 502 instead of exhausting the provider (#5085) (#5104) 2026-06-26 14:08:17 -03:00
Diego Rodrigues de Sa e Souza
721598fe02 feat(compression): compression playground (Play + Compare tabs) in the studio (#5080)
Integrated into release/v3.8.38
2026-06-26 13:10:06 -03:00
Jan Leon
7b6a9ed33d Harden selected API error responses (#5032)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:20:18 -03:00
Randi
f7e5d2c268 feat(cc): add summarized thinking display toggle (#5055)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:18:22 -03:00
fulorgnas
ef99a3c5ba fix(compression): replace fileURLToPath(import.meta.url) with runtime anchors for standalone bundle (#5089)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:16:28 -03:00
Hernan Javier Ardila Sanchez
57d10ea9f7 fix(models): derive model discovery config from registry modelsUrl (#5087)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:14:53 -03:00
Hernan Javier Ardila Sanchez
7256d34a23 fix: preserve model hidden flags (isHidden) across model sync (#5086)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:13:24 -03:00
José Victor Ferreira
14eab57ed3 feat(video): add Alibaba DashScope (wan2.7-t2v) provider (#5051)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:10:33 -03:00
Éder Costa
98c5fac3ad fix(sse): robust Anthropic /v1/messages streaming — real ping keepalive + client-disconnect guard (#5063)
Integrated into release/v3.8.38 (leva 5)
2026-06-26 11:09:12 -03:00