mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 22:02:08 +03:00
eadcbea1c93b5cf3789ffd50ea2c0ca95a46840b
5437 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
eadcbea1c9 |
fix(combo): strip boolean reasoning field for opencode-go providers (#7891)
* fix(combo): strip boolean reasoning field for opencode-go providers opencode-go backed providers (ollama-cloud, opencode-go, opencode, opencode-zen) use a Go ChatCompletionRequest struct where the reasoning field is typed as openai.Reasoning (a structured type). When a client sends reasoning: true or reasoning: false — valid per the OpenAI API — the Go JSON decoder rejects it with: 400: json: cannot unmarshal bool into Go struct field ChatCompletionRequest.reasoning of type openai.Reasoning This strips the boolean reasoning field before forwarding to these providers, allowing the upstream to apply its own default reasoning behavior. Object/string forms are left untouched. Observed in production: 3 consecutive 400 errors from ollama-cloud/glm-5.2 in a 30-second window, each with the unmarshal error. * fix(opencode): add null/primitive guard in stripBooleanReasoning Adds defensive check for null, undefined, and non-object inputs as suggested in review. Added unit test coverage for these edge cases. |
||
|
|
387ebc3e41 | fix(dashboard): safely render structured error objects in Request Logs detail (#7845) (#7920) | ||
|
|
583d3ebe1d | fix(providers): read reasoning_text in Claude-format response translator (#7856) (#7919) | ||
|
|
b15f343e67 | fix(providers): treat public-host 302 as valid in Gemini Web connection test (#7859) (#7917) | ||
|
|
62cbbcd2c0 |
fix(dashboard): preserve quota cutoff drafts (#7909)
Co-authored-by: Bryan Nathan <bryan@users.noreply.github.com> |
||
|
|
d3f8bbe555 | fix(sse): recover invalid Anthropic thinking signatures once (#7906) | ||
|
|
6b59e814da |
Restore Responses API custom tool calls (#7905)
* fix: restore Responses custom tool calls * fix: preserve nested Responses custom tool calls * fix: reset superseded tool call state * fix: preserve tool precedence and buffered Responses tool arguments * test: verify top-level tool descriptions take precedence * fix: preserve custom Responses tool streaming semantics * test: cover declared custom tool streaming round trips * test: cover Responses custom tool metadata collection * test: cover active Responses custom tool stream * test: isolate Responses active stream regression * fix: complete Responses custom tool round trips |
||
|
|
10823bcf83 |
fix(dashboard): repair monaco deep import broken by 0.56 exports map (#7897) (#7922)
monaco-editor 0.56.0 (bumped in #7897) ships a restrictive `exports` map ("./*.js" -> "./esm/vs/*.js", "./*" -> "./esm/vs/*.js") that rewrites every subpath by prepending esm/vs/. The pre-0.56 deep import `monaco-editor/esm/vs/editor/editor.api` therefore resolved to the doubled, non-existent `esm/vs/esm/vs/editor/editor.api.js` and broke the production Turbopack build (Module not found in MonacoEditor.tsx). Switch to the 0.56-compatible specifier `monaco-editor/editor/editor.api.js`, which resolves to the same file (esm/vs/editor/editor.api.js) as before. Adds tests/unit/monaco-editor-import-path.test.ts as a regression guard: asserts the specifier has no esm/vs/ prefix and resolves to editor.api.js against the installed monaco 0.56. |
||
|
|
3ab66e0ec0 |
deps: bump the development group with 5 updates (#7898)
Bumps the development group with 5 updates: | Package | From | To | | --- | --- | --- | | [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.3.2` | `4.3.3` | | [c8](https://github.com/bcoe/c8) | `11.0.0` | `12.0.0` | | [lint-staged](https://github.com/lint-staged/lint-staged) | `17.0.8` | `17.1.0` | | [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.3.2` | `4.3.3` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.64.0` | `8.65.0` | Updates `@tailwindcss/postcss` from 4.3.2 to 4.3.3 - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.3/packages/@tailwindcss-postcss) Updates `c8` from 11.0.0 to 12.0.0 - [Release notes](https://github.com/bcoe/c8/releases) - [Changelog](https://github.com/bcoe/c8/blob/main/CHANGELOG.md) - [Commits](https://github.com/bcoe/c8/compare/v11.0.0...v12.0.0) Updates `lint-staged` from 17.0.8 to 17.1.0 - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md) - [Commits](https://github.com/lint-staged/lint-staged/compare/v17.0.8...v17.1.0) Updates `tailwindcss` from 4.3.2 to 4.3.3 - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.3/packages/tailwindcss) Updates `typescript-eslint` from 8.64.0 to 8.65.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.65.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: "@tailwindcss/postcss" dependency-version: 4.3.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development - dependency-name: c8 dependency-version: 12.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: development - dependency-name: lint-staged dependency-version: 17.1.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development - dependency-name: tailwindcss dependency-version: 4.3.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development - dependency-name: typescript-eslint dependency-version: 8.65.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
8158d170d7 |
deps: bump the production group with 8 updates (#7897)
Bumps the production group with 8 updates: | Package | From | To | | --- | --- | --- | | [@aws-sdk/client-bedrock-runtime](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-bedrock-runtime) | `3.1088.0` | `3.1090.0` | | [@lobehub/icons](https://github.com/lobehub/lobe-icons) | `5.13.0` | `5.14.0` | | [@toon-format/toon](https://github.com/toon-format/toon) | `2.3.0` | `2.3.1` | | [ink](https://github.com/vadimdemedes/ink) | `7.1.0` | `7.1.1` | | [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `1.24.0` | `1.25.0` | | [monaco-editor](https://github.com/microsoft/monaco-editor) | `0.55.1` | `0.56.0` | | [smol-toml](https://github.com/squirrelchat/smol-toml) | `1.6.1` | `1.7.0` | | [undici](https://github.com/nodejs/undici) | `8.7.0` | `8.8.0` | Updates `@aws-sdk/client-bedrock-runtime` from 3.1088.0 to 3.1090.0 - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-bedrock-runtime/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1090.0/clients/client-bedrock-runtime) Updates `@lobehub/icons` from 5.13.0 to 5.14.0 - [Release notes](https://github.com/lobehub/lobe-icons/releases) - [Changelog](https://github.com/lobehub/lobe-icons/blob/master/CHANGELOG.md) - [Commits](https://github.com/lobehub/lobe-icons/compare/v5.13.0...v5.14.0) Updates `@toon-format/toon` from 2.3.0 to 2.3.1 - [Release notes](https://github.com/toon-format/toon/releases) - [Commits](https://github.com/toon-format/toon/compare/v2.3.0...v2.3.1) Updates `ink` from 7.1.0 to 7.1.1 - [Release notes](https://github.com/vadimdemedes/ink/releases) - [Commits](https://github.com/vadimdemedes/ink/compare/v7.1.0...v7.1.1) Updates `lucide-react` from 1.24.0 to 1.25.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.25.0/packages/lucide-react) Updates `monaco-editor` from 0.55.1 to 0.56.0 - [Release notes](https://github.com/microsoft/monaco-editor/releases) - [Changelog](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/monaco-editor/compare/v0.55.1...v0.56.0) Updates `smol-toml` from 1.6.1 to 1.7.0 - [Release notes](https://github.com/squirrelchat/smol-toml/releases) - [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.6.1...v1.7.0) Updates `undici` from 8.7.0 to 8.8.0 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v8.7.0...v8.8.0) --- updated-dependencies: - dependency-name: "@aws-sdk/client-bedrock-runtime" dependency-version: 3.1090.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production - dependency-name: "@lobehub/icons" dependency-version: 5.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production - dependency-name: "@toon-format/toon" dependency-version: 2.3.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production - dependency-name: ink dependency-version: 7.1.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production - dependency-name: lucide-react dependency-version: 1.25.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production - dependency-name: monaco-editor dependency-version: 0.56.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production - dependency-name: smol-toml dependency-version: 1.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production - dependency-name: undici dependency-version: 8.8.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
0df0ff2ddb |
feat(grok-cli): align with official Grok Build client (#7358)
Rebuilt clean on release/v3.8.49 (branch forked from old main, ~drift). Resolved 2 real conflicts against the current tip: providerModelsConfig.ts keeps BOTH the tip's DashScope text-model helpers (#7882) and this PR's ProviderModelsHeaderContext type; OAuthModal.tsx takes this PR's DEVICE_CODE_PROVIDERS set (superset of the tip's hardcoded chain + grok-cli), dropping the now-dead qwen entry (#7866 removed qwen OAuth). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
cec2f58c24 |
chore(quality): prune stale ESLint suppression (db-migration-runner-account-identity)
#7843's test reorganization removed the 2 no-explicit-any usages that this suppression covered, leaving a stale entry that fails lint:json --max-warnings 0 (exit 2, 'suppressions left that do not occur anymore') on the release tip for every fresh PR run. Pruning tightens the gate — no rebaseline. |
||
|
|
161de7de4a |
fix(opencode-plugin): support separate management read token (#7885)
* fix(opencode-plugin): separate management read token * fix(opencode-plugin): scope inference auth and snapshots * fix(opencode-plugin): scope auth to base path * docs(changelog): format opencode management-read-token fragment as a bullet Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
00677044be |
[Part 3/3] feat(qwen): add regional Alibaba and Qwen Cloud providers (#7882)
* feat(qwen): add Qwen3.8 Max Preview catalogs [Part 2/3] Rebuilt clean on release/v3.8.49 after Part 1 (#7866) squash-merged — applies only the Part-2 delta (Qwen Web / Qoder qwen3.8-max-preview registration + required-thinking allowlist + Qoder client rework) onto the current tip. No migration in this part (that was Part 1). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * feat(qwen): add regional Alibaba and Qwen Cloud providers [Part 3/3] Rebuilt clean on top of Part 2 (#7874) over the current release tip — applies only the Part-3 delta (alibaba Model Studio, Alibaba Token Plan, qwen-cloud, qwen-cloud-token-plan with region selector). No migration in this part. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
ccdbc89290 |
feat(qwen): add Qwen3.8 Max Preview catalogs [Part 2/3] (#7874)
Rebuilt clean on release/v3.8.49 after Part 1 (#7866) squash-merged — applies only the Part-2 delta (Qwen Web / Qoder qwen3.8-max-preview registration + required-thinking allowlist + Qoder client rework) onto the current tip. No migration in this part (that was Part 1). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
74f5f8377d |
docs: add general Web Cookie provider setup guide (#7881)
* Create WEB-COOKIE-GUIDE.md for Web Cookie providers Added a comprehensive guide for using Web Cookie providers with OmniRoute, including setup instructions, credential formats, limitations, and troubleshooting tips. * Fix formatting in WEB-COOKIE-GUIDE.md * Add Web Cookie Providers section to providers guide Added section for Web Cookie Providers with a reference to the WEB-COOKIE-GUIDE.md. * Enhance CLAUDE_WEB.md with user guidance Added introductory information and guidance for new users of the Claude Web provider. |
||
|
|
99135d7ebe |
fix(notion-web): accept OpenAI content-parts arrays in transcript (#7896)
Agent clients often send message.content as [{type:\"text\",text:\"...\"}]
instead of a plain string. buildNotionMessageStep previously required a
string and silently dropped those turns, so system injects (jailbreak /
agentic conversion) and multimodal user messages never reached Notion.
Normalize string | content-parts | bare string parts via
extractNotionMessageText, and add regression coverage in the transcript
unit suite.
|
||
|
|
4f52e36082 |
Preserve supported Responses behavior in Chat translation (#7894)
* fix(responses): preserve additional_tools when downgrading to Chat Completions * fix: preserve Responses structured output in Chat translation * fix: translate Responses allowed tools to Chat * fix: reject unsupported Responses input items * fix: normalize Responses refusal history for Chat * fix: strip Responses-only fields from Chat requests * fix: preserve namespace tools with colliding function names * fix: merge same-named namespaces during Chat translation |
||
|
|
65e0aeda79 |
[Part 1/3]refactor(qwen): replace legacy Qwen Code and remove OAuth provider (#7866)
* refactor(cli): remove legacy Qwen Code integration * refactor(qwen): remove deprecated Qwen OAuth provider * feat(cli): rebuild Qwen Code integration for upstream V4 * fix(qwen): clear stale CLI auth on reset * test(qwen): align retired provider coverage * fix(db): renumber qwen-cleanup migration 129 -> 130 release/v3.8.49 tip took slot 129 via #7843 (usage_history_codex_strong_identity, itself renumbered from 128 during the #7838/#7840 base-red cleanup) after this branch forked; renumber remove_unregistered_qwen_data to 130. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
470e0811fd |
fix(i18n): backfill usage.* quota-visibility keys into vi.json (#7251 base-red)
#7251 added four usage.* quota-visibility keys to en.json without the Vietnamese counterparts, leaving __MISSING__ markers that fail i18n-vi-completeness on the release tip for every fresh PR run. Translated with the locale's existing quota vocabulary (hạn mức). |
||
|
|
bf943e0a7c |
[needs-vps] feat(dashboard): add per-operator quota row visibility on usage tab (#7251)
* feat(dashboard): add per-operator quota row visibility on usage tab
Adds a "hide this quota row" action (visibility_off icon button) to
each model-quota row on the provider limits card, and a "Hidden: …"
strip at the bottom of the card to restore any hidden row. The
visibility preference is keyed per-provider (settings.quotaVisibility)
and persisted via PATCH /api/settings, so it survives refresh/reload.
Distinct from the existing model-catalog isHidden/isDeleted mechanism
(collectHiddenQuotaModelIds/filterHiddenModelQuotas in
ProviderLimits/utils.tsx), which hides rows the ADMIN marked hidden in
the model catalog. This is a personal dashboard preference an operator
can toggle without touching the catalog — e.g. temporarily decluttering
a quota card with many low-signal rows.
New pure helpers (getQuotaVisibilityKey, filterQuotasByVisibility,
getHiddenQuotaRows) live in ProviderLimits/utils.tsx and are unit
tested directly; the settings key is added to DEFAULT_SETTINGS and
validated via updateSettingsSchema like the existing
providerStrategies field. New UI strings are filled in en.json and
synced to the other 42 locales as `__MISSING__` placeholders.
Co-authored-by: nguyenha935 <208228297+nguyenha935@users.noreply.github.com>
Inspired-by: https://github.com/decolua/9router/pull/2371
* chore(changelog): fragment for #7251
* refactor(usage): extract useQuotaVisibility hook (file-size budget)
ProviderLimits/index.tsx grew past its frozen 1127-line budget with the
quota-visibility wiring; extract the state + persistence + hide/show handlers
into a dedicated hook (same pattern as useCodexResetCreditRedemption).
No behavior change — the live validation evidence on the PR covers this flow
end-to-end.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
* refactor(dashboard): shed QuotaCard complexity to baseline + type useQuotaVisibility settings fetch (#7251 CI green)
* test(dashboard): rename quota-row visibility test (path claimed by #7360)
* fix(dashboard): restore providerTierField case-collision fix dropped by merge auto-resolve
The git merge of origin/release/v3.8.49 auto-resolved providerTierFieldApi.ts
(added post-merge-base by commit
|
||
|
|
8b78bc361e |
fix: reserve chat admission before body parsing (#7853)
* fix: reserve chat admission before parsing * fix: release admission on handler failure * fix: reconcile chat admission with the #7862 parse-once route Post-#7862 rebase: the admission-rebuilt request is json()-parsed directly over the already-buffered bytes — the clone()+json() pair is gone, and the parse-once regression tests now pin the post-admission contract (original request: zero json() calls, zero clone() calls; the single materialization is admitChatRequest()'s bounded byte reader). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
d78740bcb0 |
feat: add live gRPC-web quota fetcher for grok-cli (#6844) (#7714)
* feat(sse): add live gRPC-web quota fetcher for grok-cli (#6844) * fix(sse): send gRPC-web request frame + decode real GetGrokCreditsConfig schema Live validation against grok.com (real bearer token, tier-4 account) proved the #6844 grok-cli quota fetcher was a silent no-op: - The POST to GetGrokCreditsConfig had no body. gRPC-web requires a request frame even for a no-argument RPC; without one the upstream returns `grpc-status: 13 "Missing request message."` with a 0-byte response. Fixed by sending the empty gRPC-web frame (flag 0x00 + 4-byte length 0). - The decoder's field mapping (top-level field 1 = double percent, field 2 = string resetAt) was reverse-engineered from a third-party doc and never matched the real response. The real shape is: top-level field 1 is a NESTED message whose subfield 1 is a fixed32 float usage ratio (0..1) and subfield 5 is a Timestamp{seconds,nanos} reset time. grokCliQuotaFrame.ts now decodes that nested shape; grokCliQuotaFetcher.ts's buildQuota() rescales the decoder's 0-100 percentUsed back to the 0-1 fraction the rest of the quota pipeline expects (quotaPreflight.ts::remainingPercentFrom). - The response's 2nd gRPC-web frame (trailer, flag 0x80) is now explicitly walked-and-skipped instead of relying on incidental length-bounding. Test fixtures in both files now encode the real captured wire structure (nested message, fixed32 ratio, Timestamp reset, trailer frame) instead of the old synthetic fixed64-double buffers, and the stale "Cloudflare non-blocking is an assumption" comment is corrected to reflect that it is now live-validated. |
||
|
|
21fcb19f96 |
fix(mitm): gate Agent Bridge Repair on sudo password (#7836) (#7865)
Reject repair and Remove CA when no sudo password is supplied or cached, instead of spawning sudo -S with an empty string. Add a password modal to AgentBridgeMaintenanceCard and regression tests for the 400 gate. Address PR review feedback: reject whitespace-only sudoPassword values, avoid caching unusable passwords, extract closePasswordModal helper, and replace the route test that invoked real sudo with pure gate assertions. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
fd6a583a95 |
fix(notion-web): add browser fingerprint headers to reduce Cloudflare challenges (#7864)
* fix(notion-web): add browser fingerprint headers to reduce Cloudflare challenges Adds sec-ch-ua, sec-fetch-*, cache-control, pragma, and priority headers that real Chromium browsers send. Without these, Cloudflare may challenge or block requests that look like non-browser clients. Applied to: - buildNotionExecuteHeaders (inference requests) - buildNotionBrowserHeaders (workspace discovery) - buildNotionModelsDiscoveryHeaders (model discovery) Headers match the real browser capture from Chrome 149 on Linux. Addresses gemini-code-assist review: - Fixed platform mismatch: sec-ch-ua-platform now matches USER_AGENT (Windows) - Deduplicated headers via shared BROWSER_HEADERS constant in notionWebModels.ts - Both executor and model discovery use the same constant * fix(notion-web): align Chrome version to 149 and add browser header tests Addresses maintainer review feedback on #7864: - Align User-Agent and NOTION_USER_AGENT to Chrome/149 (was 145 and 150) matching sec-ch-ua already declaring v="149" - Add test assertions that browser fingerprint headers (sec-ch-ua, sec-fetch-mode, cache-control, pragma) are sent on both executor and models-discovery requests * refactor(providers): extract notion-web fallback catalog to its own module notionWebModels.ts crossed the 800-line new-file cap (875) once the browser header tests landed; move the NOTION_WEB_FALLBACK_MODELS catalog + its type to notionWebFallbackModels.ts (pure data, re-exported for existing consumers). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
3fe61cdea7 |
fix(compression): enable OmniGlyph for Claude Fable 5 (#7863)
Rebuilt clean on release/v3.8.49 (branch forked from an old main and carried ~68 files of base drift). Reconciled with #7237 on the tip: supportsVision keeps the authoritative getResolvedModelCapabilities() resolution (the PR's isVisionModelId heuristic predates that fix); the PR's real change lands — OAuth 'claude' now counts as a direct Anthropic transport for OmniGlyph, and claude-fable-5 joins the vision model ids. Plumbing test now pins the '|| provider === "claude"' invariant instead of exact formatting. Co-authored-by: quanturbo <168349709+quanturbo@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
6fa748e321 |
fix(vision-bridge): reroute auto/ prefix to vision model when images present (#7871)
* fix(vision-bridge): reroute auto/ prefix to vision model when images present Rebuilt clean on release/v3.8.49 (the original branch forked from an old main and dragged ~70 unrelated files of base drift). Reconciled with the newer VibeProxy credential guards on the tip: the reroute now also fires for auto/ models, the keep-credentialed-model skip does not apply to auto (keeping auto would land on a text-only candidate), and the reroute-target credential guard is preserved. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * test(guardrails): compact image_url literals to fit the 800-line test cap Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: herjarsa <204746071+herjarsa@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
74204911c7 |
fix(usage): harden account identity reconciliation (#7843)
* fix(usage): harden account identity reconciliation * fix(db): renumber codex strong-identity migration 128 -> 129 release/v3.8.49 tip took slot 128 via #7839 (auto_candidate_overrides) after this branch forked; renumber the new migration and its test references. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |
||
|
|
b2efa35982 |
fix(sse): CC bridge loses OpenAI-format image input (OpenCode/Kilo/Cline → AgentRouter) (#7888)
* fix(sse): convert OpenAI media parts to Claude blocks in the CC bridge OpenAI-format clients (OpenCode/Kilo/Cline) reach the Claude-Code-compatible bridge untranslated: chatCore skips the OpenAI->Claude translator when sourceFormat is OPENAI, so image_url / AI-SDK image / file parts either went upstream in OpenAI shape (silently ignored) or were dropped by the text-only extraction, and media-only user turns were removed by hasValidContent(). - claudeCodeCompatible: convertOpenAiMediaBlock() converts image_url (base64 + remote), AI-SDK string image and file parts (pdf->document, image mime->image) to Claude blocks in both bridge paths; Claude-native blocks pass through unchanged and the text-only wire image is preserved. - claudeHelper: hasValidContent() now counts image/document blocks so media-only user turns are not silently deleted. Reported-by: beingshafin Refs #7777 * refactor(sse): extract CC media-block conversion to ccOpenAiMediaBlocks.ts claudeCodeCompatible.ts is frozen at 1202 lines by check:file-size; the #7777 helpers pushed it to 1291. Move them to a dedicated module, no behavior change. * test(quality): register cc-bridge-openai-image-7777 test in stryker tap.testFiles |
||
|
|
a6dafa0ff7 |
feat(providers): add OpenRouter speech-to-text (audio transcription) provider (#7861)
* feat(providers): add OpenRouter speech-to-text (audio transcription) provider Adds OpenRouter as a speech-to-text provider for POST /v1/audio/transcriptions. Transcription requests route to OpenRouter's dedicated STT endpoint (https://openrouter.ai/api/v1/audio/transcriptions), converting the multipart audio upload into OpenRouter's JSON input_audio { data, format } shape and forwarding optional language, temperature, and response_format fields. OpenRouter STT reuses your existing OpenRouter connection, so no separate credential is required. Eleven transcription models are available (Deepgram Nova-3, Microsoft MAI-Transcribe 1.5, NVIDIA Parakeet, Mistral Voxtral, Qwen3 ASR, Google Chirp 3, and the OpenAI Whisper / GPT-4o transcribe family). The media-providers STT playground card now narrows its model picker to transcription-only models, so the OpenRouter chat catalog is not shown for speech-to-text, and the provider page shows an existing-connection note for OpenRouter STT. * fix(providers): address OpenRouter STT review feedback - Extract the OpenRouter transcription handler into open-sse/handlers/openrouterTranscription.ts to keep audioTranscription.ts under the file-size cap. - Qualify the STT card's submitted model id with the connection's provider prefix so OpenRouter models route to OpenRouter rather than the model's own vendor (the transcription route resolves the provider from the leading segment of the model id). - Coerce temperature to a number and forward timestamp_granularities on the JSON input_audio payload; match the base MIME type when resolving the audio format so codec parameters (e.g. audio/webm;codecs=opus) do not fall back to wav. - Split the OpenRouter cases into tests/unit/audio-transcription-openrouter.test.ts and add coverage for temperature, timestamp granularities, MIME codec params, and qualified-id routing. |
||
|
|
fca82af737 |
fix(compression): skip CCR on tool outputs to preserve agent loop (#7869)
* fix(compression): skip CCR on tool outputs to preserve agent loop
When OmniRoute is used as a chat-completion PROVIDER (not as an MCP server),
the upstream LLM cannot call `omniroute_ccr_retrieve` to expand CCR markers
on demand. Replacing tool outputs with `[CCR retrieve hash=… chars=…]`
placeholders therefore makes the LLM stall — it sees an opaque marker
where the actual tool result should be and has no way to recover the
verbatim content.
Scope:
- OpenAI format: `{ role: "tool", tool_call_id, content }`
- Anthropic format: `{ role: "user", content: [{ type: "tool_result", … }] }`
Fix: extend `processMessages` in the CCR engine to skip both shapes
verbatim. The engine still applies to plain user / assistant text blocks,
which is where compression yields token savings AND the LLM can reason
about the marker.
Tests:
- New `tests/unit/compression/ccr-skip-tool-outputs.test.ts` covers both
formats (4 cases) plus a regression guard that plain user text is still
compressed.
- All 57 pre-existing CCR tests still pass.
Reported-by: herjarsa
Refs: AGENTS.md agent feedback — agent loop stalled on bash/read/grep
outputs after CCR collapsed them to markers.
* fix(compression): guard CCR against null / non-object parts
Apply gemini-code-assist review feedback on PR #7869:
- Use optional chaining when reading `part["type"]` so malformed
client payloads (null entries, non-object entries in the parts
array) cannot throw `TypeError: Cannot read properties of null`.
- The skip rule (this branch) and the existing text-part compression
path (the next branch) both get the guard, since both dereference
`part["type"]` directly.
Test:
- New defensive case: a user message whose content array contains a
`null` entry alongside a `tool_result` must not crash the engine.
Refs: gemini-code-assist review on #7869 (PRR_kwDORPf6ys8AAAABGj5G7Q)
---------
Co-authored-by: herjarsa <herjarsa@users.noreply.github.com>
|
||
|
|
286628a8c4 |
fix: avoid cmd.exe spawn on Windows by using os.hostname() before execSync fallback (#7841)
* fix: avoid cmd.exe spawn on Windows by using os.hostname() before execSync fallback
On Windows, execSync() wraps the command in cmd.exe /d /s /c,
spawning a new cmd.exe process. getMachineIdRaw() called
execSync("hostname") as Strategy 4 before trying os.hostname()
as Strategy 5 -- meaning every dashboard API call spawned an
unnecessary cmd.exe process.
This commit:
- Moves os.hostname() to Strategy 4 (no child process, native binding)
- Keeps execSync("hostname") as Strategy 5 fallback
- Adds module-level caching so getMachineIdRaw() only runs once per
process lifetime since the machine ID never changes at runtime
- Caches all strategy results at the first successful return
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
* fix: avoid cmd.exe spawn on Windows by using os.hostname() before execSync fallback
Prioritize os.hostname() (sync, no subprocess) over execSync hostname fallback. Cache the result so subsequent calls never spawn. Export resetMachineIdCache() for test isolation.
Tests: 10 tests covering cache behavior, strategy fallback order, and consistent machine ID hashing. The 2 tests that mock os.hostname() now also stub fs.readFileSync for /etc/machine-id to throw, so Strategy 3 (Linux machine-id file) does not preempt Strategy 4 on real Linux runners.
---------
Co-authored-by: tientien17 <tientien17@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
||
|
|
7d82b72def |
fix(cli): use rundll32 instead of cmd.exe for Windows browser fallback in dashboard command (#7844)
* fix(cli): use rundll32 instead of cmd.exe for Windows browser fallback in dashboard command Extract resolveOpenCommand(platform, url) as an exported pure function so tests import the actual production code instead of duplicating logic. The openFallback function in bin/cli/commands/dashboard.mjs used cmd /c start to open the dashboard URL on Windows, spawning an unnecessary cmd.exe process. Replaces with rundll32 url.dll,FileProtocolHandler which opens the URL directly through the Windows shell handler API without any shell wrapper. Tests: 5 tests importing the actual resolveOpenCommand function, covering all platform branches (darwin, win32, linux) and URL pass-through. Changelog fragment included. * chore: rename changelog fragment 7842->7844 to match actual PR number --------- Co-authored-by: tientien17 <tientien17@users.noreply.github.com> |
||
|
|
ee3546a6ce |
perf: reduce long-context request copies (#7862)
Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com> |
||
|
|
b1d3a513f2 |
fix: bound quadratic session-dedup memory growth (#7855)
* fix: bound long-context compression memory * perf: scan session dedup line starts natively --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com> |
||
|
|
916ccddfd8 |
fix: add native lifecycle-aware health endpoint (#7852)
* fix: add native health endpoint * fix: keep health endpoint dynamic --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com> |
||
|
|
8fbb1519ea |
fix(i18n): backfill providers.tierOverride* keys into vi.json (#7838 base-red)
#7838 added six providers.tierOverride* keys to en.json without the Vietnamese counterparts; i18n-vi-completeness (key parity + both ICU checks) fails on the release tip for every fresh PR run. Translated using the locale's existing tier vocabulary and inserted at the mirrored position. |
||
|
|
3ba3cd145e |
chore(quality): fix release-tip base-reds — providerTierField case collision + stryker 7806 registration
(1) #7838 added providerTierField.ts next to ProviderTierField.tsx in the same directory — a case-only collision that breaks webpack on case-insensitive filesystems; the #6584 guard fails Unit shard 4/4 on every fresh PR run. Rename the helper to providerTierFieldApi.ts (import + test path adjusted). (2) check:mutation-test-coverage --strict fails on the tip because merged #7806's combo-skip-conn-disable-plugin-block test was never registered in stryker tap.testFiles. Register it. |
||
|
|
887e56845f |
chore(quality): regenerate translate-path golden for the #7840 catalog entries
#7840 added navy/aihorde and moved liquid to inference.liquid.ai in providers.ts without regenerating tests/snapshots/provider/translate-path.json, leaving the golden gate (Unit shard 4/4) red on the release tip for every fresh PR run. Mechanical regen via UPDATE_GOLDEN=1; only those 3 entries change. |
||
|
|
d813bedf5c |
fix(cli): register ESM alias resolver for @/ paths under global install (#7808)
* chore(ci): add .mergify.yml to main — Mergify only reads config from the default branch (#7168) * fix(ci): add the auto-enqueue pull_request_rule to the Mergify config (queue_conditions alone are eligibility-only) (#7179) * fix(ci): migrate Mergify auto-enqueue to merge_protections_settings.auto_merge_conditions (rules-based path is EOL 2026-07-16) (#7216) * fix(ci): drop Mergify batch settings (batching is a paid-tier feature; free plan queue is serial) (#7220) * fix(ci): merge queue tolerates the advisory dast-smoke failure (its GH-hosted build hang dequeued every attempt) (#7225) * test(ci): make the #6634 selfref guard hermetic — main's copy hard-fails every PR (#7341) main's copy of this test still does git I/O inside a unit test: const baseSrc = git(['show', 'origin/main:' + FILE]); Runners check out a shallow single ref, so origin/main does not resolve and the test dies with 'fatal: invalid object name origin/main'. Every PR into main fails Unit Tests (7/8) on it — today that is #7313, #7315, #7316, #7334, #7336 and #7337, six PRs red on a defect none of them introduced. #7313 has no other red at all. release/v3.8.49 already carries a fix ( |
||
|
|
9c40e481e1 |
fix(rerank): honor the connection's pinned proxy on rerank calls (#7350) (#7867)
Rerank egressed directly while chat and embeddings on the SAME connection went through the connection's proxy, so a provider that geo-blocks the host IP (Voyage AI) failed on a connection that was otherwise working. handleRerank now takes a connectionId, resolves that connection's proxy and wraps the upstream fetch in runWithProxyContext; a failed lookup is logged and skipped rather than turned into a request error. Also threads connectionId into the embeddings path of runSingleModelTest, which had the same gap. The change is lifted from #7420 by @kamenkadmitry. That PR could not be updated in place: its head lives on an organization-owned fork, where GitHub's 'allow edits from maintainers' does not grant push access, and its branch had drifted ~3 weeks (343 files of formatting churn once merged with the tip). Only the proxy layer is taken here — #7420's voyage format adapter is superseded by #7813 and was factually wrong about the Voyage response shape. Refs #7350 Refs #7420 Co-authored-by: kamenkadmitry <kamenkadmitry@users.noreply.github.com> |
||
|
|
d2ab1893ed |
feat(catalog): map unmapped free tiers, add navy + aihorde, surface keyless providers (#7840)
* feat(catalog): map unmapped free tiers, add navy + aihorde, surface keyless
Seven providers whose free tier was documented upstream but never reached our
catalog. Five of them we could already route — only the quota was missing.
Providers already routable, quota now mapped:
- requesty (200 req/day), ovhcloud (2 req/min per IP, anonymous), agnes
(permanently free), glm (GLM-4.7/4.5-Flash are Free on the official pricing
table). All registered as recurring-uncapped: their free tier is capped in
REQUESTS, not tokens, so inventing a token figure would inflate the headline.
The "~30M/month" that circulates for GLM belongs to BigModel.cn (a separate
Chinese offering) and is deliberately not recorded.
New providers:
- navy: one shared 150K tokens/day pool (~4.5M/month) drained by a per-model
token_multiplier. Registered as a SINGLE pooled row — summing its ~149 free
models would overcount ~149x.
- aihorde: crowdsourced volunteer GPUs, keyless via the documented anonymous
key. No tool calling and a 120s timeout, because requests queue for minutes.
Also:
- kilo-gateway reconciled against its live /models list (7 -> 13 models) and
flagged with the new trainsOnPrompts field: every free Kilo model reports
mayTrainOnYourPrompts: true, so the privacy cost now sits next to the quota.
- Free-tier page gains search, provider/keyless filters, per-row type badges,
a "no API key required" section and a curation-date freshness indicator.
- catalogUpdatedAt comes from an explicit FREE_CATALOG_CURATED_AT constant
rather than the data file's mtime: a standalone build rewrites timestamps on
deploy, which would advertise a months-old catalog as updated today.
Net effect on the headline: 462 -> 484 models but 1.371B -> 1.376B tokens,
because only navy publishes a token quota. That is the point — coverage grows
without the number lying.
* refactor(providers): derive one answer for "does this need an API key?"
"Works without a credential" lived in three registries that disagreed, and only
three providers were classified the same way in all of them:
- NOAUTH_PROVIDERS.noAuth -> whether the connect form hides the field
- RegistryEntry.authType / anonymousApiKey -> what the executor really sends
- FreeModelBudget.freeType === "keyless" -> how the catalog labels it
getCredentialRequirement() now derives the answer from the two sources that
describe real behaviour, returning none | optional | oauth | required. It adds
no list to maintain: registering a provider the usual way is enough. oauth is
deliberately NOT "works without a credential" — there is no key to paste, but
signing in is still a barrier, and calling it keyless would mislead.
anonymousApiKey outranks noAuth: AI Horde ships a documented anonymous key AND
honours a real one for higher queue priority, so it is "optional" rather than
"none" even though the form hides the field.
Fixes one real inconsistency this branch introduced: ovhcloud was catalogued as
keyless while its registry demanded a key. Verified live — the anonymous tier
answers /chat/completions with no Authorization header, and a BAD key returns
403 instead of degrading, so authType is now "optional" and the executor
attaches the header only when a real credential exists.
The 10 pre-existing divergences (agy, blackbox, pollinations, puter, qwen-web,
…) are frozen in KEYLESS_CATALOG_DRIFT with a stale-entry check: the gate blocks
new drift, and fails if a frozen entry stops drifting so the debt list cannot
outlive the debt. Resolving each one means confirming upstream behaviour, not
editing a list.
* fix(dashboard): build "no API key required" from routing, not freeType
Probing all ten providers the catalog labels `keyless` (2026-07-20) showed the
label answers a different question than the UI was asking:
blackbox 401 "No api key passed in."
friendliai 401 "no authorization info provided"
iflytek 401 Unauthorized
sparkdesk 401 Unauthorized
puter 401 "Missing authentication token"
muse-spark-web 403 (authHeader is a session cookie, not a key)
qwen-web 200 but serves the WAF HTML page, not the API
liquid 404 — endpoint moved; needs its own audit
pollinations 200 with real choices <- genuinely key-free
ovhcloud 200, and 403 on a BAD key <- fixed earlier in this branch
`freeType: "keyless"` means "free access not quantifiable in tokens" — it sits
beside `oauth` in FREE_TIERS.md for exactly that reason. The new section was
listing those rows under "No API key required", which would have sent users to
providers that reject them. It now derives from getCredentialRequirement().
pollinations was the one real find: it answers with no credential at all, so its
registry entry moves from apikey to optional and it leaves the recorded list.
The list is computed in the route handler, not the component: deriving it
client-side pulled the whole 201-entry provider REGISTRY into the browser
bundle. The component takes `noCredentialProviders` from the payload and stays
dumb — which is also why the vitest run could not resolve REGISTRY through the
`@omniroute/*` alias and silently classified every provider as credentialed.
* fix(test,providers): resolve open-sse in vitest; point liquid at its live host
vitest.config.ts / vitest.mcp.config.ts had no `@omniroute/open-sse` alias, so
imports from open-sse resolved to undefined instead of throwing. Tests stayed
green while every lookup silently returned a default — that is how the free-tier
card asserted on provider credentials with REGISTRY never loaded. Both configs
now mirror the tsconfig paths, and tests/unit/ui/open-sse-alias.test.tsx pins it
by asserting on values only reachable through REGISTRY (aihorde's anonymous key,
pollinations' optional auth), so a future regression fails loudly.
liquid pointed at api.liquid.ai, which stopped serving the API — every path now
returns a Vercel 404 HTML page, so routing failed with an unparseable body
instead of a clean error. The live OpenAI-compatible host is inference.liquid.ai
(403 {"detail":"Not authenticated"} without a key). Both verified 2026-07-20.
Swept every free-catalog provider for the same failure. Five more looked dead on
a /models probe (agentrouter, coze, kiro, nlpcloud, puter) but answer their chat
endpoint with real API JSON — a 404 on /models only means the path is not
exposed. They are untouched: liquid was the only genuine casualty.
* test(providers): move the APIKEY_PROVIDERS partition count to 180
This PR adds one gateway provider (navy), so the frozen entry-count and the
family-partition sum both shift by one. The assertions are moving targets by
design — they exist to catch a provider silently landing in two families or in
none, not to freeze the catalog size.
|
||
|
|
51b118c2d3 |
feat(routing): read-only auto/* candidate transparency + per-API-key exclusions (#7819) (#7839)
Level 1: GET /v1/auto-combo/{channel}/candidates lists an auto/* channel's
candidate pool with live reachability (provider circuit breaker via
getStatus()/canExecute(), connection cooldown, model lockout).
Level 2: per-API-key candidate exclusions, persisted in a new
auto_candidate_overrides table and enforced at the virtualFactory.ts
candidate-pool chokepoint via a pure, fail-open filter — mirrors the #7622/
#7646 precedent exactly (zero touches to the frozen combo.ts god-file).
Levels 3 (weights/ordering) and 4 (policy pin) are deferred to a follow-up
issue, as is the dashboard UI (Step 4) and its i18n strings.
|
||
|
|
6770a57131 |
feat(providers): expose an explicit tier override for any provider connection (#7818) (#7838)
classifyTier() already honored a DB-backed providerOverrides list keyed by an arbitrary provider-id string (built-in or custom), but nothing exposed it through the UI or API. Adds GET/PUT /api/settings/tier-config, a generic Advanced Settings tier selector wired into EditConnectionModal, and makes TierCoverageWidget consult the same override before falling back to registry-membership classification. Owner decision: scope is the 3 real ProviderTier machine values (free/cheap/premium) — the enum is not extended to 4. |
||
|
|
a7a6b5d016 |
test(security): exact SAN-entry match in mitm leaf-cert test (CodeQL #746) (#7824)
CodeQL js/incomplete-url-substring-sanitization (HIGH) flags cert.subjectAltName.includes(host) in the #6684 leaf-issuance test as a host-substring check. It is the ONLY open CodeQL alert repo-wide, and check:codeql-ratchet counts alerts repo-wide, so it keeps Quality Ratchet red on every open PR — currently blocking ~10 contributor PRs that have no defect of their own. Assert exact SAN-entry membership (split on ',' + Array.includes of the full 'DNS:<host>' entry) instead of a substring. Stronger: a SAN of 'notexample.com' no longer satisfies host 'example.com'. All 5 tests pass. |
||
|
|
d8499dacd3 |
fix(stream): emit terminal SSE frames on mid-stream upstream failure (#7699) (#7816)
* fix(stream): emit terminal SSE frames on mid-stream upstream failure (#7699) On /v1/messages (Anthropic format), when the upstream SSE stream fails mid-flight after bytes have been forwarded to the client, OmniRoute used to silently close the connection with no terminal event. Anthropic SDK and Claude Code report "Connection closed mid-response. The response above may be incomplete." Two fixes in open-sse/utils/streamHandler.ts: 1. buildStreamErrorChunks (Claude format) now emits event:message_stop after event:error — the Anthropic stream terminator that clients expect. Previously only event:error was sent, leaving the client hanging. 2. createDisconnectAwareStream pull() now detects upstream "done" without a client-visible terminal marker ([DONE] / response.completed / message_stop) and emits a synthetic terminal error frame instead of silently closing. This covers the case where the upstream drops the connection mid-stream without sending an error chunk. Adds tests/unit/silent-sse-close-7699.test.ts covering both code paths across Claude, OpenAI Chat, and OpenAI Responses formats. Refs: diegosouzapw/OmniRoute#7699 * fix(stream): scope terminal-marker missing detection to known formats with forwarded bytes Gate the done-path synthetic 502 error on bytesWereForwarded AND a known clientResponseFormat. Without this gate, any stream that closes cleanly without a terminal marker (including raw passthrough streams and non-API transforms) is incorrectly treated as a mid-stream drop. - Add bytesWereForwarded flag set on first Uint8Array chunk - Require clientResponseFormat to be set before injecting 502 - Fixes 3 broken stream-handler tests (pipes transformed bytes, slow upstream stall watchdog, normal completion watchdog) - Preserves #7699 fix: Claude-format streams that forwarded content but missed message_stop still get the synthetic terminal frame * fix(stream): scope terminal-marker heuristic to Claude only, add non-SSE regression #7699 is scoped to /v1/messages (Anthropic): Claude clients treat a stream that ends without message_stop as an error, and Anthropic's SSE spec explicitly permits a mid-stream event: error. The issue's own suggested fix says the current OpenAI silent-close "remains reasonable" — so the done-without-terminal-marker synthetic-502 heuristic must not fire for any other clientResponseFormat (gemini/codex/kiro/cursor/openai/openai-responses etc.), where a done stream with no [DONE]/response.completed/message_stop equivalent is not necessarily a silent drop. Narrows the gate from "any truthy clientResponseFormat" to "clientResponseFormat === FORMATS.CLAUDE" specifically. Adds a regression test asserting a plain non-SSE OpenAI-format completion (bytes forwarded, no terminal marker) is NOT mutated with a synthetic error frame. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * test(stream): trim new regression test to clear the 800-line test-file cap tests/unit/stream-handler.test.ts was 772 lines pre-#7816 (not in the frozen file-size baseline, so it's evaluated as new-file-cap 800). The added regression test pushed it to 807; trim boilerplate to land at 796. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> |
||
|
|
bf9202de0c |
fix(antigravity): attempt onboarding when projectId is empty (#5193 regression of #2541) (#7815)
* fix(antigravity): attempt onboarding when projectId is empty (#5193 regression of #2541) PR #5193 changed onboarding from inline await to fire-and-forget gated by if (projectId), which never fires when projectId is empty — the exact case that needs onboarding. This re-introduced the #2541 catch-22. Add an else-if branch that attempts onboarding inline (bounded by AbortSignal.timeout) when projectId is empty, then retries loadCodeAssist to discover the newly created project. - Existing accounts with projectId: unchanged (fire-and-forget) - New accounts without projectId: now onboarded within login flow - Timeout bounded: +8s worst case (onboardUser + retry loadCodeAssist) - Graceful degradation: if onboarding fails, lazy retry handles it Tests: - 3 new tests covering empty-projectId onboarding path (RED→GREEN) - Existing 2 tests preserved and passing - Adjusted timeout assertion for the stall test (now includes onboardUser stall) - 5/5 passing on Node 24 Fixes #7814 Related: #5193, #2569, #2541, #2219 * docs(changelog): add fragment for antigravity onboarding empty-projectId fix (#7814) Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouzapw@users.noreply.github.com> Co-authored-by: Rafael Dias Zendron <rafaumeu@users.noreply.github.com> |
||
|
|
7c63e99149 |
fix(rerank): add voyage format adapter for request/response translation (#7809) (#7813)
* fix(rerank): add voyage format adapter for request/response translation (#7809) Voyage AI is not Cohere-compatible: - Uses top_k instead of top_n (top_n is rejected with 400) - Rejects empty-string documents (Cohere tolerates them) - Returns {data:[{relevance_score,index}]} not {results:[…]} Add format: 'voyage' to the registry entry and implement both transformRequestForProvider and transformResponseFromProvider adapters: Request: map top_n→top_k, filter empty/whitespace-only documents Response: map data[]→results[], remap filtered indices back to caller's original document positions, sort by score desc, honor top_n Follows the existing nvidia/deepinfra adapter pattern. 13 new tests, all existing rerank tests still pass. * fix(rerank): preserve whitespace-only documents in voyage adapter Voyage API accepts whitespace-only documents (probed live). Changed filter from text.trim() to text !== '' so only exact empty strings are dropped. Updated both request adapter and response index-map reconstruction, plus tests pinning the behavior. * fix(rerank): force return_documents:false upstream + isolate voyage-7809 test DB Voyage echoes documents as plain strings (not Cohere {text}); we never rely on that echo (document text is always synthesized locally from the caller's originals), so force return_documents:false on the upstream request to make that explicit and never trust an echoed document. Folds in the corresponding delta from the now-closed #7811. Also isolates tests/unit/rerank-voyage-7809.test.ts's SQLite usage behind a temp DATA_DIR + core.resetDbInstance() in test.after, since importing open-sse/handlers/rerank.ts pulls in @/lib/usageDb (migrations run on import) — the test must never touch the shared/real DB. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> |
||
|
|
34aefcf4e2 | fix(ci): repair release regressions exposed by clean runs (#7812) | ||
|
|
adbcd2c8bc |
fix(auth): gate invalid-key check on isRequireApiKeyEnabled for embeddings and web-fetch (#7785) (#7810)
* fix(auth): gate invalid-key check on isRequireApiKeyEnabled for embeddings and web-fetch (#7785) When REQUIRE_API_KEY=false, /v1/embeddings and /v1/web/fetch still returned 401 for invalid presented keys while all other client APIs allowed anonymous access. The route-local invalid-key check was not gated on isRequireApiKeyEnabled(), unlike the /v1/combos pattern. Gate the invalid-key check on isRequireApiKeyEnabled() in both route files so anonymous access works consistently across all client APIs. Refs: https://github.com/diegosouzapw/OmniRoute/issues/7785 * fix(tests): set REQUIRE_API_KEY=true in embeddings-auth invalid-key subtest The "should return 401 when an invalid API key is provided" test now correctly sets REQUIRE_API_KEY="true" so the route-level gated check is exercised. Before, the test asserted 401 when REQUIRE_API_KEY was not set, which after #7785 fix now returns 400 (model validation fails) instead of 401. * test(auth): assert anonymous-passthrough in embeddings-auth legacy suite (#7785) Per #7785's acceptance criteria, the pre-existing embeddings regression test must assert BOTH enforcement states, not just the enforced-401 case. Add the missing REQUIRE_API_KEY=false + invalid-key subtest alongside the already-fixed REQUIRE_API_KEY=true + invalid-key subtest, matching the coverage already present in the dedicated auth-policy-embeddings-webfetch-7785.test.ts suite. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> |