Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
Release v3.8.26 (#3875)
Diego Rodrigues de Sa e Souza81a37b67ed5e
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 25badf8168..b99cdc6cd0 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -70,6 +70,11 @@ jobs:runs-on: ubuntu-latestneeds: test-coverageif: ${{ always() && needs.test-coverage.result == 'success' }}+ # security-events: read lets the CodeQL ratchet read open code-scanning alerts+ # via `gh api .../code-scanning/alerts`. contents: read keeps checkout working.+ permissions:+ contents: read+ security-events: readsteps:- uses: actions/checkout@v6- uses: actions/setup-node@v6@@ -88,6 +93,15 @@ jobs:# coverage mergeado). Tamanho de arquivo e duplicação têm gates dedicados.- name: Ratchet checkrun: node scripts/quality/check-quality-ratchet.mjs --summary .artifacts/quality-ratchet.md+ # Fase 6A.5: require-tighten — ADVISORY por enquanto (continue-on-error). Reporta+ # quando uma métrica MELHOROU sem o baseline ter sido apertado no mesmo PR (força+ # capturar ganhos permanentes). As métricas coverage.* carregam tightenSlack para+ # o gap anti-flake (CI mergeado > baseline) não disparar falso-positivo. Promover a+ # BLOQUEANTE no fim do ciclo removendo o `continue-on-error` (ver a nota+ # _require_tighten_advisory em config/quality/quality-baseline.json).+ - name: Require-tighten (advisory — flip to blocking at cycle-end)+ continue-on-error: true+ run: node scripts/quality/check-quality-ratchet.mjs --require-tighten# Catraca de duplicação (jscpd@4 sobre src+open-sse). Roda neste job (paralelo)# para não pesar no caminho crítico do lint.- name: Duplication ratchet@@ -103,6 +117,14 @@ jobs:run: npm run check:cognitive-complexity- name: Type coverage ratchetrun: npm run check:type-coverage+ # CodeQL alerts ratchet — BLOQUEANTE (promovido de advisory na v3.8.26).+ # Lê metrics.codeqlAlerts.value de quality-baseline.json e sai 1 SOMENTE numa+ # regressão real (alertas abertos > baseline). Falha de medição (gh/auth/api)+ # é skip gracioso com exit 0 — security-events:read no job-level permissions.+ - name: CodeQL alerts ratchet (blocking)+ run: npm run check:codeql-ratchet+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: Append summaryif: always()run: cat .artifacts/quality-ratchet.md >> "$GITHUB_STEP_SUMMARY"@@ -114,17 +136,23 @@ jobs:path: .artifacts/quality-ratchet.mdif-no-files-found: warn- # Phase 7 extended quality gates — ADVISORY (continue-on-error). The 5 npm-based- # ratchets (dead-code/cognitive-complexity/type-coverage/circular-deps/bundle-size)- # run for real. The external scans (vuln/secrets/workflows) skip gracefully until the- # owner adds install steps for osv-scanner/gitleaks/actionlint/zizmor; CodeQL ratchet- # works via the runner's gh token. SonarQube needs SONAR_TOKEN/SONAR_HOST_URL secrets.+ # Phase 7 extended quality gates — ADVISORY (continue-on-error). The npm-based+ # ratchets that remain here (circular-deps/bundle-size) run for real. The external+ # scans (vuln/secrets/workflows) install via GitHub release downloads and skip+ # gracefully if a binary is still absent. The CodeQL ratchet was PROMOTED to a+ # blocking step in the quality-gate job (v3.8.26) — no longer runs here.+ # SonarQube needs SONAR_TOKEN/SONAR_HOST_URL secrets.quality-extended:name: Quality Gates (Extended, advisory)runs-on: ubuntu-latestcontinue-on-error: truesteps:+ # fetch-depth: 0 — the OpenAPI breaking-change gate (oasdiff) reads the base+ # spec via `git show <base_ref>:docs/reference/openapi.yaml`; a shallow clone+ # would lack the base ref and the gate would self-skip (base-unresolved).- uses: actions/checkout@v6+ with:+ fetch-depth: 0- uses: actions/setup-node@v6with:node-version: ${{ env.CI_NODE_VERSION }}@@ -136,30 +164,70 @@ jobs:run: npm run check:circular-deps- name: Bundle sizerun: npm run check:bundle-size- - name: CodeQL alerts ratchet- run: npm run check:codeql-ratchet- env:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- # Fase 7 INT: install the advisory security scanners so the gates below- # actually run (they self-skip when the binaries are absent). go install- # uses documented module paths (no fragile version-pinned URLs); zizmor is- # a PyPI package. Whole job is continue-on-error, so an install hiccup never- # blocks the build. Exercised at the next release→main run.+ # CodeQL ratchet foi PROMOVIDO a BLOQUEANTE no job quality-gate (v3.8.26) —+ # não roda aqui para evitar duplo run/duplo report.+ # Install the advisory security scanners so the gates below actually run+ # (they self-skip when the binaries are absent). Robustness lessons baked in:+ # • `go install …/gitleaks/v8@latest` produces a binary WITHOUT the version+ # ldflags gitleaks needs (and often fails) — avoided.+ # • `curl …api.github.com/…/releases/latest` is UNAUTHENTICATED and+ # rate-limited to 60 req/hr/IP; when throttled it returns an empty body,+ # so the asset URL resolves to nothing and the install silently no-ops —+ # every gate then self-skips and the metric is never produced. We instead+ # use `gh release download`, which is preinstalled on GitHub runners and+ # authenticated via GITHUB_TOKEN (5000 req/hr) — robust under load.+ # • actionlint keeps its official download script; zizmor stays on pipx.+ # We `set +e` (no single failure aborts the step), ALWAYS export $GITHUB_PATH+ # at the end, and print diagnostics so the next CI run proves exactly what+ # installed. The job is continue-on-error too, so an install hiccup never+ # blocks the build.- name: Install advisory security scanners (gitleaks/osv/actionlint/zizmor)continue-on-error: true+ env:+ GH_TOKEN: ${{ github.token }}run: |- go install github.com/rhysd/actionlint/cmd/actionlint@latest- go install github.com/gitleaks/gitleaks/v8@latest- go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest- echo "$HOME/go/bin" >> "$GITHUB_PATH"+ set +e+ mkdir -p "$HOME/.local/bin"+ # gitleaks — download latest linux x64 tarball via gh (authed), extract binary+ rm -rf /tmp/gl && mkdir -p /tmp/gl+ gh release download --repo gitleaks/gitleaks --pattern '*linux_x64.tar.gz' --dir /tmp/gl+ tar -xzf /tmp/gl/*linux_x64.tar.gz -C "$HOME/.local/bin" gitleaks+ # osv-scanner — download latest linux amd64 bare binary via gh (authed)+ rm -rf /tmp/osv && mkdir -p /tmp/osv+ gh release download --repo google/osv-scanner --pattern '*linux_amd64' --dir /tmp/osv+ install -m 0755 /tmp/osv/*linux_amd64 "$HOME/.local/bin/osv-scanner"+ # actionlint — official download script+ bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) latest "$HOME/.local/bin"+ # zizmor — PyPI (pipx preferred, pip --user fallback); lands in ~/.local/binpipx install zizmor || pip install --user zizmor+ # oasdiff — download latest linux amd64 tarball via gh (authed), extract binary+ rm -rf /tmp/oasd && mkdir -p /tmp/oasd+ gh release download --repo oasdiff/oasdiff --pattern '*linux_amd64.tar.gz' --dir /tmp/oasd+ tar -xzf /tmp/oasd/*linux_amd64.tar.gz -C "$HOME/.local/bin" oasdiff+ # ALWAYS export the bin dir (even if any step above failed)echo "$HOME/.local/bin" >> "$GITHUB_PATH"+ # diagnostics — prove what installed on the next CI run+ ls -la "$HOME/.local/bin"+ "$HOME/.local/bin/gitleaks" version || true+ "$HOME/.local/bin/actionlint" -version || true+ "$HOME/.local/bin/osv-scanner" --version || true+ "$HOME/.local/bin/oasdiff" --version || true+ zizmor --version || true- name: Secret scan (gitleaks; skips if absent)run: npm run check:secrets- name: Vulnerability ratchet (osv-scanner; skips if absent)run: npm run check:vuln-ratchet- name: Workflow lint (actionlint+zizmor; skips if absent)run: npm run check:workflows+ # OpenAPI breaking-change detection (oasdiff). Diffs the PR's public API+ # contract (docs/reference/openapi.yaml) against the base branch's spec.+ # ADVISORY: reports `openapiBreaking=N` and self-skips when oasdiff is absent+ # or the base spec can't be resolved. BASE_REF is read by the script from the+ # env (never interpolated into a shell body) — workflow-injection-safe.+ - name: OpenAPI breaking-change (oasdiff; advisory)+ env:+ BASE_REF: ${{ github.base_ref }}+ run: npm run check:openapi-breakingdocs-sync-strict:name: Docs Sync (Strict)@@ -188,6 +256,30 @@ jobs:- name: i18n translation drift (warn)run: node scripts/i18n/check-translation-drift.mjs --warn+ docs-lint:+ name: Docs Lint (prose — advisory)+ runs-on: ubuntu-latest+ # Advisory (warning-first): prose/markdown style must not block merges while the+ # existing doc corpus is brought up to style. Promote to blocking once it converges.+ continue-on-error: true+ steps:+ - uses: actions/checkout@v6+ - uses: actions/setup-node@v6+ with:+ node-version: ${{ env.CI_NODE_VERSION }}+ cache: npm+ - name: markdownlint (docs + root, advisory)+ run: npx --yes markdownlint-cli2 "docs/**/*.md" "*.md" "!docs/i18n" "!docs/research" || true+ - name: Vale prose lint (Microsoft style, advisory)+ # Non-fatal: a Vale/reviewdog setup error must not turn this advisory job red.+ continue-on-error: true+ uses: errata-ai/vale-action@reviewdog+ with:+ files: docs+ fail_on_error: false+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+i18n-ui-coverage:name: i18n UI Coverageruns-on: ubuntu-latest@@ -229,8 +321,14 @@ jobs:python-version: "3.12"- name: Validate ${{ matrix.lang }}+ env:+ # Pass the matrix value via env (never interpolate ${{ ... }} straight+ # into the run: script body) so the shell receives a variable, not+ # inlined text — zizmor template-injection mitigation. Named MATRIX_LANG+ # to avoid clobbering the POSIX `LANG` locale variable.+ MATRIX_LANG: ${{ matrix.lang }}run: |- python3 scripts/i18n/validate_translation.py quick -l '${{ matrix.lang }}' > result.txt+ python3 scripts/i18n/validate_translation.py quick -l "$MATRIX_LANG" > result.txt- name: Upload resultif: always()@@ -511,10 +609,11 @@ jobs:path: coverage-shards/merge-multiple: true- name: Merge + report + gate- # Merging 8 shards of raw v8 coverage is memory-heavy; the default Node- # heap OOMs (exit 134). Raise it for the c8 merge/report step.+ # Merging 8 shards of raw v8 coverage is memory-heavy; the 6 GB heap can+ # still OOM on large PR runs. Keep this job focused on the gate and+ # JSON summary that downstream ratchets consume.env:- NODE_OPTIONS: --max-old-space-size=6144+ NODE_OPTIONS: --max-old-space-size=8192run: |mkdir -p coverageif [ ! -d coverage-shards ] || ! find coverage-shards -maxdepth 1 -type f -name '*.json' | grep -q .; then@@ -532,9 +631,7 @@ jobs:--temp-directory coverage-shards \--reports-dir coverage \--reporter=text-summary \- --reporter=html \--reporter=json-summary \- --reporter=lcov \--exclude=tests/** \--exclude=**/*.test.* \--check-coverage \@@ -563,7 +660,6 @@ jobs:name: coverage-reportpath: |coverage/coverage-summary.json- coverage/lcov.infocoverage/coverage-report.mdif-no-files-found: warndiff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.ymlindex f37d7b152a..372e093525 100644--- a/.github/workflows/electron-release.yml+++ b/.github/workflows/electron-release.yml@@ -33,11 +33,18 @@ jobs:- name: Validate version formatid: validate+ env:+ # Pass workflow context via env (never interpolate ${{ ... }} straight+ # into the run: script body) so the shell receives variables, not+ # inlined text — zizmor template-injection mitigation. INPUT_VERSION is+ # the operator-supplied value and is regex-validated below before use.+ EVENT_NAME: ${{ github.event_name }}+ INPUT_VERSION: ${{ inputs.version }}run: |- if [[ "${{ github.event_name }}" == "push" ]]; then+ if [[ "$EVENT_NAME" == "push" ]]; thenVERSION="${GITHUB_REF#refs/tags/}"else- VERSION="${{ inputs.version }}"+ VERSION="$INPUT_VERSION"fiif [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then@@ -114,8 +121,13 @@ jobs:- name: Sync version in electron/package.jsonshell: bash+ env:+ # Pass the validated version via env (never interpolate ${{ ... }}+ # straight into the run: script body) — zizmor template-injection+ # mitigation. Already regex-validated (^v[0-9]+\.[0-9]+\.[0-9]+$) in+ # the `validate` job, so it cannot carry shell metacharacters.+ VERSION: ${{ needs.validate.outputs.version }}run: |- VERSION="${{ needs.validate.outputs.version }}"VERSION_NO_V="${VERSION#v}"node -e "const fs = require('fs');@@ -212,14 +224,20 @@ jobs:merge-multiple: true- name: Create source archives+ env:+ # Pass the validated version via env (never interpolate ${{ ... }}+ # straight into the run: script body) — zizmor template-injection+ # mitigation. Already regex-validated (^v[0-9]+\.[0-9]+\.[0-9]+$) in+ # the `validate` job, so it cannot carry shell metacharacters.+ VERSION: ${{ needs.validate.outputs.version }}run: |# Create source code archives (excluding dev dependencies and build artifacts)- export TARBALL="OmniRoute-${{ needs.validate.outputs.version }}.source.tar.gz"- export ZIPBALL="OmniRoute-${{ needs.validate.outputs.version }}.source.zip"+ export TARBALL="OmniRoute-${VERSION}.source.tar.gz"+ export ZIPBALL="OmniRoute-${VERSION}.source.zip"# Use git archive for clean source export- git archive --format=tar.gz --prefix=OmniRoute-${{ needs.validate.outputs.version }}/ HEAD -o "release-assets/$TARBALL"- git archive --format=zip --prefix=OmniRoute-${{ needs.validate.outputs.version }}/ HEAD -o "release-assets/$ZIPBALL"+ git archive --format=tar.gz --prefix="OmniRoute-${VERSION}/" HEAD -o "release-assets/$TARBALL"+ git archive --format=zip --prefix="OmniRoute-${VERSION}/" HEAD -o "release-assets/$ZIPBALL"echo "✓ Created source archives:"ls -lh "release-assets/$TARBALL" "release-assets/$ZIPBALL"diff --git a/.github/workflows/nightly-llm-security.yml b/.github/workflows/nightly-llm-security.ymlindex 2ac2778e39..0838c9b11b 100644--- a/.github/workflows/nightly-llm-security.yml+++ b/.github/workflows/nightly-llm-security.yml@@ -43,16 +43,35 @@ jobs:garak:name: garak probes (skip without provider secret)runs-on: ubuntu-latest- if: ${{ secrets.PROMPTFOO_PROVIDER_KEY != '' }}+ # NOTE: the `secrets` context is NOT available in a job-level `if:` — referencing+ # it there makes GitHub reject the file on push (startup_failure on every push).+ # Map the secret into a job-level env and gate each step on a presence check, so+ # the job stays green and simply skips the probes when the secret is absent.+ env:+ PROMPTFOO_PROVIDER_KEY: ${{ secrets.PROMPTFOO_PROVIDER_KEY }}steps:+ - name: Gate on provider secret+ id: gate+ run: |+ if [ -n "$PROMPTFOO_PROVIDER_KEY" ]; then+ echo "run=true" >> "$GITHUB_OUTPUT"+ else+ echo "run=false" >> "$GITHUB_OUTPUT"+ echo "::notice::PROMPTFOO_PROVIDER_KEY not set — skipping garak probes (advisory)."+ fi- uses: actions/checkout@v6+ if: steps.gate.outputs.run == 'true'- uses: actions/setup-node@v6+ if: steps.gate.outputs.run == 'true'with: { node-version: "24", cache: npm }- run: npm ci+ if: steps.gate.outputs.run == 'true'- name: Build CLI bundle+ if: steps.gate.outputs.run == 'true'env: { JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation }run: npm run build:cli- name: Start OmniRoute+ if: steps.gate.outputs.run == 'true'env:JWT_SECRET: ci-build-secret-with-sufficient-length-for-validationPORT: "20128"@@ -64,13 +83,16 @@ jobs:sleep 2done- uses: actions/setup-python@v5+ if: steps.gate.outputs.run == 'true'with: { python-version: "3.12" }- run: pip install garak+ if: steps.gate.outputs.run == 'true'- name: garak limited probes+ if: steps.gate.outputs.run == 'true'env:OPENAI_API_KEY: ${{ secrets.PROMPTFOO_PROVIDER_KEY }}OPENAI_BASE_URL: http://localhost:20128/v1run: garak --model_type openai --model_name gpt-4o-mini --probes promptinject,dan,leakreplay --report_prefix garak-omniroute || true- name: Stop server- if: always()+ if: always() && steps.gate.outputs.run == 'true'run: kill "$(cat server.pid)" || truediff --git a/.github/workflows/nightly-mutation.yml b/.github/workflows/nightly-mutation.ymlnew file mode 100644index 0000000000..7b14c6296a--- /dev/null+++ b/.github/workflows/nightly-mutation.yml@@ -0,0 +1,37 @@+name: Nightly Mutation+on:+ schedule:+ - cron: "17 3 * * *"+ workflow_dispatch:++permissions:+ contents: read++jobs:+ stryker:+ name: Stryker mutation testing (8 critical modules — advisory)+ runs-on: ubuntu-latest+ # Mutation testing is expensive (~200-500 mutants, 30-90 min). It runs only+ # on the nightly schedule / manual dispatch, never on PRs. The score is NOT+ # yet enforced as a ratchet (wired in a later INT phase) — for now the job+ # just produces the HTML/JSON report and uploads it as an artifact.+ timeout-minutes: 120+ steps:+ - uses: actions/checkout@v6+ - uses: actions/setup-node@v6+ with:+ node-version: "24"+ cache: npm+ - run: npm ci+ - name: Run Stryker (advisory)+ id: stryker+ continue-on-error: true+ run: npx stryker run+ - name: Upload mutation report+ if: always()+ uses: actions/upload-artifact@v4+ with:+ name: mutation-report+ path: reports/mutation/+ if-no-files-found: warn+ retention-days: 14diff --git a/.github/workflows/nightly-schemathesis.yml b/.github/workflows/nightly-schemathesis.ymlnew file mode 100644index 0000000000..0255c4a85c--- /dev/null+++ b/.github/workflows/nightly-schemathesis.yml@@ -0,0 +1,70 @@+name: Nightly Schemathesis+on:+ schedule:+ - cron: "23 4 * * *"+ workflow_dispatch:++permissions:+ contents: read++jobs:+ schemathesis:+ name: Schemathesis — OpenAPI contract fuzz (advisory)+ runs-on: ubuntu-latest+ timeout-minutes: 30+ steps:+ - uses: actions/checkout@v6+ - uses: actions/setup-node@v6+ with: { node-version: "24", cache: npm }+ - run: npm ci+ - name: Build CLI bundle+ env: { JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation }+ run: npm run build:cli+ - name: Start OmniRoute (background)+ env:+ JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation+ PORT: "20128"+ run: |+ node dist/server.js > server.log 2>&1 &+ echo $! > server.pid+ for i in $(seq 1 30); do+ if curl -sf http://localhost:20128/api/monitoring/health >/dev/null; then echo "server up"; break; fi+ sleep 2+ done+ - uses: actions/setup-python@v5+ with: { python-version: "3.12" }+ - name: Install schemathesis+ run: pip install schemathesis+ - name: Schemathesis contract fuzz (advisory)+ # Advisory gate: never fails the job. `continue-on-error` covers a crash of the+ # step itself; `|| true` covers schemathesis exiting non-zero when it finds spec+ # violations / upstream 500s — both are expected here (most /v1 endpoints proxy an+ # upstream that has no provider configured in CI). The point of the nightly is to+ # PROVE the contract is fuzzable and surface regressions, not to gate the build.+ continue-on-error: true+ run: |+ schemathesis run docs/reference/openapi.yaml \+ --url http://localhost:20128 \+ --max-examples 20 \+ --workers 4 \+ --checks all \+ --max-response-time 30 \+ --request-timeout 30 \+ --suppress-health-check all \+ --report junit \+ --report-junit-path schemathesis-report/junit.xml \+ --no-color \+ || true+ - name: Stop server+ if: always()+ run: kill "$(cat server.pid)" || true+ - name: Upload schemathesis report+ if: always()+ uses: actions/upload-artifact@v4+ with:+ name: schemathesis-report+ path: |+ schemathesis-report/+ server.log+ if-no-files-found: warn+ retention-days: 14diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.ymlnew file mode 100644index 0000000000..7381ed5648--- /dev/null+++ b/.github/workflows/wiki-sync.yml@@ -0,0 +1,69 @@+name: Wiki Sync++# Keeps the GitHub wiki in sync with docs/ on every release that lands on main.+# The wiki has no native generator and historically drifts (it sat at "212+ providers /+# 14 strategies / 37 MCP tools" while code was at 226 / 15 / 87, and new docs like+# SUPPLY_CHAIN never appeared). This runs scripts/docs/sync-wiki.mjs, which:+# - ADDS any docs/ page missing from the wiki (curated; internal reports excluded),+# - syncs the four cover-page counts on Home.md.+# It does NOT overwrite existing wiki pages by default: several docs sources still carry+# stale counts (e.g. ARCHITECTURE.md says "177 providers" while the wiki cover is 226),+# so blind overwrite would regress the wiki. Full content parity (--update-existing) is+# gated on regenerating those sources — see docs/ops/DOCUMENTATION_AUDIT_REPORT.md.++on:+ push:+ branches: [main]+ paths:+ - "docs/**"+ - "README.md"+ - "AGENTS.md"+ - "src/shared/constants/routingStrategies.ts"+ - "config/i18n.json"+ - "open-sse/mcp-server/server.ts"+ - "scripts/docs/sync-wiki.mjs"+ workflow_dispatch:++permissions:+ contents: write++concurrency:+ group: wiki-sync+ cancel-in-progress: false++jobs:+ sync-wiki:+ name: Sync wiki with docs+ runs-on: ubuntu-latest+ steps:+ - name: Checkout repo+ uses: actions/checkout@v4++ - name: Setup Node+ uses: actions/setup-node@v4+ with:+ node-version: "24"++ - name: Clone wiki+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ REPO: ${{ github.repository }}+ run: |+ git clone "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.wiki.git" wiki++ - name: Sync wiki (add missing pages + cover counts)+ run: node scripts/docs/sync-wiki.mjs --wiki-dir wiki++ - name: Commit & push if changed+ run: |+ cd wiki+ if [ -n "$(git status --porcelain)" ]; then+ git config user.name "github-actions[bot]"+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"+ git add -A+ git commit -m "docs(wiki): auto-sync pages + cover counts with docs"+ git push+ echo "Wiki updated."+ else+ echo "Wiki already in sync — nothing to push."+ fidiff --git a/.gitignore b/.gitignoreindex cbe3af7f64..de10d077d2 100644--- a/.gitignore+++ b/.gitignore@@ -23,6 +23,11 @@ coverage/.build/**.out/**+# Stryker mutation testing — ephemeral sandbox + generated reports (never commit)+.stryker-tmp/+reports/mutation/+stryker-output-*.json+# Memory Bank and Cursor rules (local-only AI agent context)memory-bank/@@ -203,8 +208,11 @@ pr_reviews*.json# internal setup prompts with personal credentials — never commitCODEX-SETUP-PROMPT.md-# Quality ratchet — métricas efêmeras (baseline é commitado, métricas não)-quality-metrics.json+# Quality ratchet — métricas efêmeras (baseline commitado em config/quality/; métricas não)+config/quality/quality-metrics.json++# Runtime logs (diretório local, nunca versionado)+/logs/-home-diegosouzapw-dev-automações-bots-yt-downloader-20260504 .txt-home-diegosouzapw-dev-automações-bots-yt-downloader-20260410 .txtdocs/prompts/AGENT-OWNERSHIP-PROTOCOL.omniroute.mddiff --git a/.gitleaks.toml b/.gitleaks.tomlindex 9e221be280..0051e694b2 100644--- a/.gitleaks.toml+++ b/.gitleaks.toml@@ -15,7 +15,15 @@# Referência: docs/security/PUBLIC_CREDS.md (credenciais OAuth públicas conhecidas)# CLAUDE.md Hard Rule #11 (resolvePublicCred obrigatório)-# Usar as regras padrão do gitleaks (não declaramos [rules] aqui para herdar tudo)+# Herdar TODAS as regras padrão do gitleaks. ATENÇÃO: um config customizado+# SEM [extend].useDefault = true (e sem [[rules]] próprias) resulta em ZERO+# regras — o gitleaks SUBSTITUI o ruleset padrão pelo arquivo, não o estende+# automaticamente. Sem esta seção, `gitleaks --config .gitleaks.toml` nunca+# detecta nada (todo finding vira 0), tornando o gate inerte. Com useDefault,+# a allowlist abaixo é aplicada POR CIMA das ~170 regras padrão.+[extend]+ useDefault = true+# Para desabilitar uma regra específica, usar:# [[rules]]# id = "rule-id"diff --git a/.markdownlint.json b/.markdownlint.jsonnew file mode 100644index 0000000000..68ab04a1ff--- /dev/null+++ b/.markdownlint.json@@ -0,0 +1,14 @@+{+ "_comment": "Advisory markdown lint for docs/ + root *.md. Rules that conflict with the existing doc style (heavy inline HTML, long lines, centered headings) are disabled so the gate stays signal-not-noise. Run: npm run lint:md",+ "default": true,+ "MD013": false,+ "MD033": false,+ "MD041": false,+ "MD024": { "siblings_only": true },+ "MD026": false,+ "MD036": false,+ "MD040": false,+ "MD029": false,+ "MD007": { "indent": 2 },+ "MD046": false+}diff --git a/.mcp.json.example b/.mcp.json.examplenew file mode 100644index 0000000000..0a11e61a62--- /dev/null+++ b/.mcp.json.example@@ -0,0 +1,17 @@+{+ "$comment_purpose": "OPT-IN agent-lsp / LSP-in-the-loop (Quality Gates Fase 7 Task 15). Copy this file to `.mcp.json` to enable. It exposes a TypeScript language server to coding agents (Claude Code, etc.) so they get diagnostics / hover / go-to-definition / blast-radius BEFORE writing code — turning 'invented symbol' review-catches into impossible-at-edit-time. Pairs with `npm run typecheck:core` as a compile-before-claim check.",+ "$comment_safety": "Shipped as `.example` (NOT `.mcp.json`) on purpose so it never auto-loads an unvetted server into everyone's session. Pick an MCP<->LSP bridge you trust and have verified locally, then drop in its package + args below. A broken MCP entry only logs a connection error; it does not break agent sessions. The underlying language server is `typescript-language-server` (npm, mature) — install via `npm i -g typescript-language-server typescript` or rely on npx.",+ "mcpServers": {+ "typescript-lsp": {+ "command": "npx",+ "args": [+ "-y",+ "<your-mcp-lsp-bridge>",+ "--lsp",+ "typescript-language-server",+ "--stdio"+ ],+ "$note": "Replace <your-mcp-lsp-bridge> with the concrete MCP<->LSP adapter you chose. It must speak MCP on stdio and proxy to `typescript-language-server --stdio`. Scope it to this repo's tsconfig (open-sse/tsconfig.json / tsconfig.json) for accurate diagnostics."+ }+ }+}diff --git a/.vale.ini b/.vale.ininew file mode 100644index 0000000000..de42bb1bad--- /dev/null+++ b/.vale.ini@@ -0,0 +1,15 @@+# Advisory prose lint for OmniRoute docs (Vale — https://vale.sh).+# Warning-first: surfaces vague language, passive voice, and terminology drift without+# blocking CI. The Microsoft style is pulled by the CI step (vale sync / vale-action).+# Project terms live in the OmniRoute vocabulary so they never read as misspellings.+StylesPath = .vale/styles+MinAlertLevel = warning+Packages = Microsoft+Vocab = OmniRoute++[*.md]+BasedOnStyles = Vale, Microsoft++# Code-heavy reference docs and auto-generated catalogs are noisy under prose rules.+[docs/reference/PROVIDER_REFERENCE.md]+BasedOnStyles = Valediff --git a/.vale/styles/Vocab/OmniRoute/accept.txt b/.vale/styles/Vocab/OmniRoute/accept.txtnew file mode 100644index 0000000000..50e154c3ce--- /dev/null+++ b/.vale/styles/Vocab/OmniRoute/accept.txt@@ -0,0 +1,50 @@+OmniRoute+combo+combos+[Cc]ombo+[Aa]uto-[Cc]ombo+MCP+A2A+ACP+RTK+Caveman+Troglodita+Qdrant+FTS5+SQLite+LowDB+OAuth+PKCE+SSE+JSON-RPC+LKGP+P2C+Antigravity+Codex+Kiro+Qoder+Pollinations+LongCat+Cerebras+DeepSeek+Groq+Cline+OpenCode+Termux+Electron+Fumadocs+Notion+Obsidian+WebDAV+IPv4+IPv6+SOCKS5+loopback+backoff+changelog+i18n+locale+locales+roadmap+[Ww]ildcard+upstreamdiff --git a/.zizmor.yml b/.zizmor.ymlindex 83eefa7d85..7bb17a1dbe 100644--- a/.zizmor.yml+++ b/.zizmor.yml@@ -30,22 +30,44 @@# Uncomment to pin to a specific minimum severity level.# min-severity: low # low | medium | high | critical (default: low = all)-# ── Per-finding ignores ──────────────────────────────────────────────────────+# ── Per-rule ignores ─────────────────────────────────────────────────────────+# zizmor ≥1.0 replaced the old top-level `ignores:` list with a `rules:` map+# keyed by audit id. Per-rule config lives under `rules.<audit-id>.ignore`,+# where each entry is `filename` or `filename:line` (line optional, column+# further-optional). See: https://docs.zizmor.sh/configuration/+## Format:-# ignores:-# - id: <zizmor-audit-id> # e.g. "unpinned-uses", "script-injection"-# reason: "<justification>"-# # Optional: scope to a specific workflow or step-# # workflow: .github/workflows/ci.yml+# rules:+# <zizmor-audit-id>: # e.g. "unpinned-uses", "template-injection"+# ignore:+# - <workflow-filename> # ignore this audit across the file+# - <workflow-filename>:<line> # or scope to a specific line## Example (do not uncomment without real justification):#-# ignores:-# - id: unpinned-uses-# reason: >-# actions/checkout@v6 is pinned at the major-version tag intentionally:-# GitHub-managed first-party action; SHA pinning buys little against a-# GitHub-side compromise and adds significant maintenance burden.-# workflow: .github/workflows/ci.yml+# rules:+# unpinned-uses:+# # actions/checkout@v6 is pinned at the major-version tag intentionally:+# # GitHub-managed first-party action; SHA pinning buys little against a+# # GitHub-side compromise and adds significant maintenance burden.+# ignore:+# - ci.yml-ignores: []+# Every entry below is an explicit, justified ignore (same stale-review+# discipline as the other allowlists in this project). New ignores require a+# per-rule entry with a justification comment.+rules:+ dangerous-triggers:+ # deploy-vps.yml uses `on: workflow_run` (after "Publish to Docker Hub").+ # zizmor flags workflow_run as "almost always used insecurely", but this one+ # is guarded and not exploitable:+ # • The deploy job is gated on `github.event.workflow_run.conclusion ==+ # 'success'` (deploy-vps.yml job `if:`, L15), so it only runs after a+ # successful, trusted upstream run — never on a forked/PR-triggered+ # failure.+ # • It does NOT checkout or execute untrusted code: the deploy runs over SSH+ # using repository secrets; there is no `actions/checkout` of an attacker+ # ref in the privileged context.+ # Accepted risk, re-review at the next release cycle (added 2026-06-15).+ ignore:+ - deploy-vps.ymldiff --git a/@omniroute/opencode-plugin/package.json b/@omniroute/opencode-plugin/package.jsonindex ee6bc62363..e2f2bbde4c 100644--- a/@omniroute/opencode-plugin/package.json+++ b/@omniroute/opencode-plugin/package.json@@ -3,19 +3,16 @@"version": "0.1.0","description": "OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @opencode-ai/plugin contract.","type": "module",- "main": "./dist/index.cjs",- "module": "./dist/index.js",+ "main": "./dist/index.js","types": "./dist/index.d.ts","exports": {".": {- "import": {- "types": "./dist/index.d.ts",- "default": "./dist/index.js"- },- "require": {- "types": "./dist/index.d.cts",- "default": "./dist/index.cjs"- }+ "types": "./dist/index.d.ts",+ "import": "./dist/index.js"+ },+ "./runtime": {+ "types": "./dist/index.d.ts",+ "import": "./dist/index.js"}},"files": [diff --git a/@omniroute/opencode-plugin/src/index.ts b/@omniroute/opencode-plugin/src/index.tsindex 6c8c92540b..f70807434c 100644--- a/@omniroute/opencode-plugin/src/index.ts+++ b/@omniroute/opencode-plugin/src/index.ts@@ -56,11 +56,7 @@ import { randomUUID } from "node:crypto";import type { AuthHook, Config, Plugin, PluginOptions, ProviderHook } from "@opencode-ai/plugin";import type { Model as ModelV2 } from "@opencode-ai/sdk/v2";import { z } from "zod";-import {- logger as _logger,- setLogLevel,- type LogLevel as _LogLevel,-} from "./logger.js";+import { logger as _logger, setLogLevel, type LogLevel as _LogLevel } from "./logger.js";import {PROVIDER_TAG_SEPARATOR as _PROVIDER_TAG_SEPARATOR,shortProviderLabel as _shortProviderLabel,@@ -207,13 +203,11 @@ export const OMNIROUTE_PROVIDER_KEY = "omniroute" as const;/** Deployed plugin version (injected at build time by tsup define). */export const PLUGIN_VERSION: string =- ((globalThis as Record<string, unknown>).__PLUGIN_VERSION__ as string) ??- "dev";+ ((globalThis as Record<string, unknown>).__PLUGIN_VERSION__ as string) ?? "dev";/** Deployed plugin git commit hash (injected at build time by tsup define). */export const PLUGIN_GIT_HASH: string =- ((globalThis as Record<string, unknown>).__PLUGIN_GIT_HASH__ as string) ??- "unknown";+ ((globalThis as Record<string, unknown>).__PLUGIN_GIT_HASH__ as string) ?? "unknown";export const DEFAULT_MODEL_CACHE_TTL_MS = 300_000 as const;@@ -243,17 +237,13 @@ function trimLeadingDashes(value: string): string {* sees a consistent identifier.*/export function resolveOmniRoutePluginOptions(- opts?: OmniRoutePluginOptions,-): Required<- Pick<OmniRoutePluginOptions, "providerId" | "displayName" | "modelCacheTtl">-> &+ opts?: OmniRoutePluginOptions+): Required<Pick<OmniRoutePluginOptions, "providerId" | "displayName" | "modelCacheTtl">> &Pick<OmniRoutePluginOptions, "baseURL" | "features"> {const providerId = opts?.providerId ?? OMNIROUTE_PROVIDER_KEY;const displayName =opts?.displayName ??- (providerId === OMNIROUTE_PROVIDER_KEY- ? "OmniRoute"- : `OmniRoute (${providerId})`);+ (providerId === OMNIROUTE_PROVIDER_KEY ? "OmniRoute" : `OmniRoute (${providerId})`);const modelCacheTtl =typeof opts?.modelCacheTtl === "number" && opts.modelCacheTtl > 0? opts.modelCacheTtl@@ -284,9 +274,7 @@ export function resolveOmniRoutePluginOptions(* Exported so callers and tests can validate options independent of the* full plugin factory invocation.*/-export function parseOmniRoutePluginOptions(- opts: unknown,-): OmniRoutePluginOptions {+export function parseOmniRoutePluginOptions(opts: unknown): OmniRoutePluginOptions {if (opts === null || opts === undefined) return {};const result = optionsSchema.safeParse(opts);if (!result.success) {@@ -322,13 +310,7 @@ function coercePluginOptions(opts?: PluginOptions): OmniRoutePluginOptions {* `anthropic/`, plus the user-configured `kiro/` and `kr/` upstream* connections that proxy Anthropic models.*/-export const DEFAULT_ANTHROPIC_PREFIXES = [- "cc",- "claude",- "anthropic",- "kiro",- "kr",-];+export const DEFAULT_ANTHROPIC_PREFIXES = ["cc", "claude", "anthropic", "kiro", "kr"];/*** Ensure a baseURL ends with `/v1` so the OpenAI-compat SDK constructs@@ -378,7 +360,6 @@ export function resolveApiBlock(};}-/*** Build the AuthHook portion of the plugin for a given options bag. Exported* standalone so the auth contract can be unit-tested without faking the full@@ -403,11 +384,8 @@ export function resolveApiBlock(* keys by returning `{}` — OC then surfaces the `/connect` flow to the* user instead of dispatching a request with bogus credentials.*/-export function createOmniRouteAuthHook(- opts?: OmniRoutePluginOptions,-): AuthHook {- const { providerId, displayName, baseURL, features } =- resolveOmniRoutePluginOptions(opts);+export function createOmniRouteAuthHook(opts?: OmniRoutePluginOptions): AuthHook {+ const { providerId, displayName, baseURL, features } = resolveOmniRoutePluginOptions(opts);// Both fetch-layer features default ON (parity with the rest of the plugin's// `features.X !== false` convention). Honoring them here lets users disable// the interceptor/sanitizer from opencode.json — previously these flags were@@ -449,8 +427,7 @@ export function createOmniRouteAuthHook(// no `baseURL`. We've already checked the runtime type via typeof so// the unknown-bridge is a safe assertion, not a lie.const authBaseURL = (auth as unknown as { baseURL?: unknown }).baseURL;- const resolvedBaseURL =- baseURL ?? (typeof authBaseURL === "string" ? authBaseURL : "");+ const resolvedBaseURL = baseURL ?? (typeof authBaseURL === "string" ? authBaseURL : "");// Without a baseURL the interceptor can't tell which requests to// intercept (it would either gate-keep nothing or, worse, all// outbound traffic). Fall back to apiKey-only and let the SDK use@@ -477,11 +454,7 @@ export function createOmniRouteAuthHook(composedFetch = createGeminiSanitizingFetch(composedFetch ?? fetch);}if (wantDebugLog || debugLogEnabled(providerId)) {- composedFetch = createDebugLoggingFetch(- composedFetch ?? fetch,- providerId,- wantDebugLog- );+ composedFetch = createDebugLoggingFetch(composedFetch ?? fetch, providerId, wantDebugLog);}return composedFetch? { apiKey, baseURL: resolvedBaseURL, fetch: composedFetch }@@ -519,14 +492,10 @@ export const OmniRoutePlugin: Plugin = async (_input, options) => {// Debug breadcrumb: confirm server() invocation + resolved options.// Useful when diagnosing "is the plugin even running" from OC logs.const _ver: string =- ((globalThis as Record<string, unknown>).__PLUGIN_VERSION__ as string) ??- "dev";+ ((globalThis as Record<string, unknown>).__PLUGIN_VERSION__ as string) ?? "dev";const _hash: string =- ((globalThis as Record<string, unknown>).__PLUGIN_GIT_HASH__ as string) ??- "unknown";- const _prefixes =- resolved.features?.apiFormat?.anthropicPrefixes ??- DEFAULT_ANTHROPIC_PREFIXES;+ ((globalThis as Record<string, unknown>).__PLUGIN_GIT_HASH__ as string) ?? "unknown";+ const _prefixes = resolved.features?.apiFormat?.anthropicPrefixes ?? DEFAULT_ANTHROPIC_PREFIXES;_logger.always(`v${_ver} (${_hash}) initialized` +` providerId=${resolved.providerId}` +@@ -534,15 +503,11 @@ export const OmniRoutePlugin: Plugin = async (_input, options) => {` modelCacheTtl=${resolved.modelCacheTtl}ms` +` apiFormat=anthropic:[${_prefixes.join(",")}]` +` debugLog=${resolved.features?.debugLog ?? false}` +- ` logLevel=${resolved.features?.startupDebug ? "debug" : (resolved.features?.logLevel ?? "warn")}`,+ ` logLevel=${resolved.features?.startupDebug ? "debug" : (resolved.features?.logLevel ?? "warn")}`);// Wire log level: startupDebug:true → "debug", explicit logLevel wins.- setLogLevel(- resolved.features?.startupDebug- ? "debug"- : (resolved.features?.logLevel ?? "warn"),- );+ setLogLevel(resolved.features?.startupDebug ? "debug" : (resolved.features?.logLevel ?? "warn"));return {auth: createOmniRouteAuthHook(resolved),provider: createOmniRouteProviderHook(resolved, { cache: sharedCache }),@@ -621,7 +586,7 @@ export interface OmniRouteRawModelEntry {export type OmniRouteModelsFetcher = (baseURL: string,apiKey: string,- timeoutMs?: number,+ timeoutMs?: number) => Promise<OmniRouteRawModelEntry[]>;/**@@ -634,23 +599,15 @@ export type OmniRouteModelsFetcher = (export const defaultOmniRouteModelsFetcher: OmniRouteModelsFetcher = async (baseURL,apiKey,- timeoutMs = 10_000,+ timeoutMs = 10_000) => {- if (!apiKey)- throw new Error(- "@omniroute/opencode-plugin: apiKey required to fetch /v1/models",- );- if (!baseURL)- throw new Error(- "@omniroute/opencode-plugin: baseURL required to fetch /v1/models",- );+ if (!apiKey) throw new Error("@omniroute/opencode-plugin: apiKey required to fetch /v1/models");+ if (!baseURL) throw new Error("@omniroute/opencode-plugin: baseURL required to fetch /v1/models");const trimmed = trimTrailingSlashes(baseURL);// Tolerate both `https://host` and `https://host/v1` forms — the gateway// exposes /v1/models either way; we just don't want a double `/v1/v1`.- const url = /\/v\d+$/.test(trimmed)- ? `${trimmed}/models`- : `${trimmed}/v1/models`;+ const url = /\/v\d+$/.test(trimmed) ? `${trimmed}/models` : `${trimmed}/v1/models`;const controller = new AbortController();const timer = setTimeout(() => controller.abort(), timeoutMs);@@ -665,24 +622,18 @@ export const defaultOmniRouteModelsFetcher: OmniRouteModelsFetcher = async (});if (!res.ok) {throw new Error(- `@omniroute/opencode-plugin: GET ${url} failed: ${res.status} ${res.statusText}`,+ `@omniroute/opencode-plugin: GET ${url} failed: ${res.status} ${res.statusText}`);}const body = (await res.json()) as unknown;const rawList: unknown[] = Array.isArray(body)? body- : body &&- typeof body === "object" &&- Array.isArray((body as { data?: unknown }).data)+ : body && typeof body === "object" && Array.isArray((body as { data?: unknown }).data)? ((body as { data: unknown[] }).data as unknown[]): [];const out: OmniRouteRawModelEntry[] = [];for (const r of rawList) {- if (- r &&- typeof r === "object" &&- typeof (r as { id?: unknown }).id === "string"- ) {+ if (r && typeof r === "object" && typeof (r as { id?: unknown }).id === "string") {out.push(r as OmniRouteRawModelEntry);}}@@ -793,11 +744,8 @@ export function mapRawModelToModelV2(},limit: {context: typeof raw.context_length === "number" ? raw.context_length : 0,- ...(typeof raw.max_input_tokens === "number"- ? { input: raw.max_input_tokens }- : {}),- output:- typeof raw.max_output_tokens === "number" ? raw.max_output_tokens : 0,+ ...(typeof raw.max_input_tokens === "number" ? { input: raw.max_input_tokens } : {}),+ output: typeof raw.max_output_tokens === "number" ? raw.max_output_tokens : 0,},status: "active",options: {},@@ -872,7 +820,7 @@ export interface OmniRouteRawCombo {export type OmniRouteCombosFetcher = (baseURL: string,apiKey: string,- timeoutMs?: number,+ timeoutMs?: number) => Promise<OmniRouteRawCombo[]>;/**@@ -896,16 +844,11 @@ export type OmniRouteCombosFetcher = (export const defaultOmniRouteCombosFetcher: OmniRouteCombosFetcher = async (baseURL,apiKey,- timeoutMs = 10_000,+ timeoutMs = 10_000) => {- if (!apiKey)- throw new Error(- "@omniroute/opencode-plugin: apiKey required to fetch /api/combos",- );+ if (!apiKey) throw new Error("@omniroute/opencode-plugin: apiKey required to fetch /api/combos");if (!baseURL)- throw new Error(- "@omniroute/opencode-plugin: baseURL required to fetch /api/combos",- );+ throw new Error("@omniroute/opencode-plugin: baseURL required to fetch /api/combos");// Strip trailing slashes, then strip a trailing `/v1` so we land on the// management plane. Models live under `/v1/models`; combos live under@@ -927,24 +870,18 @@ export const defaultOmniRouteCombosFetcher: OmniRouteCombosFetcher = async (});if (!res.ok) {throw new Error(- `@omniroute/opencode-plugin: GET ${url} failed: ${res.status} ${res.statusText}`,+ `@omniroute/opencode-plugin: GET ${url} failed: ${res.status} ${res.statusText}`);}const body = (await res.json()) as unknown;const rawList: unknown[] = Array.isArray(body)? body- : body &&- typeof body === "object" &&- Array.isArray((body as { combos?: unknown }).combos)+ : body && typeof body === "object" && Array.isArray((body as { combos?: unknown }).combos)? ((body as { combos: unknown[] }).combos as unknown[]): [];const out: OmniRouteRawCombo[] = [];for (const r of rawList) {- if (- r &&- typeof r === "object" &&- typeof (r as { id?: unknown }).id === "string"- ) {+ if (r && typeof r === "object" && typeof (r as { id?: unknown }).id === "string") {out.push(r as OmniRouteRawCombo);}}@@ -997,18 +934,14 @@ export function mapComboToModelV2(members: OmniRouteRawModelEntry[],providerId: string,baseURL: string,- apiFormat?: { anthropicPrefixes?: string[] },+ apiFormat?: { anthropicPrefixes?: string[] }): ModelV2 {// `every` over an empty array returns true (would lie about an empty// combo's capabilities) — short-circuit to all-false when no members.const hasMembers = members.length > 0;- const memberInMods = members.map(- (m) => new Set(m.input_modalities ?? ["text"]),- );- const memberOutMods = members.map(- (m) => new Set(m.output_modalities ?? ["text"]),- );+ const memberInMods = members.map((m) => new Set(m.input_modalities ?? ["text"]));+ const memberOutMods = members.map((m) => new Set(m.output_modalities ?? ["text"]));const modalityAllHave = (sets: Array<Set<string>>, key: string): boolean =>hasMembers && sets.every((s) => s.has(key));@@ -1023,26 +956,18 @@ export function mapComboToModelV2(.map((m) => m.max_input_tokens).filter((v): v is number => typeof v === "number" && v > 0);- const everyDeclaresInput =- hasMembers && inputValues.length === members.length;+ const everyDeclaresInput = hasMembers && inputValues.length === members.length;const capabilities: ModelV2["capabilities"] = {temperature:- hasMembers &&- members.every((m) => (m.capabilities?.temperature ?? true) !== false),+ hasMembers && members.every((m) => (m.capabilities?.temperature ?? true) !== false),reasoning:hasMembers &&- members.every((m) =>- Boolean(m.capabilities?.reasoning || m.capabilities?.thinking),- ),+ members.every((m) => Boolean(m.capabilities?.reasoning || m.capabilities?.thinking)),attachment:hasMembers &&- members.every((m) =>- Boolean(m.capabilities?.attachment ?? m.capabilities?.vision ?? false),- ),- toolcall:- hasMembers &&- members.every((m) => Boolean(m.capabilities?.tool_calling ?? false)),+ members.every((m) => Boolean(m.capabilities?.attachment ?? m.capabilities?.vision ?? false)),+ toolcall: hasMembers && members.every((m) => Boolean(m.capabilities?.tool_calling ?? false)),input: {text: modalityAllHave(memberInMods, "text"),audio: modalityAllHave(memberInMods, "audio"),@@ -1057,8 +982,7 @@ export function mapComboToModelV2(video: modalityAllHave(memberOutMods, "video"),pdf: modalityAllHave(memberOutMods, "pdf"),},- interleaved:- hasMembers && members.every((m) => Boolean(m.capabilities?.thinking)),+ interleaved: hasMembers && members.every((m) => Boolean(m.capabilities?.thinking)),};// Combos span multiple providers. Use Anthropic format only when ALL@@ -1067,7 +991,7 @@ export function mapComboToModelV2(const comboApiBlock = (() => {if (!hasMembers) return resolveApiBlock("", baseURL, apiFormat);const allAnthropic = members.every(- (m) => resolveApiBlock(m.id, baseURL, apiFormat).id === "anthropic",+ (m) => resolveApiBlock(m.id, baseURL, apiFormat).id === "anthropic");return allAnthropic? resolveApiBlock(members[0].id, baseURL, apiFormat)@@ -1145,7 +1069,7 @@ export interface OmniRouteRawAutoCombo {export type OmniRouteAutoCombosFetcher = (baseURL: string,apiKey: string,- timeoutMs?: number,+ timeoutMs?: number) => Promise<OmniRouteRawAutoCombo[]>;/**@@ -1154,67 +1078,64 @@ export type OmniRouteAutoCombosFetcher = (* Fault-tolerant: returns empty array on 404 (endpoint doesn't exist yet)* or any non-2xx / network error. Logs a warning in those cases.*/-export const defaultOmniRouteAutoCombosFetcher: OmniRouteAutoCombosFetcher =- async (baseURL, apiKey, timeoutMs = 5_000) => {- if (!apiKey || !baseURL) return [];+export const defaultOmniRouteAutoCombosFetcher: OmniRouteAutoCombosFetcher = async (+ baseURL,+ apiKey,+ timeoutMs = 5_000+) => {+ if (!apiKey || !baseURL) return [];- const trimmed = trimTrailingSlashes(baseURL);- const root = trimmed.replace(/\/v\d+$/, "");- const url = `${root}/api/combos/auto`;+ const trimmed = trimTrailingSlashes(baseURL);+ const root = trimmed.replace(/\/v\d+$/, "");+ const url = `${root}/api/combos/auto`;- const controller = new AbortController();- const timer = setTimeout(() => controller.abort(), timeoutMs);- try {- const res = await fetch(url, {- method: "GET",- headers: {- Authorization: `Bearer ${apiKey}`,- Accept: "application/json",- },- signal: controller.signal,- });- // 404 = endpoint not deployed yet — expected during rollout- if (res.status === 404) {- console.warn(- `[omniroute-plugin] /api/combos/auto not available (404) — auto combos disabled`,- );- return [];- }- if (!res.ok) {- console.warn(- `[omniroute-plugin] /api/combos/auto failed: ${res.status} ${res.statusText} — auto combos disabled`,- );- return [];- }- const body = (await res.json()) as unknown;- const rawList: unknown[] = Array.isArray(body)- ? body- : body &&- typeof body === "object" &&- Array.isArray((body as { combos?: unknown }).combos)- ? ((body as { combos: unknown[] }).combos as unknown[])- : [];- const out: OmniRouteRawAutoCombo[] = [];- for (const r of rawList) {- if (- r &&- typeof r === "object" &&- typeof (r as { id?: unknown }).id === "string"- ) {- out.push(r as OmniRouteRawAutoCombo);- }- }- return out;- } catch (err) {- // Network error, timeout, abort — all non-fatal+ const controller = new AbortController();+ const timer = setTimeout(() => controller.abort(), timeoutMs);+ try {+ const res = await fetch(url, {+ method: "GET",+ headers: {+ Authorization: `Bearer ${apiKey}`,+ Accept: "application/json",+ },+ signal: controller.signal,+ });+ // 404 = endpoint not deployed yet — expected during rollout+ if (res.status === 404) {console.warn(- `[omniroute-plugin] /api/combos/auto fetch failed: ${err instanceof Error ? err.message : String(err)} — auto combos disabled`,+ `[omniroute-plugin] /api/combos/auto not available (404) — auto combos disabled`);return [];- } finally {- clearTimeout(timer);}- };+ if (!res.ok) {+ console.warn(+ `[omniroute-plugin] /api/combos/auto failed: ${res.status} ${res.statusText} — auto combos disabled`+ );+ return [];+ }+ const body = (await res.json()) as unknown;+ const rawList: unknown[] = Array.isArray(body)+ ? body+ : body && typeof body === "object" && Array.isArray((body as { combos?: unknown }).combos)+ ? ((body as { combos: unknown[] }).combos as unknown[])+ : [];+ const out: OmniRouteRawAutoCombo[] = [];+ for (const r of rawList) {+ if (r && typeof r === "object" && typeof (r as { id?: unknown }).id === "string") {+ out.push(r as OmniRouteRawAutoCombo);+ }+ }+ return out;+ } catch (err) {+ // Network error, timeout, abort — all non-fatal+ console.warn(+ `[omniroute-plugin] /api/combos/auto fetch failed: ${err instanceof Error ? err.message : String(err)} — auto combos disabled`+ );+ return [];+ } finally {+ clearTimeout(timer);+ }+};/** Fallbacks when the server does not advertise auto-combo limits (older* OmniRoute builds). MUST be positive: OpenCode's overflow guard treats@@ -1233,7 +1154,7 @@ const AUTO_COMBO_FALLBACK_OUTPUT = 8_192;* applies when the server omits them. Never 0.*/export function mapAutoComboToStaticEntry(- autoCombo: OmniRouteRawAutoCombo,+ autoCombo: OmniRouteRawAutoCombo): OmniRouteStaticModelEntry {const variant = autoCombo.variant;const name = formatAutoComboName(variant, autoCombo.candidateCount);@@ -1320,7 +1241,7 @@ export type OmniRouteEnrichmentMap = Map<string, OmniRouteEnrichmentEntry>;export type OmniRouteEnrichmentFetcher = (baseURL: string,apiKey: string,- timeoutMs?: number,+ timeoutMs?: number) => Promise<OmniRouteEnrichmentMap>;/**@@ -1344,224 +1265,207 @@ export type OmniRouteEnrichmentFetcher = (* the two fetches are independent so one missing source still surfaces the* other.*/-export const defaultOmniRouteEnrichmentFetcher: OmniRouteEnrichmentFetcher =- async (baseURL, apiKey, timeoutMs = 10_000) => {- const out: OmniRouteEnrichmentMap = new Map();- if (!baseURL || !apiKey) return out;- const root = baseURL.replace(/\/v1\/?$/, "").replace(/\/$/, "");- const headers = {- Authorization: `Bearer ${apiKey}`,- Accept: "application/json",- };+export const defaultOmniRouteEnrichmentFetcher: OmniRouteEnrichmentFetcher = async (+ baseURL,+ apiKey,+ timeoutMs = 10_000+) => {+ const out: OmniRouteEnrichmentMap = new Map();+ if (!baseURL || !apiKey) return out;+ const root = baseURL.replace(/\/v1\/?$/, "").replace(/\/$/, "");+ const headers = {+ Authorization: `Bearer ${apiKey}`,+ Accept: "application/json",+ };- // ── 1. Catalog with nice display names ────────────────────────────────- const catalogAc = new AbortController();- const catalogTimer = setTimeout(() => catalogAc.abort(), timeoutMs);- try {- const res = await fetch(`${root}/api/pricing/models`, {- method: "GET",- headers,- signal: catalogAc.signal,- });- if (res.ok) {- const body = (await res.json()) as unknown;- const providers =- (body as { providers?: Record<string, { models?: unknown[] }> })- ?.providers ?? (body as Record<string, { models?: unknown[] }>);- if (providers && typeof providers === "object") {- for (const [providerAlias, slot] of Object.entries(providers)) {- if (!slot || typeof slot !== "object") continue;- const models = (slot as { models?: unknown[] }).models;- if (!Array.isArray(models)) continue;- // Canonical id sits at the per-provider top level (e.g.- // `pricing-models.cc.id === 'claude'`). Falls back to the alias- // itself when missing — common case alias===canonical.- const canonicalRaw = (slot as { id?: unknown }).id;- const providerCanonical =- typeof canonicalRaw === "string" && canonicalRaw.length > 0- ? canonicalRaw- : providerAlias;- // Upstream provider human label (e.g. `Claude`, `Kiro`,- // `GitHub Models`). Optional — falls back to undefined when- // OmniRoute hasn't curated a label for this slot.- const slotNameRaw = (slot as { name?: unknown }).name;- const providerDisplayName =- typeof slotNameRaw === "string" && slotNameRaw.trim().length > 0- ? slotNameRaw.trim()- : undefined;- for (const m of models) {- if (!m || typeof m !== "object") continue;- const id = (m as { id?: unknown }).id;- if (typeof id !== "string" || id.length === 0) continue;- const name = (m as { name?: unknown }).name;- const entry: OmniRouteEnrichmentEntry = {- providerAlias,- providerCanonical,- };- if (providerDisplayName)- entry.providerDisplayName = providerDisplayName;- if (typeof name === "string" && name.trim().length > 0)- entry.name = name;- const namespaced = `${providerAlias}/${id}`;- if (!out.has(namespaced)) out.set(namespaced, entry);- if (!out.has(id)) out.set(id, entry);- }+ // ── 1. Catalog with nice display names ────────────────────────────────+ const catalogAc = new AbortController();+ const catalogTimer = setTimeout(() => catalogAc.abort(), timeoutMs);+ try {+ const res = await fetch(`${root}/api/pricing/models`, {+ method: "GET",+ headers,+ signal: catalogAc.signal,+ });+ if (res.ok) {+ const body = (await res.json()) as unknown;+ const providers =+ (body as { providers?: Record<string, { models?: unknown[] }> })?.providers ??+ (body as Record<string, { models?: unknown[] }>);+ if (providers && typeof providers === "object") {+ for (const [providerAlias, slot] of Object.entries(providers)) {+ if (!slot || typeof slot !== "object") continue;+ const models = (slot as { models?: unknown[] }).models;+ if (!Array.isArray(models)) continue;+ // Canonical id sits at the per-provider top level (e.g.+ // `pricing-models.cc.id === 'claude'`). Falls back to the alias+ // itself when missing — common case alias===canonical.+ const canonicalRaw = (slot as { id?: unknown }).id;+ const providerCanonical =+ typeof canonicalRaw === "string" && canonicalRaw.length > 0+ ? canonicalRaw+ : providerAlias;+ // Upstream provider human label (e.g. `Claude`, `Kiro`,+ // `GitHub Models`). Optional — falls back to undefined when+ // OmniRoute hasn't curated a label for this slot.+ const slotNameRaw = (slot as { name?: unknown }).name;+ const providerDisplayName =+ typeof slotNameRaw === "string" && slotNameRaw.trim().length > 0+ ? slotNameRaw.trim()+ : undefined;+ for (const m of models) {+ if (!m || typeof m !== "object") continue;+ const id = (m as { id?: unknown }).id;+ if (typeof id !== "string" || id.length === 0) continue;+ const name = (m as { name?: unknown }).name;+ const entry: OmniRouteEnrichmentEntry = {+ providerAlias,+ providerCanonical,+ };+ if (providerDisplayName) entry.providerDisplayName = providerDisplayName;+ if (typeof name === "string" && name.trim().length > 0) entry.name = name;+ const namespaced = `${providerAlias}/${id}`;+ if (!out.has(namespaced)) out.set(namespaced, entry);+ if (!out.has(id)) out.set(id, entry);}}}- } catch {- // Soft-fail; keep going to pricing fetch.- } finally {- clearTimeout(catalogTimer);}+ } catch {+ // Soft-fail; keep going to pricing fetch.+ } finally {+ clearTimeout(catalogTimer);+ }- // ── 2. Pricing values from /api/pricing ───────────────────────────────- const priceAc = new AbortController();- const priceTimer = setTimeout(() => priceAc.abort(), timeoutMs);- try {- const res = await fetch(`${root}/api/pricing`, {- method: "GET",- headers,- signal: priceAc.signal,- });- if (res.ok) {- const body = (await res.json()) as unknown;- if (body && typeof body === "object" && !Array.isArray(body)) {- for (const [providerAlias, slot] of Object.entries(- body as Record<string, unknown>,- )) {- if (!slot || typeof slot !== "object" || Array.isArray(slot))- continue;- for (const [modelId, raw] of Object.entries(- slot as Record<string, unknown>,- )) {- if (!raw || typeof raw !== "object") continue;- const p = raw as Record<string, unknown>;- const parsed: NonNullable<OmniRouteEnrichmentEntry["pricing"]> =- {};- // OmniRoute `/api/pricing` keys:- // input → cost.input- // output → cost.output- // cached → cost.cache.read (alias: cacheRead)- // cache_creation → cost.cache.write (alias: cacheWrite)- // Tolerate alternative spellings for forward-compat.- if (typeof p.input === "number") parsed.input = p.input;- if (typeof p.output === "number") parsed.output = p.output;- const cacheRead =- typeof p.cached === "number"- ? p.cached- : typeof p.cacheRead === "number"- ? p.cacheRead- : undefined;- if (typeof cacheRead === "number") parsed.cacheRead = cacheRead;- const cacheWrite =- typeof p.cache_creation === "number"- ? p.cache_creation- : typeof p.cacheWrite === "number"- ? p.cacheWrite- : undefined;- if (typeof cacheWrite === "number")- parsed.cacheWrite = cacheWrite;- if (Object.keys(parsed).length === 0) continue;- const namespaced = `${providerAlias}/${modelId}`;- const existingNs = out.get(namespaced);- if (existingNs)- existingNs.pricing = {- ...(existingNs.pricing ?? {}),- ...parsed,- };- else out.set(namespaced, { pricing: parsed });- const existingBare = out.get(modelId);- if (existingBare)- existingBare.pricing = {- ...(existingBare.pricing ?? {}),- ...parsed,- };- else out.set(modelId, { pricing: parsed });- }+ // ── 2. Pricing values from /api/pricing ───────────────────────────────+ const priceAc = new AbortController();+ const priceTimer = setTimeout(() => priceAc.abort(), timeoutMs);+ try {+ const res = await fetch(`${root}/api/pricing`, {+ method: "GET",+ headers,+ signal: priceAc.signal,+ });+ if (res.ok) {+ const body = (await res.json()) as unknown;+ if (body && typeof body === "object" && !Array.isArray(body)) {+ for (const [providerAlias, slot] of Object.entries(body as Record<string, unknown>)) {+ if (!slot || typeof slot !== "object" || Array.isArray(slot)) continue;+ for (const [modelId, raw] of Object.entries(slot as Record<string, unknown>)) {+ if (!raw || typeof raw !== "object") continue;+ const p = raw as Record<string, unknown>;+ const parsed: NonNullable<OmniRouteEnrichmentEntry["pricing"]> = {};+ // OmniRoute `/api/pricing` keys:+ // input → cost.input+ // output → cost.output+ // cached → cost.cache.read (alias: cacheRead)+ // cache_creation → cost.cache.write (alias: cacheWrite)+ // Tolerate alternative spellings for forward-compat.+ if (typeof p.input === "number") parsed.input = p.input;+ if (typeof p.output === "number") parsed.output = p.output;+ const cacheRead =+ typeof p.cached === "number"+ ? p.cached+ : typeof p.cacheRead === "number"+ ? p.cacheRead+ : undefined;+ if (typeof cacheRead === "number") parsed.cacheRead = cacheRead;+ const cacheWrite =+ typeof p.cache_creation === "number"+ ? p.cache_creation+ : typeof p.cacheWrite === "number"+ ? p.cacheWrite+ : undefined;+ if (typeof cacheWrite === "number") parsed.cacheWrite = cacheWrite;+ if (Object.keys(parsed).length === 0) continue;+ const namespaced = `${providerAlias}/${modelId}`;+ const existingNs = out.get(namespaced);+ if (existingNs)+ existingNs.pricing = {+ ...(existingNs.pricing ?? {}),+ ...parsed,+ };+ else out.set(namespaced, { pricing: parsed });+ const existingBare = out.get(modelId);+ if (existingBare)+ existingBare.pricing = {+ ...(existingBare.pricing ?? {}),+ ...parsed,+ };+ else out.set(modelId, { pricing: parsed });}}}- } catch {- // Soft-fail; return whatever names we collected.- } finally {- clearTimeout(priceTimer);}+ } catch {+ // Soft-fail; return whatever names we collected.+ } finally {+ clearTimeout(priceTimer);+ }- // ── 3. Free model budgets from /api/free-tier/summary ──────────────────- // Best-effort fetch: populates freeType/monthlyTokens/creditTokens on- // enrichment entries that match. 404 = endpoint doesn't exist — skip.- // Uses the EXISTING /api/free-tier/summary endpoint (no new server code).- const freeAc = new AbortController();- const freeTimer = setTimeout(() => freeAc.abort(), timeoutMs);- try {- const res = await fetch(`${root}/api/free-tier/summary`, {- method: "GET",- headers,- signal: freeAc.signal,- });- if (res.ok) {- const body = (await res.json()) as unknown;- // Response shape: { perModel: FreeModelBudget[], ... }- const perModel: unknown[] =- body &&- typeof body === "object" &&- Array.isArray((body as { perModel?: unknown }).perModel)- ? ((body as { perModel: unknown[] }).perModel as unknown[])- : Array.isArray(body)- ? (body as unknown[])- : [];- let matched = 0;- for (const fm of perModel) {- if (!fm || typeof fm !== "object") continue;- const fmObj = fm as Record<string, unknown>;- const provider =- typeof fmObj.provider === "string" ? fmObj.provider : "";- const modelId =- typeof fmObj.modelId === "string" ? fmObj.modelId : "";- const freeType =- typeof fmObj.freeType === "string" ? fmObj.freeType : "";- if (!modelId || !freeType) continue;- const monthlyTokens =- typeof fmObj.monthlyTokens === "number"- ? fmObj.monthlyTokens- : undefined;- const creditTokens =- typeof fmObj.creditTokens === "number"- ? fmObj.creditTokens- : undefined;- // Match against enrichment entries: namespaced, bare, and displayName- const displayName =- typeof fmObj.displayName === "string" ? fmObj.displayName : "";- const candidates = [- `${provider}/${modelId}`,- modelId,- ...(displayName ? [displayName] : []),- ];- for (const key of candidates) {- const entry = out.get(key);- if (entry) {- entry.freeType = freeType as FreeModelFreeType;- if (monthlyTokens !== undefined)- entry.monthlyTokens = monthlyTokens;- if (creditTokens !== undefined) entry.creditTokens = creditTokens;- matched++;- break;- }+ // ── 3. Free model budgets from /api/free-tier/summary ──────────────────+ // Best-effort fetch: populates freeType/monthlyTokens/creditTokens on+ // enrichment entries that match. 404 = endpoint doesn't exist — skip.+ // Uses the EXISTING /api/free-tier/summary endpoint (no new server code).+ const freeAc = new AbortController();+ const freeTimer = setTimeout(() => freeAc.abort(), timeoutMs);+ try {+ const res = await fetch(`${root}/api/free-tier/summary`, {+ method: "GET",+ headers,+ signal: freeAc.signal,+ });+ if (res.ok) {+ const body = (await res.json()) as unknown;+ // Response shape: { perModel: FreeModelBudget[], ... }+ const perModel: unknown[] =+ body && typeof body === "object" && Array.isArray((body as { perModel?: unknown }).perModel)+ ? ((body as { perModel: unknown[] }).perModel as unknown[])+ : Array.isArray(body)+ ? (body as unknown[])+ : [];+ let matched = 0;+ for (const fm of perModel) {+ if (!fm || typeof fm !== "object") continue;+ const fmObj = fm as Record<string, unknown>;+ const provider = typeof fmObj.provider === "string" ? fmObj.provider : "";+ const modelId = typeof fmObj.modelId === "string" ? fmObj.modelId : "";+ const freeType = typeof fmObj.freeType === "string" ? fmObj.freeType : "";+ if (!modelId || !freeType) continue;+ const monthlyTokens =+ typeof fmObj.monthlyTokens === "number" ? fmObj.monthlyTokens : undefined;+ const creditTokens =+ typeof fmObj.creditTokens === "number" ? fmObj.creditTokens : undefined;+ // Match against enrichment entries: namespaced, bare, and displayName+ const displayName = typeof fmObj.displayName === "string" ? fmObj.displayName : "";+ const candidates = [+ `${provider}/${modelId}`,+ modelId,+ ...(displayName ? [displayName] : []),+ ];+ for (const key of candidates) {+ const entry = out.get(key);+ if (entry) {+ entry.freeType = freeType as FreeModelFreeType;+ if (monthlyTokens !== undefined) entry.monthlyTokens = monthlyTokens;+ if (creditTokens !== undefined) entry.creditTokens = creditTokens;+ matched++;+ break;}}- _logger.debug(- `free-tier/summary: ${perModel.length} models returned, ${matched} matched enrichment entries`,- );}- } catch {- // Soft-fail; free metadata is optional.- } finally {- clearTimeout(freeTimer);+ _logger.debug(+ `free-tier/summary: ${perModel.length} models returned, ${matched} matched enrichment entries`+ );}+ } catch {+ // Soft-fail; free metadata is optional.+ } finally {+ clearTimeout(freeTimer);+ }- return out;- };+ return out;+};// ── Startup diagnostics writer (file-based) ──────────────────────────────// OC doesn't capture plugin console.warn in its log file. Write diagnostics@@ -1595,16 +1499,16 @@ async function writeStartupDiagnostics(params: {lines.push(`=== startupDebug ${new Date().toISOString()} ===`);lines.push(`providerId=${providerId} baseURL=${baseURL}`);lines.push(- `models=${modelCount} combos=${comboCount} enrichment=${enrichmentSize} autoCombos=${autoComboCount}`,+ `models=${modelCount} combos=${comboCount} enrichment=${enrichmentSize} autoCombos=${autoComboCount}`);lines.push(- `enrichment: ${withName.length} with name, ${withPricing.length} with pricing, ${withFree.length} free`,+ `enrichment: ${withName.length} with name, ${withPricing.length} with pricing, ${withFree.length} free`);if (withFree.length > 0) {lines.push(`free models (${withFree.length}):`);for (const [k, e] of withFree.slice(0, 10)) {lines.push(- ` ${k} → name=${e.name ?? "(none)"}, freeType=${e.freeType}, monthly=${e.monthlyTokens ?? 0}, credits=${e.creditTokens ?? 0}`,+ ` ${k} → name=${e.name ?? "(none)"}, freeType=${e.freeType}, monthly=${e.monthlyTokens ?? 0}, credits=${e.creditTokens ?? 0}`);}} else {@@ -1612,7 +1516,7 @@ async function writeStartupDiagnostics(params: {`NO free models detected. ` +(enrichmentSize === 0? "Enrichment map is EMPTY."- : `Enrichment has ${enrichmentSize} entries but none have freeType.`),+ : `Enrichment has ${enrichmentSize} entries but none have freeType.`));}const sampleNames = enriched@@ -1625,7 +1529,7 @@ async function writeStartupDiagnostics(params: {}if (autoCombos.length > 0) {lines.push(- `auto combos: ${autoCombos.length} — ${autoCombos.map((ac) => `${ac.id}(${ac.candidateCount ?? "?"}p)`).join(", ")}`,+ `auto combos: ${autoCombos.length} — ${autoCombos.map((ac) => `${ac.id}(${ac.candidateCount ?? "?"}p)`).join(", ")}`);}lines.push(`=== end startupDebug ===\n`);@@ -1635,13 +1539,8 @@ async function writeStartupDiagnostics(params: {try {const diagDir =- process.env.OPENCODE_DATA_DIR ??- path.join(os.homedir(), ".local/share/opencode");- const diagPath = path.join(- diagDir,- "plugins",- "omniroute-startup-diagnostics.log",- );+ process.env.OPENCODE_DATA_DIR ?? path.join(os.homedir(), ".local/share/opencode");+ const diagPath = path.join(diagDir, "plugins", "omniroute-startup-diagnostics.log");let existing = "";try {existing = await readFile(diagPath, "utf8");@@ -1650,10 +1549,7 @@ async function writeStartupDiagnostics(params: {}const KEEP = 65_536;const combined = existing + diagnostics;- const trimmed =- combined.length > KEEP- ? combined.slice(combined.length - KEEP)- : combined;+ const trimmed = combined.length > KEEP ? combined.slice(combined.length - KEEP) : combined;await writeFile(diagPath, trimmed, "utf8");} catch {/* best effort */@@ -1674,7 +1570,7 @@ export const PROVIDER_TAG_SEPARATOR = _PROVIDER_TAG_SEPARATOR;// Re-export from naming.ts — thin wrapper preserving OmniRouteEnrichmentEntry signatureexport function shortProviderLabel(- enrichment: OmniRouteEnrichmentEntry | undefined,+ enrichment: OmniRouteEnrichmentEntry | undefined): string | undefined {return _shortProviderLabel(enrichment);}@@ -1706,7 +1602,7 @@ export function shortProviderLabel(*/export function applyProviderTag(model: ModelV2,- enrichment: OmniRouteEnrichmentEntry | undefined,+ enrichment: OmniRouteEnrichmentEntry | undefined): ModelV2 {const label = shortProviderLabel(enrichment);if (!label) return model;@@ -1737,17 +1633,14 @@ export function applyProviderTag(* like `kiro`).*/export function buildCanonicalToAliasMap(- enrichment: OmniRouteEnrichmentMap | undefined,+ enrichment: OmniRouteEnrichmentMap | undefined): Map<string, string> {const out = new Map<string, string>();if (!enrichment) return out;for (const entry of enrichment.values()) {- const alias =- typeof entry.providerAlias === "string" ? entry.providerAlias.trim() : "";+ const alias = typeof entry.providerAlias === "string" ? entry.providerAlias.trim() : "";const canonical =- typeof entry.providerCanonical === "string"- ? entry.providerCanonical.trim()- : "";+ typeof entry.providerCanonical === "string" ? entry.providerCanonical.trim() : "";if (alias.length === 0 || canonical.length === 0) continue;if (alias === canonical) continue;if (!out.has(canonical)) out.set(canonical, alias);@@ -1774,7 +1667,7 @@ export function buildCanonicalToAliasMap(export function lookupEnrichment(rawId: string,enrichment: OmniRouteEnrichmentMap | undefined,- canonicalToAlias: Map<string, string>,+ canonicalToAlias: Map<string, string>): OmniRouteEnrichmentEntry | undefined {if (!enrichment) return undefined;const direct = enrichment.get(rawId);@@ -1809,7 +1702,7 @@ export function lookupEnrichment(*/export function canonicalDedupSet(rawModels: ReadonlyArray<OmniRouteRawModelEntry>,- canonicalToAlias: Map<string, string>,+ canonicalToAlias: Map<string, string>): Set<string> {const drop = new Set<string>();if (canonicalToAlias.size === 0) return drop;@@ -1853,13 +1746,12 @@ export function canonicalDedupSet(* `buildCanonicalToAliasMap` semantics).*/export function buildAliasIndex(- enrichment: OmniRouteEnrichmentMap | undefined,+ enrichment: OmniRouteEnrichmentMap | undefined): Map<string, OmniRouteEnrichmentEntry> {const out = new Map<string, OmniRouteEnrichmentEntry>();if (!enrichment) return out;for (const entry of enrichment.values()) {- const alias =- typeof entry.providerAlias === "string" ? entry.providerAlias.trim() : "";+ const alias = typeof entry.providerAlias === "string" ? entry.providerAlias.trim() : "";if (alias.length === 0) continue;if (out.has(alias)) {// First-wins, but upgrade to the first entry that carries a@@ -1867,8 +1759,7 @@ export function buildAliasIndex(const existing = out.get(alias);if (existing &&- (!existing.providerDisplayName ||- existing.providerDisplayName.trim().length === 0) &&+ (!existing.providerDisplayName || existing.providerDisplayName.trim().length === 0) &&typeof entry.providerDisplayName === "string" &&entry.providerDisplayName.trim().length > 0) {@@ -1907,17 +1798,12 @@ export function resolveProviderTagEntry(rawId: string,direct: OmniRouteEnrichmentEntry | undefined,aliasIndex: Map<string, OmniRouteEnrichmentEntry>,- canonicalToAlias?: Map<string, string>,+ canonicalToAlias?: Map<string, string>): OmniRouteEnrichmentEntry | undefined {if (direct) {- const alias =- typeof direct.providerAlias === "string"- ? direct.providerAlias.trim()- : "";+ const alias = typeof direct.providerAlias === "string" ? direct.providerAlias.trim() : "";const display =- typeof direct.providerDisplayName === "string"- ? direct.providerDisplayName.trim()- : "";+ typeof direct.providerDisplayName === "string" ? direct.providerDisplayName.trim() : "";if (alias.length > 0 || display.length > 0) return direct;}const slash = rawId.indexOf("/");@@ -1957,7 +1843,7 @@ export { _normaliseFreeLabel as normaliseFreeLabel };export function applyEnrichment(model: ModelV2,- enrichment: OmniRouteEnrichmentEntry | undefined,+ enrichment: OmniRouteEnrichmentEntry | undefined): ModelV2 {if (!enrichment) return model;if (enrichment.name && enrichment.name.trim().length > 0) {@@ -2004,7 +1890,7 @@ export interface OmniRouteCompressionCombo {export type OmniRouteCompressionMetaFetcher = (baseURL: string,apiKey: string,- timeoutMs?: number,+ timeoutMs?: number) => Promise<OmniRouteCompressionCombo[]>;/**@@ -2012,67 +1898,70 @@ export type OmniRouteCompressionMetaFetcher = (* Tolerates envelope shapes `{ combos: [...] }`, `[...]`, or* `{ data: [...] }`. Soft-fails (returns []) on non-2xx or parse errors.*/-export const defaultOmniRouteCompressionMetaFetcher: OmniRouteCompressionMetaFetcher =- async (baseURL, apiKey, timeoutMs = 10_000) => {- const empty: OmniRouteCompressionCombo[] = [];- if (!baseURL || !apiKey) return empty;- const root = baseURL.replace(/\/v1\/?$/, "").replace(/\/$/, "");- const url = `${root}/api/context/combos`;- const ac = new AbortController();- const timer = setTimeout(() => ac.abort(), timeoutMs);- try {- const res = await fetch(url, {- method: "GET",- headers: {- Authorization: `Bearer ${apiKey}`,- Accept: "application/json",- },- signal: ac.signal,- });- if (!res.ok) return empty;- const body = (await res.json()) as unknown;- const list = Array.isArray(body)- ? body- : Array.isArray((body as { combos?: unknown[] })?.combos)- ? (body as { combos: unknown[] }).combos- : Array.isArray((body as { data?: unknown[] })?.data)- ? (body as { data: unknown[] }).data- : [];- const out: OmniRouteCompressionCombo[] = [];- for (const raw of list) {- if (!raw || typeof raw !== "object") continue;- const id = (raw as { id?: unknown }).id;- const pipeline = (raw as { pipeline?: unknown }).pipeline;- if (typeof id !== "string" || id.length === 0) continue;- if (!Array.isArray(pipeline)) continue;- const steps: OmniRouteCompressionStep[] = [];- for (const step of pipeline) {- if (!step || typeof step !== "object") continue;- const engine = (step as { engine?: unknown }).engine;- if (typeof engine !== "string" || engine.length === 0) continue;- const intensity = (step as { intensity?: unknown }).intensity;- const entry: OmniRouteCompressionStep = { engine };- if (typeof intensity === "string" && intensity.length > 0) {- entry.intensity = intensity;- }- steps.push(entry);+export const defaultOmniRouteCompressionMetaFetcher: OmniRouteCompressionMetaFetcher = async (+ baseURL,+ apiKey,+ timeoutMs = 10_000+) => {+ const empty: OmniRouteCompressionCombo[] = [];+ if (!baseURL || !apiKey) return empty;+ const root = baseURL.replace(/\/v1\/?$/, "").replace(/\/$/, "");+ const url = `${root}/api/context/combos`;+ const ac = new AbortController();+ const timer = setTimeout(() => ac.abort(), timeoutMs);+ try {+ const res = await fetch(url, {+ method: "GET",+ headers: {+ Authorization: `Bearer ${apiKey}`,+ Accept: "application/json",+ },+ signal: ac.signal,+ });+ if (!res.ok) return empty;+ const body = (await res.json()) as unknown;+ const list = Array.isArray(body)+ ? body+ : Array.isArray((body as { combos?: unknown[] })?.combos)+ ? (body as { combos: unknown[] }).combos+ : Array.isArray((body as { data?: unknown[] })?.data)+ ? (body as { data: unknown[] }).data+ : [];+ const out: OmniRouteCompressionCombo[] = [];+ for (const raw of list) {+ if (!raw || typeof raw !== "object") continue;+ const id = (raw as { id?: unknown }).id;+ const pipeline = (raw as { pipeline?: unknown }).pipeline;+ if (typeof id !== "string" || id.length === 0) continue;+ if (!Array.isArray(pipeline)) continue;+ const steps: OmniRouteCompressionStep[] = [];+ for (const step of pipeline) {+ if (!step || typeof step !== "object") continue;+ const engine = (step as { engine?: unknown }).engine;+ if (typeof engine !== "string" || engine.length === 0) continue;+ const intensity = (step as { intensity?: unknown }).intensity;+ const entry: OmniRouteCompressionStep = { engine };+ if (typeof intensity === "string" && intensity.length > 0) {+ entry.intensity = intensity;}- const combo: OmniRouteCompressionCombo = { id, pipeline: steps };- const name = (raw as { name?: unknown }).name;- if (typeof name === "string" && name.length > 0) combo.name = name;- const description = (raw as { description?: unknown }).description;- if (typeof description === "string") combo.description = description;- const isDefault = (raw as { isDefault?: unknown }).isDefault;- if (typeof isDefault === "boolean") combo.isDefault = isDefault;- out.push(combo);+ steps.push(entry);}- return out;- } catch {- return empty;- } finally {- clearTimeout(timer);+ const combo: OmniRouteCompressionCombo = { id, pipeline: steps };+ const name = (raw as { name?: unknown }).name;+ if (typeof name === "string" && name.length > 0) combo.name = name;+ const description = (raw as { description?: unknown }).description;+ if (typeof description === "string") combo.description = description;+ const isDefault = (raw as { isDefault?: unknown }).isDefault;+ if (typeof isDefault === "boolean") combo.isDefault = isDefault;+ out.push(combo);}- };+ return out;+ } catch {+ return empty;+ } finally {+ clearTimeout(timer);+ }+};/*** Map of well-known compression-intensity tokens to a single emoji@@ -2110,9 +1999,7 @@ export const COMPRESSION_INTENSITY_EMOJI: Record<string, string> = {* `[caveman]` (engine without intensity, no emoji)* `[rtk:custom-thing]` (unknown intensity, raw-text fallback)*/-export function formatCompressionPipeline(- pipeline: OmniRouteCompressionStep[],-): string {+export function formatCompressionPipeline(pipeline: OmniRouteCompressionStep[]): string {if (!pipeline || pipeline.length === 0) return "";return ("[" +@@ -2157,7 +2044,7 @@ export interface OmniRouteProviderConnection {export type OmniRouteProvidersFetcher = (baseURL: string,apiKey: string,- timeoutMs?: number,+ timeoutMs?: number) => Promise<OmniRouteProviderConnection[]>;/**@@ -2166,48 +2053,51 @@ export type OmniRouteProvidersFetcher = (* (returns []) on non-2xx or parse errors so the `usableOnly` filter* gracefully degrades to "no filter" instead of hiding the whole catalog.*/-export const defaultOmniRouteProvidersFetcher: OmniRouteProvidersFetcher =- async (baseURL, apiKey, timeoutMs = 10_000) => {- const empty: OmniRouteProviderConnection[] = [];- if (!baseURL || !apiKey) return empty;- const root = baseURL.replace(/\/v1\/?$/, "").replace(/\/$/, "");- const url = `${root}/api/providers`;- const ac = new AbortController();- const timer = setTimeout(() => ac.abort(), timeoutMs);- try {- const res = await fetch(url, {- method: "GET",- headers: {- Authorization: `Bearer ${apiKey}`,- Accept: "application/json",- },- signal: ac.signal,- });- if (!res.ok) return empty;- const body = (await res.json()) as unknown;- const list = Array.isArray(body)- ? body- : Array.isArray((body as { connections?: unknown[] })?.connections)- ? (body as { connections: unknown[] }).connections- : Array.isArray((body as { data?: unknown[] })?.data)- ? (body as { data: unknown[] }).data- : [];- const out: OmniRouteProviderConnection[] = [];- for (const raw of list) {- if (!raw || typeof raw !== "object") continue;- const provider = (raw as { provider?: unknown }).provider;- if (typeof provider !== "string" || provider.length === 0) continue;- const id = (raw as { id?: unknown }).id;- const idStr = typeof id === "string" && id.length > 0 ? id : provider;- out.push({ ...(raw as Record<string, unknown>), id: idStr, provider });- }- return out;- } catch {- return empty;- } finally {- clearTimeout(timer);+export const defaultOmniRouteProvidersFetcher: OmniRouteProvidersFetcher = async (+ baseURL,+ apiKey,+ timeoutMs = 10_000+) => {+ const empty: OmniRouteProviderConnection[] = [];+ if (!baseURL || !apiKey) return empty;+ const root = baseURL.replace(/\/v1\/?$/, "").replace(/\/$/, "");+ const url = `${root}/api/providers`;+ const ac = new AbortController();+ const timer = setTimeout(() => ac.abort(), timeoutMs);+ try {+ const res = await fetch(url, {+ method: "GET",+ headers: {+ Authorization: `Bearer ${apiKey}`,+ Accept: "application/json",+ },+ signal: ac.signal,+ });+ if (!res.ok) return empty;+ const body = (await res.json()) as unknown;+ const list = Array.isArray(body)+ ? body+ : Array.isArray((body as { connections?: unknown[] })?.connections)+ ? (body as { connections: unknown[] }).connections+ : Array.isArray((body as { data?: unknown[] })?.data)+ ? (body as { data: unknown[] }).data+ : [];+ const out: OmniRouteProviderConnection[] = [];+ for (const raw of list) {+ if (!raw || typeof raw !== "object") continue;+ const provider = (raw as { provider?: unknown }).provider;+ if (typeof provider !== "string" || provider.length === 0) continue;+ const id = (raw as { id?: unknown }).id;+ const idStr = typeof id === "string" && id.length > 0 ? id : provider;+ out.push({ ...(raw as Record<string, unknown>), id: idStr, provider });}- };+ return out;+ } catch {+ return empty;+ } finally {+ clearTimeout(timer);+ }+};/*** Compute the set of provider aliases that have at least one healthy,@@ -2231,7 +2121,7 @@ export const defaultOmniRouteProvidersFetcher: OmniRouteProvidersFetcher =*/export function usableProviderAliasSet(connections: OmniRouteProviderConnection[],- enrichment: OmniRouteEnrichmentMap | undefined,+ enrichment: OmniRouteEnrichmentMap | undefined): {aliases: Set<string>;canonicals: Set<string>;@@ -2290,7 +2180,7 @@ export function isUsableRawModelId(canonicals: Set<string>;knownAliases: Set<string>;},- enrichment: OmniRouteEnrichmentMap | undefined,+ enrichment: OmniRouteEnrichmentMap | undefined): boolean {const slash = id.indexOf("/");if (slash <= 0) return true;@@ -2316,7 +2206,7 @@ export function isUsableCombo(aliases: Set<string>;canonicals: Set<string>;knownAliases: Set<string>;- },+ }): boolean {const steps = Array.isArray(combo.models) ? combo.models : [];if (steps.length === 0) return true;@@ -2333,8 +2223,7 @@ export function isUsableCombo(if (slash <= 0) continue; // no provider prefix to evaluatesawResolvableMember = true;const prefix = modelId.slice(0, slash);- if (usable.aliases.has(prefix) || usable.canonicals.has(prefix))- return true;+ if (usable.aliases.has(prefix) || usable.canonicals.has(prefix)) return true;// Unknown prefix (not in the known-alias universe) → can't prove// unroutable; keep. Known-but-not-usable prefixes keep scanning.if (!usable.knownAliases.has(prefix)) return true;@@ -2355,9 +2244,7 @@ export function isUsableCombo(*/export function slugifyComboName(name: string): string {if (typeof name !== "string") return "";- return trimLeadingDashes(- trimTrailingDashes(name.toLowerCase().replace(/[^a-z0-9]+/g, "-")),- );+ return trimLeadingDashes(trimTrailingDashes(name.toLowerCase().replace(/[^a-z0-9]+/g, "-")));}/**@@ -2370,12 +2257,8 @@ export function slugifyComboName(name: string): string {* Falls back to `combo/<id>` when the friendly name slugifies to the empty* string (e.g. a combo named just punctuation).*/-export function buildComboKey(- combo: OmniRouteRawCombo,- used: Set<string>,-): string {- const friendlyName =- combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;+export function buildComboKey(combo: OmniRouteRawCombo, used: Set<string>): string {+ const friendlyName = combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;let slug = slugifyComboName(friendlyName);if (slug.length === 0) slug = combo.id;let key = `combo/${slug}`;@@ -2498,7 +2381,7 @@ export function createOmniRouteProviderHook(providersFetcher?: OmniRouteProvidersFetcher;now?: () => number;cache?: OmniRouteFetchCache;- } = {},+ } = {}): ProviderHook {const resolved = resolveOmniRoutePluginOptions(opts);const fetcher = deps.fetcher ?? defaultOmniRouteModelsFetcher;@@ -2507,14 +2390,11 @@ export function createOmniRouteProviderHook(// reference resolves at hook-invocation time, not at hook-construction// time, so source-order beyond hoisting rules has no semantic effect.const combosFetcher = deps.combosFetcher ?? defaultOmniRouteCombosFetcher;- const autoCombosFetcher =- deps.autoCombosFetcher ?? defaultOmniRouteAutoCombosFetcher;- const enrichmentFetcher =- deps.enrichmentFetcher ?? defaultOmniRouteEnrichmentFetcher;+ const autoCombosFetcher = deps.autoCombosFetcher ?? defaultOmniRouteAutoCombosFetcher;+ const enrichmentFetcher = deps.enrichmentFetcher ?? defaultOmniRouteEnrichmentFetcher;const compressionMetaFetcher =deps.compressionMetaFetcher ?? defaultOmniRouteCompressionMetaFetcher;- const providersFetcher =- deps.providersFetcher ?? defaultOmniRouteProvidersFetcher;+ const providersFetcher = deps.providersFetcher ?? defaultOmniRouteProvidersFetcher;// Features defaults (mirror v0.1.0 behavior when unset).const features = resolved.features ?? {};const wantCombos = features.combos !== false;@@ -2561,9 +2441,8 @@ export function createOmniRouteProviderHook(// union (OAuth | ApiAuth | WellKnownAuth) doesn't declare baseURL on// any branch — we duck-type it as a defensive extension point.const authBaseURL = (auth as unknown as { baseURL?: unknown }).baseURL;- const providerBaseURL = (- _provider as { options?: { baseURL?: unknown } } | undefined- )?.options?.baseURL;+ const providerBaseURL = (_provider as { options?: { baseURL?: unknown } } | undefined)+ ?.options?.baseURL;const baseURL =resolved.baseURL ??(typeof authBaseURL === "string" && authBaseURL.length > 0 ? authBaseURL : undefined) ??@@ -2616,7 +2495,7 @@ export function createOmniRouteProviderHook(} catch (err) {console.warn("[omniroute-plugin] combos fetch failed, falling back to models-only catalog",- err,+ err);}}@@ -2643,7 +2522,7 @@ export function createOmniRouteProviderHook(} catch (err) {console.warn("[omniroute-plugin] enrichment fetch failed, falling back to raw ids",- err,+ err);}}@@ -2653,16 +2532,9 @@ export function createOmniRouteProviderHook(rawCompressionCombos = [];if (wantCompressionMeta) {try {- rawCompressionCombos = await compressionMetaFetcher(- baseURL,- apiKey,- 10_000,- );+ rawCompressionCombos = await compressionMetaFetcher(baseURL, apiKey, 10_000);} catch (err) {- console.warn(- "[omniroute-plugin] compression-metadata fetch failed",- err,- );+ console.warn("[omniroute-plugin] compression-metadata fetch failed", err);}}@@ -2678,7 +2550,7 @@ export function createOmniRouteProviderHook(} catch (err) {console.warn("[omniroute-plugin] /api/providers fetch failed; usableOnly filter disabled for this refresh",- err,+ err);}}@@ -2702,7 +2574,7 @@ export function createOmniRouteProviderHook(`${rawEnrichment.size} enrichment entries + ` +`${rawCompressionCombos.length} compression combos + ` +`${rawConnections.length} connections ` +- `(TTL=${resolved.modelCacheTtl}ms)`,+ `(TTL=${resolved.modelCacheTtl}ms)`);// ── Startup debug: deep-dive into enrichment + auto combos ──────@@ -2756,18 +2628,13 @@ export function createOmniRouteProviderHook(for (const entry of rawModels) {if (!entry.id) continue;if (canonicalDedup.has(entry.id)) continue;- if (usable && !isUsableRawModelId(entry.id, usable, rawEnrichment))- continue;+ if (usable && !isUsableRawModelId(entry.id, usable, rawEnrichment)) continue;const model = mapRawModelToModelV2(entry, {providerId: resolved.providerId,baseURL,apiFormat: resolved.features?.apiFormat,});- const enrichEntry = lookupEnrichment(- entry.id,- rawEnrichment,- canonicalToAlias,- );+ const enrichEntry = lookupEnrichment(entry.id, rawEnrichment, canonicalToAlias);applyEnrichment(model, enrichEntry);// Prepend upstream provider label (e.g. `Claude - Claude Opus 4.7`)// so the picker groups same-model rows by upstream connection.@@ -2780,7 +2647,7 @@ export function createOmniRouteProviderHook(entry.id,enrichEntry,aliasIndex,- canonicalToAlias,+ canonicalToAlias);applyProviderTag(model, tagEntry);}@@ -2808,89 +2675,183 @@ export function createOmniRouteProviderHook(const comboNames = new Set<string>();for (const combo of rawCombos) {if (!combo || combo.isHidden === true) continue;- const n =- combo.name && combo.name.trim().length > 0- ? combo.name.trim()- : combo.id;+ const n = combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;if (typeof n === "string" && n.length > 0) comboNames.add(n);}for (const key of Object.keys(models)) {if (comboNames.has(key)) delete models[key];}+ // ── Combo LCD across nested combo-refs (T-NN) ───────────────────────+ // Combos can nest other combos via `kind: "combo-ref"` members+ // (e.g. MASTER-LIGHT contains OldLLM, KIRO, Opecode Zen FREE). The+ // nested combo's own `limit.context` is computed below in this same+ // loop, so we need a fixpoint iteration: if a combo-ref points at a+ // combo not yet processed, defer this combo and try again after the+ // sibling combos catch up. We bound the retries so a circular combo+ // graph can't deadlock the picker.+ const MAX_COMBO_PASSES = 8;const usedComboKeys = new Set<string>();- for (const combo of rawCombos) {- if (!combo.id) continue;- if (combo.isHidden === true) continue;- // usableOnly filter — drop combos whose members all map to- // non-usable providers.- if (usable && !isUsableCombo(combo, usable)) continue;-- const memberSteps = Array.isArray(combo.models) ? combo.models : [];- const memberEntries: OmniRouteRawModelEntry[] = [];- for (const step of memberSteps) {- // Use the unknown-bridge pattern from commit 91b137e6 so the- // DTS pass stays clean: ComboMemberRef declares `model?: string`- // but we still verify the runtime shape before consuming it.- const modelId = (step as unknown as { model?: unknown }).model;- if (typeof modelId !== "string" || modelId.length === 0) continue;- const member = rawModelById.get(modelId);- if (member) memberEntries.push(member);- }+ // Combos in `rawCombos` that still need (re)processing this round.+ // Shrinks as combos resolve.+ let pending = rawCombos.filter((combo) => {+ if (!combo.id) return false;+ if (combo.isHidden === true) return false;+ if (usable && !isUsableCombo(combo, usable)) return false;+ return true;+ });+ // Resolved nested combos keyed by their friendly name, so parent+ // combos that reference them via combo-ref can lift the full+ // capability vector (not just the context window) into their own+ // LCD pass.+ const resolvedComboModelsByName = new Map<string, ModelV2>();++ for (let pass = 0; pass < MAX_COMBO_PASSES && pending.length > 0; pass++) {+ const stillPending: typeof pending = [];+ for (const combo of pending) {+ const memberSteps = Array.isArray(combo.models) ? combo.models : [];+ const memberEntries: OmniRouteRawModelEntry[] = [];+ let deferredThisPass = false;++ for (const step of memberSteps) {+ // Unknown-bridge: ComboMemberRef's DTS type only declares+ // `model?: string`, so verify the runtime shape before reading+ // either `model` (raw member) or `comboName` (nested combo).+ const stepKind = (step as unknown as { kind?: unknown }).kind;++ if (stepKind === "combo-ref") {+ const comboName = (step as unknown as { comboName?: unknown }).comboName;+ if (typeof comboName !== "string" || comboName.length === 0) {+ continue;+ }+ const nestedModel = resolvedComboModelsByName.get(comboName);+ if (!nestedModel) {+ // Nested combo hasn't been processed yet. Defer this+ // combo to the next pass.+ deferredThisPass = true;+ break;+ }+ // Synthesize a member entry that contributes only the+ // nested combo's pre-computed context_length + max_output.+ // Other capability axes default conservatively (no tool+ // calls, no vision) — a nested combo's modalities are an+ // OR, but if we let raw-model defaults leak in we'd+ // over-claim. The combo's own LCD (computed by+ // mapComboToModelV2 from the synthesized entries) will only+ // further restrict capabilities, so this is safe.+ // Synthesize a member entry carrying the nested combo's+ // pre-computed context + capabilities + modalities so the+ // parent combo's LCD is accurate across the whole graph+ // (not just its direct raw-model members).+ const inputModalities: string[] = [];+ if (nestedModel.capabilities.input.text) inputModalities.push("text");+ if (nestedModel.capabilities.input.audio) inputModalities.push("audio");+ if (nestedModel.capabilities.input.image) inputModalities.push("image");+ if (nestedModel.capabilities.input.video) inputModalities.push("video");+ if (nestedModel.capabilities.input.pdf) inputModalities.push("pdf");++ const outputModalities: string[] = [];+ if (nestedModel.capabilities.output.text) outputModalities.push("text");+ if (nestedModel.capabilities.output.audio) outputModalities.push("audio");+ if (nestedModel.capabilities.output.image) outputModalities.push("image");+ if (nestedModel.capabilities.output.video) outputModalities.push("video");+ if (nestedModel.capabilities.output.pdf) outputModalities.push("pdf");++ memberEntries.push({+ id: `combo-ref:${comboName}`,+ context_length: nestedModel.limit.context,+ max_output_tokens: nestedModel.limit.output,+ max_input_tokens: nestedModel.limit.input ?? 0,+ owned_by: "combo",+ input_modalities: inputModalities,+ output_modalities: outputModalities,+ capabilities: {+ temperature: nestedModel.capabilities.temperature,+ reasoning: nestedModel.capabilities.reasoning,+ thinking: nestedModel.capabilities.interleaved,+ attachment: nestedModel.capabilities.attachment,+ tool_calling: nestedModel.capabilities.toolcall,+ },+ } as unknown as OmniRouteRawModelEntry);+ continue;+ }- const mapped = mapComboToModelV2(- combo,- memberEntries,- resolved.providerId,- baseURL,- features.apiFormat,- );- const hasMembers = memberEntries.length > 0;-- // Apply enrichment overlay to combos too (OmniRoute's- // /api/pricing/models surfaces combos alongside provider-scoped- // models with curated names).- applyEnrichment(mapped, rawEnrichment.get(combo.id));-- // `Combo: ` prefix surfaces the combo nature in OC's model picker.- // Idempotent guard covers the case where enrichment overwrote- // mapped.name with an already-prefixed string. Mirrors the- // static-hook Combo:-prefix decoration.- if (!mapped.name.startsWith("Combo: ")) {- mapped.name = `Combo: ${mapped.name}`;- }+ const modelId = (step as unknown as { model?: unknown }).model;+ if (typeof modelId !== "string" || modelId.length === 0) continue;+ const member = rawModelById.get(modelId);+ if (member) memberEntries.push(member);+ }- // Optionally decorate combo name with its compression pipeline.- // Only fires when features.compressionMetadata: true, OmniRoute- // returned at least one default compression combo, AND the- // combo has resolvable members — claiming compression on an- // unroutable combo would mislead the picker.- if (- hasMembers &&- defaultCompression &&- defaultCompression.pipeline.length > 0- ) {- const tag = formatCompressionPipeline(defaultCompression.pipeline);- if (tag.length > 0 && !mapped.name.includes(tag)) {- mapped.name = `${mapped.name} ${tag}`;+ if (deferredThisPass) {+ stillPending.push(combo);+ continue;}- }- const comboKey = buildComboKey(combo, usedComboKeys);+ const mapped = mapComboToModelV2(+ combo,+ memberEntries,+ resolved.providerId,+ baseURL,+ features.apiFormat+ );+ const hasMembers = memberEntries.length > 0;++ // Apply enrichment overlay to combos too (OmniRoute's+ // /api/pricing/models surfaces combos alongside provider-scoped+ // models with curated names).+ applyEnrichment(mapped, rawEnrichment.get(combo.id));++ // `Combo: ` prefix surfaces the combo nature in OC's model picker.+ // Idempotent guard covers the case where enrichment overwrote+ // mapped.name with an already-prefixed string. Mirrors the+ // static-hook Combo:-prefix decoration.+ if (!mapped.name.startsWith("Combo: ")) {+ mapped.name = `Combo: ${mapped.name}`;+ }- // Collision policy: combos win. Warn ONCE per (cacheKey, comboKey)- // when overwriting a same-key raw model so the operator can spot- // the unusual naming choice without log spam.- if (Object.prototype.hasOwnProperty.call(models, comboKey)) {- const dedupeKey = `${cacheKey}::${comboKey}`;- if (!collisionWarned.has(dedupeKey)) {- collisionWarned.add(dedupeKey);- console.warn(- `[omniroute-plugin] combo key "${comboKey}" collides with a model id; combo wins.`,- );+ // Optionally decorate combo name with its compression pipeline.+ // Only fires when features.compressionMetadata: true, OmniRoute+ // returned at least one default compression combo, AND the+ // combo has resolvable members — claiming compression on an+ // unroutable combo would mislead the picker.+ if (hasMembers && defaultCompression && defaultCompression.pipeline.length > 0) {+ const tag = formatCompressionPipeline(defaultCompression.pipeline);+ if (tag.length > 0 && !mapped.name.includes(tag)) {+ mapped.name = `${mapped.name} ${tag}`;+ }}++ const comboKey = buildComboKey(combo, usedComboKeys);++ // Collision policy: combos win. Warn ONCE per (cacheKey, comboKey)+ // when overwriting a same-key raw model so the operator can spot+ // the unusual naming choice without log spam.+ if (Object.prototype.hasOwnProperty.call(models, comboKey)) {+ const dedupeKey = `${cacheKey}::${comboKey}`;+ if (!collisionWarned.has(dedupeKey)) {+ collisionWarned.add(dedupeKey);+ console.warn(+ `[omniroute-plugin] combo key "${comboKey}" collides with a model id; combo wins.`+ );+ }+ }+ models[comboKey] = mapped;++ // Make this combo's resolved model available to parent combos+ // that reference it via combo-ref. Use the friendly name+ // (combo.name) since that's the lookup key on the parent side.+ const lookupName =+ combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;+ resolvedComboModelsByName.set(lookupName, mapped);}- models[comboKey] = mapped;+ if (stillPending.length === pending.length) break;+ pending = stillPending;+ }++ if (pending.length > 0) {+ console.warn(+ `[omniroute-plugin] ${pending.length} combo(s) could not resolve all nested combo-refs after ${MAX_COMBO_PASSES} passes; they will advertise context=0 to avoid over-claiming.`+ );}// ── Auto combos in dynamic catalog ────────────────────────────────@@ -3001,11 +2962,7 @@ export function createOmniRouteFetchInterceptor(config: {const prefix = `${trimmed}/`;return async (input, init = {}) => {const url =- typeof input === "string"- ? input- : input instanceof URL- ? input.toString()- : input.url;+ typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;const targetsOmniRoute = url === trimmed || url.startsWith(prefix);if (!targetsOmniRoute) {@@ -3014,9 +2971,7 @@ export function createOmniRouteFetchInterceptor(config: {// Merge order: Request-attached headers (when input is a Request) →// init.headers overlay → our injected headers last (so we win).- const headers = new Headers(- input instanceof Request ? input.headers : undefined,- );+ const headers = new Headers(input instanceof Request ? input.headers : undefined);if (init.headers) {const initHeaders = new Headers(init.headers);initHeaders.forEach((value, key) => {@@ -3051,12 +3006,7 @@ export function createOmniRouteFetchInterceptor(config: {* Source: behavioural reverse-engineering from Alph4d0g's* [email protected] (dist/src/plugin.js:517).*/-const GEMINI_SCHEMA_KEYS_TO_REMOVE = new Set([- "$schema",- "$ref",- "ref",- "additionalProperties",-]);+const GEMINI_SCHEMA_KEYS_TO_REMOVE = new Set(["$schema", "$ref", "ref", "additionalProperties"]);function isRecord(v: unknown): v is Record<string, unknown> {return typeof v === "object" && v !== null && !Array.isArray(v);@@ -3105,9 +3055,7 @@ function stripSchemaKeys(schema: Record<string, unknown>): boolean {* occasionally attach a top-level `$schema` declaration when re-serialising* tool bundles, and Gemini rejects those too.*/-function sanitizeToolSchemaContainer(- payload: Record<string, unknown>,-): boolean {+function sanitizeToolSchemaContainer(payload: Record<string, unknown>): boolean {let changed = false;// Top-level keyword strip — covers payload-level `$schema` etc.for (const key of Object.keys(payload)) {@@ -3124,18 +3072,11 @@ function sanitizeToolSchemaContainer(if (!isRecord(tool)) continue;const fn = (tool as { function?: unknown }).function;if (isRecord(fn) && isRecord((fn as { parameters?: unknown }).parameters)) {- changed =- stripSchemaKeys(fn.parameters as Record<string, unknown>) || changed;+ changed = stripSchemaKeys(fn.parameters as Record<string, unknown>) || changed;}- const fnDecl = (tool as { function_declaration?: unknown })- .function_declaration;- if (- isRecord(fnDecl) &&- isRecord((fnDecl as { parameters?: unknown }).parameters)- ) {- changed =- stripSchemaKeys(fnDecl.parameters as Record<string, unknown>) ||- changed;+ const fnDecl = (tool as { function_declaration?: unknown }).function_declaration;+ if (isRecord(fnDecl) && isRecord((fnDecl as { parameters?: unknown }).parameters)) {+ changed = stripSchemaKeys(fnDecl.parameters as Record<string, unknown>) || changed;}const inputSchema = (tool as { input_schema?: unknown }).input_schema;if (isRecord(inputSchema)) {@@ -3257,8 +3198,7 @@ export function createGeminiSanitizingFetch(inner: typeof fetch): typeof fetch {: "";// URL gate — match the path substring with prefix tolerance.- const targetsCompletions =- url.includes("/chat/completions") || url.includes("/responses");+ const targetsCompletions = url.includes("/chat/completions") || url.includes("/responses");if (!targetsCompletions) {return inner(input, init);}@@ -3284,7 +3224,7 @@ export function createGeminiSanitizingFetch(inner: typeof fetch): typeof fetch {geminiStreamingWarningEmitted = true;console.warn(- "[omniroute-plugin] sanitizeGemini: streaming Request body, skipping schema strip (Gemini may reject)",+ "[omniroute-plugin] sanitizeGemini: streaming Request body, skipping schema strip (Gemini may reject)");}return inner(input, init);@@ -3379,12 +3319,7 @@ export function __resetGeminiStreamingWarning(): void {* `undefined` noise.*//** Modalities accepted by OC's static catalog reader (see `@opencode-ai/sdk`). */-export type OmniRouteModalityKind =- | "text"- | "audio"- | "image"- | "video"- | "pdf";+export type OmniRouteModalityKind = "text" | "audio" | "image" | "video" | "pdf";const STATIC_MODALITY_VALUES: ReadonlySet<OmniRouteModalityKind> = new Set(["text",@@ -3530,7 +3465,7 @@ export function buildStaticProviderEntry(enrichment?: OmniRouteEnrichmentMap,compressionCombos?: OmniRouteCompressionCombo[],connections?: OmniRouteProviderConnection[],- rawAutoCombos?: OmniRouteRawAutoCombo[],+ rawAutoCombos?: OmniRouteRawAutoCombo[]): OmniRouteStaticProviderEntry {const models: Record<string, OmniRouteStaticModelEntry> = {};@@ -3557,8 +3492,7 @@ export function buildStaticProviderEntry(const comboNames = new Set<string>();for (const combo of rawCombos) {if (!combo || combo.isHidden === true) continue;- const name =- combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;+ const name = combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;if (typeof name === "string" && name.length > 0) comboNames.add(name);}@@ -3588,14 +3522,9 @@ export function buildStaticProviderEntry(// to the raw id when no enrichment entry is found. The alias-fallback// lookup rescues `<canonical>/<id>` rows whose enrichment indexed only// under `<alias>/<id>`.- const enrichmentEntry = lookupEnrichment(- raw.id,- enrichment,- canonicalToAlias,- );+ const enrichmentEntry = lookupEnrichment(raw.id, enrichment, canonicalToAlias);const enrichmentName = enrichmentEntry?.name;- let displayName =- enrichmentName && enrichmentName.length > 0 ? enrichmentName : raw.id;+ let displayName = enrichmentName && enrichmentName.length > 0 ? enrichmentName : raw.id;// Provider-tag PREFIX — `<label> - <name>` so the picker groups by// upstream provider when scanning a column of model names. Mirrors// `applyProviderTag` used in the dynamic hook. Idempotent: skip@@ -3608,13 +3537,12 @@ export function buildStaticProviderEntry(raw.id,enrichmentEntry,aliasIndex,- canonicalToAlias,+ canonicalToAlias);const label = shortProviderLabel(tagEntry);if (label) {const prefix = `${label}${PROVIDER_TAG_SEPARATOR}`;- if (!displayName.startsWith(prefix))- displayName = `${prefix}${displayName}`;+ if (!displayName.startsWith(prefix)) displayName = `${prefix}${displayName}`;}}const entry: OmniRouteStaticModelEntry = { name: displayName };@@ -3622,10 +3550,7 @@ export function buildStaticProviderEntry(const attachment = caps.attachment ?? caps.vision;if (typeof attachment === "boolean") entry.attachment = attachment;- if (- typeof caps.reasoning === "boolean" ||- typeof caps.thinking === "boolean"- ) {+ if (typeof caps.reasoning === "boolean" || typeof caps.thinking === "boolean") {entry.reasoning = Boolean(caps.reasoning || caps.thinking);}@@ -3668,18 +3593,13 @@ export function buildStaticProviderEntry(// Cost from enrichment pricing (sourced from `/api/pricing`). Map// OmniRoute field names to OC's static-schema field names.const pricing = enrichmentEntry?.pricing;- if (- pricing &&- (typeof pricing.input === "number" || typeof pricing.output === "number")- ) {+ if (pricing && (typeof pricing.input === "number" || typeof pricing.output === "number")) {const cost: NonNullable<OmniRouteStaticModelEntry["cost"]> = {input: typeof pricing.input === "number" ? pricing.input : 0,output: typeof pricing.output === "number" ? pricing.output : 0,};- if (typeof pricing.cacheRead === "number")- cost.cache_read = pricing.cacheRead;- if (typeof pricing.cacheWrite === "number")- cost.cache_write = pricing.cacheWrite;+ if (typeof pricing.cacheRead === "number") cost.cache_read = pricing.cacheRead;+ if (typeof pricing.cacheWrite === "number") cost.cache_write = pricing.cacheWrite;entry.cost = cost;}@@ -3720,110 +3640,182 @@ export function buildStaticProviderEntry(const usedComboKeys = new Set<string>();const reportedCollisions = new Set<string>();- for (const combo of rawCombos) {- if (!combo.id) continue;- if (combo.isHidden === true) continue;- if (usable && !isUsableCombo(combo, usable)) continue;-- const memberSteps = Array.isArray(combo.models) ? combo.models : [];- const memberEntries: OmniRouteRawModelEntry[] = [];- for (const step of memberSteps) {- const modelId = (step as unknown as { model?: unknown }).model;- if (typeof modelId !== "string" || modelId.length === 0) continue;- const member = rawModelById.get(modelId);- if (member) memberEntries.push(member);- }-- const hasMembers = memberEntries.length > 0;- const friendlyName =- combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;- // `Combo: ` prefix surfaces the combo nature in OC's model picker — the- // catalog key (`combo/<slug>`) is already namespaced, but the picker- // shows `name`, so prefix the display string too.- const prefixedName = `Combo: ${friendlyName}`;- const displayName =- hasMembers && compressionSuffix- ? `${prefixedName}${compressionSuffix}`- : prefixedName;- const entry: OmniRouteStaticModelEntry = { name: displayName };+ // ── Combo LCD across nested combo-refs (T-NN mirror) ─────────────────+ // Mirror of the dynamic-catalog fixpoint iteration: combos can nest+ // other combos via `kind: "combo-ref"` members (e.g. MASTER-LIGHT+ // contains OldLLM, KIRO, Opecode Zen FREE). The nested combo's own+ // capabilities and limits are computed in this same loop, so we need+ // a fixpoint pass: if a combo-ref points at a combo not yet processed,+ // defer this combo and try again after the sibling combos catch up.+ // We bound the retries so a circular combo graph can't deadlock the+ // picker, and we break early when a pass makes no progress.+ const MAX_STATIC_COMBO_PASSES = 8;+ const resolvedStaticCombosByName = new Map<string, OmniRouteStaticModelEntry>();+ let pendingStatic = rawCombos.filter((combo) => {+ if (!combo.id) return false;+ if (combo.isHidden === true) return false;+ if (usable && !isUsableCombo(combo, usable)) return false;+ return true;+ });++ for (let pass = 0; pass < MAX_STATIC_COMBO_PASSES && pendingStatic.length > 0; pass++) {+ const stillPendingStatic: typeof pendingStatic = [];+ for (const combo of pendingStatic) {+ const memberSteps = Array.isArray(combo.models) ? combo.models : [];+ const memberEntries: OmniRouteRawModelEntry[] = [];+ let deferredThisPass = false;++ for (const step of memberSteps) {+ const stepKind = (step as unknown as { kind?: unknown }).kind;++ if (stepKind === "combo-ref") {+ const comboName = (step as unknown as { comboName?: unknown }).comboName;+ if (typeof comboName !== "string" || comboName.length === 0) {+ continue;+ }+ const nestedEntry = resolvedStaticCombosByName.get(comboName);+ if (!nestedEntry) {+ deferredThisPass = true;+ break;+ }+ // Synthesize a raw-model-shaped member entry carrying the+ // nested combo's pre-computed context + capabilities ++ // modalities. Mirrors the dynamic path so the static catalog+ // stays in lockstep with the dynamic one.+ const inputModalities = (nestedEntry.modalities?.input ?? ["text"]) as string[];+ const outputModalities = (nestedEntry.modalities?.output ?? ["text"]) as string[];+ memberEntries.push({+ id: `combo-ref:${comboName}`,+ context_length: nestedEntry.limit?.context ?? 0,+ max_output_tokens: nestedEntry.limit?.output ?? 0,+ max_input_tokens: 0,+ owned_by: "combo",+ input_modalities: inputModalities,+ output_modalities: outputModalities,+ capabilities: {+ temperature: nestedEntry.temperature,+ reasoning: nestedEntry.reasoning,+ thinking: nestedEntry.reasoning,+ attachment: nestedEntry.attachment,+ tool_calling: nestedEntry.tool_call,+ },+ } as unknown as OmniRouteRawModelEntry);+ continue;+ }- if (hasMembers) {- // LCD across capabilities — every member must support for the combo- // to support. Mirrors mapComboToModelV2.- entry.attachment = memberEntries.every((m) =>- Boolean(m.capabilities?.attachment ?? m.capabilities?.vision ?? false),- );- entry.reasoning = memberEntries.every((m) =>- Boolean(m.capabilities?.reasoning || m.capabilities?.thinking),- );- entry.temperature = memberEntries.every(- (m) => (m.capabilities?.temperature ?? true) !== false,- );- entry.tool_call = memberEntries.every((m) =>- Boolean(m.capabilities?.tool_calling ?? false),- );+ const modelId = (step as unknown as { model?: unknown }).model;+ if (typeof modelId !== "string" || modelId.length === 0) continue;+ const member = rawModelById.get(modelId);+ if (member) memberEntries.push(member);+ }- // LCD across limits — min over declared values. OC's SDK static schema- // accepts only `context` + `output` on `limit`, so we drop the legacy- // `input` emission. Emit only when BOTH context AND output are known- // across at least one member (mirrors the required-field constraint).- const contextValues = memberEntries- .map((m) => m.context_length)- .filter((v): v is number => typeof v === "number" && v > 0);- const outputValues = memberEntries- .map((m) => m.max_output_tokens)- .filter((v): v is number => typeof v === "number" && v > 0);-- if (contextValues.length > 0 && outputValues.length > 0) {- entry.limit = {- context: Math.min(...contextValues),- output: Math.min(...outputValues),- };+ if (deferredThisPass) {+ stillPendingStatic.push(combo);+ continue;}- // LCD across modalities — combo accepts modality M iff every member- // accepts M. Same intersection rule as runtime capabilities.- const inSets = memberEntries.map(- (m) => new Set(normaliseModalities(m.input_modalities)),- );- const outSets = memberEntries.map(- (m) => new Set(normaliseModalities(m.output_modalities)),- );- const intersect = (- sets: Set<OmniRouteModalityKind>[],- ): OmniRouteModalityKind[] => {- if (sets.length === 0) return [];- const [first, ...rest] = sets;- const out: OmniRouteModalityKind[] = [];- for (const v of first) {- if (rest.every((s) => s.has(v))) out.push(v);+ const hasMembers = memberEntries.length > 0;+ const friendlyName =+ combo.name && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;+ // `Combo: ` prefix surfaces the combo nature in OC's model picker — the+ // catalog key (`combo/<slug>`) is already namespaced, but the picker+ // shows `name`, so prefix the display string too.+ const prefixedName = `Combo: ${friendlyName}`;+ const displayName =+ hasMembers && compressionSuffix ? `${prefixedName}${compressionSuffix}` : prefixedName;+ const entry: OmniRouteStaticModelEntry = { name: displayName };++ if (hasMembers) {+ // LCD across capabilities — every member must support for the combo+ // to support. Mirrors mapComboToModelV2.+ entry.attachment = memberEntries.every((m) =>+ Boolean(m.capabilities?.attachment ?? m.capabilities?.vision ?? false)+ );+ entry.reasoning = memberEntries.every((m) =>+ Boolean(m.capabilities?.reasoning || m.capabilities?.thinking)+ );+ entry.temperature = memberEntries.every(+ (m) => (m.capabilities?.temperature ?? true) !== false+ );+ entry.tool_call = memberEntries.every((m) =>+ Boolean(m.capabilities?.tool_calling ?? false)+ );++ // LCD across limits — min over declared values. OC's SDK static schema+ // accepts only `context` + `output` on `limit`, so we drop the legacy+ // `input` emission. Emit only when BOTH context AND output are known+ // across at least one member (mirrors the required-field constraint).+ const contextValues = memberEntries+ .map((m) => m.context_length)+ .filter((v): v is number => typeof v === "number" && v > 0);+ const outputValues = memberEntries+ .map((m) => m.max_output_tokens)+ .filter((v): v is number => typeof v === "number" && v > 0);++ if (contextValues.length > 0 && outputValues.length > 0) {+ entry.limit = {+ context: Math.min(...contextValues),+ output: Math.min(...outputValues),+ };}- return out;- };- const inModalities = intersect(inSets);- const outModalities = intersect(outSets);- if (inModalities.length > 0 || outModalities.length > 0) {- entry.modalities = {- input: inModalities.length > 0 ? inModalities : ["text"],- output: outModalities.length > 0 ? outModalities : ["text"],++ // LCD across modalities — combo accepts modality M iff every member+ // accepts M. Same intersection rule as runtime capabilities.+ const inSets = memberEntries.map((m) => new Set(normaliseModalities(m.input_modalities)));+ const outSets = memberEntries.map((m) => new Set(normaliseModalities(m.output_modalities)));+ const intersect = (sets: Set<OmniRouteModalityKind>[]): OmniRouteModalityKind[] => {+ if (sets.length === 0) return [];+ const [first, ...rest] = sets;+ const out: OmniRouteModalityKind[] = [];+ for (const v of first) {+ if (rest.every((s) => s.has(v))) out.push(v);+ }+ return out;};+ const inModalities = intersect(inSets);+ const outModalities = intersect(outSets);+ if (inModalities.length > 0 || outModalities.length > 0) {+ entry.modalities = {+ input: inModalities.length > 0 ? inModalities : ["text"],+ output: outModalities.length > 0 ? outModalities : ["text"],+ };+ }+ } else {+ // Empty members → safety posture: all caps false. Caller's OC picker+ // will grey out an unroutable combo rather than promise capabilities+ // we can't honour.+ entry.attachment = false;+ entry.reasoning = false;+ entry.temperature = false;+ entry.tool_call = false;}- } else {- // Empty members → safety posture: all caps false. Caller's OC picker- // will grey out an unroutable combo rather than promise capabilities- // we can't honour.- entry.attachment = false;- entry.reasoning = false;- entry.temperature = false;- entry.tool_call = false;++ // Key under `combo/<slug>` (e.g. `combo/claude-primary`) so the+ // namespace cleanly separates combos from raw provider/model pairs+ // and so the key is copy/paste-friendly. Slug collisions across+ // combos are disambiguated with a short UUID-prefix suffix; see+ // `buildComboKey` for the policy.+ models[buildComboKey(combo, usedComboKeys)] = entry;++ // Make this combo's resolved entry available to parent combos+ // that reference it via combo-ref. Use the friendly name since+ // that's the lookup key on the parent side.+ resolvedStaticCombosByName.set(friendlyName, entry);}- // Key under `combo/<slug>` (e.g. `combo/claude-primary`) so the- // namespace cleanly separates combos from raw provider/model pairs- // and so the key is copy/paste-friendly. Slug collisions across- // combos are disambiguated with a short UUID-prefix suffix; see- // `buildComboKey` for the policy.- models[buildComboKey(combo, usedComboKeys)] = entry;+ if (stillPendingStatic.length === pendingStatic.length) {+ // No progress in this pass — remaining combos have unresolvable+ // refs (missing nested combo, circular graph, or nested combo+ // with no members). Break early to avoid wasting the pass budget.+ break;+ }+ pendingStatic = stillPendingStatic;+ }++ if (pendingStatic.length > 0) {+ console.warn(+ `[omniroute-plugin] ${pendingStatic.length} combo(s) in the static catalog could not resolve all nested combo-refs after ${MAX_STATIC_COMBO_PASSES} passes; they will be omitted.`+ );}// ── Auto combos ────────────────────────────────────────────────────────@@ -3842,7 +3834,7 @@ export function buildStaticProviderEntry(if (!reportedCollisions.has(key)) {reportedCollisions.add(key);console.warn(- `[omniroute-plugin] auto combo key "${key}" collides with an existing model; auto combo wins.`,+ `[omniroute-plugin] auto combo key "${key}" collides with an existing model; auto combo wins.`);}}@@ -3870,10 +3862,7 @@ interface AuthJsonApiEntry {baseURL?: string;}-type AuthJsonShape = Record<- string,- AuthJsonApiEntry | { type?: string; [k: string]: unknown }->;+type AuthJsonShape = Record<string, AuthJsonApiEntry | { type?: string; [k: string]: unknown }>;/*** Read & parse `auth.json` from OC's data dir. The path resolution mirrors@@ -3913,26 +3902,21 @@ interface OmniRouteDiskSnapshot {/** Resolve the disk-snapshot path for a given providerId. */export function diskSnapshotPath(providerId: string): string {- const dir =- process.env.OPENCODE_DATA_DIR ??- path.join(os.homedir(), ".local/share/opencode");+ const dir = process.env.OPENCODE_DATA_DIR ?? path.join(os.homedir(), ".local/share/opencode");return path.join(dir, "plugins", `omniroute-${providerId}.json`);}export type OmniRouteDiskSnapshotWriter = (providerId: string,- entry: Omit<OmniRouteFetchCacheEntry, "expiresAt">,+ entry: Omit<OmniRouteFetchCacheEntry, "expiresAt">) => Promise<void>;export type OmniRouteDiskSnapshotReader = (- providerId: string,+ providerId: string) => Promise<Omit<OmniRouteFetchCacheEntry, "expiresAt"> | undefined>;/** Best-effort disk write. Soft-fails on any I/O error (no exception thrown). */-export const defaultDiskSnapshotWriter: OmniRouteDiskSnapshotWriter = async (- providerId,- entry,-) => {+export const defaultDiskSnapshotWriter: OmniRouteDiskSnapshotWriter = async (providerId, entry) => {try {const file = diskSnapshotPath(providerId);// Restrict perms to the owner: the snapshot lives alongside auth.json@@ -3958,9 +3942,7 @@ export const defaultDiskSnapshotWriter: OmniRouteDiskSnapshotWriter = async (};/** Best-effort disk read. Returns `undefined` when missing/corrupt/unreadable. */-export const defaultDiskSnapshotReader: OmniRouteDiskSnapshotReader = async (- providerId,-) => {+export const defaultDiskSnapshotReader: OmniRouteDiskSnapshotReader = async (providerId) => {try {const file = diskSnapshotPath(providerId);const body = await readFile(file, "utf8");@@ -3969,18 +3951,12 @@ export const defaultDiskSnapshotReader: OmniRouteDiskSnapshotReader = async (return {rawModels: Array.isArray(parsed.rawModels) ? parsed.rawModels : [],rawCombos: Array.isArray(parsed.rawCombos) ? parsed.rawCombos : [],- rawAutoCombos: Array.isArray(parsed.rawAutoCombos)- ? parsed.rawAutoCombos- : [],- rawEnrichment: new Map(- Array.isArray(parsed.rawEnrichment) ? parsed.rawEnrichment : [],- ),+ rawAutoCombos: Array.isArray(parsed.rawAutoCombos) ? parsed.rawAutoCombos : [],+ rawEnrichment: new Map(Array.isArray(parsed.rawEnrichment) ? parsed.rawEnrichment : []),rawCompressionCombos: Array.isArray(parsed.rawCompressionCombos)? parsed.rawCompressionCombos: [],- rawConnections: Array.isArray(parsed.rawConnections)- ? parsed.rawConnections- : [],+ rawConnections: Array.isArray(parsed.rawConnections) ? parsed.rawConnections : [],};} catch {return undefined;@@ -4043,10 +4019,7 @@ export function debugLogSetEnabled(providerId: string, enabled: boolean): void {try {const dir = debugLogDir();if (!existsSync(dir)) mkdirSync(dir, { recursive: true });- writeFileSync(- debugStatePath(providerId),- JSON.stringify({ enabled, ts: Date.now() }, null, 2)- );+ writeFileSync(debugStatePath(providerId), JSON.stringify({ enabled, ts: Date.now() }, null, 2));} catch (err) {// best-effort; never break the auth flowconsole.warn(`[omniroute-plugin] debugLogSetEnabled failed: ${(err as Error).message}`);@@ -4133,7 +4106,9 @@ export function createDebugLoggingFetch(: input instanceof Request? input.url: String(input);- const method = (init?.method ?? (typeof input === "string" ? "GET" : (input as Request).method ?? "GET")).toUpperCase();+ const method = (+ init?.method ?? (typeof input === "string" ? "GET" : ((input as Request).method ?? "GET"))+ ).toUpperCase();const reqHeaders: Record<string, string> = {};if (input instanceof Request) {input.headers.forEach((v, k) => (reqHeaders[k] = v));@@ -4227,14 +4202,10 @@ export function createDebugLoggingFetch(}export const noopDiskSnapshotReader: OmniRouteDiskSnapshotReader = async () => undefined;-export type OmniRouteReadAuthJson = () => Promise<- AuthJsonShape | undefined | null->;+export type OmniRouteReadAuthJson = () => Promise<AuthJsonShape | undefined | null>;export const defaultReadAuthJson: OmniRouteReadAuthJson = async () => {- const dir =- process.env.OPENCODE_DATA_DIR ??- path.join(os.homedir(), ".local/share/opencode");+ const dir = process.env.OPENCODE_DATA_DIR ?? path.join(os.homedir(), ".local/share/opencode");const file = path.join(dir, "auth.json");let body: string;try {@@ -4321,24 +4292,19 @@ export function createOmniRouteConfigHook(now?: () => number;cache?: OmniRouteFetchCache;logger?: { warn: (...args: unknown[]) => void };- } = {},+ } = {}): (input: Config) => Promise<void> {const resolved = resolveOmniRoutePluginOptions(opts);const readAuthJson = deps.readAuthJson ?? defaultReadAuthJson;const fetcher = deps.fetcher ?? defaultOmniRouteModelsFetcher;const combosFetcher = deps.combosFetcher ?? defaultOmniRouteCombosFetcher;- const autoCombosFetcher =- deps.autoCombosFetcher ?? defaultOmniRouteAutoCombosFetcher;- const enrichmentFetcher =- deps.enrichmentFetcher ?? defaultOmniRouteEnrichmentFetcher;+ const autoCombosFetcher = deps.autoCombosFetcher ?? defaultOmniRouteAutoCombosFetcher;+ const enrichmentFetcher = deps.enrichmentFetcher ?? defaultOmniRouteEnrichmentFetcher;const compressionMetaFetcher =deps.compressionMetaFetcher ?? defaultOmniRouteCompressionMetaFetcher;- const providersFetcher =- deps.providersFetcher ?? defaultOmniRouteProvidersFetcher;- const diskSnapshotReader =- deps.diskSnapshotReader ?? defaultDiskSnapshotReader;- const diskSnapshotWriter =- deps.diskSnapshotWriter ?? defaultDiskSnapshotWriter;+ const providersFetcher = deps.providersFetcher ?? defaultOmniRouteProvidersFetcher;+ const diskSnapshotReader = deps.diskSnapshotReader ?? defaultDiskSnapshotReader;+ const diskSnapshotWriter = deps.diskSnapshotWriter ?? defaultDiskSnapshotWriter;const now = deps.now ?? Date.now;const cache: OmniRouteFetchCache = deps.cache ?? new Map();const logger = deps.logger ?? console;@@ -4354,14 +4320,10 @@ export function createOmniRouteConfigHook(// (e) operator override — `input.provider[providerId]` already set →// leave it alone. Manually curated catalogs ALWAYS win over the plugin's// generated block. Detect-and-respect before any I/O.- const existingProviders = (input as { provider?: Record<string, unknown> })- .provider;- if (- existingProviders &&- existingProviders[resolved.providerId] !== undefined- ) {+ const existingProviders = (input as { provider?: Record<string, unknown> }).provider;+ if (existingProviders && existingProviders[resolved.providerId] !== undefined) {logger.warn(- `[omniroute-plugin] config shim skipped: provider.${resolved.providerId} already set by user`,+ `[omniroute-plugin] config shim skipped: provider.${resolved.providerId} already set by user`);return;}@@ -4377,26 +4339,19 @@ export function createOmniRouteConfigHook(}if (authJson === null) {- logger.warn(- "[omniroute-plugin] config shim: auth.json failed to parse; treating as missing",- );+ logger.warn("[omniroute-plugin] config shim: auth.json failed to parse; treating as missing");authJson = undefined;}- const entry = authJson?.[resolved.providerId] as- | AuthJsonApiEntry- | undefined;- const apiKey =- entry && entry.type === "api" && typeof entry.key === "string"- ? entry.key- : "";+ const entry = authJson?.[resolved.providerId] as AuthJsonApiEntry | undefined;+ const apiKey = entry && entry.type === "api" && typeof entry.key === "string" ? entry.key : "";if (!apiKey) {// (c) no apiKey — silent no-op (with debug breadcrumb). The operator// hasn't run `/connect <providerId>` yet, OR the stored credential// isn't api-flavored. OC will handle the `/connect` flow at runtime.logger.warn(- `[omniroute-plugin] config shim skipped: no apiKey for providerId=${resolved.providerId}`,+ `[omniroute-plugin] config shim skipped: no apiKey for providerId=${resolved.providerId}`);return;}@@ -4404,12 +4359,11 @@ export function createOmniRouteConfigHook(// baseURL resolution: opts.baseURL wins, then auth.json's stored baseURL.// No silent localhost default — a misconfigured plugin should surface a// breadcrumb and skip, not phantom requests.- const storedBaseURL =- entry && typeof entry.baseURL === "string" ? entry.baseURL : undefined;+ const storedBaseURL = entry && typeof entry.baseURL === "string" ? entry.baseURL : undefined;const baseURL = resolved.baseURL ?? storedBaseURL ?? "";if (!baseURL) {logger.warn(- `[omniroute-plugin] config shim skipped: no baseURL for providerId=${resolved.providerId}`,+ `[omniroute-plugin] config shim skipped: no baseURL for providerId=${resolved.providerId}`);return;}@@ -4449,7 +4403,7 @@ export function createOmniRouteConfigHook(} catch (err) {logger.warn("[omniroute-plugin] config shim: /v1/models fetch failed; publishing stub provider entry",- err,+ err);rawModels = [];modelsFetchThrew = true;@@ -4462,7 +4416,7 @@ export function createOmniRouteConfigHook(} catch (err) {logger.warn("[omniroute-plugin] config shim: /api/combos fetch failed; publishing models-only static catalog",- err,+ err);}@@ -4489,7 +4443,7 @@ export function createOmniRouteConfigHook(} catch (err) {logger.warn("[omniroute-plugin] config shim: /api/pricing/models fetch failed; publishing raw-id static catalog",- err,+ err);}}@@ -4500,15 +4454,11 @@ export function createOmniRouteConfigHook(rawCompressionCombos = [];if (wantCompressionMeta) {try {- rawCompressionCombos = await compressionMetaFetcher(- baseURL,- apiKey,- 10_000,- );+ rawCompressionCombos = await compressionMetaFetcher(baseURL, apiKey, 10_000);} catch (err) {logger.warn("[omniroute-plugin] config shim: /api/context/combos fetch failed; publishing combos without compression suffix",- err,+ err);}}@@ -4524,7 +4474,7 @@ export function createOmniRouteConfigHook(} catch (err) {logger.warn("[omniroute-plugin] config shim: /api/providers fetch failed; usableOnly filter disabled for this refresh",- err,+ err);}}@@ -4539,7 +4489,7 @@ export function createOmniRouteConfigHook(const snapshot = await diskSnapshotReader(resolved.providerId);if (snapshot && snapshot.rawModels.length > 0) {logger.warn(- `[omniroute-plugin] config shim: /v1/models unreachable; using stale disk cache (${snapshot.rawModels.length} models)`,+ `[omniroute-plugin] config shim: /v1/models unreachable; using stale disk cache (${snapshot.rawModels.length} models)`);rawModels = snapshot.rawModels;rawCombos = snapshot.rawCombos;@@ -4601,7 +4551,7 @@ export function createOmniRouteConfigHook(rawEnrichment,rawCompressionCombos,rawConnections,- rawAutoCombos,+ rawAutoCombos);// Mutate the input.provider map. The Config type declares@@ -4627,7 +4577,7 @@ export function createOmniRouteConfigHook(const mcpKey = features.mcpToken ?? apiKey;if (!mcpKey) {logger.warn(- `[omniroute-plugin] mcp auto-emit skipped: no Bearer token for providerId=${resolved.providerId}`,+ `[omniroute-plugin] mcp auto-emit skipped: no Bearer token for providerId=${resolved.providerId}`);} else {const inputWithMcp = input as { mcp?: Record<string, unknown> };@@ -4636,7 +4586,7 @@ export function createOmniRouteConfigHook(}if (inputWithMcp.mcp[resolved.providerId] !== undefined) {logger.warn(- `[omniroute-plugin] mcp auto-emit skipped: mcp.${resolved.providerId} already set by user`,+ `[omniroute-plugin] mcp auto-emit skipped: mcp.${resolved.providerId} already set by user`);} else {// Strip a trailing `/v1` from baseURL when present so we land ondiff --git a/@omniroute/opencode-plugin/tests/combos.test.ts b/@omniroute/opencode-plugin/tests/combos.test.tsindex 32b5522d24..1b843cf151 100644--- a/@omniroute/opencode-plugin/tests/combos.test.ts+++ b/@omniroute/opencode-plugin/tests/combos.test.ts@@ -639,3 +639,74 @@ test("models(): combos fetcher receives the resolved baseURL + apiKey", async ()await hook.models!({} as never, { auth: apiAuth("sk-spy") as never });assert.deepEqual(combosFetcher.callsBy()[0], ["https://or.example.com/v1", "sk-spy"]);});++test("models(): nested combo-ref context is the min of nested + raw members", async () => {+ // Top-level combo MASTER-LIGHT has 1 raw model (claude-primary, 200k)+ // and 2 combo-refs: OldLLM (8k member) and KIRO (32k member). The OLD+ // plugin would advertise 200k (only the raw model); the fix should+ // make it advertise 8k (the bottleneck across the member graph).+ const modelsFetcher = stubModelsFetcher([+ MODEL_PRIMARY,+ {+ id: "oldllm-member-1",+ context_length: 8_000,+ max_output_tokens: 4_000,+ capabilities: {+ tool_calling: false,+ reasoning: false,+ vision: false,+ thinking: false,+ temperature: true,+ },+ input_modalities: ["text"],+ output_modalities: ["text"],+ },+ {+ id: "kiro-member-1",+ context_length: 32_000,+ max_output_tokens: 8_000,+ capabilities: {+ tool_calling: true,+ reasoning: false,+ vision: false,+ thinking: false,+ temperature: true,+ },+ input_modalities: ["text"],+ output_modalities: ["text"],+ },+ ]);+ const combosFetcher = stubCombosFetcher([+ {+ id: "oldllm",+ name: "OldLLM",+ models: [{ id: "s1", kind: "model", model: "oldllm-member-1", weight: 100 }],+ },+ {+ id: "kiro",+ name: "KIRO",+ models: [{ id: "s1", kind: "model", model: "kiro-member-1", weight: 100 }],+ },+ {+ id: "master-light",+ name: "MASTER-LIGHT",+ models: [+ { id: "r1", kind: "model", model: "claude-primary", weight: 50 },+ { id: "r2", kind: "combo-ref", comboName: "OldLLM", weight: 25 },+ { id: "r3", kind: "combo-ref", comboName: "KIRO", weight: 25 },+ ],+ },+ ]);+ const hook = createOmniRouteProviderHook(+ { baseURL: "https://or.example.com/v1" },+ { fetcher: modelsFetcher, combosFetcher }+ );+ const out = await hook.models!({} as never, { auth: apiAuth("sk-z") as never });+ const masterLight = out["combo/master-light"];+ assert.ok(masterLight, "MASTER-LIGHT entry must exist");+ assert.equal(+ masterLight.limit.context,+ 8_000,+ `expected 8_000 (OldLLM bottleneck), got ${masterLight.limit.context}`+ );+});diff --git a/@omniroute/opencode-plugin/tests/config-shim.test.ts b/@omniroute/opencode-plugin/tests/config-shim.test.tsindex ffe5c1a648..e95e108bec 100644--- a/@omniroute/opencode-plugin/tests/config-shim.test.ts+++ b/@omniroute/opencode-plugin/tests/config-shim.test.ts@@ -1362,3 +1362,57 @@ test("config: providerTag is idempotent — second hook call doesn't double-suff.omniroute;assert.equal(entryB.models["claude-sonnet-4-6"].name, "Claude - Claude Sonnet 4.6");});++// ────────────────────────────────────────────────────────────────────────────+// T-NN: nested combo-ref resolution in the static catalog+// (mirrors the dynamic-catalog fix in combos.test.ts)+// ────────────────────────────────────────────────────────────────────────────++test("buildStaticProviderEntry: nested combo-ref context is the bottleneck across the graph", () => {+ const resolved = resolveOmniRoutePluginOptions({ providerId: "omniroute" });+ const rawModels: OmniRouteRawModelEntry[] = [+ {+ id: "raw-big",+ context_length: 200_000,+ max_output_tokens: 64_000,+ capabilities: { tool_calling: true, reasoning: true, vision: false, temperature: true },+ input_modalities: ["text"],+ output_modalities: ["text"],+ },+ {+ id: "raw-tiny",+ context_length: 8_000,+ max_output_tokens: 4_000,+ capabilities: { tool_calling: false, reasoning: false, vision: false, temperature: true },+ input_modalities: ["text"],+ output_modalities: ["text"],+ },+ ];+ const rawCombos: OmniRouteRawCombo[] = [+ {+ id: "tiny-combo",+ name: "TinyCombo",+ models: [{ id: "m1", kind: "model", model: "raw-tiny", weight: 100 }],+ },+ {+ id: "parent",+ name: "Parent",+ models: [+ { id: "p1", kind: "model", model: "raw-big", weight: 50 },+ { id: "p2", kind: "combo-ref", comboName: "TinyCombo", weight: 50 },+ ],+ },+ ];+ const block = buildStaticProviderEntry(+ rawModels,+ rawCombos,+ resolved,+ "https://or.example/v1",+ "sk-test"+ );+ // Pre-fix: Parent would advertise 200_000 (only raw-big counted).+ // Post-fix: Parent should advertise 8_000 (TinyCombo bottleneck).+ const parent = block.models["combo/parent"];+ assert.ok(parent, "Parent combo must be in the static catalog");+ assert.equal(parent.limit?.context, 8_000);+});diff --git a/@omniroute/opencode-plugin/tsup.config.ts b/@omniroute/opencode-plugin/tsup.config.tsindex 97d4437dd8..209450e7aa 100644--- a/@omniroute/opencode-plugin/tsup.config.ts+++ b/@omniroute/opencode-plugin/tsup.config.ts@@ -2,7 +2,7 @@ import { defineConfig } from "tsup";export default defineConfig({entry: ["src/index.ts"],- format: ["esm", "cjs"],+ format: ["esm"],dts: true,clean: true,sourcemap: false,@@ -11,7 +11,7 @@ export default defineConfig({target: "node22",outDir: "dist",minify: false,- cjsInterop: true,+ cjsInterop: false,// Bundle runtime deps so the .tgz / npm install is self-contained.// `zod` is required at runtime by the options schema and would otherwise// need a peer install when the plugin is loaded directly from a file pathdiff --git a/AGENTS.md b/AGENTS.mdindex 9dec913a17..04e716ed76 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -3,13 +3,13 @@## ProjectUnified AI proxy/router — route any LLM through one endpoint. Multi-provider support-with **232 provider entries** (OpenAI, Anthropic, Gemini, DeepSeek, Groq, xAI, Mistral, Fireworks,+with **226 provider entries** (OpenAI, Anthropic, Gemini, DeepSeek, Groq, xAI, Mistral, Fireworks,Cohere, NVIDIA, Cerebras, Pollinations, Puter, Cloudflare AI, HuggingFace, DeepInfra,SambaNova, Meta Llama API, Moonshot AI, AI21 Labs, Databricks, Snowflake, and many more)with **MCP Server** (87 tools), **A2A v0.3 Protocol**, and **Electron desktop app**.-> **Live counts (v3.8.24)**: providers 232 · MCP tools 87 · MCP scopes 30 · A2A skills 6 ·-> open-sse services 115 · routing strategies 15 · auto-combo scoring factors 12 ·+> **Live counts (v3.8.24)**: providers 226 · MCP tools 87 · MCP scopes 30 · A2A skills 6 ·+> open-sse services 115 · routing strategies 15 · auto-combo scoring factors 9 ·> DB modules 83 · DB migrations 97 · base tables 17 · search providers 11 ·> i18n locales 42. **Refresh with `npm run check:docs-all`.**diff --git a/CHANGELOG.md b/CHANGELOG.mdindex bcdcd4e4b5..2ab56d55b9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,68 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **fix(providers): keep the `/v1/models` catalog alias-only (release-time follow-up to #3870)** — #3870 made `generateModels()` also key the registry by each provider's raw id, which surfaced phantom `opencode/*` entries in `/v1/models` that collide with the `opencode/` → opencode-zen route (a regression vs v3.8.25, caught by the #2798 catalog regression test). `getProviderModels()` now resolves a raw provider id to its alias at lookup time instead of mirroring raw-id keys into the model namespace, preserving #3870's intent (`getProviderModels("github")` returns the same models as the `gh` alias) without polluting the public catalog. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @diegosouzapw / @YunyunZhai)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): add an OpenAPI breaking-change gate (oasdiff, advisory) + fix dangling `$ref`s** — a CI gate diffs the OpenAPI spec against the base branch (`BASE_REF`) with oasdiff to surface breaking API changes, and the spec's dangling `$ref`s were repaired. ([#3951](https://github.com/diegosouzapw/OmniRoute/pull/3951) — thanks @diegosouzapw)+- **ci(quality): add a schemathesis API-fuzz nightly (advisory)** — a nightly schemathesis property/fuzz pass against the OpenAPI spec (Quality Gates Fase 8 · Bloco B.4, advisory). ([#3956](https://github.com/diegosouzapw/OmniRoute/pull/3956) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/CLAUDE.md b/CLAUDE.mdindex 9ee18e58c4..353a925c4d 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -35,7 +35,7 @@ For full test matrix, see `CONTRIBUTING.md` → "Running Tests". For deep archit## Project at a Glance-**OmniRoute** — unified AI proxy/router. One endpoint, 160+ LLM providers, auto-fallback.+**OmniRoute** — unified AI proxy/router. One endpoint, 226 LLM providers, auto-fallback.| Layer | Location | Purpose || ------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |@@ -327,33 +327,33 @@ connection continue serving other models.For any non-trivial change, read the matching deep-dive first:-| Area | Doc |-| -------------------------------------------- | ----------------------------------------------------------------- |-| Repo navigation | `docs/architecture/REPOSITORY_MAP.md` |-| Architecture | `docs/architecture/ARCHITECTURE.md` |-| Engineering reference | `docs/architecture/CODEBASE_DOCUMENTATION.md` |-| Auto-Combo (9-factor scoring, 15 strategies) | `docs/routing/AUTO-COMBO.md` |-| Resilience (3 mechanisms) | `docs/architecture/RESILIENCE_GUIDE.md` |-| Reasoning replay | `docs/routing/REASONING_REPLAY.md` |-| Skills framework | `docs/frameworks/SKILLS.md` |-| Memory system (FTS5 + Qdrant) | `docs/frameworks/MEMORY.md` |-| Cloud agents | `docs/frameworks/CLOUD_AGENT.md` |-| Guardrails (PII / injection / vision) | `docs/security/GUARDRAILS.md` |-| Public upstream credentials (Gemini/etc.) | `docs/security/PUBLIC_CREDS.md` |-| Error message sanitization | `docs/security/ERROR_SANITIZATION.md` |-| Evals | `docs/frameworks/EVALS.md` |-| Compliance / audit | `docs/security/COMPLIANCE.md` |-| Webhooks | `docs/frameworks/WEBHOOKS.md` |-| Authorization pipeline | `docs/architecture/AUTHZ_GUIDE.md` |-| Stealth (TLS / fingerprint) | `docs/security/STEALTH_GUIDE.md` |-| Agent protocols (A2A / ACP / Cloud) | `docs/frameworks/AGENT_PROTOCOLS_GUIDE.md` |-| MCP server | `docs/frameworks/MCP-SERVER.md` |-| A2A server | `docs/frameworks/A2A-SERVER.md` |-| API reference + OpenAPI | `docs/reference/API_REFERENCE.md` + `docs/reference/openapi.yaml` |-| Provider catalog (auto-generated) | `docs/reference/PROVIDER_REFERENCE.md` |-| Release flow | `docs/ops/RELEASE_CHECKLIST.md` |-| Embedded services | `docs/frameworks/EMBEDDED-SERVICES.md` |-| Quality gates (35 gates, allowlist policy) | `docs/architecture/QUALITY_GATES.md` |+| Area | Doc |+| --------------------------------------------- | ----------------------------------------------------------------- |+| Repo navigation | `docs/architecture/REPOSITORY_MAP.md` |+| Architecture | `docs/architecture/ARCHITECTURE.md` |+| Engineering reference | `docs/architecture/CODEBASE_DOCUMENTATION.md` |+| Auto-Combo (9-factor scoring, 15 strategies) | `docs/routing/AUTO-COMBO.md` |+| Resilience (3 mechanisms) | `docs/architecture/RESILIENCE_GUIDE.md` |+| Reasoning replay | `docs/routing/REASONING_REPLAY.md` |+| Skills framework | `docs/frameworks/SKILLS.md` |+| Memory system (FTS5 + Qdrant) | `docs/frameworks/MEMORY.md` |+| Cloud agents | `docs/frameworks/CLOUD_AGENT.md` |+| Guardrails (PII / injection / vision) | `docs/security/GUARDRAILS.md` |+| Public upstream credentials (Gemini/etc.) | `docs/security/PUBLIC_CREDS.md` |+| Error message sanitization | `docs/security/ERROR_SANITIZATION.md` |+| Evals | `docs/frameworks/EVALS.md` |+| Compliance / audit | `docs/security/COMPLIANCE.md` |+| Webhooks | `docs/frameworks/WEBHOOKS.md` |+| Authorization pipeline | `docs/architecture/AUTHZ_GUIDE.md` |+| Stealth (TLS / fingerprint) | `docs/security/STEALTH_GUIDE.md` |+| Agent protocols (A2A / ACP / Cloud) | `docs/frameworks/AGENT_PROTOCOLS_GUIDE.md` |+| MCP server | `docs/frameworks/MCP-SERVER.md` |+| A2A server | `docs/frameworks/A2A-SERVER.md` |+| API reference + OpenAPI | `docs/reference/API_REFERENCE.md` + `docs/reference/openapi.yaml` |+| Provider catalog (auto-generated) | `docs/reference/PROVIDER_REFERENCE.md` |+| Release flow | `docs/ops/RELEASE_CHECKLIST.md` |+| Embedded services | `docs/frameworks/EMBEDDED-SERVICES.md` |+| Quality gates (~48 scripts, allowlist policy) | `docs/architecture/QUALITY_GATES.md` |---@@ -406,6 +406,42 @@ git push -u origin feat/your-feature- **pre-commit**: lint-staged + `check-docs-sync` + `check:any-budget:t11`- **pre-push**: fast deterministic gates (`check:any-budget:t11` + `check:tracked-artifacts`); intentionally excludes `test:unit` (slow — covered by the CI `test-unit` job). Activated 2026-06-13 (Quality Gates Fase 6A.12).+### Worktree isolation (MANDATORY for every development task)++Multiple sessions/agents work this repo in parallel. The main checkout is **shared**, so a+`git checkout`/branch switch in it silently discards another session's uncommitted work and+yanks the branch out from under whatever else is running (incidents: 2026-06-05, 2026-06-13).++**Rule: never develop on the shared main checkout. Every task gets its own git worktree on its+own dedicated branch, and you MUST confirm the base branch with the operator before creating it.**++1. **Ask first — which base branch?** Before creating anything, ask the operator (via+ `AskUserQuestion`, unless they already told you) from which branch the new worktree/branch+ should be cut. Do NOT assume `main` or "whatever I'm on" — the answer is usually the active+ `release/vX.Y.Z`, but it can be another feature/release branch. Get the base explicitly.+2. **Create an isolated worktree + branch off that base** (never reuse the main checkout):++ ```bash+ BASE_BRANCH="release/vX.Y.Z" # ← the branch the operator confirmed in step 1+ TASK="feat/your-feature" # feat/ fix/ refactor/ docs/ test/ chore/+ git fetch origin "$BASE_BRANCH"+ git worktree add ".worktrees/${TASK##*/}" -b "$TASK" "origin/$BASE_BRANCH"+ cd ".worktrees/${TASK##*/}"+ # symlink node_modules from the main checkout to skip a per-worktree npm install:+ ln -s "$(git -C <main_checkout> rev-parse --show-toplevel)/node_modules" node_modules+ ```++ In Claude Code prefer the native `EnterWorktree` tool (create the worktree with the command+ above, then call `EnterWorktree` with its `path`).+3. **Work, commit, push, open the PR — all from inside the worktree.** Never `git checkout` a+ different branch inside a worktree another session might share.+4. **Tear down only your own** worktree + branch when done, from the main checkout:+ `git worktree remove .worktrees/<dir>` then `git branch -D <task>`. Never blanket-delete+ `fix/*`/`feat/*` — other sessions keep their own; delete only the branches you created, by name.+5. **Never touch another session's worktree, branch, or uncommitted changes.** If `git worktree+ list` shows worktrees you didn't create, leave them alone. End every session with the main+ checkout back on the branch it started on (the active `release/vX.Y.Z`, never `main`).+---## Environment@@ -422,13 +458,17 @@ git push -u origin feat/your-feature## Quality Gates & Ratchets-OmniRoute has **35 CI quality gates** wired across 6 jobs in `.github/workflows/ci.yml`.-Full inventory, per-job breakdown, and operational procedures are in-[`docs/architecture/QUALITY_GATES.md`](docs/architecture/QUALITY_GATES.md).+OmniRoute has **~48 quality-gate scripts** (`scripts/check/` + `scripts/quality/`) wired+across **9 gate-running jobs** in `.github/workflows/ci.yml` (`lint`, `quality-gate`,+`quality-extended`, `docs-sync-strict`, `i18n-ui-coverage`, `i18n`, `pr-test-policy`,+`test-vitest`, `sonarqube`), plus the `quality.yml` fast-gates job (PR→`release/**`) and+3 nightly workflows (`nightly-property`, `nightly-resilience`, `nightly-llm-security`;+`nightly-mutation` once merged). Full inventory, per-job breakdown, and operational+procedures are in [`docs/architecture/QUALITY_GATES.md`](docs/architecture/QUALITY_GATES.md).**Quick reference:**-- Gates in job `lint` (18 checks) + `docs-sync-strict` (12 checks): pass/fail policy gates —+- Gates in jobs `lint` + `docs-sync-strict`: pass/fail policy gates —fix the violation or add an allowlist entry with a justification comment + tracking issue.- Gates in job `quality-gate`: ratchet — metrics (ESLint warnings, code coverage, duplication,complexity) must not regress vs `quality-baseline.json`. Update via@@ -463,6 +503,7 @@ the stale-enforcement added in Fase 6A.3.16. Never include `Co-Authored-By` trailers that credit an AI assistant, LLM, or automation account (e.g. names containing "Claude", "GPT", "Copilot", "Bot"; emails at `anthropic.com` / `openai.com` / bot-owned `noreply.github.com` addresses). Such trailers route attribution to the bot account on GitHub, hiding the real author (`diegosouzapw`) in PR history. Human collaborators — including upstream PR authors and issue reporters being ported into OmniRoute — MAY and SHOULD be credited with standard `Co-authored-by: Name <email>` trailers; the upstream-port workflows (`/port-upstream-features`, `/port-upstream-issues`) depend on this.17. Never expose routes under `/api/services/` or `/dashboard/providers/services/*/embed/` without `isLocalOnlyPath()` classification in `src/server/authz/routeGuard.ts`. These routes can spawn child processes (`npm install`, `node`). Loopback enforcement happens unconditionally before any auth check — a leaked JWT via tunnel cannot trigger process spawning. See `docs/security/ROUTE_GUARD_TIERS.md`.18. Every bug fix must be validated before shipping: a failing-then-passing unit/integration test (TDD) OR a documented live test on the production VPS (192.168.0.15). A fix without either is not merged. See Testing → "Bug fix / issue triage protocol" for the full decision tree.+19. Never develop on the shared main checkout. Every development task runs in its own git worktree on its own dedicated branch, and you MUST confirm the base branch with the operator (e.g. via `AskUserQuestion`) before creating the worktree/branch — never assume `main` or the currently checked-out branch. A `git checkout` in the shared checkout silently destroys other sessions' uncommitted work. Tear down only the worktrees/branches you created (by name, never `fix/*`/`feat/*` wildcards), leave other sessions' worktrees untouched, and end on the branch you started on (the active `release/vX.Y.Z`, never `main`). See Git Workflow → "Worktree isolation".---diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex ba211765d5..25ed28a6a4 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -71,11 +71,11 @@ PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev### Build Output Layout-| Directory | Contents | Tracked |-| ---------- | ------------------------------------------- | ------- |-| `src/` | Application source (TypeScript / TSX) | Yes |-| `.build/` | Intermediates — `next build` output (gitignored, `distDir = .build/next`) | No |-| `dist/` | Shippable bundle — assembled by `assembleStandalone` (gitignored) | No |+| Directory | Contents | Tracked |+| --------- | ------------------------------------------------------------------------- | ------- |+| `src/` | Application source (TypeScript / TSX) | Yes |+| `.build/` | Intermediates — `next build` output (gitignored, `distDir = .build/next`) | No |+| `dist/` | Shippable bundle — assembled by `assembleStandalone` (gitignored) | No |The build pipeline is a single pass:@@ -252,7 +252,7 @@ open-sse/ # @omniroute/open-sse workspaceelectron/ # Electron desktop app (cross-platform)tests/-├── unit/ # Node.js test runner (122 test files)+├── unit/ # Node.js test runner (1,574 test files)├── integration/ # Integration tests├── e2e/ # Playwright tests├── security/ # Security testsdiff --git a/README.md b/README.mdindex 950f1b2730..b2783bea12 100644--- a/README.md+++ b/README.md@@ -6,7 +6,7 @@# 🚀 OmniRoute — The Free AI Gateway-### Never stop coding. Connect every AI tool to **177 providers** — **50+ free** — through one endpoint.+### Never stop coding. Connect every AI tool to **226 providers** — **50+ free** — through one endpoint.**Plug Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini. Auto-fallback.**<br/>@@ -19,8 +19,8 @@<br/>-[](#-177-ai-providers--50-free)-[](#-177-ai-providers--50-free)+[](#-226-ai-providers--50-free)+[](#-226-ai-providers--50-free)[](docs/reference/FREE_TIERS.md)[](#%EF%B8%8F-save-1595-tokens--automatically)[](#-combos--the-flagship)@@ -59,7 +59,7 @@<br/>-[**🚀 Quick Start**](#-quick-start) • [**🎯 Combos**](#-combos--the-flagship) • [**🌐 Providers**](#-177-ai-providers--50-free) • [**🔌 CLI & MCP**](#-full-cli--a2a--mcp) • [**🗜️ Compression**](#%EF%B8%8F-save-1595-tokens--automatically) • [**🌍 Website**](https://omniroute.online)+[**🚀 Quick Start**](#-quick-start) • [**🎯 Combos**](#-combos--the-flagship) • [**🌐 Providers**](#-226-ai-providers--50-free) • [**🔌 CLI & MCP**](#-full-cli--a2a--mcp) • [**🗜️ Compression**](#%EF%B8%8F-save-1595-tokens--automatically) • [**🌍 Website**](https://omniroute.online)[💥 The Promise](#-the-promise) • [🤔 Why](#-why-omniroute) • [🏆 What Sets Apart](#-what-sets-omniroute-apart) • [🤖 Compatible CLIs](#-compatible-clis--coding-agents) • [🖥️ Where It Runs](#%EF%B8%8F-where-omniroute-runs--anywhere) • [🔒 Private](#-private--local-first) • [🎬 In Action](#-omniroute-in-action) • [📚 Explore More](#-explore-more) • [📧 Support](#-support--community)@@ -136,18 +136,18 @@</div>-> One endpoint. **177 providers.** Never stop building — and let OmniRoute pick the cheapest one that works.+> One endpoint. **226 providers.** Never stop building — and let OmniRoute pick the cheapest one that works.<table><tr>- <td width="33%" valign="top"><b>🚫 Never hit limits</b><br/><sub>Auto-fallback across 177 providers in milliseconds. Quota out? Next provider takes over — zero downtime.</sub></td>+ <td width="33%" valign="top"><b>🚫 Never hit limits</b><br/><sub>Auto-fallback across 226 providers in milliseconds. Quota out? Next provider takes over — zero downtime.</sub></td><td width="33%" valign="top"><b>💸 Save up to 95% tokens</b><br/><sub>RTK + Caveman stacked compression cuts 15–95% of eligible tokens (~89% avg on tool-heavy sessions).</sub></td><td width="33%" valign="top"><b>🆓 $0 to start</b><br/><sub>50+ providers with a free tier, 11 free <i>forever</i> (Kiro, Qoder, Pollinations, LongCat…). No card needed.</sub></td></tr><tr><td width="33%" valign="top"><b>🔌 Every tool works</b><br/><sub>16+ coding agents — Claude Code, Codex, Cursor, Cline, Copilot, Antigravity — through one config.</sub></td><td width="33%" valign="top"><b>🧩 One endpoint</b><br/><sub>OpenAI ↔ Claude ↔ Gemini ↔ Responses API translation. Point any tool at <code>/v1</code> and it just works.</sub></td>- <td width="33%" valign="top"><b>🛡️ Production-grade</b><br/><sub>Circuit breakers, TLS stealth, MCP (87 tools), A2A, memory, guardrails, evals. 4,690+ tests.</sub></td>+ <td width="33%" valign="top"><b>🛡️ Production-grade</b><br/><sub>Circuit breakers, TLS stealth, MCP (87 tools), A2A, memory, guardrails, evals. 14,965 tests.</sub></td></tr></table>@@ -263,7 +263,7 @@ Result: 4 layers of fallback = zero downtime| Feature | OmniRoute | Other routers || -------------------------------------- | ----------------------------------------------------------- | ------------- |-| 🌐 Providers | **177** | 20–100 |+| 🌐 Providers | **226** | 20–100 || 🆓 Free providers | **50+ (11 free forever)** | 1–5 || 🔀 Routing strategies | **15** (priority, weighted, cost-optimized, context-relay…) | 1–3 || 🗜️ Token compression | **RTK + Caveman stacked (15–95%)** | None / 20–40% |@@ -274,7 +274,7 @@ Result: 4 layers of fallback = zero downtime| ☁️ Cloud agents | **Codex, Devin, Jules** | None || 🥷 TLS fingerprint stealth | **JA3/JA4 via wreq-js** | None || 🖥️ Multi-platform | **Web · Desktop · Termux · PWA** | Web only |-| 🌍 i18n | **40+ locales** | 0–4 |+| 🌍 i18n | **42 locales** | 0–4 |<sub>📊 Detailed comparison vs LiteLLM, OpenRouter & Portkey → [`docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md`](docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md)</sub>@@ -319,11 +319,11 @@ Result: 4 layers of fallback = zero downtime<div align="center">-# 🌐 177 AI Providers — 50+ Free+# 🌐 226 AI Providers — 50+ Free</div>-> The most complete catalog of any open-source router: **177 providers**, **50+ with a free tier**, **11 free forever**.+> The most complete catalog of any open-source router: **226 providers**, **50+ with a free tier**, **11 free forever**.<div align="center">@@ -439,7 +439,25 @@ claude mcp add-server omniroute --type http --url http://localhost:20128/api/mcp</div>-> **Why use many token when few token do trick?** Every request passes through OmniRoute's compression pipeline **transparently** — no client changes. It stacks ideas from [RTK](https://github.com/rtk-ai/rtk), [Caveman](https://github.com/JuliusBrussee/caveman) (⭐ 51K+), and [Troglodita](https://github.com/leninejunior/troglodita) (PT-BR).+> **Why use many token when few token do trick?** Every request passes through OmniRoute's compression pipeline **transparently** — no client changes. It's now a **stack of 9 composable engines** that run in order and mix & match per routing combo — building on ideas from [RTK](https://github.com/rtk-ai/rtk), [Caveman](https://github.com/JuliusBrussee/caveman) (⭐ 51K+), [LLMLingua-2](https://github.com/microsoft/LLMLingua), and [Troglodita](https://github.com/leninejunior/troglodita) (PT-BR).++### 🧱 The 9-engine stack++Engines run in pipeline order; each is independently toggleable and configurable per combo:++| # | Engine | What it does |+| --- | ----------------- | ------------------------------------------------------------------------ |+| 1 | **Session-Dedup** | Drops content repeated across turns (content-addressed, cross-turn) |+| 2 | **CCR** | Archives large blocks behind retrieve markers, fetched on demand |+| 3 | **RTK** | Smart tool-result filtering, dedup & truncation (command-aware) |+| 4 | **Headroom** | Lossless tabular compaction of homogeneous JSON arrays (~30%+) |+| 5 | **Caveman** | Rule-based prose compression (~65–75% on output) |+| 6 | **LLMLingua-2** | ML semantic pruning via MobileBERT ONNX — code-safe, async |+| 7 | **Lite** | Whitespace + image-URL trimming (latency-light baseline) |+| 8 | **Aggressive** | Summarization + progressive aging of old turns |+| 9 | **Ultra** | Heuristic token pruning with an optional small-model (SLM) tier |++Code blocks, URLs and structured data are **always preserved** byte-perfect. **One-click presets** combine the engines:| Mode | Savings | Best for || ------------------------------ | ---------- | --------------------------- |@@ -471,7 +489,7 @@ claude mcp add-server omniroute --type http --url http://localhost:20128/api/mcp### 📖 How it works — pipeline, architecture & savings math```-Client (10,000 tok) ──▶ OmniRoute Compression (7 options) ──▶ Provider (~1,080 tok, up to 95% saved)+Client (10,000 tok) ──▶ OmniRoute Compression (9 engines) ──▶ Provider (~1,080 tok, up to 95% saved)```Default stacked combo runs `RTK → Caveman`. When both act on the same tool/context payload, savings compound:@@ -733,7 +751,7 @@ Compression: aggressive (~50%) → double your free quota · Cost: $0/mo**Will I be charged by OmniRoute?** No — it's free, open-source software on your machine. You only pay paid providers directly. OmniRoute has no billing system.**Are FREE providers really unlimited?** Yes — Kiro, Qoder, Pollinations, LongCat, Cloudflare. No catch.**Will compression hurt quality?** No — it only compresses the **input**; code, URLs, JSON are always protected.-**Does it work where AI is blocked?** Yes — 3-level proxy + 1proxy marketplace reach all 177 providers.+**Does it work where AI is blocked?** Yes — 3-level proxy + 1proxy marketplace reach all 226 providers.📖 [User Guide](docs/guides/USER_GUIDE.md) · [API Reference](docs/reference/API_REFERENCE.md) · [Environment Config](docs/reference/ENVIRONMENT.md)@@ -803,7 +821,7 @@ Compression: aggressive (~50%) → double your free quota · Cost: $0/mo- **Protocols**: MCP (stdio/HTTP) + A2A v0.3 (JSON-RPC 2.0 + SSE)- **Streaming**: Server-Sent Events (SSE) + WebSocket bridge (`/v1/ws`)- **Auth**: OAuth 2.0 (PKCE) + JWT + API Keys + MCP Scoped Authorization-- **Testing**: Node.js test runner + Vitest (**4,690+ test cases** across 517 files — unit, integration, E2E, security, ecosystem)+- **Testing**: Node.js test runner + Vitest (**14,965 test cases** across 517 files — unit, integration, E2E, security, ecosystem)- **Platforms**: Desktop (Electron), Android (Termux), PWA (any browser)- **CI/CD**: GitHub Actions (auto npm publish + Docker Hub on release)- **Website**: [omniroute.online](https://omniroute.online)@@ -878,7 +896,7 @@ Compression: aggressive (~50%) → double your free quota · Cost: $0/mo| [Security Policy](SECURITY.md) | Vulnerability reporting and security practices || [i18n Guide](docs/guides/I18N.md) | 40+ language support, translation workflow, RTL || [Release Checklist](docs/ops/RELEASE_CHECKLIST.md) | Pre-release validation steps |-| [Coverage Plan](docs/ops/COVERAGE_PLAN.md) | Test coverage strategy and 4,690+ test suite |+| [Coverage Plan](docs/ops/COVERAGE_PLAN.md) | Test coverage strategy and 14,965 test suite |<br/>diff --git a/bin/cli/commands/setup-open-code.mjs b/bin/cli/commands/setup-open-code.mjsindex b23103f51e..2ad7aa9870 100644--- a/bin/cli/commands/setup-open-code.mjs+++ b/bin/cli/commands/setup-open-code.mjs@@ -44,8 +44,7 @@ const PACKAGE_ROOT = resolve(__dirname, "..", "..", "..");// (see root package.json `files`: ["@omniroute/", ...]). The env override// exists so tests can point at a fixture without building the real plugin.const BUNDLED_PLUGIN_DIR =- process.env.OMNIROUTE_OPENCODE_PLUGIN_DIR ||- join(PACKAGE_ROOT, "@omniroute", "opencode-plugin");+ process.env.OMNIROUTE_OPENCODE_PLUGIN_DIR || join(PACKAGE_ROOT, "@omniroute", "opencode-plugin");/*** Resolve the OpenCode config directory. Honours XDG_CONFIG_HOME and the@@ -89,7 +88,7 @@ function resolveOpenCodeDirs() {* a clear error instead of running tsup here, because the CLI runtime* may not have tsup available (it's a devDependency).*- * @returns {{ distEntry: string, cjsEntry: string, packageDir: string }}+ * @returns {{ distEntry: string, packageDir: string }}*/function resolveBundledPlugin() {if (!existsSync(BUNDLED_PLUGIN_DIR)) {@@ -102,17 +101,17 @@ function resolveBundledPlugin() {}const esmEntry = join(BUNDLED_PLUGIN_DIR, "dist", "index.js");- const cjsEntry = join(BUNDLED_PLUGIN_DIR, "dist", "index.cjs");- if (!existsSync(esmEntry) || !existsSync(cjsEntry)) {+ if (!existsSync(esmEntry)) {throw new Error(`@omniroute/opencode-plugin dist/ not built (looked for ${esmEntry}).\n` +`Run \`cd ${BUNDLED_PLUGIN_DIR} && npm install && npm run build\` and re-run this command.`);}- // Prefer ESM. OpenCode (≥1.15) loads ESM modules natively.- return { distEntry: esmEntry, cjsEntry, packageDir: BUNDLED_PLUGIN_DIR };+ // ESM-only build (CJS was dropped in tsup config). OpenCode (>=1.15) loads+ // ESM modules natively.+ return { distEntry: esmEntry, packageDir: BUNDLED_PLUGIN_DIR };}/**diff --git a/.license-allowlist.json b/config/quality/.license-allowlist.jsonsimilarity index 100%rename from .license-allowlist.jsonrename to config/quality/.license-allowlist.jsondiff --git a/complexity-baseline.json b/config/quality/complexity-baseline.jsonsimilarity index 100%rename from complexity-baseline.jsonrename to config/quality/complexity-baseline.jsondiff --git a/dependency-allowlist.json b/config/quality/dependency-allowlist.jsonsimilarity index 96%rename from dependency-allowlist.jsonrename to config/quality/dependency-allowlist.jsonindex e43b815de5..05f0b51c93 100644--- a/dependency-allowlist.json+++ b/config/quality/dependency-allowlist.json@@ -13,6 +13,9 @@"@ngrok/ngrok","@opencode-ai/plugin","@playwright/test",+ "@size-limit/file",+ "@stryker-mutator/core",+ "@stryker-mutator/tap-runner","@swc/helpers","@tailwindcss/postcss","@testing-library/jest-dom",diff --git a/duplication-baseline.json b/config/quality/duplication-baseline.jsonsimilarity index 100%rename from duplication-baseline.jsonrename to config/quality/duplication-baseline.jsondiff --git a/file-size-baseline.json b/config/quality/file-size-baseline.jsonsimilarity index 74%rename from file-size-baseline.jsonrename to config/quality/file-size-baseline.jsonindex 7dbcc932a7..558cd45551 100644--- a/file-size-baseline.json+++ b/config/quality/file-size-baseline.json@@ -2,9 +2,23 @@"_comment": "Catraca de tamanho (check-file-size.mjs). frozen so pode encolher; arquivos novos <= cap. --update ratcheta.","_rebaseline_v3.8.25": "Drift consciente do ciclo v3.8.24->v3.8.25 (features #3799-#3806: free-provider-rankings, plugins menu, proxy IP-family selector). 3 arquivos cresceram por feature legitima, nao por regressao de qualidade: ProxyRegistryManager.tsx 1072->1089, sidebarVisibility.ts 990->1006, schemas.ts 2519->2522. Encolher fica como debt para um refactor dedicado.","_rebaseline_2026_06_15_3860_compression_ui": "PR #3860 own growth: sidebarVisibility.ts 1006->1100 (+94 = Compression Hub menu entries: Hub + per-engine Lite/Aggressive/Ultra pages + combos editor) and chatCore.ts 5812->5815 (+3 = compression UI config wiring). Cohesive feature growth, not a quality regression.",+ "_rebaseline_2026_06_15_3885_glm_5_2": "PR #3885 own growth: pricing.ts 1508->1529 (+21 = GLM-5.2 pricing rows for glm-5.2 + effort aliases glm-5.2-high/-max, same $1.2/$5 schedule as glm-5.1; pure data). Also adds glm-5.2 specs to glmProvider.ts/modelSpecs.ts (modelSpecs.ts stays under cap). Cohesive model registration; not extractable.",+ "_rebaseline_2026_06_15_3870_alias_lookup": "PR #3870 own growth: providerRegistry.ts 4703->4708 (+5 = generateModels() also stores each provider's models under its raw id, not only its alias, so getProviderModels(rawId) works when alias != id e.g. github->gh; preserves the existing first-wins guard). Cohesive registry fix; not extractable.",+ "_rebaseline_2026_06_15_3846_sticky_combo_rr": "PR #3846 own growth: combo.ts 5204->5277 (+73 = combo-level sticky round-robin reusing the existing global stickyRoundRobinLimit knob #3847 added for account fallback: rrStickyTargets map + clampStickyRoundRobinTargetLimit + getStickyRoundRobinStartIndex/recordStickyRoundRobinSuccess helpers wired into handleRoundRobinCombo, with sticky-eviction tied to rrCounters eviction). Cohesive routing logic in the combo handler; not a movable block. Structural shrink of combo.ts tracked in #3501.",+ "_rebaseline_2026_06_15_3907_zai_validator": "PR #3907 own growth: validation.ts 4348->4394 (+46 = a zai (z.ai/glm) validator using directHttpsRequest to bypass the undici pool — same anti-zombie-socket pattern as nvidia #3226 — since z.ai drops idle keep-alive sockets without TCP RST after 502s. Anthropic wire format, x-api-key, 401/403->invalid else->valid). Cohesive validator branch; not extractable. (The global keepAlive 4000->1000 change from the original PR was reverted on review — scoped to the zai validator only.)",+ "_rebaseline_2026_06_15_3906_proxy_direct_fallback": "PR #3906 own growth: oauth/[provider]/[action]/route.ts 916->918 (+2 = swap runWithProxyContext -> runWithProxyContextOrDirect at the control-plane callsites so a dead pinned proxy degrades to a direct connection instead of a 500; the longer call name + a prettier reflow add the lines). Cohesive control-plane change; not extractable.",+ "_rebaseline_2026_06_15_3871_empty_pool": "PR #3871 own growth: combo.ts 5203->5204 (+1 = guard expandAutoComboCandidatePool against an empty candidatePool array — Array.isArray(pool) && pool.length > 0 so [] falls through to active-connection expansion instead of early-returning). One-line correctness fix; not extractable.",+ "_rebaseline_2026_06_15_3911_sse_role": "PR #3911 own growth: openai-responses.ts 878->903 (+25 = withAssistantRoleOnFirstDelta wrapper that synthesizes role=assistant on the first Responses->Chat delta so strict streaming clients (langchain/n8n) do not drop tool_call deltas). Cohesive translator fix; not extractable.",+ "_rebaseline_2026_06_15_3881_nous_validator": "Issue #3881 own growth: validation.ts 4394->4407 (+13 = treat any non-auth 4xx (400/404/422) from the Nous Research probe as a valid key — the request shape/model was wrong, not the credentials — mirroring the longcat/nvidia validators, plus the corrected Hermes-4-70B probe model). Cohesive validator branch; not extractable.",+ "_rebaseline_2026_06_15_3877_byteplus": "Issue #3877 own growth: providerRegistry.ts 4708->4730 (+22 = a byteplus (BytePlus ModelArk) registry entry — OpenAI-compatible, Ark base ap-southeast-1, Bearer, 4 seed models — modeled on the volcengine entry; byteplus was in APIKEY_PROVIDERS but unregistered here so validation returned {unsupported:true}). Cohesive provider registration; not extractable.",+ "_rebaseline_2026_06_15_3910_nested_combo_ctx": "PR #3910 net +1: providerRegistry.ts 4730->4731 (test-registry contextLength metadata for the nested combo-ref LCD regression test). opencode-plugin-only behavioral change; no core routing/virtualFactory touched.",+ "_rebaseline_2026_06_15_3929_vertex_media": "PR #3929 own growth: audioSpeech.ts 952->965 (+13) and videoGeneration.ts 1026->1078 (+52) = vertex/* media branches (Gemini TTS, Veo predictLongRunning poll) wired into the speech/video handlers; new logic lives in open-sse/executors/vertexMedia.ts (341, under cap). Cohesive media-provider feature.",+ "_rebaseline_2026_06_15_3879_redact_thinking": "PR #3879 + #3921 reconcile: AddApiKeyModal.tsx 843->845 (+2 = merging #3879's CcCompatibleRequestDefaultsFields (context1m + opt-in redact-thinking toggle) into #3921's preset-input block in the cc-compatible settings group). Cohesive UI; not extractable.",+ "_rebaseline_2026_06_15_3890_cache_preserve": "Issue #3890 own growth: chatCore.ts 5815->5823 (+8 = wire resolveCacheAwareConfig() into the compression apply step so the system prompt is never compressed in a caching context — honors the cache-aware skipSystemPrompt flag that selectCompressionStrategy could not carry). Cohesive cache-preservation guard at the existing compression chokepoint; not extractable.",+ "_rebaseline_2026_06_15_3938_perplexity_v218": "PR #3938 own growth: perplexity-web.ts 868->939 (+71 = rebuild buildPplxRequestBody to mirror the current www.perplexity.ai schematized request body — version 2.18, use_schematized_api + the full supported_block_use_cases list, dsl_query, shared requestId for frontend_uuid/client_search_results_cache_key, last_backend_uuid only on follow-ups — plus the x-perplexity-request-* / x-request-id headers replacing the stale X-App-ApiVersion pair that triggered HTTP 400). Cohesive upstream-schema sync in a single executor; not extractable.","cap": 800,"frozen": {- "open-sse/config/providerRegistry.ts": 4703,+ "open-sse/config/providerRegistry.ts": 4731,"open-sse/executors/antigravity.ts": 1649,"open-sse/executors/base.ts": 1218,"open-sse/executors/chatgpt-web.ts": 2870,@@ -15,14 +29,14 @@"open-sse/executors/duckduckgo-web.ts": 917,"open-sse/executors/grok-web.ts": 1871,"open-sse/executors/muse-spark-web.ts": 1284,- "open-sse/executors/perplexity-web.ts": 868,- "open-sse/handlers/audioSpeech.ts": 952,- "open-sse/handlers/chatCore.ts": 5815,+ "open-sse/executors/perplexity-web.ts": 939,+ "open-sse/handlers/audioSpeech.ts": 965,+ "open-sse/handlers/chatCore.ts": 5823,"open-sse/handlers/imageGeneration.ts": 3777,"open-sse/handlers/responseSanitizer.ts": 1103,"open-sse/handlers/search.ts": 1442,"open-sse/handlers/sseParser.ts": 812,- "open-sse/handlers/videoGeneration.ts": 1026,+ "open-sse/handlers/videoGeneration.ts": 1078,"open-sse/mcp-server/schemas/tools.ts": 1437,"open-sse/mcp-server/server.ts": 1457,"open-sse/mcp-server/tools/advancedTools.ts": 1118,@@ -30,12 +44,12 @@"open-sse/services/batchProcessor.ts": 828,"open-sse/services/browserBackedChat.ts": 850,"open-sse/services/claudeCodeCompatible.ts": 1202,- "open-sse/services/combo.ts": 5203,+ "open-sse/services/combo.ts": 5277,"open-sse/services/rateLimitManager.ts": 1017,"open-sse/services/tokenRefresh.ts": 1997,"open-sse/services/usage.ts": 3408,"open-sse/translator/request/openai-to-gemini.ts": 844,- "open-sse/translator/response/openai-responses.ts": 878,+ "open-sse/translator/response/openai-responses.ts": 903,"open-sse/utils/cursorAgentProtobuf.ts": 1521,"open-sse/utils/stream.ts": 2710,"src/app/(dashboard)/dashboard/HomePageClient.tsx": 1385,@@ -53,7 +67,7 @@"src/app/(dashboard)/dashboard/playground/components/tabs/ApiTab.tsx": 847,"src/app/(dashboard)/dashboard/providers/[id]/ProviderDetailPageClient.tsx": 784,"src/app/(dashboard)/dashboard/providers/[id]/components/ConnectionRow.tsx": 941,- "src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx": 843,+ "src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx": 845,"src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx": 1174,"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts": 954,"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderModels.ts": 155,@@ -73,7 +87,7 @@"src/app/(dashboard)/dashboard/usage/components/BudgetTab.tsx": 1016,"src/app/(dashboard)/dashboard/usage/components/EvalsTab.tsx": 2148,"src/app/(dashboard)/dashboard/usage/components/ProviderLimits/index.tsx": 1069,- "src/app/api/oauth/[provider]/[action]/route.ts": 916,+ "src/app/api/oauth/[provider]/[action]/route.ts": 918,"src/app/api/providers/[id]/models/route.ts": 2489,"src/app/api/providers/[id]/test/route.ts": 842,"src/app/api/usage/analytics/route.ts": 941,@@ -90,7 +104,7 @@"src/lib/evals/evalRunner.ts": 961,"src/lib/memory/retrieval.ts": 1171,"src/lib/modelsDevSync.ts": 934,- "src/lib/providers/validation.ts": 4348,+ "src/lib/providers/validation.ts": 4407,"src/lib/tailscaleTunnel.ts": 1189,"src/lib/usage/callLogs.ts": 975,"src/lib/usage/providerLimits.ts": 949,@@ -99,7 +113,7 @@"src/shared/components/RequestLoggerV2.tsx": 1282,"src/shared/components/analytics/charts.tsx": 1558,"src/shared/constants/cliTools.ts": 875,- "src/shared/constants/pricing.ts": 1508,+ "src/shared/constants/pricing.ts": 1529,"src/shared/constants/providers.ts": 3147,"src/shared/constants/sidebarVisibility.ts": 1100,"src/shared/services/cliRuntime.ts": 1090,diff --git a/config/quality/quality-baseline.json b/config/quality/quality-baseline.jsonnew file mode 100644index 0000000000..78de4b33f8--- /dev/null+++ b/config/quality/quality-baseline.json@@ -0,0 +1,148 @@+{+ "_comment": "Catraca de qualidade. 'down' = nao pode aumentar; 'up' = nao pode cair. Atualize via 'npm run quality:ratchet -- --update' (somente quando melhora). Cada valor e um numero REAL medido, nunca um chute. Cobertura entra na Fase 4 a partir de um run de cobertura mergeada no CI.",+ "metrics": {+ "eslintWarnings": {+ "value": 3760,+ "direction": "down"+ },+ "eslintErrors": {+ "value": 0,+ "direction": "down",+ "eps": 0+ },+ "coverage.statements": {+ "value": 76.5,+ "direction": "up",+ "tightenSlack": 5+ },+ "coverage.lines": {+ "value": 76.5,+ "direction": "up",+ "tightenSlack": 5+ },+ "coverage.functions": {+ "value": 82,+ "direction": "up",+ "tightenSlack": 5+ },+ "coverage.branches": {+ "value": 73,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 5+ },+ "coverage.chatCore.lines": {+ "value": 74,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.combo.lines": {+ "value": 80,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.accountFallback.lines": {+ "value": 88,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.auth.lines": {+ "value": 69,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.routeGuard.lines": {+ "value": 94,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.error.lines": {+ "value": 88,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.publicCreds.lines": {+ "value": 92,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "coverage.circuitBreaker.lines": {+ "value": 92,+ "direction": "up",+ "eps": 1.5,+ "tightenSlack": 10+ },+ "openapiCoverage.pct": {+ "value": 38.3,+ "direction": "up",+ "eps": 0.5+ },+ "i18nUiCoverage.pct": {+ "value": 80.1,+ "direction": "up",+ "eps": 0.5+ },+ "deadExports": {+ "value": 339,+ "direction": "down",+ "dedicatedGate": true+ },+ "cognitiveComplexity": {+ "value": 753,+ "direction": "down",+ "dedicatedGate": true+ },+ "typeCoveragePct": {+ "value": 92.17,+ "direction": "up",+ "eps": 0.05,+ "dedicatedGate": true+ },+ "codeqlAlerts": {+ "value": 0,+ "direction": "down",+ "dedicatedGate": true+ },+ "secretFindings": {+ "value": 3,+ "direction": "down",+ "dedicatedGate": true+ },+ "zizmorFindings": {+ "value": 187,+ "direction": "down",+ "dedicatedGate": true+ },+ "vulnCount": {+ "value": 10,+ "direction": "down",+ "dedicatedGate": true+ },+ "bundleSize": {+ "value": 5601,+ "direction": "down",+ "dedicatedGate": true+ }+ },+ "_coverage_note": "Pisos anti-flake ~2pt abaixo do real do CI mergeado MEDIDO COM os 135 testes religados (run 27247237268: statements 78.4 / lines 78.4 / functions 83.84 / branches 75.73). O religamento da 6A.1 HONESTIFICOU a regua: os ~82.5 anteriores eram inflados porque modulos nunca importados ficavam fora do denominador do c8. Apertar via --require-tighten na Fase 6A (2026-06-16).",+ "_eslint_rebaseline_2026_06_09": "Baseline 3482 foi congelado na branch das Fases 0-6 (base ~v3.8.17) ANTES da v3.8.18 sair; a tag v3.8.18 publicada ja media 3501 (delta nasceu no fim daquele ciclo, antes do job quality-gate existir no ci.yml). O ciclo v3.8.19 esta NEUTRO (tag 3501 == HEAD 3501). Re-baseline para o estado real da main publicada; reduzir os ~19 (any em codigo do ciclo v3.8.18) e ligar --require-tighten ficam para a Fase 6A (2026-06-16).",+ "_eslint_rebaseline_2026_06_13_int6a": "3501 -> 3653. Medido: dos 152 de drift, ~132 sao pre-existentes dos ciclos v3.8.20-v3.8.24 (base 33667fcf3 mede ~3633) e ~20 vem dos scripts .mjs de tooling novos das Fases 6A.3-6A.12 (gates de qualidade; warnings de estilo aceitaveis em tooling). Apertar via --require-tighten fica para o fim do ciclo.",+ "_eslint_rebaseline_2026_06_13_phase7": "3653 -> 3658: +5 warnings dos scripts .mjs de tooling novos da Fase 7 (check-vuln-ratchet/codeql/secrets/workflows/dead-code/etc). Tooling de qualidade; apertar via --require-tighten no fim do ciclo.",+ "_eslint_rebaseline_2026_06_13_v3825": "3658 -> 3669: +11 drift consciente do ciclo v3.8.24->v3.8.25 (features #3799-#3806: free-provider-rankings, plugins menu, proxy IP-family). Medido em release/v3.8.25 (e38d22512). Crescimento de feature legitima, nao regressao; apertar via --require-tighten no fim do ciclo.",+ "_eslint_rebaseline_2026_06_15_release_v3826": "3669 -> 3760. Medido em origin/release/v3.8.26 e neste PR com npm run quality:collect: ambos retornam 3760 warnings, portanto este PR e neutro; o drift ja existe na base release/v3.8.26.",+ "_quality_rebaseline_2026_06_15_release_v3826": "deadExports 327 -> 339 e cognitiveComplexity 738 -> 753. Medido em origin/release/v3.8.26 e neste PR com os dedicated gates: ambos retornam os mesmos valores, portanto este PR e neutro; typeCoveragePct permanece acima do baseline.",+ "_scanner_baselines_seeded_2026_06_15": "secretFindings (3), zizmorFindings (195), vulnCount (13) e bundleSize (5601) congelados a partir de um run LOCAL em 2026-06-15 com os binarios reais no PATH (gitleaks 8.30.1, osv-scanner 2.3.8, zizmor 1.25.2, @size-limit/file 12.1.0). Medicoes: (a) secretFindings=3 via 'gitleaks dir <dir>' por diretorio de fonte (src/open-sse/bin/electron/scripts) APOS corrigir o .gitleaks.toml para [extend].useDefault=true (sem isso o config customizado zerava o ruleset e nunca detectava nada) e a invocacao para escopo por-dir (gitleaks dir aceita 1 path; multiplos caiam para escanear o CWD inteiro/node_modules->timeout). Os 3 sao falsos-positivos do heuristico generic-api-key (string de header beta Anthropic + nomes de coluna latencyP50Ms/latencyP95Ms), a serem allowlistados ao longo do tempo; (b) zizmorFindings=195 via 'npm run check:workflows' APOS migrar .zizmor.yml do schema antigo 'ignores: []' para 'rules: {}' (zizmor 1.25.2 rejeitava o campo 'ignores'); (c) vulnCount=13 (LOW=4/MOD=7/HIGH=2) via osv-scanner; (d) bundleSize=5601 (gzip dos 4 entrypoints bin/*.mjs) via size-limit+@size-limit/file. Todos os 4 sao dedicatedGate:true => SKIP no ratchet BLOQUEANTE (job quality-gate) e ADVISORY no job quality-extended (continue-on-error). Permanecem advisory ate um run VERDE de CI confirmar que a tooling corrigida (install via 'gh release download' em vez de api.github.com nao-autenticado) produz os valores; o flip para bloqueante (remover continue-on-error) fica para um PR de follow-up. Direction:down em todos.",+ "_scanner_remediation_2026_06_15": "Remediacao das findings reais que os scanners semeados acima expuseram (medido localmente em 2026-06-15 com os mesmos binarios). vulnCount 13->10: bump dos 2 HIGH transitivos via package.json overrides — form-data 4.0.5->^4.0.6 (GHSA-hmw2-7cc7-3qxx, via axios) e vite 8.0.5->^8.0.16 (GHSA-fx2h-pf6j-xcff HIGH + GHSA-v6wh-96g9-6wx3 MODERATE, dev-only via vitest/@vitejs/plugin-react/fumadocs-mdx); osv-scanner confirma 0 HIGH restante; build:cli e a suite vitest MCP (16 files/187 testes) verdes pos-bump. zizmorFindings 195->187: env-harden de 7 findings template-injection (ci.yml job i18n; electron-release.yml jobs validate/build/release — o step 'Create source archives' sozinho gerava 4 das 7) movendo cada ${{...}} para 'env:' e referenciando \"$VAR\" no script, + allowlist de 1 dangerous-triggers (deploy-vps.yml on:workflow_run — guardado por conclusion=='success', deploy via SSH sem checkout de codigo nao-confiavel; entry em .zizmor.yml rules.dangerous-triggers.ignore). secretFindings (3) e bundleSize (5601) intocados neste PR. Apertados via edicao manual (direction:down).",+ "_codeql_promote_blocking_2026_06_15": "codeqlAlerts (value 0, direction down) PROMOVIDO de ADVISORY para RATCHET BLOQUEANTE como dedicated gate. CodeQL default-setup esta ON no repo e 'gh api repos/diegosouzapw/OmniRoute/code-scanning/alerts?state=open' retorna 0 alertas abertos (limpo). check-codeql-ratchet.mjs agora le metrics.codeqlAlerts.value, compara e sai 1 SOMENTE numa regressao real (medida > baseline); QUALQUER falha de medicao (gh ausente/sem auth/sem repo/erro de API) e SKIP gracioso com exit 0 — nunca bloqueia por falta de infraestrutura. O step bloqueante vive no job quality-gate (GH_TOKEN + permissions security-events:read); o step advisory duplicado foi removido do quality-extended. Substitui a nota _int_wiring_2026_06_13 que dizia 'codeqlAlerts permanece advisory'.",+ "_metrics_added_2026_06_13_6a11": "openapiCoverage.pct (38.3) e i18nUiCoverage.pct (80.1) promovidas de pisos manuais THRESHOLD para metricas de catraca (direction up) na Task 6A.11. eslintErrors fixado em 0 (era metrica orfa detectada pelo motor v2 da 6A.5).",+ "_int_wiring_2026_06_13": "Fase 7 INT: 3 metricas promovidas de ADVISORY para RATCHET BLOQUEANTE. Valores REAIS medidos em 2026-06-13 no HEAD desta branch: deadExports=327 (knip --reporter json, DEAD_TOTAL=exports+files), cognitiveComplexity=738 (eslint sonarjs/cognitive-complexity via eslint.sonarjs.config.mjs), typeCoveragePct=92.17 (type-coverage --json-output -p open-sse/tsconfig.json). Os scripts check-dead-code.mjs/check-cognitive-complexity.mjs/check-type-coverage.mjs foram convertidos de advisory (exit 0 sempre) para ratchet (exit 1 em regressao). vulnCount e codeqlAlerts permanecem advisory no job quality-extended: dependem de binarios externos (osv-scanner) e token GitHub (gh api) nao disponiveis localmente — nao podem ser medidos/congelados honestamente sem infraestrutura de CI.",+ "_coverage_per_module_2026_06_15": "Fase 7 Task 7.9: pisos coverage.<modulo>.lines para os 8 modulos criticos (chatCore/combo/accountFallback/auth/routeGuard/error/publicCreds/circuitBreaker). O coletor (collect-metrics.mjs::coverageByModule + CRITICAL_MODULE_PATHS) ja existia; faltava SO congelar o baseline. Valores semeados CONSERVADORES (~2-3pt abaixo de um run LOCAL de test:coverage de 2026-06-15, que por sua vez mede ~68% global vs ~76.5% do CI mergeado — logo os pisos estao MUITO abaixo do real do CI, zero risco de red). Apertar via 'quality:ratchet -- --update' a partir do 1o run de coverage mergeada do CI que popule essas chaves. tightenSlack alto (10) absorve a variancia local-vs-CI no step advisory de require-tighten.",+ "_require_tighten_advisory_2026_06_15": "Fase 6A.5: o gate --require-tighten (falha quando uma metrica melhora sem o baseline ser apertado no mesmo PR) foi finalmente WIRADO no CI — porem como STEP ADVISORY (continue-on-error) no job quality-gate, NAO bloqueante. Motivo: (a) o proprio plano sequencia o aperto para 'o fim do ciclo', e a v3.8.26 acabou de abrir; (b) liga-lo bloqueante durante merges ativos travaria qualquer melhoria de metrica ate re-baseline. Para promover a BLOQUEANTE no fim do ciclo: remover o 'continue-on-error: true' do step 'Require-tighten' no ci.yml. tightenSlack nas metricas coverage.* impede falso-disparo pelo gap anti-flake."+}diff --git a/test-discovery-baseline.json b/config/quality/test-discovery-baseline.jsonsimilarity index 100%rename from test-discovery-baseline.jsonrename to config/quality/test-discovery-baseline.jsondiff --git a/docs/AGENTROUTER.md b/docs/AGENTROUTER.mdindex 21a08589a1..c4a2b8c725 100644--- a/docs/AGENTROUTER.md+++ b/docs/AGENTROUTER.md@@ -126,7 +126,8 @@ request (see `open-sse/services/claudeCodeCompatible.ts`):| `Authorization` | `Bearer <api-key>` || `User-Agent` | `claude-cli/2.1.158 (external, sdk-cli)` || `anthropic-version` | `2023-06-01` |-| `anthropic-beta` | `claude-code-20250219,interleaved-thinking-2025-05-14,effort-2025-11-24,redact-thinking-2026-02-12` |+| `anthropic-beta` | `claude-code-20250219,interleaved-thinking-2025-05-14,effort-2025-11-24` |+| Per-connection redact-thinking beta toggle | Adds `redact-thinking-2026-02-12` for upstreams that specifically require redacted thinking streams || `anthropic-dangerous-direct-browser-access` | `true` || `x-app` | `cli` || `X-Stainless-*` | Various Stainless SDK headers (lang, package version, OS, arch, etc.) |diff --git a/docs/README.md b/docs/README.mdindex 4c85a157a1..745b6be723 100644--- a/docs/README.md+++ b/docs/README.md@@ -78,7 +78,7 @@ Pluggable subsystems exposed to clients, agents, and operators.Combo routing, scoring, and replay.-- [AUTO-COMBO.md](routing/AUTO-COMBO.md) — Auto-Combo (9-factor scoring, 14 strategies).+- [AUTO-COMBO.md](routing/AUTO-COMBO.md) — Auto-Combo (9-factor scoring, 15 strategies).- [REASONING_REPLAY.md](routing/REASONING_REPLAY.md) — reasoning replay flow.## security/@@ -118,7 +118,7 @@ Mermaid sources and exported SVG/PNG diagrams referenced from the docs above. Po## i18n/-Translated mirrors of the documentation in 40 locales. See [i18n/README.md](i18n/README.md) for the supported language list.+Translated mirrors of the documentation in 42 locales. See [i18n/README.md](i18n/README.md) for the supported language list.## screenshots/diff --git a/docs/architecture/ARCHITECTURE.md b/docs/architecture/ARCHITECTURE.mdindex 3792dec1ec..92702f3f79 100644--- a/docs/architecture/ARCHITECTURE.md+++ b/docs/architecture/ARCHITECTURE.md@@ -17,7 +17,7 @@ It provides a single OpenAI-compatible endpoint (`/v1/*`) and routes traffic acrCore capabilities:-- OpenAI-compatible API surface for CLI/tools (177 providers, 60 executors)+- OpenAI-compatible API surface for CLI/tools (226 providers, 60 executors)- Request/response translation across provider formats- Model combo fallback (multi-model sequence)- Structured combo steps (`provider + model + connection`) with runtime ordering by `compositeTiers`@@ -58,7 +58,7 @@ Core capabilities:- Compliance audit logging with opt-out per API key- Eval framework for LLM quality assurance- Health dashboard with real-time provider circuit breaker status-- MCP Server (37 tools) with 3 transports (stdio/SSE/Streamable HTTP)+- MCP Server (87 tools) with 3 transports (stdio/SSE/Streamable HTTP)- A2A Server (JSON-RPC 2.0 + SSE) with skills and task lifecycle- Memory system (extraction, injection, retrieval, summarization)- Skills system (registry, executor, sandbox, built-in skills)@@ -932,7 +932,7 @@ All other providers (including custom compatible nodes) use the `DefaultExecutor## Provider Compatibility Matrix-> **Note:** The matrix below is a representative sample of the 177 registered providers in+> **Note:** The matrix below is a representative sample of the 226 registered providers in> OmniRoute v3.8.0. For the canonical and continuously-updated list, refer to> [`docs/reference/PROVIDER_REFERENCE.md`](../reference/PROVIDER_REFERENCE.md) (auto-generated) or the source of> truth at `src/shared/constants/providers.ts` (Zod-validated at load).diff --git a/docs/architecture/CODEBASE_DOCUMENTATION.md b/docs/architecture/CODEBASE_DOCUMENTATION.mdindex d222b94b90..12c822ade3 100644--- a/docs/architecture/CODEBASE_DOCUMENTATION.md+++ b/docs/architecture/CODEBASE_DOCUMENTATION.md@@ -272,46 +272,46 @@ the same `open-sse/handlers/` pipeline).Always import data, sync, OAuth, skill, memory, etc. through these modules. Thetable groups the actual directories and notable top-level files.-| Module | Purpose |-| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `a2a/` | A2A protocol server: `taskManager.ts`, `streaming.ts`, `taskExecution.ts`, `routingLogger.ts`, `skills/` (6 skills: cost analysis, health report, provider discovery, quota management, smart routing, list-capabilities) |-| `acp/` | Agent-Control-Protocol: `index.ts`, `manager.ts`, `registry.ts` |-| `api/` | Internal API helpers: `requireManagementAuth.ts`, `requireCliToolsAuth.ts`, `errorResponse.ts` |-| `auth/` | `managementPassword.ts` (password reset / hashing) |-| `batches/` | OpenAI Batches API service (`service.ts`) |-| `catalog/` | OpenRouter catalog sync (`openrouterCatalog.ts`) |-| `cloudAgent/` | Cloud agent registry: `api.ts`, `baseAgent.ts`, `db.ts`, `index.ts`, `registry.ts`, `types.ts`, `agents/{codex, devin, jules}.ts` |-| `combos/` | Combo resolution helpers |-| `compliance/` | Audit + provider audit: `index.ts`, `providerAudit.ts` |-| `config/` | Runtime config glue |-| `db/` | SQLite domain modules (see §3.2.1) |-| `display/` | UI/display helpers used by API responses |-| `embeddings/` | Embedding service registry |-| `env/` | Env loading + introspection |-| `evals/` | Eval runtime |-| `guardrails/` | `piiMasker.ts`, `promptInjection.ts`, `visionBridge.ts`, `visionBridgeHelpers.ts`, `registry.ts`, `base.ts` |-| `jobs/` | Background jobs (`autoUpdate.ts`, …) |-| `memory/` | Persistent memory: `store.ts`, `cache.ts`, `retrieval.ts`, `summarization.ts`, `extraction.ts`, `injection.ts`, `qdrant.ts`, `settings.ts`, `verify.ts`, `schemas.ts`, `types.ts` |-| `monitoring/` | `observability.ts` |-| `oauth/` | OAuth providers (14): `antigravity`, `claude`, `cline`, `codex`, `cursor`, `gemini`, `github`, `gitlab-duo`, `kilocode`, `kimi-coding`, `kiro`, `qoder`, `qwen`, `windsurf` plus `services/`, `utils/{pkce, server, banner, codexAuthFile, ui}`, `constants/oauth.ts` |-| `plugins/` | Plugin loader (`index.ts`) |-| `promptCache/` | `prefixAnalyzer.ts`, `index.ts` |-| `providerModels/` | Managed model lifecycle: `modelDiscovery.ts`, `managedModelImport.ts`, `managedAvailableModels.ts`, `cursorAgent.ts` |-| `providers/` | Provider helpers: `catalog.ts`, `validation.ts`, `imageValidation.ts`, `claudeExtraUsage.ts`, `codexConnectionDefaults.ts`, `codexFastTier.ts`, `webCookieAuth.ts`, `managedAvailableModels.ts`, `requestDefaults.ts` |-| `resilience/` | `settings.ts` — settings for circuit breaker, cooldown, lockout |-| `runtime/` | Runtime feature detection |-| `search/` | `executeWebSearch.ts` |-| `services/` | Embedded services framework: `ServiceSupervisor.ts` (generic child-process supervisor with operation lock, ring buffer, health checker), `bootstrap.ts` (process-level registration and auto-start), `registry.ts` (tool → supervisor map), `apiKey.ts` (AES-256-GCM key store), `modelSync.ts` (periodic model sync), `ringBuffer.ts` (5 MB circular log buffer), `healthCheck.ts` (HTTP health probe), `types.ts`, `embedWsProxy.ts` (WebSocket proxy), `installers/{ninerouter,cliproxy}.ts`. See `docs/frameworks/EMBEDDED-SERVICES.md` |+| Module | Purpose |+| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `a2a/` | A2A protocol server: `taskManager.ts`, `streaming.ts`, `taskExecution.ts`, `routingLogger.ts`, `skills/` (6 skills: cost analysis, health report, provider discovery, quota management, smart routing, list-capabilities) |+| `acp/` | Agent-Control-Protocol: `index.ts`, `manager.ts`, `registry.ts` |+| `api/` | Internal API helpers: `requireManagementAuth.ts`, `requireCliToolsAuth.ts`, `errorResponse.ts` |+| `auth/` | `managementPassword.ts` (password reset / hashing) |+| `batches/` | OpenAI Batches API service (`service.ts`) |+| `catalog/` | OpenRouter catalog sync (`openrouterCatalog.ts`) |+| `cloudAgent/` | Cloud agent registry: `api.ts`, `baseAgent.ts`, `db.ts`, `index.ts`, `registry.ts`, `types.ts`, `agents/{codex, devin, jules}.ts` |+| `combos/` | Combo resolution helpers |+| `compliance/` | Audit + provider audit: `index.ts`, `providerAudit.ts` |+| `config/` | Runtime config glue |+| `db/` | SQLite domain modules (see §3.2.1) |+| `display/` | UI/display helpers used by API responses |+| `embeddings/` | Embedding service registry |+| `env/` | Env loading + introspection |+| `evals/` | Eval runtime |+| `guardrails/` | `piiMasker.ts`, `promptInjection.ts`, `visionBridge.ts`, `visionBridgeHelpers.ts`, `registry.ts`, `base.ts` |+| `jobs/` | Background jobs (`autoUpdate.ts`, …) |+| `memory/` | Persistent memory: `store.ts`, `cache.ts`, `retrieval.ts`, `summarization.ts`, `extraction.ts`, `injection.ts`, `qdrant.ts`, `settings.ts`, `verify.ts`, `schemas.ts`, `types.ts` |+| `monitoring/` | `observability.ts` |+| `oauth/` | OAuth providers (14): `antigravity`, `claude`, `cline`, `codex`, `cursor`, `gemini`, `github`, `gitlab-duo`, `kilocode`, `kimi-coding`, `kiro`, `qoder`, `qwen`, `windsurf` plus `services/`, `utils/{pkce, server, banner, codexAuthFile, ui}`, `constants/oauth.ts` |+| `plugins/` | Plugin loader (`index.ts`) |+| `promptCache/` | `prefixAnalyzer.ts`, `index.ts` |+| `providerModels/` | Managed model lifecycle: `modelDiscovery.ts`, `managedModelImport.ts`, `managedAvailableModels.ts`, `cursorAgent.ts` |+| `providers/` | Provider helpers: `catalog.ts`, `validation.ts`, `imageValidation.ts`, `claudeExtraUsage.ts`, `codexConnectionDefaults.ts`, `codexFastTier.ts`, `webCookieAuth.ts`, `managedAvailableModels.ts`, `requestDefaults.ts` |+| `resilience/` | `settings.ts` — settings for circuit breaker, cooldown, lockout |+| `runtime/` | Runtime feature detection |+| `search/` | `executeWebSearch.ts` |+| `services/` | Embedded services framework: `ServiceSupervisor.ts` (generic child-process supervisor with operation lock, ring buffer, health checker), `bootstrap.ts` (process-level registration and auto-start), `registry.ts` (tool → supervisor map), `apiKey.ts` (AES-256-GCM key store), `modelSync.ts` (periodic model sync), `ringBuffer.ts` (5 MB circular log buffer), `healthCheck.ts` (HTTP health probe), `types.ts`, `embedWsProxy.ts` (WebSocket proxy), `installers/{ninerouter,cliproxy}.ts`. See `docs/frameworks/EMBEDDED-SERVICES.md` || `agentSkills/` | Agent Skills catalog + generator: `catalog.ts` (getCatalog/getSkillById/filterCatalog/computeCoverage), `generator.ts` (generateAgentSkills → writes `skills/{id}/SKILL.md`), `openapiParser.ts` (extracts REST endpoints from OpenAPI spec), `cliRegistryParser.ts` (extracts CLI subcommands from bin/cli-registry), `schemas.ts` (Zod: AgentSkillSchema, SkillCoverageSchema, ListQuerySchema, GenerateBodySchema), `types.ts` (AgentSkill, SkillCoverage, SkillMarkdown, GeneratorReport). Consumed by REST routes (`/api/agent-skills/*`), MCP tools (`omniroute_agent_skills_*`), and A2A skill `list-capabilities`. See [AGENT-SKILLS.md](../frameworks/AGENT-SKILLS.md). |-| `skills/` | Skill framework: `registry.ts`, `executor.ts`, `interception.ts`, `injection.ts`, `sandbox.ts`, `custom.ts`, `hybrid.ts`, `builtins.ts`, `a2a.ts`, `providerSettings.ts`, `schemas.ts`, `skillssh.ts`, `types.ts`, plus `builtin/browser.ts` |-| `spend/` | `batchWriter.ts` (write-behind buffer) |-| `sync/` | `bundle.ts`, `tokens.ts` (Cloud Sync) |-| `system/` | System-level helpers |-| `translator/` | Top-level translator glue (delegates into `open-sse/translator/`) |-| `usage/` | Usage accounting: `costCalculator.ts`, `tokenAccounting.ts`, `usageHistory.ts`, `aggregateHistory.ts`, `usageStats.ts`, `callLogs.ts`, `callLogArtifacts.ts`, `fetcher.ts`, `providerLimits.ts`, `migrations.ts` |-| `versionManager/` | Auto-update + version manifest |-| `ws/` | WebSocket bridge |-| `zed-oauth/` | Zed editor OAuth flow |+| `skills/` | Skill framework: `registry.ts`, `executor.ts`, `interception.ts`, `injection.ts`, `sandbox.ts`, `custom.ts`, `hybrid.ts`, `builtins.ts`, `a2a.ts`, `providerSettings.ts`, `schemas.ts`, `skillssh.ts`, `types.ts`, plus `builtin/browser.ts` |+| `spend/` | `batchWriter.ts` (write-behind buffer) |+| `sync/` | `bundle.ts`, `tokens.ts` (Cloud Sync) |+| `system/` | System-level helpers |+| `translator/` | Top-level translator glue (delegates into `open-sse/translator/`) |+| `usage/` | Usage accounting: `costCalculator.ts`, `tokenAccounting.ts`, `usageHistory.ts`, `aggregateHistory.ts`, `usageStats.ts`, `callLogs.ts`, `callLogArtifacts.ts`, `fetcher.ts`, `providerLimits.ts`, `migrations.ts` |+| `versionManager/` | Auto-update + version manifest |+| `ws/` | WebSocket bridge |+| `zed-oauth/` | Zed editor OAuth flow |Top-level files in `src/lib/`:@@ -457,7 +457,7 @@ open-sse/├── transformer/ Responses API ↔ Chat Completions stream transformer├── services/ 80+ service modules (combos, fallback, quotas, identity, …)├── utils/ Streaming helpers, TLS client, AWS SigV4, proxy fetch, …-└── mcp-server/ MCP server (3 transports, 13 scopes, 42 tools)+└── mcp-server/ MCP server (3 transports, 30 scopes, 87 tools)```### 4.1 `open-sse/handlers/`@@ -492,7 +492,7 @@ open-sse/(shared identity helper) and `index.ts` (registry).> Note: providers not listed here are served by `default.ts` using the generic-> OpenAI-compatible executor. The full provider catalog (177+ entries) lives in+> OpenAI-compatible executor. The full provider catalog (226+ entries) lives in> `src/shared/constants/providers.ts`.### 4.3 `open-sse/translator/`@@ -525,7 +525,7 @@ Highlights (full list under `open-sse/services/`):| Concern | Files || ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| Combo routing | `combo.ts` (14 strategies), `comboConfig.ts`, `comboMetrics.ts`, `comboManifestMetrics.ts`, `comboAgentMiddleware.ts` |+| Combo routing | `combo.ts` (15 strategies), `comboConfig.ts`, `comboMetrics.ts`, `comboManifestMetrics.ts`, `comboAgentMiddleware.ts` || Auto Combo engine | `autoCombo/` — `engine.ts`, `scoring.ts`, `taskFitness.ts`, `virtualFactory.ts`, `modePacks.ts`, `autoPrefix.ts`, `persistence.ts`, `providerDiversity.ts`, `providerRegistryAccessor.ts`, `routerStrategy.ts`, `selfHealing.ts`, `index.ts` || Resilience | `accountFallback.ts` (cooldown + lockout), `errorClassifier.ts`, `emergencyFallback.ts`, `rateLimitManager.ts`, `rateLimitSemaphore.ts`, `accountSemaphore.ts`, `accountSelector.ts` || Quotas | `quotaMonitor.ts`, `quotaPreflight.ts`, `bailianQuotaFetcher.ts`, `codexQuotaFetcher.ts`, `deepseekQuotaFetcher.ts`, `crofUsageFetcher.ts`, `antigravityCredits.ts` |diff --git a/docs/architecture/QUALITY_GATES.md b/docs/architecture/QUALITY_GATES.mdindex d21ce3a4de..2bddc16af0 100644--- a/docs/architecture/QUALITY_GATES.md+++ b/docs/architecture/QUALITY_GATES.md@@ -13,7 +13,7 @@ in `CLAUDE.md`.----## Gate Inventory (35 scripts)+## Gate Inventory (~48 scripts)Scripts live under `scripts/check/` (policy gates) and `scripts/quality/` (ratchet engine).The CI source of truth is `.github/workflows/ci.yml`.@@ -54,6 +54,21 @@ Runs after `test-coverage`. Blocks merge on failure.| `check:duplication` | Code duplication (jscpd@4) does not exceed baseline in `quality-baseline.json` | Yes || `check:complexity` | File-level cyclomatic complexity does not exceed the cap | Yes |+### Job: `quality-extended`++Entire job is advisory (`continue-on-error: true`). The npm-based ratchets run for+real; the external scanners install via `gh release download` and self-skip (exit 0)+when a binary is still absent.++| Script | Validates | Blocking |+| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------ |+| `check:circular-deps` | No circular dependencies (dpdm) | **Advisory** |+| `check:bundle-size` | Bundle size does not exceed the cap | **Advisory** |+| `check:secrets` | Secret scanning (gitleaks) — skips if binary absent | **Advisory** |+| `check:vuln-ratchet` | Dependency vulnerabilities (osv-scanner) do not regress — skips if binary absent | **Advisory** |+| `check:workflows` | Workflow lint (actionlint + zizmor) — skips if binaries absent | **Advisory** |+| `check:openapi-breaking` | Breaking changes to the public API contract (`openapi.yaml`) vs the base branch (oasdiff) — emits `openapiBreaking=N`; skips if oasdiff absent or base spec unresolvable | **Advisory** |+### Job: `docs-sync-strict`Runs on every PR to `main`. Blocks merge on failure.@@ -103,9 +118,20 @@ Runs after `build`. Blocks merge on failure.| Suite | Validates | Blocking || ---------------- | ------------------------------------------------------- | -------------------------------------------------------------------------- |-| `test:vitest` | MCP server (43 tools), autoCombo, cache — vitest runner | Yes |+| `test:vitest` | MCP server (87 tools), autoCombo, cache — vitest runner | Yes || `test:vitest:ui` | UI component tests — vitest runner | **Advisory** (`continue-on-error: true`) — failing until Fase 6A UI triage |+### Nightly workflows (scheduled, advisory)++These run on a cron schedule (and `workflow_dispatch`), never on PRs. All are advisory.++| Workflow | Validates | Blocking |+| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ |+| `nightly-property` | fast-check property tests with a random seed + high run count | **Advisory** |+| `nightly-resilience` | heap-growth gate, chaos fault-injection, k6 load/soak | **Advisory** |+| `nightly-llm-security` | promptfoo injection guard (block mode) + garak probes (skipped without a provider secret) | **Advisory** |+| `nightly-schemathesis` | OpenAPI contract fuzzing (schemathesis) against a live OmniRoute using `docs/reference/openapi.yaml` — surfaces spec violations / unhandled 500s (Fase 8 B.4) | **Advisory** |+---## Ratchet Baseline (`quality-baseline.json`)@@ -188,6 +214,18 @@ allowlist is a false sense of quality.---+## Agent tooling: LSP-in-the-loop (opt-in)++Beyond the CI gates, OmniRoute ships an **opt-in** `agent-lsp` scaffold+([`.mcp.json.example`](../../.mcp.json.example), Fase 7 Task 15). Copy it to `.mcp.json`+to expose a TypeScript language server to coding agents, so they resolve symbols /+diagnostics **before** writing code — a compile-before-claim companion to+`typecheck:core` that cuts "invented symbol" errors at the source. It is intentionally+not auto-loaded (you pick and verify the MCP↔LSP bridge); a broken entry only logs a+connection error and never breaks sessions.++---+## Related Documentation- Supply-chain (provenance, SBOM, Trivy, Scorecard): [`docs/security/SUPPLY_CHAIN.md`](../security/SUPPLY_CHAIN.md)diff --git a/docs/architecture/REPOSITORY_MAP.md b/docs/architecture/REPOSITORY_MAP.mdindex bddfefd9d5..2fb5c24e9e 100644--- a/docs/architecture/REPOSITORY_MAP.md+++ b/docs/architecture/REPOSITORY_MAP.md@@ -1,13 +1,13 @@---title: "Repository Map"-version: 3.8.2-lastUpdated: 2026-05-13+version: 3.8.26+lastUpdated: 2026-06-15---# Repository Map> **One-line description for every directory and root file.**-> Last updated: 2026-05-13 — OmniRoute v3.8.0+> Last updated: 2026-06-15 — OmniRoute v3.8.26>> Use this map to navigate the codebase quickly. For deep dives, follow links to dedicated docs.@@ -23,8 +23,13 @@ OmniRoute/├── docs/ # Public documentation (you are here)├── tests/ # All test suites (unit, integration, e2e, protocols-e2e)├── public/ # Next.js static assets, PWA manifest, service worker, icons-├── config/ # Static config files+├── config/ # Static config + quality-gate state (i18n, payloadRules, quality/)├── images/ # Marketing / README image assets+├── @omniroute/ # Publishable companion packages (opencode-plugin, opencode-provider)+├── skills/ # CLI/agent skill packs (cli-* + omni-* + config-codex-cli)+├── examples/ # Sample plugins + omniroute-cmd-hello starter+├── contrib/ # Community contributions (podman/)+├── .source/ # Fumadocs source config (source.config.mjs + server/browser/dynamic)├── .github/ # GitHub Actions workflows + issue templates + PR template├── .husky/ # Git hooks (pre-commit, pre-push)├── .claude/ # Claude Code slash commands (project-scoped)@@ -34,6 +39,7 @@ OmniRoute/├── _mono_repo/ # Historic subprojects (cloud, site, vscode-extension)├── _references/ # Read-only reference clones from related OSS projects├── _tasks/ # Per-release task tracking files (informal)+├── .build/ .worktrees/ dist/ # local build / git-worktree / build-output scratch (gitignored)├── .issues/ # Local issue cache (gitignored)├── .playwright-mcp/ # Playwright MCP test artifacts├── coverage/ # c8 coverage output (gitignored)@@ -48,45 +54,63 @@ OmniRoute/## Root files-| File | Purpose |-| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |-| **README.md** | Marketing landing page + quick start + feature matrix (see also `llm.txt`) |-| **CHANGELOG.md** | Per-release changelog (auto-generated by `/version-bump-cc` skill) |-| **LICENSE** | MIT license text |-| **CLAUDE.md** | Project rules for Claude Code agents (hard rules, conventions, scenarios) |-| **AGENTS.md** | Same as CLAUDE.md but for non-Claude AI agents (Codex, Cursor, etc.) |-| **GEMINI.md** | Concise rules for Gemini-based agents (subset of CLAUDE.md) |-| **CONTRIBUTING.md** | Contributor guide: setup, conventional commits, testing, PR flow |-| **SECURITY.md** | Vulnerability reporting policy, supported versions, threat model |-| **CODE_OF_CONDUCT.md** | Contributor Covenant — community behavior expectations |-| **llm.txt** | Plain-text landing optimized for LLM crawlers (SEO for AI assistants) |-| **Tuto_Qdrant.md** | Tutorial for enabling Qdrant vector memory — **integration currently dormant** (see banner; primary memory docs in `docs/frameworks/MEMORY.md`) |-| **package.json** | npm manifest, scripts, dependencies, engines, c8 coverage gate |-| **package-lock.json** | Locked dependency tree |-| **tsconfig.json** | Root TypeScript config |-| **tsconfig.typecheck-core.json** | Typecheck config for `src/` core |-| **tsconfig.typecheck-noimplicit-core.json** | Strict (`noImplicitAny`) typecheck |-| **tsconfig.tsbuildinfo** | TS incremental build cache (gitignored) |-| **next.config.mjs** | Next.js 16 build configuration (standalone output) |-| **next-env.d.ts** | Next.js auto-generated env types |-| **eslint.config.mjs** | ESLint flat config (rules per project area) |-| **prettier.config.mjs** | Prettier formatting rules |-| **postcss.config.mjs** | PostCSS config for Tailwind/CSS pipeline |-| **playwright.config.ts** | Playwright E2E test config |-| **vitest.config.ts** | Vitest config (default suite) |-| **vitest.mcp.config.ts** | Vitest config for MCP server / autoCombo / cache suites |-| **sonar-project.properties** | SonarQube/SonarCloud config (code quality) |-| **Dockerfile** | Multi-stage Docker build (builder → runner-base → runner-cli) |-| **docker-compose.yml** | Dev compose with 4 profiles (base, cli, host, cliproxyapi) + redis sidecar |-| **docker-compose.prod.yml** | Production compose (port 20130, redis, named volumes) |-| **.dockerignore** | Files excluded from Docker context |-| **fly.toml** | Fly.io deployment config (region `sin`, port 20128, /data volume) |-| **.env.example** | Template env file (815 lines, auto-copied to `.env` on first install) |-| **.gitignore** | Git ignore patterns |-| **.npmignore** | npm publish exclusion list |-| **.npmrc** | npm config (registry, lockfile policy) |-| **.node-version** | Node version pin (used by nvm-compatible tools) |-| **.nvmrc** | Node version pin for nvm |+| File | Purpose |+| ------------------------------------------- | ---------------------------------------------------------------------------------------- |+| **README.md** | Marketing landing page + quick start + feature matrix (see also `llm.txt`) |+| **CHANGELOG.md** | Per-release changelog (auto-generated by `/version-bump-cc` skill) |+| **LICENSE** | MIT license text |+| **CLAUDE.md** | Project rules for Claude Code agents (hard rules, conventions, scenarios) |+| **AGENTS.md** | Same as CLAUDE.md but for non-Claude AI agents (Codex, Cursor, etc.) |+| **GEMINI.md** | Concise rules for Gemini-based agents (subset of CLAUDE.md) |+| **CONTRIBUTING.md** | Contributor guide: setup, conventional commits, testing, PR flow |+| **SECURITY.md** | Vulnerability reporting policy, supported versions, threat model |+| **CODE_OF_CONDUCT.md** | Contributor Covenant — community behavior expectations |+| **llm.txt** | Plain-text landing optimized for LLM crawlers (SEO for AI assistants) |+| **package.json** | npm manifest, scripts, dependencies, engines, c8 coverage gate |+| **package-lock.json** | Locked dependency tree |+| **tsconfig.json** | Root TypeScript config |+| **tsconfig.typecheck-core.json** | Typecheck config for `src/` core |+| **tsconfig.typecheck-noimplicit-core.json** | Strict (`noImplicitAny`) typecheck |+| **tsconfig.tsbuildinfo** | TS incremental build cache (gitignored) |+| **next.config.mjs** | Next.js 16 build configuration (standalone output) |+| **next-env.d.ts** | Next.js auto-generated env types |+| **eslint.config.mjs** | ESLint flat config (rules per project area) |+| **prettier.config.mjs** | Prettier formatting rules |+| **postcss.config.mjs** | PostCSS config for Tailwind/CSS pipeline |+| **playwright.config.ts** | Playwright E2E test config |+| **vitest.config.ts** | Vitest config (default suite) |+| **vitest.mcp.config.ts** | Vitest config for MCP server / autoCombo / cache suites |+| **sonar-project.properties** | SonarQube/SonarCloud config (code quality) |+| **Dockerfile** | Multi-stage Docker build (builder → runner-base → runner-cli) |+| **docker-compose.yml** | Dev compose with 4 profiles (base, cli, host, cliproxyapi) + redis sidecar |+| **docker-compose.prod.yml** | Production compose (port 20130, redis, named volumes) |+| **.dockerignore** | Files excluded from Docker context |+| **fly.toml** | Fly.io deployment config (region `sin`, port 20128, /data volume) |+| **.env.example** | Template env file (auto-copied to `.env` on first install) |+| **.gitignore** | Git ignore patterns |+| **.npmignore** | npm publish exclusion list |+| **.npmrc** | npm config (registry, lockfile policy) |+| **.node-version** | Node version pin (used by nvm-compatible tools) |+| **.nvmrc** | Node version pin for nvm |+| **eslint.complexity.config.mjs** | ESLint config for the complexity ratchet (`scripts/check/check-complexity.mjs --config`) |+| **eslint.sonarjs.config.mjs** | ESLint config for SonarJS rules (cognitive complexity / duplication) |+| **source.config.ts** | Fumadocs `defineDocs` source config (feeds `.source/`) |+| **knip.json** | Knip config — unused files/exports/deps (feeds the dead-code gate) |+| **stryker.conf.json** | Stryker mutation-testing config |+| **.size-limit.json** | size-limit bundle budget config |+| **semcheck.yaml** | semcheck (spec↔code drift) config |+| **promptfooconfig.yaml** | promptfoo eval config |+| **.gitleaks.toml** | gitleaks secret-scan ruleset |+| **.zizmor.yml** | zizmor GitHub-Actions security-lint config |+| **socket.yml** | Socket.dev supply-chain config |+| **news.json** | In-app release-notes feed (read by `src/shared/utils/releaseNotes.ts`) |+| **flake.nix** / **flake.lock** | Nix dev-shell definition + lock |+| **.env** | Local secrets (gitignored — generated from `.env.example`) |++> **Moved out of the root in v3.8.26 (declutter):**+>+> - **→ `config/quality/`:** `quality-baseline.json`, `complexity-baseline.json`, `duplication-baseline.json`, `file-size-baseline.json`, `test-discovery-baseline.json`, `dependency-allowlist.json`, `.license-allowlist.json`, and the generated `quality-metrics.json` (gitignored). See [`## config/`](#config--static-configs--quality-gate-state).+> - **→ `docs/ops/`:** `DOCUMENTATION_AUDIT_REPORT.md`.---@@ -117,84 +141,84 @@ src/### `src/app/` — App Router (Next.js 16)-| Path | Purpose |-| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| `app/api/v1/` | Public OpenAI-compat API (~25 sub-routes: chat, completions, embeddings, files, batches, audio, images, videos, music, rerank, moderations, search, ws, agents, accounts, providers, etc.) |-| `app/api/v1beta/` | Gemini-style API endpoints |-| `app/api/playground/` | Playground Studio routes: `improve-prompt/` (POST — LLM prompt rewriter), `presets/` (GET list / POST create), `presets/[id]/` (GET / PUT / DELETE) — see `docs/frameworks/PLAYGROUND_STUDIO.md` |-| `app/api/` (non-v1) | Management/admin routes (~60 directories: providers, combos, settings, mcp, a2a, evals, memory, skills, webhooks, compliance, resilience, monitoring, tunnels, cli-tools, etc.) |-| `app/api/tools/agent-bridge/` | AgentBridge REST API — 12 routes (server control, agent state/DNS/mappings, bypass, cert, upstream-CA). LOCAL_ONLY + SPAWN_CAPABLE. See `docs/frameworks/AGENTBRIDGE.md §7`. |-| `app/api/tools/traffic-inspector/` | Traffic Inspector REST + WS API — 16+ routes (requests, sessions, hosts, capture-modes, export, ws). LOCAL_ONLY + SPAWN_CAPABLE. See `docs/frameworks/TRAFFIC_INSPECTOR.md §8`. |-| `app/a2a/` | A2A JSON-RPC 2.0 entry point (`POST /a2a`) |-| `app/.well-known/agent.json/` | A2A Agent Card (discovery) |-| `app/(dashboard)/dashboard/` | Dashboard UI pages (~35 pages: providers, combos, settings, memory, skills, webhooks, evals, audit, batch, cache, costs, health, system, activity, etc.) |-| `app/(dashboard)/dashboard/search-tools/` | Search Tools Studio UI (3 tabs: Search/Scrape/Compare + SearchConceptCard + ProviderCatalog) — see `docs/frameworks/SEARCH_TOOLS_STUDIO.md` |-| `app/(dashboard)/dashboard/` | Dashboard UI pages (~30 pages: providers, combos, settings, memory, skills, webhooks, evals, audit, batch, cache, costs, health, system, etc.) |+| Path | Purpose |+| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| `app/api/v1/` | Public OpenAI-compat API (~25 sub-routes: chat, completions, embeddings, files, batches, audio, images, videos, music, rerank, moderations, search, ws, agents, accounts, providers, etc.) |+| `app/api/v1beta/` | Gemini-style API endpoints |+| `app/api/playground/` | Playground Studio routes: `improve-prompt/` (POST — LLM prompt rewriter), `presets/` (GET list / POST create), `presets/[id]/` (GET / PUT / DELETE) — see `docs/frameworks/PLAYGROUND_STUDIO.md` |+| `app/api/` (non-v1) | Management/admin routes (~60 directories: providers, combos, settings, mcp, a2a, evals, memory, skills, webhooks, compliance, resilience, monitoring, tunnels, cli-tools, etc.) |+| `app/api/tools/agent-bridge/` | AgentBridge REST API — 12 routes (server control, agent state/DNS/mappings, bypass, cert, upstream-CA). LOCAL_ONLY + SPAWN_CAPABLE. See `docs/frameworks/AGENTBRIDGE.md §7`. |+| `app/api/tools/traffic-inspector/` | Traffic Inspector REST + WS API — 16+ routes (requests, sessions, hosts, capture-modes, export, ws). LOCAL_ONLY + SPAWN_CAPABLE. See `docs/frameworks/TRAFFIC_INSPECTOR.md §8`. |+| `app/a2a/` | A2A JSON-RPC 2.0 entry point (`POST /a2a`) |+| `app/.well-known/agent.json/` | A2A Agent Card (discovery) |+| `app/(dashboard)/dashboard/` | Dashboard UI pages (~35 pages: providers, combos, settings, memory, skills, webhooks, evals, audit, batch, cache, costs, health, system, activity, etc.) |+| `app/(dashboard)/dashboard/search-tools/` | Search Tools Studio UI (3 tabs: Search/Scrape/Compare + SearchConceptCard + ProviderCatalog) — see `docs/frameworks/SEARCH_TOOLS_STUDIO.md` |+| `app/(dashboard)/dashboard/` | Dashboard UI pages (~30 pages: providers, combos, settings, memory, skills, webhooks, evals, audit, batch, cache, costs, health, system, etc.) || `app/(dashboard)/dashboard/memory/` | Memory Studio (plan 21): `page.tsx` (3-tab shell), `components/` (MemoryConceptCard, MemoryEngineStatus, EmbeddingSourceSelector, EditMemoryModal, RetrievePreview, QdrantConfigCard, RerankConfigCard), `components/tabs/` (MemoriesTab, PlaygroundTab, EngineTab), `hooks/` (useEngineStatus, useMemorySettings) |-| `app/(dashboard)/dashboard/tools/agent-bridge/` | AgentBridge dashboard page — server card, 9 agent cards, setup wizard, model mapping, bypass list. i18n PT-BR + EN. See `docs/frameworks/AGENTBRIDGE.md`. |-| `app/(dashboard)/dashboard/tools/traffic-inspector/` | Traffic Inspector dashboard page — DevTools split, 7 detail tabs, 4 capture mode toggles, session recorder, context colorization. i18n PT-BR + EN. See `docs/frameworks/TRAFFIC_INSPECTOR.md`. |-| `app/(dashboard)/dashboard/activity/` | Activity feed page (Group B): `page.tsx` (server) + `ActivityFeedClient.tsx` + `components/{ActivityFeed,ActivityItem,DayHeader,EventTypeFilter}.tsx` — see `docs/architecture/MONITORING_SECTIONS.md` |-| `app/(dashboard)/dashboard/costs/quota-share/` | Quota Sharing page (Group B): `QuotaSharePageClient.tsx` + `components/{PoolCard,DimensionBar,AllocationTable,BurnRateChart,QuotaConceptCard,CreatePoolModal,EditAllocationsModal}.tsx` + `hooks/{usePools,usePoolUsage,useLocalStoragePoolMigration}.ts` |-| `app/(dashboard)/dashboard/costs/quota-share/plans/` | Provider plan config page (Group B): `page.tsx` + `ProviderPlanConfigClient.tsx` — quota dimensions per connection override |-| `app/docs/` | Embedded documentation viewer (renders `docs/*.md`) |-| `app/landing/` | Marketing landing page |-| `app/login/`, `forgot-password/`, `forbidden/` | Auth-related pages |-| `app/{400,401,403,408,429,500,502,503}/` | HTTP error pages |-| `app/maintenance/`, `offline/`, `status/`, `privacy/`, `terms/`, `callback/` | Static/status pages |-| `app/layout.tsx`, `page.tsx`, `manifest.ts`, `globals.css` | Root layout, home, PWA manifest, global CSS |-| `app/error.tsx`, `global-error.tsx`, `not-found.tsx`, `loading.tsx` | Error boundaries |+| `app/(dashboard)/dashboard/tools/agent-bridge/` | AgentBridge dashboard page — server card, 9 agent cards, setup wizard, model mapping, bypass list. i18n PT-BR + EN. See `docs/frameworks/AGENTBRIDGE.md`. |+| `app/(dashboard)/dashboard/tools/traffic-inspector/` | Traffic Inspector dashboard page — DevTools split, 7 detail tabs, 4 capture mode toggles, session recorder, context colorization. i18n PT-BR + EN. See `docs/frameworks/TRAFFIC_INSPECTOR.md`. |+| `app/(dashboard)/dashboard/activity/` | Activity feed page (Group B): `page.tsx` (server) + `ActivityFeedClient.tsx` + `components/{ActivityFeed,ActivityItem,DayHeader,EventTypeFilter}.tsx` — see `docs/architecture/MONITORING_SECTIONS.md` |+| `app/(dashboard)/dashboard/costs/quota-share/` | Quota Sharing page (Group B): `QuotaSharePageClient.tsx` + `components/{PoolCard,DimensionBar,AllocationTable,BurnRateChart,QuotaConceptCard,CreatePoolModal,EditAllocationsModal}.tsx` + `hooks/{usePools,usePoolUsage,useLocalStoragePoolMigration}.ts` |+| `app/(dashboard)/dashboard/costs/quota-share/plans/` | Provider plan config page (Group B): `page.tsx` + `ProviderPlanConfigClient.tsx` — quota dimensions per connection override |+| `app/docs/` | Embedded documentation viewer (renders `docs/*.md`) |+| `app/landing/` | Marketing landing page |+| `app/login/`, `forgot-password/`, `forbidden/` | Auth-related pages |+| `app/{400,401,403,408,429,500,502,503}/` | HTTP error pages |+| `app/maintenance/`, `offline/`, `status/`, `privacy/`, `terms/`, `callback/` | Static/status pages |+| `app/layout.tsx`, `page.tsx`, `manifest.ts`, `globals.css` | Root layout, home, PWA manifest, global CSS |+| `app/error.tsx`, `global-error.tsx`, `not-found.tsx`, `loading.tsx` | Error boundaries |### `src/lib/` — Core libraries (~50 modules)-| Module | Purpose |-| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `a2a/` | A2A protocol task manager, skills (5), streaming |-| `acp/` | CLI Agent Registry (local CLI discovery — see `docs/frameworks/AGENT_PROTOCOLS_GUIDE.md`) |-| `api/` | Shared API helpers (`requireManagementAuth`, validation) |-| `auth/` | Session, password hashing, token validation |-| `batches/` | OpenAI Batches API handlers |-| `catalog/` | Provider catalog Zod validation + capability resolution |-| `cloudAgent/` | Cloud Agents (Codex Cloud, Devin, Jules) — see `docs/frameworks/CLOUD_AGENT.md` |-| `combos/` | Combo resolution + reorder helpers |-| `audit/` | Activity feed helpers: `highLevelActions.ts` (allowlist + `isHighLevelAction()`), `activityIcons.ts` (action → icon/verb map), `timeline.ts` (groupByDay/relativeTime) — see `docs/architecture/MONITORING_SECTIONS.md` |-| `compliance/` | Audit log + provider audit — see `docs/security/COMPLIANCE.md` |-| `compression/` | Compression engine glue (engines live in `open-sse/services/compression/`) |-| `config/` | Runtime config helpers |-| `db/` | 45+ domain DB modules + 55 migrations (always go through here for SQLite) |+| Module | Purpose |+| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `a2a/` | A2A protocol task manager, skills (5), streaming |+| `acp/` | CLI Agent Registry (local CLI discovery — see `docs/frameworks/AGENT_PROTOCOLS_GUIDE.md`) |+| `api/` | Shared API helpers (`requireManagementAuth`, validation) |+| `auth/` | Session, password hashing, token validation |+| `batches/` | OpenAI Batches API handlers |+| `catalog/` | Provider catalog Zod validation + capability resolution |+| `cloudAgent/` | Cloud Agents (Codex Cloud, Devin, Jules) — see `docs/frameworks/CLOUD_AGENT.md` |+| `combos/` | Combo resolution + reorder helpers |+| `audit/` | Activity feed helpers: `highLevelActions.ts` (allowlist + `isHighLevelAction()`), `activityIcons.ts` (action → icon/verb map), `timeline.ts` (groupByDay/relativeTime) — see `docs/architecture/MONITORING_SECTIONS.md` |+| `compliance/` | Audit log + provider audit — see `docs/security/COMPLIANCE.md` |+| `compression/` | Compression engine glue (engines live in `open-sse/services/compression/`) |+| `config/` | Runtime config helpers |+| `db/` | 45+ domain DB modules + 55 migrations (always go through here for SQLite) || `quota/` | Quota Sharing Engine: `dimensions.ts` (types/Zod), `types.ts` (QuotaStore interface), `sqliteQuotaStore.ts`, `redisQuotaStore.ts`, `storeFactory.ts`, `fairShare.ts`, `burnRate.ts`, `planResolver.ts`, `planRegistry.ts`, `saturationSignals.ts`, `enforce.ts`, `spendRecorder.ts` — see `docs/routing/QUOTA_SHARE.md` |-| `display/` | UI formatting helpers (cost, latency, etc.) |-| `embeddings/` | Embeddings service helpers |-| `env/` | Env variable parsing + validation |-| `evals/` | Eval framework (suites, runner, runtime) — see `docs/frameworks/EVALS.md` |-| `guardrails/` | PII masker, prompt injection, vision bridge — see `docs/security/GUARDRAILS.md` |-| `jobs/` | Background jobs (cron-like) |-| `memory/` | Conversational memory (SQLite FTS5 + sqlite-vec hybrid RRF + Qdrant tier 2) — see `docs/frameworks/MEMORY.md` |-| `memory/embedding/` | Multi-source embedding layer: `index.ts` (resolver), `remote.ts`, `staticPotion.ts`, `transformersLocal.ts`, `cache.ts`, `types.ts` (plan 21) |-| `memory/vectorStore.ts` | sqlite-vec v0.1.9 wrapper — KNN brute-force + hybrid RRF (FTS5 + vector, k=60). Lazy-init, degrades gracefully when sqlite-vec unavailable. (plan 21) |-| `memory/reindex.ts` | `runReindexBatch()` — processes memories with `needs_reindex=1` in background; called by `POST /api/memory/reindex` and lazy-backfill path. (plan 21) |-| `monitoring/` | Health checks, metrics emission |-| `oauth/` | OAuth flows for 14 providers (claude, codex, antigravity, cursor, github, gemini, kimi-coding, kilocode, cline, qwen, kiro, qoder, gitlab-duo, windsurf) |-| `plugins/` | Plugin registry |-| `promptCache/` | Anthropic-style prompt cache breakpoints |-| `skills/` | Skills framework (built-in + marketplace + SkillsSH) — see `docs/frameworks/SKILLS.md` |-| `playground/` | Playground Studio shared helpers: `codeExport.ts` (curl/Python/TS generator), `promptImprover.ts` (meta-prompt builder), `streamMetrics.ts` (pure TTFT/TPS), `types.ts` (pricing table) — see `docs/frameworks/PLAYGROUND_STUDIO.md` |-| `webhookDispatcher.ts` | HMAC webhook delivery — see `docs/frameworks/WEBHOOKS.md` |-| `cloudflaredTunnel.ts`, `ngrokTunnel.ts` | Tunnel managers — see `docs/ops/TUNNELS_GUIDE.md` |-| `oneproxySync.ts`, `oneproxyRotator.ts` | 1proxy free proxy marketplace — see `docs/ops/PROXY_GUIDE.md` |-| `cloudSync.ts`, `initCloudSync.ts` | Optional cloud sync of state |-| `localDb.ts` | Re-export barrel for db modules (no logic — re-exports only) |-| `cacheLayer.ts`, `idempotencyLayer.ts` | Request caching + idempotency |-| (~30 more top-level files) | Specialized helpers (logEnv, modelsDevSync, piiSanitizer, etc.) |+| `display/` | UI formatting helpers (cost, latency, etc.) |+| `embeddings/` | Embeddings service helpers |+| `env/` | Env variable parsing + validation |+| `evals/` | Eval framework (suites, runner, runtime) — see `docs/frameworks/EVALS.md` |+| `guardrails/` | PII masker, prompt injection, vision bridge — see `docs/security/GUARDRAILS.md` |+| `jobs/` | Background jobs (cron-like) |+| `memory/` | Conversational memory (SQLite FTS5 + sqlite-vec hybrid RRF + Qdrant tier 2) — see `docs/frameworks/MEMORY.md` |+| `memory/embedding/` | Multi-source embedding layer: `index.ts` (resolver), `remote.ts`, `staticPotion.ts`, `transformersLocal.ts`, `cache.ts`, `types.ts` (plan 21) |+| `memory/vectorStore.ts` | sqlite-vec v0.1.9 wrapper — KNN brute-force + hybrid RRF (FTS5 + vector, k=60). Lazy-init, degrades gracefully when sqlite-vec unavailable. (plan 21) |+| `memory/reindex.ts` | `runReindexBatch()` — processes memories with `needs_reindex=1` in background; called by `POST /api/memory/reindex` and lazy-backfill path. (plan 21) |+| `monitoring/` | Health checks, metrics emission |+| `oauth/` | OAuth flows for 14 providers (claude, codex, antigravity, cursor, github, gemini, kimi-coding, kilocode, cline, qwen, kiro, qoder, gitlab-duo, windsurf) |+| `plugins/` | Plugin registry |+| `promptCache/` | Anthropic-style prompt cache breakpoints |+| `skills/` | Skills framework (built-in + marketplace + SkillsSH) — see `docs/frameworks/SKILLS.md` |+| `playground/` | Playground Studio shared helpers: `codeExport.ts` (curl/Python/TS generator), `promptImprover.ts` (meta-prompt builder), `streamMetrics.ts` (pure TTFT/TPS), `types.ts` (pricing table) — see `docs/frameworks/PLAYGROUND_STUDIO.md` |+| `webhookDispatcher.ts` | HMAC webhook delivery — see `docs/frameworks/WEBHOOKS.md` |+| `cloudflaredTunnel.ts`, `ngrokTunnel.ts` | Tunnel managers — see `docs/ops/TUNNELS_GUIDE.md` |+| `oneproxySync.ts`, `oneproxyRotator.ts` | 1proxy free proxy marketplace — see `docs/ops/PROXY_GUIDE.md` |+| `cloudSync.ts`, `initCloudSync.ts` | Optional cloud sync of state |+| `localDb.ts` | Re-export barrel for db modules (no logic — re-exports only) |+| `cacheLayer.ts`, `idempotencyLayer.ts` | Request caching + idempotency |+| (~30 more top-level files) | Specialized helpers (logEnv, modelsDevSync, piiSanitizer, etc.) |### `src/db/` — Database (45+ modules + 55 migrations)-| Subdir | Purpose |-| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `db/core.ts` | `getDbInstance()` singleton with WAL journaling |-| `db/migrations/` | Versioned SQL files (idempotent, transactional). `073_memory_vec.sql` adds `memory_vec_meta` + `needs_reindex` column (plan 21). |-| `db/playgroundPresets.ts` | CRUD module for Playground Studio presets (`listPlaygroundPresets`, `getPlaygroundPreset`, `createPlaygroundPreset`, `updatePlaygroundPreset`, `deletePlaygroundPreset`) |-| `db/memoryVec.ts`| CRUD for `memory_vec_meta` (active_dim, embedding_signature, last_reset_at, vec_loaded) + `markMemoryNeedsReindex`, `getMemoryReindexQueue`, etc. (plan 21) |-| `db/<domain>.ts` | One module per domain: providers, combos, apiKeys, users, sessions, usage, audit*log, webhooks, skills, memory_entries, cloud_agent_tasks, evals*\*, reasoning_cache, etc. |+| Subdir | Purpose |+| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `db/core.ts` | `getDbInstance()` singleton with WAL journaling |+| `db/migrations/` | Versioned SQL files (idempotent, transactional). `073_memory_vec.sql` adds `memory_vec_meta` + `needs_reindex` column (plan 21). |+| `db/playgroundPresets.ts` | CRUD module for Playground Studio presets (`listPlaygroundPresets`, `getPlaygroundPreset`, `createPlaygroundPreset`, `updatePlaygroundPreset`, `deletePlaygroundPreset`) |+| `db/memoryVec.ts` | CRUD for `memory_vec_meta` (active_dim, embedding_signature, last_reset_at, vec_loaded) + `markMemoryNeedsReindex`, `getMemoryReindexQueue`, etc. (plan 21) |+| `db/<domain>.ts` | One module per domain: providers, combos, apiKeys, users, sessions, usage, audit*log, webhooks, skills, memory_entries, cloud_agent_tasks, evals*\*, reasoning_cache, etc. |### `src/domain/`@@ -221,7 +245,7 @@ src/| Module | Purpose || -------------------------------- | ---------------------------------------------------------------------- |-| `constants/providers.ts` | **177 providers** with Zod validation (source of truth) |+| `constants/providers.ts` | **226 providers** with Zod validation (source of truth) || `constants/cliTools.ts` | External CLI tool registry || `constants/routingStrategies.ts` | **14 routing strategies** with priorities || `constants/publicApiRoutes.ts` | Routes that require Bearer (vs management) auth |@@ -247,7 +271,7 @@ open-sse/├── translator/ # Format converters (9 request, 8 response, 9 helpers)├── transformer/ # Responses API ↔ Chat Completions (TransformStream)├── services/ # ~80+ service modules (combo, accountFallback, autoCombo, reasoningCache, claude code/chatgpt stealth, modelDeprecation, taskAwareRouter, workflowFSM, etc.)-├── mcp-server/ # MCP server (37 tools, 3 transports, ~13 scopes)+├── mcp-server/ # MCP server (87 tools, 3 transports, 30 scopes)├── config/ # Provider/model registries, header config, model aliases├── utils/ # TLS client, proxy fetch/dispatcher, network helpers├── index.ts # Workspace entry@@ -378,13 +402,13 @@ open-sse/| `CLI-TOOLS.md` | External CLI integrations + Internal OmniRoute CLI || `I18N.md` | i18n architecture, adding a language, 30 locales || `UNINSTALL.md` | Clean uninstall steps |-| `PROVIDER_REFERENCE.md` | **Auto-generated** catalog of 177 providers (regen: `npm run gen:provider-reference`) |+| `PROVIDER_REFERENCE.md` | **Auto-generated** catalog of 226 providers (regen: `npm run gen:provider-reference`) |### Subsystem deep-dives| Doc | Purpose || -------------------------- | ------------------------------------------------------------------- |-| `MCP-SERVER.md` | MCP server: 37 tools, 3 transports, ~13 scopes, REST endpoints |+| `MCP-SERVER.md` | MCP server: 87 tools, 3 transports, 30 scopes, REST endpoints || `A2A-SERVER.md` | A2A v0.3: JSON-RPC, 5 skills, REST helpers, agent card || `AGENT_PROTOCOLS_GUIDE.md` | Unified guide: A2A vs ACP vs Cloud Agents || `CLOUD_AGENT.md` | Codex Cloud / Devin / Jules orchestration |@@ -428,7 +452,7 @@ open-sse/| Subdir | Purpose || ------------------------- | ------------------------------------------------------------------------------------- || `docs/archive/` | Archived/historical docs (e.g., `RFC-AUTO-ASSESSMENT-DRAFT.md` — superseded by EVALS) |-| `docs/i18n/` | Localized doc translations (~40 locales) |+| `docs/i18n/` | Localized doc translations (~42 locales) || `docs/screenshots/` | Image assets for guides || `docs/superpowers/plans/` | Implementation plans (generated by `superpowers:writing-plans` skill) |@@ -455,9 +479,24 @@ open-sse/----## `config/` — Static Configs--Shipped configuration templates and sample files (referenced by setup wizard).+## `config/` — Static Configs + Quality-Gate State++Shipped configuration templates plus the committed quality-gate baselines+(moved here from the repo root in v3.8.26 to keep the root lean).++| Path | Purpose |+| --------------------------------------------- | -------------------------------------------------------------------------------- |+| `config/i18n.json` | Locale list + metadata (canonical source for the 42-locale count) |+| `config/i18n-schema.json` | JSON schema validating `i18n.json` |+| `config/payloadRules.json` | Upstream payload sanitization rules |+| `config/quality/quality-baseline.json` | Multi-metric ratchet baseline (`scripts/quality/check-quality-ratchet.mjs`) |+| `config/quality/complexity-baseline.json` | Frozen ESLint-complexity baseline (`check-complexity.mjs`) |+| `config/quality/duplication-baseline.json` | Frozen jscpd duplication baseline (`check-duplication.mjs`) |+| `config/quality/file-size-baseline.json` | Frozen per-file size baseline (`check-file-size.mjs`) |+| `config/quality/test-discovery-baseline.json` | Frozen orphan-test baseline (`check-test-discovery.mjs`) |+| `config/quality/dependency-allowlist.json` | Approved dependencies allowlist (`check-deps.mjs`) |+| `config/quality/.license-allowlist.json` | SPDX license allowlist (`check-licenses.mjs`) |+| `config/quality/quality-metrics.json` | Ephemeral collected metrics (generated by `collect-metrics.mjs`; **gitignored**) |---@@ -484,15 +523,15 @@ Shipped configuration templates and sample files (referenced by setup wizard).## `.claude/` — Claude Code Slash Commands-| File | Purpose |-| ----------------------------------------------------------------- | -------------------------------------------------- |-| `commands/version-bump-cc.md` | `/version-bump-cc` — bump version + auto-changelog |-| `commands/generate-release-cc.md` | `/generate-release-cc` — full release workflow |-| `commands/deploy-vps-{local,akamai,both}-cc.md` | Deploy to VPS |-| `commands/capture-release-evidences-cc.md` | Browser-record new features as WebP |-| `commands/review-{prs,discussions}-cc.md` | Triage GitHub PRs/discussions |-| `commands/{review-issues,implement-features}-cc.md` | Issue workflows |-| `settings.local.json` | Per-project Claude Code settings |+| File | Purpose |+| --------------------------------------------------- | -------------------------------------------------- |+| `commands/version-bump-cc.md` | `/version-bump-cc` — bump version + auto-changelog |+| `commands/generate-release-cc.md` | `/generate-release-cc` — full release workflow |+| `commands/deploy-vps-{local,akamai,both}-cc.md` | Deploy to VPS |+| `commands/capture-release-evidences-cc.md` | Browser-record new features as WebP |+| `commands/review-{prs,discussions}-cc.md` | Triage GitHub PRs/discussions |+| `commands/{review-issues,implement-features}-cc.md` | Issue workflows |+| `settings.local.json` | Per-project Claude Code settings |---diff --git a/docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md b/docs/comparison/OMNIROUTE_VS_ALTERNATIVES.mdindex 4af363c97f..b7d7af4b1e 100644--- a/docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md+++ b/docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md@@ -16,10 +16,10 @@ Objective feature comparison vs popular open-source AI routers.| **Providers** | **207+** | ~100 | ~50 | ~30 || **Self-hostable** | ✅ | ✅ | ❌ | ⚠ paid || **OAuth providers (Claude, Codex, Copilot, etc.)** | **15+** | partial | ❌ | ❌ |-| **Auto-fallback combos** | **14 strategies** | priority-based | tier-based | weighted |+| **Auto-fallback combos** | **15 strategies** | priority-based | tier-based | weighted || **Tier 1/2/3 fallback (subscription→cheap→free)** | ✅ + UI | manual | n/a | manual || **Token compression** | RTK (47 filters) + Caveman | none | none | none |-| **Built-in MCP server** | ✅ 37 tools, 13 scopes | ❌ | ❌ | ❌ |+| **Built-in MCP server** | ✅ 87 tools, 30 scopes | ❌ | ❌ | ❌ || **A2A protocol** | ✅ 5 skills | ❌ | ❌ | ❌ || **Memory (FTS5 + vector)** | ✅ | ❌ | ❌ | ❌ || **Guardrails (PII, injection, vision)** | ✅ | partial | ❌ | ✅ paid |@@ -31,7 +31,7 @@ Objective feature comparison vs popular open-source AI routers.| **CLI with system tray (no Electron)** | ✅ | ❌ | n/a | n/a || **CLI machine-ID auto-auth** | ✅ | ❌ | n/a | n/a || **Dashboard** | Next.js 16 | basic | proprietary | proprietary |-| **i18n** | **40+ locales** | ❌ | ❌ | ⚠ |+| **i18n** | **42+ locales** | ❌ | ❌ | ⚠ || **Public agent skills (SKILL.md)** | ✅ 10 | ❌ | ❌ | ❌ || **Tunnel support (Cloudflared, Tailscale, Ngrok)** | ✅ | ❌ | n/a | n/a || **License** | MIT | MIT | proprietary | proprietary |diff --git a/docs/compression/meta.json b/docs/compression/meta.jsonindex bfc16e0493..1d3350b9cb 100644--- a/docs/compression/meta.json+++ b/docs/compression/meta.json@@ -5,6 +5,7 @@"COMPRESSION_ENGINES","RTK_COMPRESSION","COMPRESSION_LANGUAGE_PACKS",- "COMPRESSION_RULES_FORMAT"+ "COMPRESSION_RULES_FORMAT",+ "EXTENDING_COMPRESSION"]}diff --git a/docs/diagrams/README.md b/docs/diagrams/README.mdindex 78d2bc48aa..437fb8da32 100644--- a/docs/diagrams/README.md+++ b/docs/diagrams/README.md@@ -16,7 +16,7 @@ Mermaid sources (`.mmd`) and exported SVGs for OmniRoute v3.8.0 architecture flo| [auto-combo-9factor.mmd](./auto-combo-9factor.mmd) | [SVG](./exported/auto-combo-9factor.svg) | docs/routing/AUTO-COMBO.md || [resilience-3layers.mmd](./resilience-3layers.mmd) | [SVG](./exported/resilience-3layers.svg) | docs/architecture/RESILIENCE_GUIDE.md, CLAUDE.md || [i18n-flow.mmd](./i18n-flow.mmd) | [SVG](./exported/i18n-flow.svg) | docs/guides/I18N.md |-| [mcp-tools-43.mmd](./mcp-tools-43.mmd) | [SVG](./exported/mcp-tools-43.svg) | docs/frameworks/MCP-SERVER.md |+| [mcp-tools-87.mmd](./mcp-tools-87.mmd) | [SVG](./exported/mcp-tools-87.svg) | docs/frameworks/MCP-SERVER.md || [cloud-agent-flow.mmd](./cloud-agent-flow.mmd) | [SVG](./exported/cloud-agent-flow.svg) | docs/frameworks/CLOUD_AGENT.md || [authz-pipeline.mmd](./authz-pipeline.mmd) | [SVG](./exported/authz-pipeline.svg) | docs/architecture/AUTHZ_GUIDE.md || [db-schema-overview.mmd](./db-schema-overview.mmd) | [SVG](./exported/db-schema-overview.svg) | docs/architecture/CODEBASE_DOCUMENTATION.md |diff --git a/docs/diagrams/exported/mcp-tools-43.svg b/docs/diagrams/exported/mcp-tools-43.svgdeleted file mode 100644index dbeeac8496..0000000000--- a/docs/diagrams/exported/mcp-tools-43.svg+++ /dev/null@@ -1 +0,0 @@-<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 668.516px; background-color: white;" viewBox="0 0 668.515625 2374" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#552222;}#my-svg .error-text{fill:#552222;stroke:#552222;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#333333;stroke:#333333;}#my-svg .marker.cross{stroke:#333333;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#my-svg .cluster-label text{fill:#333;}#my-svg .cluster-label span{color:#333;}#my-svg .cluster-label span p{background-color:transparent;}#my-svg .label text,#my-svg span{fill:#333;color:#333;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#my-svg .rough-node .label text,#my-svg .node .label text,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .rough-node .label,#my-svg .node .label,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#my-svg .arrowheadPath{fill:#333333;}#my-svg .edgePath .path{stroke:#333333;stroke-width:1px;}#my-svg .flowchart-link{stroke:#333333;fill:none;}#my-svg .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#my-svg .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#my-svg .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#my-svg .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#my-svg .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#my-svg .cluster text{fill:#333;}#my-svg .cluster span{color:#333;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#my-svg rect.text{fill:none;stroke-width:0;}#my-svg .icon-shape,#my-svg .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#my-svg .icon-shape p,#my-svg .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#my-svg .icon-shape .label rect,#my-svg .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#my-svg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#my-svg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#my-svg .node .neo-node{stroke:#9370DB;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].node path{stroke:#9370DB;stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#9370DB;filter:none;}#my-svg [data-look="neo"].node circle{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker id="my-svg_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"/></marker><marker id="my-svg_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"><path d="M88.643,1364L104.491,1246.833C120.34,1129.667,152.037,895.333,172.569,778.167C193.102,661,202.469,661,207.152,661L211.836,661" id="my-svg-L_MCP_Core_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Core_0" data-points="W3sieCI6ODguNjQyNTUxODAyNTYwNjUsInkiOjEzNjR9LHsieCI6MTgzLjczNDM3NSwieSI6NjYxfSx7IngiOjIxNS44MzU5Mzc1LCJ5Ijo2NjF9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M102.186,1364L115.777,1335.833C129.369,1307.667,156.552,1251.333,173.643,1223.167C190.734,1195,197.734,1195,201.234,1195L204.734,1195" id="my-svg-L_MCP_Mem_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Mem_0" data-points="W3sieCI6MTAyLjE4NjAzNTE1NjI1LCJ5IjoxMzY0fSx7IngiOjE4My43MzQzNzUsInkiOjExOTV9LHsieCI6MjA4LjczNDM3NSwieSI6MTE5NX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M108.459,1442L121.005,1461.5C133.551,1481,158.643,1520,176.392,1539.5C194.141,1559,204.547,1559,209.75,1559L214.953,1559" id="my-svg-L_MCP_Skl_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Skl_0" data-points="W3sieCI6MTA4LjQ1ODk4NDM3NSwieSI6MTQ0Mn0seyJ4IjoxODMuNzM0Mzc1LCJ5IjoxNTU5fSx7IngiOjIxOC45NTMxMjUsInkiOjE1NTl9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M89.158,1442L104.92,1548.167C120.683,1654.333,152.209,1866.667,172.433,1972.833C192.656,2079,201.578,2079,206.039,2079L210.5,2079" id="my-svg-L_MCP_Notion_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Notion_0" data-points="W3sieCI6ODkuMTU3NjAyMTYzNDYxNTMsInkiOjE0NDJ9LHsieCI6MTgzLjczNDM3NSwieSI6MjA3OX0seyJ4IjoyMTQuNSwieSI6MjA3OX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M284.298,634L299.501,546.167C314.704,458.333,345.11,282.667,363.813,194.833C382.516,107,389.516,107,393.016,107L396.516,107" id="my-svg-L_Core_Essential_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Core_Essential_0" data-points="W3sieCI6Mjg0LjI5ODM2OTgxMDQ2OTMsInkiOjYzNH0seyJ4IjozNzUuNTE1NjI1LCJ5IjoxMDd9LHsieCI6NDAwLjUxNTYyNSwieSI6MTA3fV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M286.699,634L301.502,577.5C316.304,521,345.91,408,373.689,351.5C401.469,295,427.422,295,440.398,295L453.375,295" id="my-svg-L_Core_Search_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Core_Search_0" data-points="W3sieCI6Mjg2LjY5ODg5ODU2NTU3Mzc2LCJ5Ijo2MzR9LHsieCI6Mzc1LjUxNTYyNSwieSI6Mjk1fSx7IngiOjQ1Ny4zNzUsInkiOjI5NX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M301.566,634L313.891,618.833C326.216,603.667,350.866,573.333,366.691,558.167C382.516,543,389.516,543,393.016,543L396.516,543" id="my-svg-L_Core_Advanced_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Core_Advanced_0" data-points="W3sieCI6MzAxLjU2NjA3NTIxMTg2NDQsInkiOjYzNH0seyJ4IjozNzUuNTE1NjI1LCJ5Ijo1NDN9LHsieCI6NDAwLjUxNTYyNSwieSI6NTQzfV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M301.566,688L313.891,703.167C326.216,718.333,350.866,748.667,377.503,763.833C404.141,779,432.766,779,447.078,779L461.391,779" id="my-svg-L_Core_Cache_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Core_Cache_0" data-points="W3sieCI6MzAxLjU2NjA3NTIxMTg2NDQsInkiOjY4OH0seyJ4IjozNzUuNTE1NjI1LCJ5Ijo3Nzl9LHsieCI6NDY1LjM5MDYyNSwieSI6Nzc5fV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M291.287,688L305.325,720.5C319.363,753,347.44,818,371.789,850.5C396.138,883,416.76,883,427.072,883L437.383,883" id="my-svg-L_Core_Compression_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Core_Compression_0" data-points="W3sieCI6MjkxLjI4NzM3MzMxMDgxMDg0LCJ5Ijo2ODh9LHsieCI6Mzc1LjUxNTYyNSwieSI6ODgzfSx7IngiOjQ0MS4zODI4MTI1LCJ5Ijo4ODN9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M287.567,688L302.225,737.833C316.883,787.667,346.199,887.333,369.093,937.167C391.987,987,408.458,987,416.694,987L424.93,987" id="my-svg-L_Core_Tunnels_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Core_Tunnels_0" data-points="W3sieCI6Mjg3LjU2Njg2MTU3OTc1NDYsInkiOjY4OH0seyJ4IjozNzUuNTE1NjI1LCJ5Ijo5ODd9LHsieCI6NDI4LjkyOTY4NzUsInkiOjk4N31d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M304.52,1168L316.352,1155.167C328.185,1142.333,351.85,1116.667,374.291,1103.833C396.732,1091,417.948,1091,428.556,1091L439.164,1091" id="my-svg-L_Mem_M1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Mem_M1_0" data-points="W3sieCI6MzA0LjUxOTY4MTQ5MDM4NDY0LCJ5IjoxMTY4fSx7IngiOjM3NS41MTU2MjUsInkiOjEwOTF9LHsieCI6NDQzLjE2NDA2MjUsInkiOjEwOTF9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M350.516,1195L354.682,1195C358.849,1195,367.182,1195,383.142,1195C399.102,1195,422.688,1195,434.48,1195L446.273,1195" id="my-svg-L_Mem_M2_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Mem_M2_0" data-points="W3sieCI6MzUwLjUxNTYyNSwieSI6MTE5NX0seyJ4IjozNzUuNTE1NjI1LCJ5IjoxMTk1fSx7IngiOjQ1MC4yNzM0Mzc1LCJ5IjoxMTk1fV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M304.52,1222L316.352,1234.833C328.185,1247.667,351.85,1273.333,374.66,1286.167C397.469,1299,419.422,1299,430.398,1299L441.375,1299" id="my-svg-L_Mem_M3_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Mem_M3_0" data-points="W3sieCI6MzA0LjUxOTY4MTQ5MDM4NDY0LCJ5IjoxMjIyfSx7IngiOjM3NS41MTU2MjUsInkiOjEyOTl9LHsieCI6NDQ1LjM3NSwieSI6MTI5OX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M296.221,1532L309.437,1510.5C322.653,1489,349.084,1446,375.649,1424.5C402.214,1403,428.911,1403,442.26,1403L455.609,1403" id="my-svg-L_Skl_S1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Skl_S1_0" data-points="W3sieCI6Mjk2LjIyMTQ1NDMyNjkyMzEsInkiOjE1MzJ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MTQwM30seyJ4Ijo0NTkuNjA5Mzc1LCJ5IjoxNDAzfV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M329.414,1532L337.098,1527.833C344.781,1523.667,360.149,1515.333,383.405,1511.167C406.661,1507,437.807,1507,453.38,1507L468.953,1507" id="my-svg-L_Skl_S2_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Skl_S2_0" data-points="W3sieCI6MzI5LjQxNDM2Mjk4MDc2OTIsInkiOjE1MzJ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MTUwN30seyJ4Ijo0NzIuOTUzMTI1LCJ5IjoxNTA3fV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M329.414,1586L337.098,1590.167C344.781,1594.333,360.149,1602.667,379.622,1606.833C399.096,1611,422.677,1611,434.467,1611L446.258,1611" id="my-svg-L_Skl_S3_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Skl_S3_0" data-points="W3sieCI6MzI5LjQxNDM2Mjk4MDc2OTIsInkiOjE1ODZ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MTYxMX0seyJ4Ijo0NTAuMjU3ODEyNSwieSI6MTYxMX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M296.221,1586L309.437,1607.5C322.653,1629,349.084,1672,374.611,1693.5C400.138,1715,424.76,1715,437.072,1715L449.383,1715" id="my-svg-L_Skl_S4_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Skl_S4_0" data-points="W3sieCI6Mjk2LjIyMTQ1NDMyNjkyMzEsInkiOjE1ODZ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MTcxNX0seyJ4Ijo0NTMuMzgyODEyNSwieSI6MTcxNX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M289.583,2052L303.905,2013.167C318.227,1974.333,346.871,1896.667,372.984,1857.833C399.096,1819,422.677,1819,434.467,1819L446.258,1819" id="my-svg-L_Notion_N1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Notion_N1_0" data-points="W3sieCI6Mjg5LjU4Mjg3MjU5NjE1MzgzLCJ5IjoyMDUyfSx7IngiOjM3NS41MTU2MjUsInkiOjE4MTl9LHsieCI6NDUwLjI1NzgxMjUsInkiOjE4MTl9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M296.221,2052L309.437,2030.5C322.653,2009,349.084,1966,372.53,1944.5C395.977,1923,416.438,1923,426.668,1923L436.898,1923" id="my-svg-L_Notion_N2_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Notion_N2_0" data-points="W3sieCI6Mjk2LjIyMTQ1NDMyNjkyMzEsInkiOjIwNTJ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MTkyM30seyJ4Ijo0NDAuODk4NDM3NSwieSI6MTkyM31d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M329.414,2052L337.098,2047.833C344.781,2043.667,360.149,2035.333,374.061,2031.167C387.974,2027,400.432,2027,406.661,2027L412.891,2027" id="my-svg-L_Notion_N3_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Notion_N3_0" data-points="W3sieCI6MzI5LjQxNDM2Mjk4MDc2OTIsInkiOjIwNTJ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MjAyN30seyJ4Ijo0MTYuODkwNjI1LCJ5IjoyMDI3fV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M329.414,2106L337.098,2110.167C344.781,2114.333,360.149,2122.667,375.543,2126.833C390.938,2131,406.359,2131,414.07,2131L421.781,2131" id="my-svg-L_Notion_N4_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Notion_N4_0" data-points="W3sieCI6MzI5LjQxNDM2Mjk4MDc2OTIsInkiOjIxMDZ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MjEzMX0seyJ4Ijo0MjUuNzgxMjUsInkiOjIxMzF9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M296.221,2106L309.437,2127.5C322.653,2149,349.084,2192,367.197,2213.5C385.31,2235,395.104,2235,400.001,2235L404.898,2235" id="my-svg-L_Notion_N5_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Notion_N5_0" data-points="W3sieCI6Mjk2LjIyMTQ1NDMyNjkyMzEsInkiOjIxMDZ9LHsieCI6Mzc1LjUxNTYyNSwieSI6MjIzNX0seyJ4Ijo0MDguODk4NDM3NSwieSI6MjIzNX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M289.583,2106L303.905,2144.833C318.227,2183.667,346.871,2261.333,368.015,2300.167C389.159,2339,402.802,2339,409.624,2339L416.445,2339" id="my-svg-L_Notion_N6_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Notion_N6_0" data-points="W3sieCI6Mjg5LjU4Mjg3MjU5NjE1MzgzLCJ5IjoyMTA2fSx7IngiOjM3NS41MTU2MjUsInkiOjIzMzl9LHsieCI6NDIwLjQ0NTMxMjUsInkiOjIzMzl9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/></g><g class="edgeLabels"><g class="edgeLabel"><g class="label" data-id="L_MCP_Core_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Mem_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Skl_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Notion_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Core_Essential_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Core_Search_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Core_Advanced_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Core_Cache_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Core_Compression_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Core_Tunnels_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Mem_M1_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Mem_M2_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Mem_M3_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Skl_S1_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Skl_S2_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Skl_S3_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Skl_S4_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Notion_N1_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Notion_N2_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Notion_N3_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Notion_N4_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Notion_N5_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Notion_N6_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g class="node default" id="my-svg-flowchart-MCP-0" data-look="classic" transform="translate(83.3671875, 1403)"><rect class="basic label-container" style="" x="-75.3671875" y="-39" width="150.734375" height="78"/><g class="label" style="" transform="translate(-45.3671875, -24)"><rect/><foreignObject width="90.734375" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>MCP Server<br />43 tools total</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Core-1" data-look="classic" transform="translate(279.625, 661)"><rect class="basic label-container" style="" x="-63.7890625" y="-27" width="127.578125" height="54"/><g class="label" style="" transform="translate(-33.7890625, -12)"><rect/><foreignObject width="67.578125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Core (30)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Mem-3" data-look="classic" transform="translate(279.625, 1195)"><rect class="basic label-container" style="" x="-70.890625" y="-27" width="141.78125" height="54"/><g class="label" style="" transform="translate(-40.890625, -12)"><rect/><foreignObject width="81.78125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Memory (3)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Skl-5" data-look="classic" transform="translate(279.625, 1559)"><rect class="basic label-container" style="" x="-60.671875" y="-27" width="121.34375" height="54"/><g class="label" style="" transform="translate(-30.671875, -12)"><rect/><foreignObject width="61.34375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Skills (4)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Notion-7" data-look="classic" transform="translate(279.625, 2079)"><rect class="basic label-container" style="" x="-65.125" y="-27" width="130.25" height="54"/><g class="label" style="" transform="translate(-35.125, -12)"><rect/><foreignObject width="70.25" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Notion (6)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Essential-9" data-look="classic" transform="translate(530.515625, 107)"><rect class="basic label-container" style="" x="-130" y="-99" width="260" height="198"/><g class="label" style="" transform="translate(-100, -84)"><rect/><foreignObject width="200" height="168"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Essential (8)<br />get_health, list_combos,<br />switch_combo, check_quota,<br />route_request, cost_report,<br />list_models_catalog,<br />get_combo_metrics</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Search-11" data-look="classic" transform="translate(530.515625, 295)"><rect class="basic label-container" style="" x="-73.140625" y="-39" width="146.28125" height="78"/><g class="label" style="" transform="translate(-43.140625, -24)"><rect/><foreignObject width="86.28125" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Search (1)<br />web_search</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Advanced-13" data-look="classic" transform="translate(530.515625, 543)"><rect class="basic label-container" style="" x="-130" y="-159" width="260" height="318"/><g class="label" style="" transform="translate(-100, -144)"><rect/><foreignObject width="200" height="288"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Advanced (11)<br />simulate_route, set_budget_guard,<br />set_routing_strategy,<br />set_resilience_profile,<br />test_combo, get_provider_metrics,<br />best_combo_for_task, explain_route,<br />get_session_snapshot,<br />db_health_check, sync_pricing</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Cache-15" data-look="classic" transform="translate(530.515625, 779)"><rect class="basic label-container" style="" x="-65.125" y="-27" width="130.25" height="54"/><g class="label" style="" transform="translate(-35.125, -12)"><rect/><foreignObject width="70.25" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Cache (2)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Compression-17" data-look="classic" transform="translate(530.515625, 883)"><rect class="basic label-container" style="" x="-89.1328125" y="-27" width="178.265625" height="54"/><g class="label" style="" transform="translate(-59.1328125, -12)"><rect/><foreignObject width="118.265625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Compression (5)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Tunnels-19" data-look="classic" transform="translate(530.515625, 987)"><rect class="basic label-container" style="" x="-101.5859375" y="-27" width="203.171875" height="54"/><g class="label" style="" transform="translate(-71.5859375, -12)"><rect/><foreignObject width="143.171875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>1Proxy / Tunnels (3)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-M1-21" data-look="classic" transform="translate(530.515625, 1091)"><rect class="basic label-container" style="" x="-87.3515625" y="-27" width="174.703125" height="54"/><g class="label" style="" transform="translate(-57.3515625, -12)"><rect/><foreignObject width="114.703125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>memory_search</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-M2-23" data-look="classic" transform="translate(530.515625, 1195)"><rect class="basic label-container" style="" x="-80.2421875" y="-27" width="160.484375" height="54"/><g class="label" style="" transform="translate(-50.2421875, -12)"><rect/><foreignObject width="100.484375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>memory_save</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-M3-25" data-look="classic" transform="translate(530.515625, 1299)"><rect class="basic label-container" style="" x="-85.140625" y="-27" width="170.28125" height="54"/><g class="label" style="" transform="translate(-55.140625, -12)"><rect/><foreignObject width="110.28125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>memory_delete</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-S1-27" data-look="classic" transform="translate(530.515625, 1403)"><rect class="basic label-container" style="" x="-70.90625" y="-27" width="141.8125" height="54"/><g class="label" style="" transform="translate(-40.90625, -12)"><rect/><foreignObject width="81.8125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>skill_invoke</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-S2-29" data-look="classic" transform="translate(530.515625, 1507)"><rect class="basic label-container" style="" x="-57.5625" y="-27" width="115.125" height="54"/><g class="label" style="" transform="translate(-27.5625, -12)"><rect/><foreignObject width="55.125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>skill_list</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-S3-31" data-look="classic" transform="translate(530.515625, 1611)"><rect class="basic label-container" style="" x="-80.2578125" y="-27" width="160.515625" height="54"/><g class="label" style="" transform="translate(-50.2578125, -12)"><rect/><foreignObject width="100.515625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>skill_diagnose</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-S4-33" data-look="classic" transform="translate(530.515625, 1715)"><rect class="basic label-container" style="" x="-77.1328125" y="-27" width="154.265625" height="54"/><g class="label" style="" transform="translate(-47.1328125, -12)"><rect/><foreignObject width="94.265625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>skill_uninstall</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-N1-35" data-look="classic" transform="translate(530.515625, 1819)"><rect class="basic label-container" style="" x="-80.2578125" y="-27" width="160.515625" height="54"/><g class="label" style="" transform="translate(-50.2578125, -12)"><rect/><foreignObject width="100.515625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>notion_search</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-N2-37" data-look="classic" transform="translate(530.515625, 1923)"><rect class="basic label-container" style="" x="-89.6171875" y="-27" width="179.234375" height="54"/><g class="label" style="" transform="translate(-59.6171875, -12)"><rect/><foreignObject width="119.234375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>notion_get_page</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-N3-39" data-look="classic" transform="translate(530.515625, 2027)"><rect class="basic label-container" style="" x="-113.625" y="-27" width="227.25" height="54"/><g class="label" style="" transform="translate(-83.625, -12)"><rect/><foreignObject width="167.25" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>notion_query_database</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-N4-41" data-look="classic" transform="translate(530.515625, 2131)"><rect class="basic label-container" style="" x="-104.734375" y="-27" width="209.46875" height="54"/><g class="label" style="" transform="translate(-74.734375, -12)"><rect/><foreignObject width="149.46875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>notion_get_database</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-N5-43" data-look="classic" transform="translate(530.515625, 2235)"><rect class="basic label-container" style="" x="-121.6171875" y="-27" width="243.234375" height="54"/><g class="label" style="" transform="translate(-91.6171875, -12)"><rect/><foreignObject width="183.234375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>notion_list_block_children</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-N6-45" data-look="classic" transform="translate(530.515625, 2339)"><rect class="basic label-container" style="" x="-110.0703125" y="-27" width="220.140625" height="54"/><g class="label" style="" transform="translate(-80.0703125, -12)"><rect/><foreignObject width="160.140625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>notion_append_blocks</p></span></div></foreignObject></g></g></g></g></g><defs><filter id="my-svg-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><defs><filter id="my-svg-drop-shadow-small" height="150%" width="150%"><feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs></svg>\ No newline at end of filediff --git a/docs/diagrams/exported/mcp-tools-87.svg b/docs/diagrams/exported/mcp-tools-87.svgnew file mode 100644index 0000000000..5c3882f07b--- /dev/null+++ b/docs/diagrams/exported/mcp-tools-87.svg@@ -0,0 +1 @@+<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 526px; background-color: white;" viewBox="0 0 526 1326" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#552222;}#my-svg .error-text{fill:#552222;stroke:#552222;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#333333;stroke:#333333;}#my-svg .marker.cross{stroke:#333333;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#my-svg .cluster-label text{fill:#333;}#my-svg .cluster-label span{color:#333;}#my-svg .cluster-label span p{background-color:transparent;}#my-svg .label text,#my-svg span{fill:#333;color:#333;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#my-svg .rough-node .label text,#my-svg .node .label text,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .rough-node .label,#my-svg .node .label,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#my-svg .arrowheadPath{fill:#333333;}#my-svg .edgePath .path{stroke:#333333;stroke-width:1px;}#my-svg .flowchart-link{stroke:#333333;fill:none;}#my-svg .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#my-svg .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#my-svg .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#my-svg .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#my-svg .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#my-svg .cluster text{fill:#333;}#my-svg .cluster span{color:#333;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#my-svg rect.text{fill:none;stroke-width:0;}#my-svg .icon-shape,#my-svg .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#my-svg .icon-shape p,#my-svg .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#my-svg .icon-shape .label rect,#my-svg .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#my-svg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#my-svg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#my-svg .node .neo-node{stroke:#9370DB;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].node path{stroke:#9370DB;stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#9370DB;filter:none;}#my-svg [data-look="neo"].node circle{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker id="my-svg_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"/></marker><marker id="my-svg_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"><path d="M115.914,660L135.428,563.833C154.943,467.667,193.971,275.333,216.986,179.167C240,83,247,83,250.5,83L254,83" id="my-svg-L_MCP_Core_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Core_0" data-points="W3sieCI6MTE1LjkxMzk2MTAzODk2MTAzLCJ5Ijo2NjB9LHsieCI6MjMzLCJ5Ijo4M30seyJ4IjoyNTgsInkiOjgzfV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M119.39,660L138.325,595.167C157.26,530.333,195.13,400.667,217.565,335.833C240,271,247,271,250.5,271L254,271" id="my-svg-L_MCP_Mem_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Mem_0" data-points="W3sieCI6MTE5LjM5MDE4NjkxNTg4Nzg1LCJ5Ijo2NjB9LHsieCI6MjMzLCJ5IjoyNzF9LHsieCI6MjU4LCJ5IjoyNzF9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M128.313,660L145.76,626.5C163.208,593,198.104,526,219.052,492.5C240,459,247,459,250.5,459L254,459" id="my-svg-L_MCP_Skl_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Skl_0" data-points="W3sieCI6MTI4LjMxMjUsInkiOjY2MH0seyJ4IjoyMzMsInkiOjQ1OX0seyJ4IjoyNTgsInkiOjQ1OX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M184.172,660L192.31,655.833C200.448,651.667,216.724,643.333,228.362,639.167C240,635,247,635,250.5,635L254,635" id="my-svg-L_MCP_ASkl_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_ASkl_0" data-points="W3sieCI6MTg0LjE3MTg3NSwieSI6NjYwfSx7IngiOjIzMywieSI6NjM1fSx7IngiOjI1OCwieSI6NjM1fV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M184.172,738L192.31,742.167C200.448,746.333,216.724,754.667,231.695,758.833C246.667,763,260.333,763,267.167,763L274,763" id="my-svg-L_MCP_Gam_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Gam_0" data-points="W3sieCI6MTg0LjE3MTg3NSwieSI6NzM4fSx7IngiOjIzMywieSI6NzYzfSx7IngiOjI3OCwieSI6NzYzfV0=" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M137.018,738L153.015,759.5C169.012,781,201.006,824,228.003,845.5C255,867,277,867,288,867L299,867" id="my-svg-L_MCP_Plg_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Plg_0" data-points="W3sieCI6MTM3LjAxNzg1NzE0Mjg1NzE0LCJ5Ijo3Mzh9LHsieCI6MjMzLCJ5Ijo4Njd9LHsieCI6MzAzLCJ5Ijo4Njd9XQ==" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M122.684,738L141.07,786.833C159.456,835.667,196.228,933.333,218.114,982.167C240,1031,247,1031,250.5,1031L254,1031" id="my-svg-L_MCP_Notion_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Notion_0" data-points="W3sieCI6MTIyLjY4MzczNDkzOTc1OTAzLCJ5Ijo3Mzh9LHsieCI6MjMzLCJ5IjoxMDMxfSx7IngiOjI1OCwieSI6MTAzMX1d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/><path d="M116.961,738L136.301,822.167C155.641,906.333,194.32,1074.667,217.16,1158.833C240,1243,247,1243,250.5,1243L254,1243" id="my-svg-L_MCP_Obs_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_MCP_Obs_0" data-points="W3sieCI6MTE2Ljk2MTM5NzA1ODgyMzU0LCJ5Ijo3Mzh9LHsieCI6MjMzLCJ5IjoxMjQzfSx7IngiOjI1OCwieSI6MTI0M31d" data-look="classic" marker-end="url(#my-svg_flowchart-v2-pointEnd)"/></g><g class="edgeLabels"><g class="edgeLabel"><g class="label" data-id="L_MCP_Core_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Mem_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Skl_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_ASkl_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Gam_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Plg_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Notion_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_MCP_Obs_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g class="node default" id="my-svg-flowchart-MCP-0" data-look="classic" transform="translate(108, 699)"><rect class="basic label-container" style="" x="-100" y="-39" width="200" height="78"/><g class="label" style="" transform="translate(-70, -24)"><rect/><foreignObject width="140" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>MCP Server<br />87 tools total</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Core-2" data-look="classic" transform="translate(388, 83)"><rect class="basic label-container" style="" x="-130" y="-75" width="260" height="150"/><g class="label" style="" transform="translate(-100, -60)"><rect/><foreignObject width="200" height="120"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Core (33)<br />routing, cache, compression,<br />quota, proxy, tunnels, search</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Mem-4" data-look="classic" transform="translate(388, 271)"><rect class="basic label-container" style="" x="-130" y="-63" width="260" height="126"/><g class="label" style="" transform="translate(-100, -48)"><rect/><foreignObject width="200" height="96"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Memory (3)<br />memory_search, memory_save,<br />memory_delete</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Skl-6" data-look="classic" transform="translate(388, 459)"><rect class="basic label-container" style="" x="-130" y="-75" width="260" height="150"/><g class="label" style="" transform="translate(-100, -60)"><rect/><foreignObject width="200" height="120"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Skills (4)<br />skill_invoke, skill_list,<br />skill_diagnose, skill_uninstall</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-ASkl-8" data-look="classic" transform="translate(388, 635)"><rect class="basic label-container" style="" x="-130" y="-51" width="260" height="102"/><g class="label" style="" transform="translate(-100, -36)"><rect/><foreignObject width="200" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Agent-Skills (3)<br />cli-registry discovery</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Gam-10" data-look="classic" transform="translate(388, 763)"><rect class="basic label-container" style="" x="-110" y="-27" width="220" height="54"/><g class="label" style="" transform="translate(-80, -12)"><rect/><foreignObject width="160" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Gamification (8)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Plg-12" data-look="classic" transform="translate(388, 867)"><rect class="basic label-container" style="" x="-85" y="-27" width="170" height="54"/><g class="label" style="" transform="translate(-55, -12)"><rect/><foreignObject width="110" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Plugins (8)</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Notion-14" data-look="classic" transform="translate(388, 1031)"><rect class="basic label-container" style="" x="-130" y="-87" width="260" height="174"/><g class="label" style="" transform="translate(-100, -72)"><rect/><foreignObject width="200" height="144"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Notion (6)<br />search, get_page, query_database,<br />get_database, list_block_children,<br />append_blocks</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-Obs-16" data-look="classic" transform="translate(388, 1243)"><rect class="basic label-container" style="" x="-130" y="-75" width="260" height="150"/><g class="label" style="" transform="translate(-100, -60)"><rect/><foreignObject width="200" height="120"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Obsidian (22)<br />vault read/write, search,<br />frontmatter, daily notes, …</p></span></div></foreignObject></g></g></g></g></g><defs><filter id="my-svg-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><defs><filter id="my-svg-drop-shadow-small" height="150%" width="150%"><feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs></svg>\ No newline at end of filediff --git a/docs/diagrams/mcp-tools-43.mmd b/docs/diagrams/mcp-tools-43.mmddeleted file mode 100644index df92e73896..0000000000--- a/docs/diagrams/mcp-tools-43.mmd+++ /dev/null@@ -1,31 +0,0 @@-%% MCP Server tool inventory by category-%% Reflects: open-sse/mcp-server/tools/* and docs/MCP-SERVER.md-%% v3.8.8-flowchart LR- MCP["MCP Server<br/>43 tools total"] --> Core["Core (30)"]- MCP --> Mem["Memory (3)"]- MCP --> Skl["Skills (4)"]- MCP --> Notion["Notion (6)"]-- Core --> Essential["Essential (8)<br/>get_health, list_combos,<br/>switch_combo, check_quota,<br/>route_request, cost_report,<br/>list_models_catalog,<br/>get_combo_metrics"]- Core --> Search["Search (1)<br/>web_search"]- Core --> Advanced["Advanced (11)<br/>simulate_route, set_budget_guard,<br/>set_routing_strategy,<br/>set_resilience_profile,<br/>test_combo, get_provider_metrics,<br/>best_combo_for_task, explain_route,<br/>get_session_snapshot,<br/>db_health_check, sync_pricing"]- Core --> Cache["Cache (2)"]- Core --> Compression["Compression (5)"]- Core --> Tunnels["1Proxy / Tunnels (3)"]-- Mem --> M1["memory_search"]- Mem --> M2["memory_save"]- Mem --> M3["memory_delete"]-- Skl --> S1["skill_invoke"]- Skl --> S2["skill_list"]- Skl --> S3["skill_diagnose"]- Skl --> S4["skill_uninstall"]-- Notion --> N1["notion_search"]- Notion --> N2["notion_get_page"]- Notion --> N3["notion_query_database"]- Notion --> N4["notion_get_database"]- Notion --> N5["notion_list_block_children"]- Notion --> N6["notion_append_blocks"]diff --git a/docs/diagrams/mcp-tools-87.mmd b/docs/diagrams/mcp-tools-87.mmdnew file mode 100644index 0000000000..fc3217c40d--- /dev/null+++ b/docs/diagrams/mcp-tools-87.mmd@@ -0,0 +1,15 @@+%% MCP Server tool inventory by category+%% Reflects: open-sse/mcp-server/ — TOTAL_MCP_TOOL_COUNT in server.ts+%% (MCP_TOOLS 33 + memory 3 + skill 4 + agentSkill 3 + gamification 8 + plugin 8 + notion 6 + obsidian 22 = 87)+%% Regenerate the SVG with: npm run docs:render-diagrams+%% v3.8.26+flowchart LR+ MCP["MCP Server<br/>87 tools total"]+ MCP --> Core["Core (33)<br/>routing, cache, compression,<br/>quota, proxy, tunnels, search"]+ MCP --> Mem["Memory (3)<br/>memory_search, memory_save,<br/>memory_delete"]+ MCP --> Skl["Skills (4)<br/>skill_invoke, skill_list,<br/>skill_diagnose, skill_uninstall"]+ MCP --> ASkl["Agent-Skills (3)<br/>cli-registry discovery"]+ MCP --> Gam["Gamification (8)"]+ MCP --> Plg["Plugins (8)"]+ MCP --> Notion["Notion (6)<br/>search, get_page, query_database,<br/>get_database, list_block_children,<br/>append_blocks"]+ MCP --> Obs["Obsidian (22)<br/>vault read/write, search,<br/>frontmatter, daily notes, …"]diff --git a/docs/frameworks/ACP.md b/docs/frameworks/ACP.mdindex 1f2b9ab4fe..f5d2182ba3 100644--- a/docs/frameworks/ACP.md+++ b/docs/frameworks/ACP.md@@ -14,14 +14,14 @@ ACP (Agent Client Protocol) is a **"CLI-as-backend" transport** for OmniRoute. I### Why Use ACP?-| Benefit | Description |-|---------|-------------|-| **No API keys needed** | Uses your existing CLI authentication |-| **Native protocol** | Uses each CLI's native input/output format |-| **Auto-discovery** | Detects installed CLIs on your system |-| **14 built-in agents** | Pre-configured for popular CLI tools |-| **Custom agents** | Add your own CLI tools via settings |-| **Process management** | Handles lifecycle (spawn, send, kill) |+| Benefit | Description |+| ---------------------- | ------------------------------------------ |+| **No API keys needed** | Uses your existing CLI authentication |+| **Native protocol** | Uses each CLI's native input/output format |+| **Auto-discovery** | Detects installed CLIs on your system |+| **14 built-in agents** | Pre-configured for popular CLI tools |+| **Custom agents** | Add your own CLI tools via settings |+| **Process management** | Handles lifecycle (spawn, send, kill) |---@@ -29,22 +29,22 @@ ACP (Agent Client Protocol) is a **"CLI-as-backend" transport** for OmniRoute. IACP supports **14 built-in CLI agents** out of the box:-| Agent ID | Display Name | Binary | Protocol |-|----------|--------------|--------|----------|-| `codex` | OpenAI Codex CLI | `codex` | stdio |-| `claude` | Claude Code CLI | `claude` | stdio |-| `goose` | Goose CLI | `goose` | stdio |-| `gemini-cli` | Gemini CLI | `gemini` | stdio |-| `openclaw` | OpenClaw | `openclaw` | stdio |-| `aider` | Aider | `aider` | stdio |-| `opencode` | OpenCode | `opencode` | stdio |-| `cline` | Cline | `cline` | stdio |-| `qwen-code` | Qwen Code | `qwen` | stdio |-| `forge` | ForgeCode | `forge` | stdio |-| `amazon-q` | Amazon Q Developer | `q` | stdio |-| `interpreter` | Open Interpreter | `interpreter` | stdio |-| `cursor-cli` | Cursor CLI | `cursor` | stdio |-| `warp` | Warp AI | `warp` | stdio |+| Agent ID | Display Name | Binary | Protocol |+| ------------- | ------------------ | ------------- | -------- |+| `codex` | OpenAI Codex CLI | `codex` | stdio |+| `claude` | Claude Code CLI | `claude` | stdio |+| `goose` | Goose CLI | `goose` | stdio |+| `gemini-cli` | Gemini CLI | `gemini` | stdio |+| `openclaw` | OpenClaw | `openclaw` | stdio |+| `aider` | Aider | `aider` | stdio |+| `opencode` | OpenCode | `opencode` | stdio |+| `cline` | Cline | `cline` | stdio |+| `qwen-code` | Qwen Code | `qwen` | stdio |+| `forge` | ForgeCode | `forge` | stdio |+| `amazon-q` | Amazon Q Developer | `q` | stdio |+| `interpreter` | Open Interpreter | `interpreter` | stdio |+| `cursor-cli` | Cursor CLI | `cursor` | stdio |+| `warp` | Warp AI | `warp` | stdio |### Custom Agents@@ -129,16 +129,16 @@ const agents = detectInstalledAgents();// Returns: CliAgentInfo[]interface CliAgentInfo {- id: string; // e.g., "codex", "claude"- name: string; // Display name- binary: string; // Binary name to spawn- versionCommand: string; // Version detection command- version: string | null; // Detected version (null if not installed)- installed: boolean; // Whether the agent is installed- providerAlias: string; // Provider ID in OmniRoute- spawnArgs: string[]; // Arguments to pass when spawning- protocol: "stdio" | "http"; // Communication protocol- isCustom?: boolean; // Whether this is a user-defined custom agent+ id: string; // e.g., "codex", "claude"+ name: string; // Display name+ binary: string; // Binary name to spawn+ versionCommand: string; // Version detection command+ version: string | null; // Detected version (null if not installed)+ installed: boolean; // Whether the agent is installed+ providerAlias: string; // Provider ID in OmniRoute+ spawnArgs: string[]; // Arguments to pass when spawning+ protocol: "stdio" | "http"; // Communication protocol+ isCustom?: boolean; // Whether this is a user-defined custom agent}```@@ -193,12 +193,9 @@ Spawns a new CLI agent process.```typescriptimport { acpManager } from "@/lib/acp";-const session = acpManager.spawn(- "claude",- "claude",- ["--print", "--output-format", "json"],- { /* custom env vars */ }-);+const session = acpManager.spawn("claude", "claude", ["--print", "--output-format", "json"], {+ /* custom env vars */+});// Returns: AcpSession```@@ -214,7 +211,7 @@ import { acpManager } from "@/lib/acp";const response = await acpManager.sendPrompt("acp-claude-1234567890-abc123","What is 2+2?",- 120000 // 2 minutes timeout+ 120000 // 2 minutes timeout);// Returns: Promise<string>```@@ -255,13 +252,13 @@ acpManager.killAll();```typescriptinterface AcpSession {- id: string; // Unique session ID- agentId: string; // Agent ID (e.g., "claude")- process: ChildProcess; // Child process handle- alive: boolean; // Whether the process is alive- stdoutBuffer: string; // Accumulated stdout buffer- stderrBuffer: string; // Accumulated stderr buffer- createdAt: Date; // Created timestamp+ id: string; // Unique session ID+ agentId: string; // Agent ID (e.g., "claude")+ process: ChildProcess; // Child process handle+ alive: boolean; // Whether the process is alive+ stdoutBuffer: string; // Accumulated stdout buffer+ stderrBuffer: string; // Accumulated stderr buffer+ createdAt: Date; // Created timestamp}```@@ -412,6 +409,7 @@ Each ACP session runs in its own child process. The process is killed when the s**Problem**: `acpManager.spawn()` throws `Unknown agent: <id>`**Solution**: Only 4 agents are allowed in `spawn()`:+- `claude`- `codex`- `gemini`@@ -448,6 +446,7 @@ await acpManager.sendPrompt(sessionId, prompt, 300000); // 5 minutes**Problem**: `detectInstalledAgents()` doesn't find your CLI**Solutions**:+1. **Check PATH**: Ensure the CLI is in your system PATH2. **Check version command**: Run `claude --version` manually3. **Check permissions**: Ensure the CLI is executable@@ -458,6 +457,7 @@ await acpManager.sendPrompt(sessionId, prompt, 300000); // 5 minutes**Problem**: ACP can't execute the CLI**Solutions**:+1. **Check file permissions**: `chmod +x /usr/local/bin/claude`2. **Check ownership**: Ensure OmniRoute has read/execute permissions3. **Check SELinux/AppArmor**: May block process spawning@@ -477,11 +477,7 @@ const claude = agents.find((a) => a.id === "claude");if (claude?.installed) {// Spawn a new session- const session = acpManager.spawn(- "claude",- claude.binary,- ["--print", "--output-format", "json"]- );+ const session = acpManager.spawn("claude", claude.binary, ["--print", "--output-format", "json"]);// Send a promptconst response = await acpManager.sendPrompt(@@ -548,7 +544,7 @@ const agents = detectInstalledAgents();## What's Next?- **[API Reference](../reference/API_REFERENCE.md)** — REST API endpoints-- **[Provider Reference](../reference/PROVIDER_REFERENCE.md)** — All 223 providers+- **[Provider Reference](../reference/PROVIDER_REFERENCE.md)** — All 226 providers- **[MCP Server](./MCP-SERVER.md)** — Model Context Protocol integration- **[A2A Server](./A2A-SERVER.md)** — Agent-to-Agent protocol- **[Cloud Agent](./CLOUD_AGENT.md)** — Cloud-based agentsdiff --git a/docs/frameworks/AGENT-SKILLS.md b/docs/frameworks/AGENT-SKILLS.mdindex 79d8258eef..ab787b9c62 100644--- a/docs/frameworks/AGENT-SKILLS.md+++ b/docs/frameworks/AGENT-SKILLS.md@@ -162,7 +162,7 @@ See [A2A-SERVER.md](./A2A-SERVER.md) for protocol details.| `omni-sync-cloud` | sync-cloud | Cloud sync || `omni-db-backups` | db-backups | Database backups || `omni-webhooks` | webhooks | Webhook event dispatcher |-| `omni-mcp` | mcp | MCP server (37 tools, 3 transports) |+| `omni-mcp` | mcp | MCP server (87 tools, 3 transports) || `omni-agents-a2a` | agents-a2a | A2A agent protocol || `omni-version-manager` | version-manager | Version and update management || `omni-inference` | inference | Direct inference / completions |diff --git a/docs/frameworks/AGENTBRIDGE.md b/docs/frameworks/AGENTBRIDGE.mdindex c4656f7bd8..9ad93524fd 100644--- a/docs/frameworks/AGENTBRIDGE.md+++ b/docs/frameworks/AGENTBRIDGE.md@@ -22,7 +22,7 @@ When an IDE agent (e.g., GitHub Copilot, Cursor, Claude Code) makes an API call,This means you can:-- **Reroute any agent to any provider**: Copilot talking to OpenAI? Redirect it to Anthropic Claude, Gemini, or any of OmniRoute's 160+ providers.+- **Reroute any agent to any provider**: Copilot talking to OpenAI? Redirect it to Anthropic Claude, Gemini, or any of OmniRoute's 226+ providers.- **Apply model mappings**: `gemini-3-flash` → `claude-sonnet-4.7` transparently at the handler level.- **Observe all agent traffic**: every intercepted request is published to the [Traffic Inspector](./TRAFFIC_INSPECTOR.md).- **Apply OmniRoute resilience**: combo routing, circuit breakers, fallbacks, and cost tracking work for IDE agent traffic too.diff --git a/docs/frameworks/MCP-SERVER.md b/docs/frameworks/MCP-SERVER.mdindex 3e5790fb91..03a3f674e8 100644--- a/docs/frameworks/MCP-SERVER.md+++ b/docs/frameworks/MCP-SERVER.md@@ -6,13 +6,13 @@ lastUpdated: 2026-05-30# OmniRoute MCP Server Documentation-> Model Context Protocol server with 43 tools across routing, cache, compression, memory, skills, proxy, and context source operations.+> Model Context Protocol server with 87 tools across routing, cache, compression, memory, skills, proxy, and context source operations.>-> Source of truth: `open-sse/mcp-server/schemas/tools.ts` (30 tools) + `open-sse/mcp-server/tools/memoryTools.ts` (3 tools) + `open-sse/mcp-server/tools/skillTools.ts` (4 tools) + `open-sse/mcp-server/tools/notionTools.ts` (6 tools). Tool registration and scope wiring lives in `open-sse/mcp-server/server.ts`.+> Source of truth: `open-sse/mcp-server/schemas/tools.ts` (33 base) + `memoryTools.ts` (3) + `skillTools.ts` (4) + `agentSkillTools.ts` (3) + `gamificationTools.ts` (8) + `pluginTools.ts` (8) + `notionTools.ts` (6) + `obsidianTools.ts` (22) = **87** (`TOTAL_MCP_TOOL_COUNT`). Tool registration and scope wiring lives in `open-sse/mcp-server/server.ts`.-+-> Source: [diagrams/mcp-tools-43.mmd](../diagrams/mcp-tools-43.mmd) (regenerate via `npm run docs:render-diagrams`).+> Source: [diagrams/mcp-tools-87.mmd](../diagrams/mcp-tools-87.mmd) (regenerate via `npm run docs:render-diagrams`).## Installation@@ -217,7 +217,7 @@ See [AGENT-SKILLS.md](./AGENT-SKILLS.md) for the full catalog and how external a## Related Frameworks (v3.8.0)-The MCP tool inventory above (43 tools = 30 core + 3 memory + 4 skills + 6 notion) is intentionally+The MCP tool inventory above (87 tools = 33 core + 3 memory + 4 skills + 3 agent-skills + 8 gamification + 8 plugins + 6 notion + 22 obsidian) is intentionallyscoped to runtime routing/cache/compression/memory/skills/proxy/context-source operations. Two adjacentframeworks ship alongside the MCP server in v3.8.0 and are documented separately:diff --git a/docs/frameworks/NOTION_CONTEXT.md b/docs/frameworks/NOTION_CONTEXT.mdnew file mode 100644index 0000000000..83986856c8--- /dev/null+++ b/docs/frameworks/NOTION_CONTEXT.md@@ -0,0 +1,131 @@+---+title: "Notion Context Source"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Notion Context Source++> **Source of truth:** `src/lib/notion/api.ts` (REST client), `src/lib/db/notion.ts`+> (token persistence), `open-sse/mcp-server/tools/notionTools.ts` (6 MCP tools),+> `src/app/api/settings/notion/route.ts` (settings API). Tool registration and scope+> wiring lives in `open-sse/mcp-server/server.ts`.++## What it is++OmniRoute can connect to a **Notion** workspace as a **context source** — a read/write+knowledge base that agents reach through the built-in MCP server. Once a Notion+integration token is configured, the MCP tools let an LLM search pages and databases,+read page content and block trees, query databases with filters/sorts, and append new+blocks — all proxied through OmniRoute (with retry, timeout, and error classification)+so the model never touches the Notion API directly.++The integration is a thin, hardened wrapper over the official Notion REST API+(`https://api.notion.com/v1`, `Notion-Version: 2026-03-11`). The client+(`src/lib/notion/api.ts`) adds:++- **Retry with exponential backoff** (up to 3 attempts) for `429` and `5xx`.+- **55-second request timeout** via `AbortController`.+- **Typed error classification** — `NotionAuthError` (401/403),+ `NotionNotFoundError` (404), `NotionRateLimitError` (429, honors `retry after`+ hints), `NotionValidationError` (400/409), `NotionServerError` (5xx),+ `NotionTimeoutError`.+- **Message sanitization** that strips stack-trace-like fragments before surfacing.++## Setup++There is **no environment variable** for the Notion token — it is stored in the+SQLite `key_value` table (namespace `notion`, key `integration_token`) via+`src/lib/db/notion.ts`. Configure it from the **Context Sources** tab of the Endpoint+dashboard (`ObsidianSourceCard`'s sibling `NotionSourceCard`), or via the settings REST API.++> [!NOTE]+> The token is a **Notion internal integration token**. Create an integration at+> <https://www.notion.com/my-integrations>, then share the pages/databases you want+> OmniRoute to access with that integration (Notion's permission model is share-based,+> not workspace-wide).++### Configure via REST++```bash+# Save + validate the integration token (POST validates by issuing a test search)+curl -X POST http://localhost:20128/api/settings/notion \+ -H "Content-Type: application/json" \+ -d '{"token":"ntn_xxx"}'++# Check connection status+curl http://localhost:20128/api/settings/notion++# Disconnect (clears the stored token)+curl -X DELETE http://localhost:20128/api/settings/notion+```++All three methods require dashboard authentication (`isAuthenticated`). On `POST`,+OmniRoute saves the token and immediately runs a 1-result test search; if Notion+returns an error object the token is cleared and the call fails with `400`.++## MCP tools (6)++Defined in `open-sse/mcp-server/tools/notionTools.ts`. The token is resolved at call+time via `getNotionToken()`; if none is configured the tool throws+`"Notion integration token not configured. Set it in Settings > Context Sources."`++| Tool | Scope | Description |+| ---------------------------- | -------------- | --------------------------------------------------------------------------------- |+| `notion_search` | `read:notion` | Search pages and databases by text query (returns titles, IDs, URLs). Paginated. |+| `notion_get_page` | `read:notion` | Get content and metadata of a page by its ID. |+| `notion_list_block_children` | `read:notion` | List all block children of a block or page (the block tree). Paginated. |+| `notion_query_database` | `read:notion` | Query a database with optional `filter` + `sorts` (Notion API format). Paginated. |+| `notion_get_database` | `read:notion` | Get the schema/metadata of a database by ID. |+| `notion_append_blocks` | `write:notion` | Append block children to an existing block or page (max 100 blocks per request). |++### Input parameters++- `notion_search` — `query` (1–500 chars), `pageSize` (1–100, default 20),+ `startCursor` (optional).+- `notion_get_page` — `pageId` (32-char hex or UUID).+- `notion_list_block_children` — `blockId`, `pageSize` (1–100, default 50),+ `startCursor` (optional).+- `notion_query_database` — `databaseId`, `filter` (optional, Notion filter format),+ `sorts` (optional array), `pageSize` (1–100, default 50), `startCursor` (optional).+- `notion_get_database` — `databaseId`.+- `notion_append_blocks` — `blockId`, `children` (array of block objects),+ `after` (optional position).++### Scopes++The read tools require `read:notion` and the write tool requires `write:notion`.+Scopes are enforced by `withScopeEnforcement()` in+`open-sse/mcp-server/server.ts` only when `OMNIROUTE_MCP_ENFORCE_SCOPES=true`; the+caller's allowed scopes come from `OMNIROUTE_MCP_SCOPES` (comma-separated) or the+authenticated API key's scope context. See [MCP-SERVER.md](./MCP-SERVER.md) for the+full scope model.++## Endpoints++| Method | Path | Purpose |+| -------- | ---------------------- | -------------------------------------- |+| `GET` | `/api/settings/notion` | Return `{ connected, hasToken }`. |+| `POST` | `/api/settings/notion` | Save + validate the integration token. |+| `DELETE` | `/api/settings/notion` | Disconnect (clear the stored token). |++> These are dashboard settings routes. There is **no public `/v1` Notion proxy+> endpoint** — Notion is reached exclusively through the MCP tools above.++## Use cases++- **Knowledge-grounded answers** — let an agent `notion_search` the workspace and+ `notion_get_page` the top hit before answering, so responses cite real internal docs.+- **Database-backed workflows** — `notion_query_database` a tasks/CRM database with+ filters + sorts, then summarize or triage the rows.+- **Write-back / logging** — `notion_append_blocks` to append meeting notes, run+ summaries, or agent output into an existing page (append-only; no destructive edits).+- **Structure exploration** — `notion_list_block_children` to walk a page's block tree,+ or `notion_get_database` to discover a database's property schema before querying it.++## Related++- [MCP Server](./MCP-SERVER.md) — transports, scope enforcement, full tool inventory.+- [Obsidian Context Source](./OBSIDIAN_CONTEXT.md) — the other built-in context source.+- [Memory System](./MEMORY.md) — persistent conversational memory (complementary+ context layer, injected automatically rather than tool-fetched).diff --git a/docs/frameworks/OBSIDIAN_CONTEXT.md b/docs/frameworks/OBSIDIAN_CONTEXT.mdnew file mode 100644index 0000000000..a9f6540973--- /dev/null+++ b/docs/frameworks/OBSIDIAN_CONTEXT.md@@ -0,0 +1,191 @@+---+title: "Obsidian Context Source"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Obsidian Context Source++> **Source of truth:** `src/lib/obsidian/api.ts` (REST + sync client),+> `src/lib/db/obsidian.ts` (token / base-URL / WebDAV persistence),+> `src/lib/obsidianSync.ts` (WebDAV vault sync), `open-sse/mcp-server/tools/obsidianTools.ts`+> (22 MCP tools), `src/app/api/settings/obsidian/route.ts` ++> `src/app/api/settings/obsidian/webdav/route.ts` (settings APIs). Tool registration+> and scope wiring lives in `open-sse/mcp-server/server.ts`.++## What it is++OmniRoute connects to an **Obsidian** vault as a **context source** — a local Markdown+knowledge base that agents read and write through the built-in MCP server. The+integration talks to the **Obsidian Local REST API** community plugin running inside the+desktop app, so agents can search notes, read/write/patch files, list the vault, work+with daily/weekly periodic notes, manage tags, run Obsidian commands, and (optionally)+coordinate a bidirectional desktop↔mobile vault sync.++The client (`src/lib/obsidian/api.ts`) wraps the Local REST API with:++- **Retry with backoff** for transient `5xx`, **30-second timeout** via `AbortController`.+- **Typed error classification** — `ObsidianAuthError` (401/403),+ `ObsidianNotFoundError` (404), `ObsidianServerError` (5xx), `ObsidianTimeoutError`.+- A **friendly "cannot reach Obsidian" hint** that calls out the common port mistake+ (HTTP on `27123`, **not** the MCP endpoint on `27124`) and the Tailscale form.+- Vault-relative **path encoding** so note paths with spaces/slashes are safe.++## Setup++There is **no environment variable** for the Obsidian token or base URL — both are+stored in the SQLite `key_value` table (namespace `obsidian`) via+`src/lib/db/obsidian.ts`. The token is **encrypted at rest** (AES-256-GCM, with+plaintext backward-compat fallback). Configure from the **Context Sources** tab of the+Endpoint dashboard (`ObsidianSourceCard`), or via the settings REST API.++> [!IMPORTANT]+> The **Obsidian Local REST API** plugin must be installed and running. Its REST+> interface listens on **HTTP `127.0.0.1:27123`** (the default base URL). Port `27124`+> is a _separate_ MCP/HTTPS endpoint and is explicitly rejected by the settings route.+> If connecting from another device, use `http://<tailscale-ip>:27123`.++### Configuration keys (SQLite `key_value`, namespace `obsidian`)++| Key | Purpose | Encrypted |+| ----------------- | ------------------------------------------------ | --------- |+| `api_key` | Local REST API bearer token | yes |+| `base_url` | REST base URL (default `http://127.0.0.1:27123`) | no |+| `vault_path` | Absolute path to the vault directory (for sync) | no |+| `webdav_username` | Generated WebDAV username (vault sync) | no |+| `webdav_password` | Generated WebDAV password (vault sync) | yes |+| `webdav_enabled` | Whether WebDAV vault sync is enabled | no |++### Configure via REST++```bash+# Save + validate the Local REST API token (POST validates via a status check)+curl -X POST http://localhost:20128/api/settings/obsidian \+ -H "Content-Type: application/json" \+ -d '{"token":"<obsidian-rest-api-key>","baseUrl":"http://127.0.0.1:27123"}'++# Check connection status (returns connected, hasToken, baseUrl, vaultPath)+curl http://localhost:20128/api/settings/obsidian++# Disconnect (clears the stored token)+curl -X DELETE http://localhost:20128/api/settings/obsidian+```++All methods require dashboard authentication. `POST` rejects any URL on port `27124`+and validates the token by calling the Local REST API status endpoint before persisting.++### WebDAV vault sync++`src/app/api/settings/obsidian/webdav/route.ts` manages an optional WebDAV-backed+vault sync (driven by `src/lib/obsidianSync.ts`). Enabling it points OmniRoute at a+local vault directory and mints a random WebDAV username/password pair:++```bash+# Enable WebDAV sync for a vault directory (mints username/password)+curl -X POST http://localhost:20128/api/settings/obsidian/webdav \+ -H "Content-Type: application/json" \+ -d '{"vaultPath":"/home/me/MyVault"}'++# Get WebDAV sync status (credentials returned only while enabled)+curl http://localhost:20128/api/settings/obsidian/webdav++# Disable WebDAV sync (clears credentials + managed .stignore)+curl -X DELETE http://localhost:20128/api/settings/obsidian/webdav+```++### Per-API-key context source (optional)++Obsidian config can be scoped **per API key** via the `api_key_context_sources` table+(`src/lib/db/apiKeyContextSources.ts`). When an MCP call carries an authenticated API+key id, `getObsidianConfigForApiKey()` prefers that key's own token/base-URL/vault-path+(`source: "api_key"`) and otherwise falls back to the global config (`source: "global"`).++## MCP tools (22)++Defined in `open-sse/mcp-server/tools/obsidianTools.ts`. The token/base-URL are resolved+per call (per-API-key first, then global). Tools that hit the OmniRoute **sync server**+(the four `obsidian_sync_*` tools) additionally require the sync auth token configured+in OmniRoute settings.++### Read tools (`read:obsidian`)++| Tool | Description |+| ---------------------------- | ------------------------------------------------------------------------------------ |+| `obsidian_check_status` | Check whether the Local REST API is reachable and authenticated. |+| `obsidian_search_simple` | Full-text search of note content; returns snippets with file paths. |+| `obsidian_search_structured` | Search using a JSON Logic expression (and/or/regex/path filters). |+| `obsidian_read_note` | Read a note by vault-relative path; optionally a specific heading/block/frontmatter. |+| `obsidian_list_vault` | List files and directories in the vault (tree of entries). |+| `obsidian_get_document_map` | Get the note's heading structure as a map of headings → line numbers. |+| `obsidian_get_note_metadata` | Get frontmatter, tags, links, char/word count without the full content. |+| `obsidian_get_active_file` | Get the path + content of the currently active file in Obsidian. |+| `obsidian_get_periodic_note` | Get the daily/weekly/monthly periodic note for a date (today if omitted). |+| `obsidian_get_tags` | List all vault tags with their frequencies. |+| `obsidian_list_commands` | List available Obsidian command IDs (use with `obsidian_execute_command`). |+| `obsidian_sync_status` | OmniRoute sync server status: running, vault name, port, uptime, last sync. |+| `obsidian_sync_conflicts` | List unresolved sync conflicts (path, conflict path, detected-at). |++### Write tools (`write:obsidian`)++| Tool | Description |+| -------------------------------- | ----------------------------------------------------------------------------------- |+| `obsidian_write_note` | Create or overwrite a note with given Markdown content. |+| `obsidian_append_note` | Append content to a note; optionally to a specific heading/block. |+| `obsidian_patch_note` | Surgically append/prepend/replace at a heading, block, or frontmatter field. |+| `obsidian_delete_note` | Permanently delete a note from the vault. |+| `obsidian_move_note` | Move or rename a note within the vault. |+| `obsidian_execute_command` | Execute an Obsidian command by its command ID. |+| `obsidian_open_file` | Open a file in Obsidian (creates it if it does not exist). |+| `obsidian_sync_trigger` | Trigger an immediate bidirectional desktop↔mobile vault sync. |+| `obsidian_sync_resolve_conflict` | Resolve a sync conflict: keep `local` (mobile), `remote` (desktop), or `keep-both`. |++> [!NOTE]+> `obsidian_patch_note` targets accept `targetType` of `heading | block | frontmatter`+> and `operation` of `append | prepend | replace`, with an optional+> `createTargetIfMissing`. The four `obsidian_sync_*` tools talk to the local sync+> server (`http://127.0.0.1:27781` by default) and require the sync token.++### Scopes++Read tools require `read:obsidian`; write tools require `write:obsidian`. Enforcement+is identical to Notion — handled by `withScopeEnforcement()` in+`open-sse/mcp-server/server.ts`, gated on `OMNIROUTE_MCP_ENFORCE_SCOPES=true`, with+allowed scopes sourced from `OMNIROUTE_MCP_SCOPES` or the API key's scope context. See+[MCP-SERVER.md](./MCP-SERVER.md).++## Endpoints++| Method | Path | Purpose |+| -------- | ------------------------------- | ----------------------------------------------------- |+| `GET` | `/api/settings/obsidian` | Return `{ connected, hasToken, baseUrl, vaultPath }`. |+| `POST` | `/api/settings/obsidian` | Save + validate token (rejects port `27124`). |+| `DELETE` | `/api/settings/obsidian` | Disconnect (clear stored token). |+| `GET` | `/api/settings/obsidian/webdav` | WebDAV sync status + credentials (while enabled). |+| `POST` | `/api/settings/obsidian/webdav` | Enable WebDAV sync for a vault directory. |+| `DELETE` | `/api/settings/obsidian/webdav` | Disable WebDAV sync. |++> These are dashboard settings routes. The vault itself is reached through the Obsidian+> Local REST API (the configured `base_url`) and through the MCP tools above — there is+> no public `/v1` Obsidian proxy endpoint.++## Use cases++- **Vault-grounded answers** — `obsidian_search_simple` / `obsidian_search_structured`+ then `obsidian_read_note` so an agent answers from your real notes.+- **Note authoring / journaling** — `obsidian_write_note`, `obsidian_append_note`, or+ the surgical `obsidian_patch_note` to log agent output, summaries, or daily notes+ (`obsidian_get_periodic_note`) into the vault.+- **Vault navigation** — `obsidian_list_vault`, `obsidian_get_document_map`, and+ `obsidian_get_tags` to explore structure before reading/writing.+- **Obsidian automation** — `obsidian_list_commands` + `obsidian_execute_command` to+ drive plugins/commands from an agent; `obsidian_open_file` to surface a note in the UI.+- **Mobile sync** — enable WebDAV sync, then `obsidian_sync_trigger` /+ `obsidian_sync_status` / `obsidian_sync_conflicts` / `obsidian_sync_resolve_conflict`+ to coordinate desktop↔mobile and resolve conflicts.++## Related++- [MCP Server](./MCP-SERVER.md) — transports, scope enforcement, full tool inventory.+- [Notion Context Source](./NOTION_CONTEXT.md) — the other built-in context source.+- [Memory System](./MEMORY.md) — persistent conversational memory (complementary+ context layer, injected automatically rather than tool-fetched).diff --git a/docs/frameworks/PLUGIN_MARKETPLACE.md b/docs/frameworks/PLUGIN_MARKETPLACE.mdnew file mode 100644index 0000000000..a61b12e5f1--- /dev/null+++ b/docs/frameworks/PLUGIN_MARKETPLACE.md@@ -0,0 +1,348 @@+---+title: "Plugin Marketplace"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Plugin Marketplace++> **Source of truth:** `src/lib/plugins/` (`marketplace.ts`, `manager.ts`, `manifest.ts`,+> `scanner.ts`, `loader.ts`), `src/app/api/plugins/`, and+> `src/app/(dashboard)/dashboard/plugins/`+> **Last updated:** 2026-06-13 — v3.8.24++OmniRoute ships a WordPress-style plugin system. Plugins are self-contained+directories — each with a `plugin.json` manifest and an entry file — that hook+into the request pipeline (`onRequest` / `onResponse` / `onError`) and into+lifecycle events (`onInstall` / `onActivate` / `onDeactivate` / `onUninstall`).++The **Plugin Marketplace** is the discovery layer on top of that system. It+exposes a browsable catalog of installable plugins. By default the catalog is a+small built-in seed registry; an operator can point it at a custom remote+registry URL, in which case the fetch is hardened by a DNS-resolving SSRF guard+(see [Security](#security)).++Every plugin route is **loopback-only** (Tier 1 — `LOCAL_ONLY`): plugins load+and execute code in child processes, so the routes are unreachable from a+non-loopback origin regardless of auth. See+[`docs/security/ROUTE_GUARD_TIERS.md`](../security/ROUTE_GUARD_TIERS.md).++## How It Fits Together++```+Dashboard (/dashboard/plugins)+ ├─ "Installed" tab → GET /api/plugins (listPlugins)+ │ POST /api/plugins/scan (pluginManager.scan)+ │ POST /api/plugins/{name}/activate|deactivate+ │ DELETE /api/plugins/{name} (uninstall)+ └─ "Marketplace" tab → GET /api/plugins/marketplace+ → listMarketplacePlugins()+ ├─ no custom URL → built-in SEED_REGISTRY+ └─ custom URL → isSafeMarketplaceUrl() SSRF guard+ → safeOutboundFetch(guard:"public-only")+```++- **Registry layer** — `src/lib/plugins/marketplace.ts`: lists / searches the+ catalog, falling back to the seed registry on any failure.+- **Lifecycle layer** — `src/lib/plugins/manager.ts` (`pluginManager` singleton):+ install, upgrade, activate, deactivate, uninstall, scan, startup load.+- **Manifest layer** — `src/lib/plugins/manifest.ts`: Zod schema + defaults for+ `plugin.json`.+- **Scanner** — `src/lib/plugins/scanner.ts`: discovers plugins on disk under+ the plugin directory.+- **Loader** — `src/lib/plugins/loader.ts`: spawns each plugin in an isolated+ child process and brokers hook calls over IPC.++## Marketplace Catalog++`listMarketplacePlugins()` (`src/lib/plugins/marketplace.ts`) returns a list of+`MarketplaceEntry` objects:++| Field | Type | Notes |+| ------------- | -------- | ------------------------------------ |+| `name` | string | kebab-case plugin name |+| `version` | string | semver |+| `description` | string | Short summary |+| `author` | string | Author / org |+| `license` | string | SPDX-style license id |+| `downloadUrl` | string | Source download URL (may be empty) |+| `repository` | string? | Optional repository URL |+| `tags` | string[] | Search/filter tags |+| `downloads` | number | Download count |+| `rating` | number | 0–5 |+| `verified` | boolean | Whether the entry is marked verified |+| `lastUpdated` | string | ISO-ish date string |++When no custom registry URL is configured, the catalog is the built-in+`SEED_REGISTRY` (currently `request-logger`, `rate-limiter`, `cost-tracker`, and+`theme-manager`). The seed registry is always available — if a configured remote+registry is unreachable, returns a non-`200` status, or returns an unrecognized+body, `listMarketplacePlugins()` logs a warning and falls back to the seed list.++> Note: the marketplace **catalog** (browse/search) is wired end to end, but+> one-click marketplace **install** from the catalog is not yet implemented — the+> dashboard's "Install" button on a marketplace entry currently shows a+> "coming soon" notice. Installation today goes through the local-path install+> flow (`POST /api/plugins`) and on-disk discovery (`POST /api/plugins/scan`).++## REST API++All endpoints require management auth (`requireManagementAuth`) **and** are+loopback-only — `/api/plugins` and `/api/plugins/` are listed in+`LOCAL_ONLY_API_PREFIXES` (`src/server/authz/routeGuard.ts`).++| Endpoint | Method | Description |+| -------------------------------- | ------ | --------------------------------------------------- |+| `/api/plugins` | GET | List installed plugins (optional `?status=` filter) |+| `/api/plugins` | POST | Install a plugin from an absolute local path |+| `/api/plugins/scan` | POST | Scan the plugin directory and register new plugins |+| `/api/plugins/marketplace` | GET | List marketplace catalog entries |+| `/api/plugins/[name]` | GET | Get installed plugin details |+| `/api/plugins/[name]` | DELETE | Uninstall a plugin |+| `/api/plugins/[name]/activate` | POST | Activate (load + register hooks) |+| `/api/plugins/[name]/deactivate` | POST | Deactivate (fire `onDeactivate`, unregister hooks) |+| `/api/plugins/[name]/config` | GET | Get plugin config + config schema |+| `/api/plugins/[name]/config` | PUT | Update plugin config (validated against schema) |++The `GET /api/plugins` `status` filter accepts one of+`installed` / `active` / `inactive` / `error`. An invalid value returns `400`.++### List installed plugins++```bash+curl http://localhost:20128/api/plugins \+ -H "Cookie: auth_token=..."+```++### Install from a local path++```bash+curl -X POST http://localhost:20128/api/plugins \+ -H "Cookie: auth_token=..." \+ -H "Content-Type: application/json" \+ -d '{ "path": "/absolute/path/to/my-plugin" }'+```++The `path` must be **absolute** and may not contain `..` traversal segments or+null bytes (enforced by Zod). The source directory must contain a valid+`plugin.json` (or be a parent of one). On success the response is `201` with the+installed plugin row.++### Browse the marketplace++```bash+curl http://localhost:20128/api/plugins/marketplace \+ -H "Cookie: auth_token=..."+```++### Update plugin config++```bash+curl -X PUT http://localhost:20128/api/plugins/my-plugin/config \+ -H "Cookie: auth_token=..." \+ -H "Content-Type: application/json" \+ -d '{ "config": { "level": "debug", "maxItems": 100 } }'+```++`PUT .../config` validates each provided value against the plugin's+`configSchema` (declared in the manifest): `number` fields honor `min`/`max`,+`select` fields must match the declared `enum`. Keys not present in the schema+are allowed through.++## Configuration++### Plugin directory++Plugins live under the OmniRoute data directory:++```+~/.omniroute/plugins/<plugin-name>/+ ├─ plugin.json+ └─ index.js # (or whatever manifest.main points to)+```++`getDefaultPluginDir()` (`src/lib/plugins/scanner.ts`) resolves this to+`<home>/.omniroute/plugins`, where `<home>` is taken from the `HOME` /+`USERPROFILE` environment variables. `POST /api/plugins/scan` discovers any+subdirectory there that holds a valid `plugin.json` and registers it.++### Custom marketplace registry URL++The marketplace catalog source is read from the `pluginMarketplaceUrl` setting+(`src/lib/plugins/marketplace.ts` reads `settings.pluginMarketplaceUrl`). When+set to an `http(s)` URL, `listMarketplacePlugins()` fetches that URL and accepts+either a top-level JSON array of entries or an object with a `plugins` array;+entries without a string `name` are filtered out. When unset (or when the fetch+fails the SSRF guard / returns a bad response), the built-in seed registry is+used.++The dashboard "Marketplace" tab exposes a field for this URL (read back from+`GET /api/settings`).++> Implementation note: the dashboard "Save" action sends+> `pluginMarketplaceUrl` to `PATCH /api/settings`. At the time of writing this+> key is not declared in `updateSettingsSchema`+> (`src/shared/validation/settingsSchemas.ts`), so verify persistence in your+> release before relying on it — the **read** path (`getSettings()` →+> `listMarketplacePlugins()`) honors the key once it is present in the settings+> store.++## Security++### Route tier — loopback only++Plugins execute code in spawned child processes, so the entire `/api/plugins`+surface is classified `LOCAL_ONLY` (Tier 1). Loopback enforcement runs+unconditionally **before** any auth check, so a leaked management token reaching+the box over a tunnel still cannot install, activate, or uninstall a plugin.+See [`docs/security/ROUTE_GUARD_TIERS.md`](../security/ROUTE_GUARD_TIERS.md) and+Hard Rules #15 / #17.++### Marketplace registry SSRF guard++A custom registry URL is attacker-influenceable configuration, so before+fetching it `listMarketplacePlugins()` runs it through two layers:++1. **`isSafeMarketplaceUrl(url)`** (`src/lib/plugins/marketplace.ts`):+ - Rejects anything that is not `http:` / `https:`.+ - Rejects literal private/loopback/link-local/ULA hosts (IPv4 **and** IPv6,+ including IPv4-mapped) via the canonical `isPrivateHost`+ (`src/shared/network/outboundUrlGuard.ts`).+ - Resolves **both** `A` and `AAAA` records and rejects if **any** resolved+ address is private — closing the public-hostname → private-IP bypass.+ - **Fails closed**: a DNS resolution failure rejects the URL.+2. **`safeOutboundFetch(url, { guard: "public-only", timeoutMs: 5000 })`**+ (`src/shared/network/safeOutboundFetch.ts`): re-applies the public-only URL+ guard at fetch time and **blocks redirects** (no public → private `30x`+ pivot).++A URL that fails either layer does not abort the request — the marketplace+silently falls back to the built-in seed registry and logs a warning.++> This guard was hardened in PR #3774 specifically to resolve A + AAAA and use+> the canonical `isPrivateHost` instead of an IPv4-only check.++### Plugin execution isolation++- **Process isolation** — `loadPlugin()` (`src/lib/plugins/loader.ts`) spawns+ each plugin in a separate Node.js child process and communicates over IPC.+ Hook calls have a timeout with `SIGTERM` → `SIGKILL` escalation.+- **Env allowlist** — the child receives only an allowlisted set of environment+ variables; the broader set is only granted when the manifest requests the+ `env` permission.+- **Path containment** — install/upgrade/uninstall assert that the plugin+ directory and `manifest.main` resolve **within** the managed plugin root+ before any copy or recursive delete (guards against tampered DB paths and+ `../` traversal in `manifest.main`). Activation resolves symlinks via+ `realpath` and refuses to load an entry point that escapes the plugin+ directory.+- **Optional integrity pin** — a manifest may declare an `integrity`+ (`sha256-<base64>`, SRI format) field. When present, the loader verifies the+ entry file hash at load time and refuses to activate on mismatch. It is+ opt-in tamper-detection, **not** a security boundary — loopback-only routing+ and the permission model are the real boundaries.++## Manifest (`plugin.json`)++Validated by `PluginManifestSchema` (`src/lib/plugins/manifest.ts`):++| Field | Type | Notes |+| ------------------ | --------- | ----------------------------------------------------------- |+| `name` | string | Required; kebab-case (`^[a-z0-9-]+$`), 1–100 chars |+| `version` | string | Required; semver (`MAJOR.MINOR.PATCH`) |+| `description` | string? | ≤ 500 chars |+| `author` | string? | ≤ 200 chars |+| `license` | string? | Defaults to `MIT` |+| `main` | string? | Entry file; defaults to `index.js` |+| `source` | enum? | `local` \| `marketplace` (defaults to `local`) |+| `tags` | string[]? | Search tags |+| `requires` | object? | `{ omniroute?, permissions[] }` |+| `hooks` | object? | Booleans declaring which hooks the plugin implements |+| `skills` | object[]? | Optional skill definitions |+| `enabledByDefault` | boolean? | Auto-activate on install |+| `configSchema` | object? | Map of config fields (`string`/`number`/`boolean`/`select`) |+| `integrity` | string? | Optional `sha256-<base64>` entry-file pin |++Permissions are drawn from the enum+`network` / `file-read` / `file-write` / `env` / `exec`.++## Lifecycle Flow++```+install (POST /api/plugins, path)+ → scan/validate manifest → copy to staging → assert main within dir+ → atomic rename into ~/.omniroute/plugins/<name> → insert DB row+ → fire onInstall → if enabledByDefault: activate++activate (POST /api/plugins/{name}/activate)+ → realpath containment check → loadPlugin() (spawn child process)+ → register declared hooks → status = "active" → fire onActivate++deactivate (POST /api/plugins/{name}/deactivate)+ → fire onDeactivate (BEFORE unregister) → unregister hooks+ → kill child process → status = "inactive"++uninstall (DELETE /api/plugins/{name})+ → deactivate if active → fire onUninstall+ → containment-checked recursive delete of plugin dir → delete DB row+```++Re-running `install` against a directory whose manifest version is **strictly+newer** than the installed version auto-upgrades (clean reinstall; config resets+to defaults). A same-or-older version is rejected.++## Database++Table `plugins` (migration `076_create_plugins.sql`):++| Column | Type | Notes |+| --------------- | ------- | ------------------------------------------------ |+| `id` | TEXT PK | UUID |+| `name` | TEXT | Unique |+| `version` | TEXT | semver; default `1.0.0` |+| `description` | TEXT | Optional |+| `author` | TEXT | Optional |+| `license` | TEXT | Default `MIT` |+| `main` | TEXT | Entry file; default `index.js` |+| `source` | TEXT | Default `local` |+| `tags` | TEXT | JSON array; default `[]` |+| `status` | TEXT | `installed` \| `active` \| `inactive` \| `error` |+| `enabled` | INT | 0/1; default 0 |+| `manifest` | TEXT | Full manifest JSON |+| `config` | TEXT | JSON; default `{}` |+| `config_schema` | TEXT | JSON; default `{}` |+| `hooks` | TEXT | JSON array of declared hook names; default `[]` |+| `permissions` | TEXT | JSON array; default `[]` |+| `plugin_dir` | TEXT | Absolute install directory |+| `error_message` | TEXT | Set when `status = "error"` |+| `installed_at` | TEXT | `datetime('now')` |+| `updated_at` | TEXT | `datetime('now')` |+| `activated_at` | TEXT | Set on activation |++Plugin metrics/analytics are tracked in additional tables+(`090_plugin_metrics.sql`, `091_plugin_analytics.sql`).++## Dashboard++The dashboard page at `/dashboard/plugins`+(`src/app/(dashboard)/dashboard/plugins/page.tsx`) provides two tabs:++- **Installed** — lists installed plugins with their declared hooks, an+ activate/deactivate toggle, an uninstall button, and a "Scan for plugins"+ action (`POST /api/plugins/scan`).+- **Marketplace** — shows the catalog from `GET /api/plugins/marketplace` with a+ field to set the custom registry URL.++A per-plugin config page lives at `/dashboard/plugins/[name]/config`+(`src/app/(dashboard)/dashboard/plugins/[name]/config/page.tsx`).++## See Also++- [`docs/security/ROUTE_GUARD_TIERS.md`](../security/ROUTE_GUARD_TIERS.md) —+ why `/api/plugins` is loopback-only (Tier 1)+- [`docs/frameworks/SKILLS.md`](./SKILLS.md) — the related skills framework+ (`src/lib/skills/`); plugins may declare skills in their manifest+- [`docs/frameworks/WEBHOOKS.md`](./WEBHOOKS.md) — event-driven outbound+ integrations+- [`docs/security/ERROR_SANITIZATION.md`](../security/ERROR_SANITIZATION.md) —+ the `buildErrorBody()` pattern every plugin route uses for error responsesdiff --git a/docs/frameworks/meta.json b/docs/frameworks/meta.jsonindex 46b65656e3..76a39c8a6b 100644--- a/docs/frameworks/meta.json+++ b/docs/frameworks/meta.json@@ -9,7 +9,10 @@"EVALS","GAMIFICATION","MEMORY",+ "NOTION_CONTEXT",+ "OBSIDIAN_CONTEXT","OPENCODE",+ "PLUGIN_MARKETPLACE","SKILLS","WEBHOOKS"]diff --git a/docs/getting-started/PROVIDERS-GUIDE.md b/docs/getting-started/PROVIDERS-GUIDE.mdindex 1cda76bfca..7b7138d61f 100644--- a/docs/getting-started/PROVIDERS-GUIDE.md+++ b/docs/getting-started/PROVIDERS-GUIDE.md@@ -10,12 +10,12 @@ Think of a provider like a **phone carrier**. Just as you need a phone carrier t### Types of Providers-| Type | What It Is | Examples | Cost |-|------|-----------|----------|------|-| **Free** | No payment required | Kiro, OpenCode Free, Pollinations | $0 |-| **API Key** | You need an API key | OpenAI, Anthropic, Google | Pay per use |-| **OAuth** | Login with your account | Claude Code, GitHub Copilot | Subscription |-| **Web Cookie** | Uses your browser session | ChatGPT Web, Gemini Web | $0 (uses your account) |+| Type | What It Is | Examples | Cost |+| -------------- | ------------------------- | --------------------------------- | ---------------------- |+| **Free** | No payment required | Kiro, OpenCode Free, Pollinations | $0 |+| **API Key** | You need an API key | OpenAI, Anthropic, Google | Pay per use |+| **OAuth** | Login with your account | Claude Code, GitHub Copilot | Subscription |+| **Web Cookie** | Uses your browser session | ChatGPT Web, Gemini Web | $0 (uses your account) |---@@ -64,17 +64,17 @@ Think of a provider like a **phone carrier**. Just as you need a phone carrier tThese providers offer **free access** with no credit card:-| Provider | Free Quota | Models | How to Connect |-|----------|-----------|--------|----------------|-| **Kiro AI** | 50 credits/month | Claude Sonnet 4.5, Haiku 4.5, Opus 4.6 | No auth needed |-| **OpenCode Free** | Unlimited | GPT-4o, Claude, Gemini | No auth needed |-| **Pollinations** | No key needed | GPT-5, Claude, Gemini, DeepSeek, Llama 4 | No auth needed |-| **LongCat** | 50M tokens/day | LongCat-Flash-Lite | No auth needed |-| **Cloudflare AI** | 10K neurons/day | 50+ models | No auth needed |-| **NVIDIA NIM** | ~40 RPM | 129 models | API key needed |-| **Cerebras** | 1M tokens/day | Qwen3 235B, GPT-OSS 120B | API key needed |-| **Qwen** | Unlimited | Qwen3-coder-plus/flash/next | No auth needed |-| **Qoder** | Unlimited | Kimi-K2, DeepSeek-R1, Qwen3-coder | No auth needed |+| Provider | Free Quota | Models | How to Connect |+| ----------------- | ---------------- | ---------------------------------------- | -------------- |+| **Kiro AI** | 50 credits/month | Claude Sonnet 4.5, Haiku 4.5, Opus 4.6 | No auth needed |+| **OpenCode Free** | Unlimited | GPT-4o, Claude, Gemini | No auth needed |+| **Pollinations** | No key needed | GPT-5, Claude, Gemini, DeepSeek, Llama 4 | No auth needed |+| **LongCat** | 50M tokens/day | LongCat-Flash-Lite | No auth needed |+| **Cloudflare AI** | 10K neurons/day | 50+ models | No auth needed |+| **NVIDIA NIM** | ~40 RPM | 129 models | API key needed |+| **Cerebras** | 1M tokens/day | Qwen3 235B, GPT-OSS 120B | API key needed |+| **Qwen** | Unlimited | Qwen3-coder-plus/flash/next | No auth needed |+| **Qoder** | Unlimited | Kimi-K2, DeepSeek-R1, Qwen3-coder | No auth needed |**Tip**: Connect multiple free providers for **unlimited free AI** with automatic fallback!@@ -84,14 +84,14 @@ These providers offer **free access** with no credit card:These providers offer **high-quality models** with API keys:-| Provider | Best Models | Cost | Free Tier |-|----------|------------|------|-----------|-| **OpenAI** | GPT-5, GPT-4o | $2.50-$10/1M tokens | $5 free credits |-| **Anthropic** | Claude Opus 4.6, Sonnet 4.6 | $3-$15/1M tokens | $5 free credits |-| **Google** | Gemini 2.5 Pro, Flash | $0.075-$1.25/1M tokens | 1,500 req/day free |-| **DeepSeek** | DeepSeek V4 | $0.14-$0.28/1M tokens | 5M free tokens |-| **Groq** | Llama 4, Mixtral | $0.05-$0.27/1M tokens | 30 RPM free |-| **xAI** | Grok 3 | $0.30-$0.60/1M tokens | — |+| Provider | Best Models | Cost | Free Tier |+| ------------- | --------------------------- | ---------------------- | ------------------ |+| **OpenAI** | GPT-5, GPT-4o | $2.50-$10/1M tokens | $5 free credits |+| **Anthropic** | Claude Opus 4.6, Sonnet 4.6 | $3-$15/1M tokens | $5 free credits |+| **Google** | Gemini 2.5 Pro, Flash | $0.075-$1.25/1M tokens | 1,500 req/day free |+| **DeepSeek** | DeepSeek V4 | $0.14-$0.28/1M tokens | 5M free tokens |+| **Groq** | Llama 4, Mixtral | $0.05-$0.27/1M tokens | 30 RPM free |+| **xAI** | Grok 3 | $0.30-$0.60/1M tokens | — |---@@ -217,4 +217,4 @@ Go to Providers → click on the provider → click **Disconnect**.- **[Auto-Combo Guide](./AUTO-COMBO-GUIDE.md)** — Let OmniRoute pick the best AI for you- **[Free Tiers Guide](./FREE-TIERS-GUIDE.md)** — Get free AI with no credit card- **[Troubleshooting](./TROUBLESHOOTING.md)** — Fix common issues-- **[Provider Reference](../reference/PROVIDER_REFERENCE.md)** — Full list of 177 providers+- **[Provider Reference](../reference/PROVIDER_REFERENCE.md)** — Full list of 226 providersdiff --git a/docs/guides/COST_TRACKING.md b/docs/guides/COST_TRACKING.mdnew file mode 100644index 0000000000..216fb9cfa2--- /dev/null+++ b/docs/guides/COST_TRACKING.md@@ -0,0 +1,261 @@+---+title: "Cost & Spend Tracking"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Cost & Spend Tracking++How OmniRoute estimates, records, and reports the cost of every request — and why the+dashboard number is a **savings tracker**, not a bill.++See also: [User Guide](./USER_GUIDE.md) · [Features Gallery](./FEATURES.md)++---++## What it is (and what it is not)++OmniRoute attributes a per-request USD cost to every completion by multiplying token+counts by a model's pricing rates. These numbers power the **Costs** dashboard, the+`omniroute cost` / `omniroute usage` CLI, CSV/JSON exports, and per-API-key budgets.++> **The dashboard "cost" is a savings tracker, not a bill.** OmniRoute never charges you+> — it routes your requests to providers you have already connected (your own+> subscriptions, free tiers, and API keys). A "$290 total cost" accrued entirely on free+> models means roughly **$290 you did _not_ pay** a paid API. The figure is an _estimate_+> of what the same traffic would have cost at standard list prices, so you can see where+> your usage is concentrated and how much routing to cheaper/free providers is saving you.++This framing is stated directly in the project [README](../../README.md) ("the dashboard+'cost' is a savings tracker, not a bill").++Because the number is an estimate:++- It depends on the pricing table OmniRoute has for each model. A model with no pricing+ entry contributes `0` cost (it shows as a "Legacy / Free" row in the explorer).+- Free-tier and subscription traffic still accrues an _estimated_ cost — that is the+ amount you are saving, not an amount owed.++---++## How costs are estimated++### The pricing source++Costs come from a pricing table resolved in this precedence order+([`src/lib/pricingSync.ts`](../../src/lib/pricingSync.ts)):++1. **User overrides** — prices you set in the dashboard / via `PATCH /api/pricing`.+2. **Synced external pricing** — fetched from LiteLLM's public+ `model_prices_and_context_window.json` when sync is enabled (stored in a separate+ `pricing_synced` namespace so it never clobbers your overrides).+3. **Hardcoded defaults** — shipped with OmniRoute.++External pricing sync is **opt-in**, disabled by default. Relevant env vars+(see [`.env.example`](../../.env.example)):++| Env var | Default | Purpose |+| ----------------------- | --------- | ---------------------------------------------------------------- |+| `PRICING_SYNC_ENABLED` | `false` | Enable the background LiteLLM pricing sync at startup. |+| `PRICING_SYNC_INTERVAL` | `86400` | Sync interval in **seconds** (default daily). |+| `PRICING_SYNC_SOURCES` | `litellm` | Comma-separated source list (only `litellm` is supported today). |++### The cost formula++Cost is computed per request from token counts and per-million-token rates in+[`src/lib/usage/costCalculator.ts`](../../src/lib/usage/costCalculator.ts)+(`computeCostFromPricing` / `calculateCost`):++- **Input tokens** (minus cache reads and cache-creation tokens) × `input` rate.+- **Cache-read tokens** × `cached` rate (falls back to the input rate).+- **Cache-creation tokens** × `cache_creation` rate (falls back to the input rate).+- **Output tokens** × `output` rate.+- **Reasoning tokens** × `reasoning` rate (falls back to the output rate).++All rates are interpreted as USD per 1,000,000 tokens. A Codex "fast"/"priority" or+"flex" service tier applies a cost multiplier (`getCodexFastCostMultiplier`) — e.g. flex+is billed at a 50% token discount, surfaced as **flex savings** in the dashboard.++Model names are normalized first (provider-path prefixes such as `openai/` or+`accounts/fireworks/models/` are stripped) so historical rows still match a price.++### How spend is recorded++- The per-request cost is computed after the response and recorded fire-and-forget so it+ never adds latency to the client. Shared-quota consumption is scheduled on the next+ event-loop tick via [`src/lib/quota/spendRecorder.ts`](../../src/lib/quota/spendRecorder.ts).+- API-key spend is buffered and flushed in batches by the+ [`SpendBatchWriter`](../../src/lib/spend/batchWriter.ts) (default 60s flush interval,+ 1,000-entry buffer). Tunable via:++ | Env var | Default | Purpose |+ | ----------------------------------- | ------- | ---------------------------------- |+ | `OMNIROUTE_SPEND_FLUSH_INTERVAL_MS` | `60000` | Flush interval in milliseconds. |+ | `OMNIROUTE_SPEND_MAX_BUFFER_SIZE` | `1000` | Max buffered entries before flush. |++The dashboard's cost figures are **not** read from a stored per-row dollar amount — they+are recomputed on the fly from token counts and the current pricing table each time the+analytics endpoint runs. That means correcting a wrong price (and re-syncing) updates+historical cost estimates retroactively.++---++## Dashboard: the Costs page++The **Costs** page lives at `/dashboard/costs`+(`src/app/(dashboard)/dashboard/costs/`).+Its main view is the **Cost Overview** tab+(`src/app/(dashboard)/dashboard/costs/CostOverviewTab.tsx`),+which loads everything from `GET /api/usage/analytics`.++What it shows:++- **Spend tiles** — estimated spend for _Today (1d)_, _7d_, _30d_, and the selected+ window. Range selector: `7d`, `30d`, `90d`, `all`.+- **Headline metrics** — requests in window, active providers, active models, average+ cost per request.+- **Cost Explorer** — a sortable/filterable table grouped by **provider**, **model**,+ **API key**, **account**, or **service tier**, with cost, requests, tokens, avg+ cost/request, and share-of-total %.+- **Token usage** — total / input / output tokens and input:output ratio.+- **Routing efficiency** — fallback count, fallback rate, and requested-model coverage.+- **Monthly forecast** — projects month-end spend from the recent daily average.+- **Period comparison** — % change between the first and second half of the window.+- **Charts** — daily cost trend, provider share (pie), top providers, top models, cost+ by API key, cost by account, weekly usage pattern, and an activity heatmap.+- **Export** — download the current window as **CSV** or **JSON** (the buttons appear+ once there is non-zero cost data).++When there is no priced traffic, rows render as a "Legacy / Free" label instead of `$0`,+reflecting the savings-tracker model.++### Related Costs sub-pages++The Costs area also hosts (all under `/dashboard/costs/`):++- **Pricing** (`/dashboard/costs/pricing`) — view and override per-model prices (renders+ the shared Pricing tab).+- **Budget** (`/dashboard/costs/budget`) — set per-scope spend limits (renders the shared+ Budget tab).+- **Quota Share** (`/dashboard/costs/quota-share`) — shared-quota pools and burn-rate+ views.++---++## API endpoints++All of these require management auth (loopback/JWT, via `requireManagementAuth`) unless+noted.++### Usage & cost analytics++| Method | Endpoint | Purpose |+| ------ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `GET` | `/api/usage/analytics` | Full cost/usage analytics: summary, daily trend, by provider/model/API key/account/tier. Query: `range`, `startDate`, `endDate`, `apiKeyIds`, `presets`. |+| `GET` | `/api/usage/utilization` | Per-provider quota utilization over time. Query: `range` (`1h`/`24h`/`7d`/`30d`), `provider`. |+| `GET` | `/api/usage/history` | Raw usage history rows. |+| `GET` | `/api/usage/call-logs` | Per-request call logs (model, tokens, cost, latency, status). |+| `GET` | `/api/usage/quota` | Provider quota status. |+| `GET` | `/api/usage/proxy-logs` | Proxy request logs. |++### Budgets++| Method | Endpoint | Purpose |+| ------ | ------------------------ | ------------------------------------------------------------------------------ |+| `GET` | `/api/usage/budget` | Cost summary + budget check for one API key (`apiKeyId` query param required). |+| `POST` | `/api/usage/budget` | Set daily/weekly/monthly USD limits + warning threshold for an API key. |+| `GET` | `/api/usage/budget/bulk` | Bulk budget summaries across API keys. |++> The budget API is scoped per **API key** (`apiKeyId`). Limits returned by+> `GET /api/usage/budget` include `dailyLimitUsd`, `weeklyLimitUsd`, `monthlyLimitUsd`,+> a `warningThreshold`, and the running totals (`totalCostToday`, `totalCostMonth`, …).++### Pricing++| Method | Endpoint | Purpose |+| -------- | ----------------------- | ----------------------------------------------------------------------------------------------- |+| `GET` | `/api/pricing` | Current merged pricing (user + synced + defaults). `?includeSources=1` to see source per entry. |+| `PATCH` | `/api/pricing` | Override pricing for `{ provider: { model: { input, output, cached, … } } }`. |+| `DELETE` | `/api/pricing` | Reset pricing to defaults (optionally scoped by `?provider=&model=`). |+| `GET` | `/api/pricing/defaults` | Show default per-1M fallback rates. |+| `GET` | `/api/pricing/models` | Pricing keyed by model. |+| `POST` | `/api/pricing/sync` | Trigger a manual sync from external sources (LiteLLM). |+| `GET` | `/api/pricing/sync` | Current sync status. |+| `DELETE` | `/api/pricing/sync` | Clear all synced pricing data. |++### Other cost-relevant endpoints++| Method | Endpoint | Purpose |+| ------ | ----------------------------- | ----------------------------------------------------------------------- |+| `GET` | `/api/free-tier/summary` | Free-model token totals, used-this-month, and remaining free allowance. |+| `GET` | `/api/quota/pools/[id]/usage` | Usage for a shared-quota pool. |++---++## CLI++OmniRoute's CLI exposes cost, usage, and pricing commands (registered in+[`bin/cli/commands/registry.mjs`](../../bin/cli/commands/registry.mjs)).++### `omniroute cost`++A cost report aggregated from `/api/usage/analytics`.++```bash+omniroute cost # last 30d, grouped by provider+omniroute cost --period 7d # last 7 days+omniroute cost --group-by model # group by provider | model | combo | api-key | day+omniroute cost --since 2026-06-01 --until 2026-06-13+omniroute cost --api-key <key> --limit 50+```++Columns: group, requests, tokens in/out, cost (USD), and % of total. A grand total line+is printed at the end (suppressed with `--quiet` or `--output json`).++### `omniroute usage`++```bash+omniroute usage analytics --period 30d [--provider <id>] # per-provider cost summary+omniroute usage logs [--limit 100] [--follow] [--api-key <k>] [--search <q>]+omniroute usage quota [--provider <id>] [--check]+omniroute usage utilization [--api-key <k>]+omniroute usage history [--limit 100]+omniroute usage proxy-logs [--limit 100]++# Budgets+omniroute usage budget list+omniroute usage budget get [scope]+omniroute usage budget set <amount> [--scope global] [--period monthly]+omniroute usage budget reset [scope]+```++### `omniroute pricing`++```bash+omniroute pricing list [--provider <p>] [--model <m>] [--limit 200]+omniroute pricing get <model>+omniroute pricing sync [--provider <p>] [--force] # POST /api/pricing/sync+omniroute pricing diff [--model <m>]+omniroute pricing defaults show+omniroute pricing defaults set [--input <p>] [--output <p>] [--cache-read <p>] [--cache-write <p>]+```++> `pricing defaults show` reads `GET /api/pricing/defaults`. To edit individual model+> prices instead, use the **Pricing** dashboard page or `PATCH /api/pricing`.++---++## Troubleshooting++- **All costs show $0 / "Legacy / Free".** The models in use have no pricing entry.+ Enable external sync (`PRICING_SYNC_ENABLED=true`) and run `omniroute pricing sync`, or+ set prices manually via the Pricing page / `PATCH /api/pricing`.+- **A historical model is mispriced.** Fix the price (override or re-sync) — cost is+ recomputed from token counts on every analytics read, so estimates update retroactively.+- **Spend lags behind real time.** Per-key spend is batched; lower+ `OMNIROUTE_SPEND_FLUSH_INTERVAL_MS` if you need fresher numbers.++---++For where this fits in the broader dashboard, see the [User Guide](./USER_GUIDE.md) and+the [Features Gallery](./FEATURES.md).diff --git a/docs/guides/FEATURES.md b/docs/guides/FEATURES.mdindex df79c1d0ef..0ae629121b 100644--- a/docs/guides/FEATURES.md+++ b/docs/guides/FEATURES.md@@ -53,6 +53,8 @@ The v3.7.x → v3.8.0 cycle added zero-config auto routing, new providers, OAuthManage AI provider connections: OAuth providers (Claude Code, Codex, Gemini CLI), API key providers (Groq, DeepSeek, OpenRouter), and free providers (Qoder, Qwen, Kiro). Kiro accounts include credit balance tracking — remaining credits, total allowance, and renewal date visible in Dashboard → Usage.+OpenRouter connections can store a per-connection `preset` in Advanced Settings. When set, OmniRoute sends it as the OpenRouter top-level request field, for example `"preset": "email-copywriter"`, unless the client request already supplied its own `preset`.+---diff --git a/docs/guides/FREE_PROVIDER_RANKINGS.md b/docs/guides/FREE_PROVIDER_RANKINGS.mdnew file mode 100644index 0000000000..242c419d3c--- /dev/null+++ b/docs/guides/FREE_PROVIDER_RANKINGS.md@@ -0,0 +1,253 @@+---+title: "Free Provider Rankings (Arena ELO)"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Free Provider Rankings (Arena ELO)++> **TL;DR**: OmniRoute ranks its **free** providers by model quality using **Arena AI+> (LMArena-style) ELO scores**. Open the **Free Provider Rankings** page in the+> dashboard to see which free providers ship the strongest models for your task —+> overall, or filtered by category (coding, review, documentation, debugging).++---++## What It Is++OmniRoute aggregates 160+ providers, many of which expose a **free tier** (no-auth,+free-tier OAuth, or free-tier API key — see the+[Free Tiers Guide](../getting-started/FREE-TIERS-GUIDE.md) and the full+[Free Tiers directory](../reference/FREE_TIERS.md)). The catch: free providers vary+wildly in model quality. A no-auth provider serving a frontier model is far more useful+than one serving a small legacy model.++**Free Provider Rankings** answers "**which free provider gives me the best model?**" by+joining each free provider's catalog with **crowd-sourced quality scores** from the+**Arena AI leaderboard** (human-preference ELO, the same idea behind the LMArena+chatbot arena). Providers are then ranked by the strength of their **best free model**.++The ranking is computed from three real sources:++1. The free-provider lists — `NOAUTH_PROVIDERS`, plus `OAUTH_PROVIDERS` /+ `APIKEY_PROVIDERS` entries flagged `hasFree`+ (`src/shared/constants/providers.ts`).+2. Each provider's model catalog from the provider registry+ (`open-sse/config/providerRegistry.ts`).+3. ELO-derived task-fit scores stored in the `model_intelligence` DB table by the+ Arena ELO sync engine (`src/lib/arenaEloSync.ts`).++The join logic lives in `src/lib/freeProviderRankings.ts`.++---++## How to Access++### Dashboard page++Open the dashboard and go to **Costs → Free Provider Rankings**, or navigate directly to:++```+/dashboard/free-provider-rankings+```++The page (`src/app/(dashboard)/dashboard/free-provider-rankings/page.tsx`) shows:++- A **top-3 podium** (🥇 🥈 🥉) of the best-ranked free providers.+- A full **ranking table** with columns: **Rank**, **Provider**, **Top Model**,+ **Score**, **Avg Score**, **Models**, **Type**.+- **Category filter buttons**: _All Categories_, _Default_, _Coding_, _Review_,+ _Documentation_, _Debugging_.++Each provider's **Type** badge tells you how it is free:++| Badge | Meaning |+| -------- | --------------------------------------------- |+| `NOAUTH` | Always free, no credentials needed |+| `OAUTH` | OAuth provider with a free tier (`hasFree`) |+| `APIKEY` | API-key provider with a free tier (`hasFree`) |++Scores are shown as human-readable labels (e.g. _Elite_, _Excellent_, _Very Good_,+_Good_, _Average_) rather than raw numbers, because the underlying value is a relative+ranking quality, not a percentage.++### API endpoint++The page is backed by a public read endpoint+(`src/app/api/free-provider-rankings/route.ts`):++```+GET /api/free-provider-rankings+GET /api/free-provider-rankings?category=coding+GET /api/free-provider-rankings?category=coding&limit=20+```++Query parameters (validated with Zod):++| Param | Type | Default | Notes |+| ---------- | ------ | ------- | -------------------------------------------------------------------------------------------------- |+| `category` | string | (none) | One of `default`, `coding`, `review`, `documentation`, `debugging`. Omit for the combined ranking. |+| `limit` | number | `50` | Clamped to the range `1–100`. |++Response shape:++```json+{+ "rankings": [+ {+ "id": "<provider-id>",+ "name": "<provider name>",+ "icon": "<icon>",+ "color": "<hex color>",+ "textIcon": "<short label>",+ "category": "noauth | oauth | apikey",+ "topModel": {+ "modelId": "<registry model id>",+ "modelName": "<model display name>",+ "score": 0.0,+ "eloRaw": 0,+ "confidence": "high | medium | low",+ "category": "<task category>"+ },+ "averageScore": 0.0,+ "modelCount": 0+ }+ ]+}+```++`eloRaw` is the original Arena ELO value; `score` is the normalized task-fit value+(see below). Providers with no scored models are omitted from the response.++---++## How the Scores Work++### Source: Arena AI leaderboard++The Arena ELO sync engine (`src/lib/arenaEloSync.ts`) fetches two leaderboards — `text`+and `code` — from the Arena AI leaderboard API+(`https://api.wulong.dev/arena-ai-leaderboards/v1/leaderboard`). Each leaderboard entry+carries a model name, vendor, ELO `score`, confidence interval, and vote count.++Leaderboard categories map to OmniRoute task categories:++| Arena leaderboard | OmniRoute task categories |+| ----------------- | ------------------------------------------------- |+| `text` | `default`, `review`, `documentation`, `debugging` |+| `code` | `coding` |++### Normalization (task-fit score)++Raw ELO scores are normalized per leaderboard into a **task-fit value in `[0.4, 0.98]`**:++```+taskFit = 0.4 + 0.58 * ((elo - minElo) / (maxElo - minElo))+```++The score never reaches `0` or `1`, leaving headroom for user overrides. This is the+`score` field you see in the API response and the label shown on the dashboard.++### Confidence++Each entry gets a confidence level based on Arena vote count:++| Confidence | Votes |+| ---------- | ------- |+| `high` | ≥ 5,000 |+| `medium` | ≥ 1,000 |+| `low` | < 1,000 |++### Storage and freshness++Normalized entries are written to the `model_intelligence` DB table with+`source = "arena_elo"` (`src/lib/db/modelIntelligence.ts`). Entries **expire after+7 days**, so a provider that stops syncing eventually drops out rather than serving+stale data.++The sync runs **on by default**:++- It runs once at server startup and then on a periodic timer+ (`src/lib/arenaEloSync.ts`, wired from `src/server-init.ts`).+- It is **non-blocking and never fatal** — if the upstream fetch fails, OmniRoute keeps+ running and the rankings simply show the last good data (or an empty state).++Two environment variables control it (documented in+[`docs/reference/ENVIRONMENT.md`](../reference/ENVIRONMENT.md)):++| Variable | Default | Purpose |+| ------------------------- | ------------- | ----------------------------------------------- |+| `ARENA_ELO_SYNC_ENABLED` | `true` | Set to `false` to opt out of the outbound sync. |+| `ARENA_ELO_SYNC_INTERVAL` | `86400` (24h) | Sync interval, in seconds. |++### Manual sync / status / clear++For operators, an authenticated management endpoint exposes manual control+(`src/app/api/intelligence/sync/route.ts` — requires management auth):++```+GET /api/intelligence/sync # current sync status (enabled, lastSync, nextSync, intervalMs)+POST /api/intelligence/sync # trigger a manual sync; body: { "dryRun": true } to preview without writing+DELETE /api/intelligence/sync # clear all synced arena_elo intelligence entries+```++If the rankings page is empty, a manual `POST /api/intelligence/sync` (or simply+restarting the server) repopulates it.++### Matching models to the leaderboard++Registry model IDs and Arena model names don't always match exactly. The ranking uses+flexible matching (`findMatchingIntelligence` in `src/lib/freeProviderRankings.ts`):++1. Exact match on the normalized model ID.+2. Match after stripping a trailing version suffix (e.g. `kimi-k2.6` → `kimi-k2`).+3. Prefix match (a leaderboard model name is a prefix of the registry ID).++On the sync side, known vendor prefixes (`anthropic/`, `openai/`, `google/`, …) are+stripped and a small alias map expands canonical names into the variants OmniRoute uses+internally, so models stay findable under any name.++### How a provider is ranked++For each free provider, the engine scores every model in its catalog, then:++- **Top Model** = the provider's highest-scoring model.+- **Avg Score** = the mean score across all of that provider's scored models.+- **Models** = how many of the provider's models had an Arena score.++Providers are sorted by **top-model score** first, then by average score. This rewards a+provider that ships at least one strong free model.++---++## Using It to Choose Free Providers++1. **Pick the right category.** Use the **Coding** filter for agentic/code workloads, or+ leave it on **All Categories** / **Default** for general chat. The same provider can+ rank differently across categories because its top model differs per leaderboard.+2. **Prefer the podium for one-shot setups.** If you only want to connect one or two free+ providers, start with the top-ranked ones for your category.+3. **Check the Type badge.** `NOAUTH` providers are the fastest to connect (no+ credentials). `OAUTH` / `APIKEY` free tiers need a quick sign-up but often expose+ stronger models. See [Free Tiers Guide](../getting-started/FREE-TIERS-GUIDE.md) for+ connection steps.+4. **Connect several and let Auto-Combo decide.** The same Arena ELO data that powers+ this page also feeds the **task-fitness factor** of the Auto-Combo scoring engine+ (`open-sse/services/autoCombo/taskFitness.ts`, resolution order+ `user_override → arena_elo → models_dev_tier → static table`). So after you connect+ the top free providers, routing with `model: "auto"` (e.g. `auto/coding`) will+ automatically prefer the higher-quality free models per request. See+ [Auto-Combo](../routing/AUTO-COMBO.md) for the full 9-factor scoring.++---++## Related Documentation++- [Free Tiers Guide](../getting-started/FREE-TIERS-GUIDE.md) — how to connect free+ providers, no credit card required.+- [Free Tiers directory](../reference/FREE_TIERS.md) — full catalog of free providers+ and their limits.+- [Auto-Combo](../routing/AUTO-COMBO.md) — the 9-factor routing engine that consumes the+ same Arena ELO task-fitness data.+- [Environment variables](../reference/ENVIRONMENT.md) — `ARENA_ELO_SYNC_ENABLED` /+ `ARENA_ELO_SYNC_INTERVAL` reference.diff --git a/docs/guides/I18N.md b/docs/guides/I18N.mdindex a2d3e0f402..c4d7bd827e 100644--- a/docs/guides/I18N.md+++ b/docs/guides/I18N.md@@ -1,12 +1,12 @@---title: "i18n — Internationalization Guide"-version: 3.8.2-lastUpdated: 2026-05-13+version: 3.8.24+lastUpdated: 2026-06-13---# i18n — Internationalization Guide-OmniRoute supports **30 languages** with full dashboard UI translation, translated documentation, and RTL support for Arabic and Hebrew.+OmniRoute supports **42 languages** with full dashboard UI translation, translated documentation, and RTL support for Arabic and Hebrew.🌐 **Languages:** 🇺🇸 [English](./I18N.md) | 🇧🇷 [Português (Brasil)](../i18n/pt-BR/docs/guides/I18N.md) | 🇪🇸 [Español](../i18n/es/docs/guides/I18N.md) | 🇫🇷 [Français](../i18n/fr/docs/guides/I18N.md) | 🇩🇪 [Deutsch](../i18n/de/docs/guides/I18N.md) | 🇮🇹 [Italiano](../i18n/it/docs/guides/I18N.md) | 🇷🇺 [Русский](../i18n/ru/docs/guides/I18N.md) | 🇨🇳 [中文 (简体)](../i18n/zh-CN/docs/guides/I18N.md) | 🇯🇵 [日本語](../i18n/ja/docs/guides/I18N.md) | 🇰🇷 [한국어](../i18n/ko/docs/guides/I18N.md) | 🇸🇦 [العربية](../i18n/ar/docs/guides/I18N.md) | 🇮🇳 [हिन्दी](../i18n/hi/docs/guides/I18N.md) | 🇹🇭 [ไทย](../i18n/th/docs/guides/I18N.md) | 🇹🇷 [Türkçe](../i18n/tr/docs/guides/I18N.md) | 🇺🇦 [Українська](../i18n/uk-UA/docs/guides/I18N.md) | 🇻🇳 [Tiếng Việt](../i18n/vi/docs/guides/I18N.md) | 🇧🇬 [Български](../i18n/bg/docs/guides/I18N.md) | 🇩🇰 [Dansk](../i18n/da/docs/guides/I18N.md) | 🇫🇮 [Suomi](../i18n/fi/docs/guides/I18N.md) | 🇮🇱 [עברית](../i18n/he/docs/guides/I18N.md) | 🇭🇺 [Magyar](../i18n/hu/docs/guides/I18N.md) | 🇮🇩 [Bahasa Indonesia](../i18n/id/docs/guides/I18N.md) | 🇲🇾 [Bahasa Melayu](../i18n/ms/docs/guides/I18N.md) | 🇳🇱 [Nederlands](../i18n/nl/docs/guides/I18N.md) | 🇳🇴 [Norsk](../i18n/no/docs/guides/I18N.md) | 🇵🇹 [Português (Portugal)](../i18n/pt/docs/guides/I18N.md) | 🇷🇴 [Română](../i18n/ro/docs/guides/I18N.md) | 🇵🇱 [Polski](../i18n/pl/docs/guides/I18N.md) | 🇸🇰 [Slovenčina](../i18n/sk/docs/guides/I18N.md) | 🇸🇪 [Svenska](../i18n/sv/docs/guides/I18N.md) | 🇵🇭 [Filipino](../i18n/phi/docs/guides/I18N.md) | 🇨🇿 [Čeština](../i18n/cs/docs/guides/I18N.md)@@ -241,7 +241,7 @@ python3 scripts/i18n/i18n_autotranslate.py \- Scans `docs/i18n/` markdown files for English paragraphs- Skips code blocks, tables, and already-translated content- Sends paragraphs to LLM with technical translation system prompt-- Supports all 30 languages+- Supports all 42 languages## CLI i18ndiff --git a/docs/guides/SETUP_GUIDE.md b/docs/guides/SETUP_GUIDE.mdindex 1946fd8e23..bf811ae193 100644--- a/docs/guides/SETUP_GUIDE.md+++ b/docs/guides/SETUP_GUIDE.md@@ -216,7 +216,7 @@ Add to your MCP settings:}```-**Full MCP documentation:** [MCP Server README](../../open-sse/mcp-server/README.md) — 37 tools, IDE configs, Python/TS/Go clients.+**Full MCP documentation:** [MCP Server README](../../open-sse/mcp-server/README.md) — 87 tools, IDE configs, Python/TS/Go clients.### A2A Setup (Agent-to-Agent Protocol)@@ -255,7 +255,7 @@ Backward compatibility is preserved: existing `FETCH_TIMEOUT_MS`, `API_BRIDGE_PRFor Claude Code-compatible upstreams (`anthropic-compatible-cc-*`), OmniRoute derives the outbound `X-Stainless-Timeout` header from the resolved fetch timeout so provider-side read timeouts stay aligned with your env configuration.-For third-party Claude Code-compatible reverse proxies, OmniRoute keeps the default `anthropic-beta` set conservative and, when `Client Cache Control` is left on `Auto`, only forwards client-provided `cache_control` markers.+For third-party Claude Code-compatible reverse proxies, OmniRoute keeps the default `anthropic-beta` set conservative and, when `Client Cache Control` is left on `Auto`, only forwards client-provided `cache_control` markers. Enable the per-connection "Enable redact-thinking beta" toggle only when the upstream specifically requires redacted Claude thinking streams.### Advanced Timeout Overridesdiff --git a/docs/guides/meta.json b/docs/guides/meta.jsonindex 6603dc1378..9ed8d6c36d 100644--- a/docs/guides/meta.json+++ b/docs/guides/meta.json@@ -7,8 +7,11 @@"DOCKER_GUIDE","ELECTRON_GUIDE","FEATURES",+ "FREE_PROVIDER_RANKINGS",+ "COST_TRACKING","I18N","KIRO_SETUP",+ "CODEX-CLI-CONFIGURATION","PWA_GUIDE","TERMUX_GUIDE","UNINSTALL"diff --git a/docs/i18n/ar/CHANGELOG.md b/docs/i18n/ar/CHANGELOG.mdindex d4c2175cbf..5b8b543c62 100644--- a/docs/i18n/ar/CHANGELOG.md+++ b/docs/i18n/ar/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/az/CHANGELOG.md b/docs/i18n/az/CHANGELOG.mdindex 4fb4d1ee04..5ba8212844 100644--- a/docs/i18n/az/CHANGELOG.md+++ b/docs/i18n/az/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/bg/CHANGELOG.md b/docs/i18n/bg/CHANGELOG.mdindex 4fb4d1ee04..5ba8212844 100644--- a/docs/i18n/bg/CHANGELOG.md+++ b/docs/i18n/bg/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/bn/CHANGELOG.md b/docs/i18n/bn/CHANGELOG.mdindex 47b5e3cec4..0db73346c0 100644--- a/docs/i18n/bn/CHANGELOG.md+++ b/docs/i18n/bn/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/cs/CHANGELOG.md b/docs/i18n/cs/CHANGELOG.mdindex ee25f9424a..6e6ecbf61f 100644--- a/docs/i18n/cs/CHANGELOG.md+++ b/docs/i18n/cs/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/da/CHANGELOG.md b/docs/i18n/da/CHANGELOG.mdindex 8f5040c48c..5aae04c2b3 100644--- a/docs/i18n/da/CHANGELOG.md+++ b/docs/i18n/da/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/de/CHANGELOG.md b/docs/i18n/de/CHANGELOG.mdindex b680e3dc98..6045389476 100644--- a/docs/i18n/de/CHANGELOG.md+++ b/docs/i18n/de/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/es/CHANGELOG.md b/docs/i18n/es/CHANGELOG.mdindex 85dd13446c..e4b50140a3 100644--- a/docs/i18n/es/CHANGELOG.md+++ b/docs/i18n/es/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/fa/CHANGELOG.md b/docs/i18n/fa/CHANGELOG.mdindex 3060c2c78c..c9b7f1c1eb 100644--- a/docs/i18n/fa/CHANGELOG.md+++ b/docs/i18n/fa/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/fi/CHANGELOG.md b/docs/i18n/fi/CHANGELOG.mdindex d48ee8a418..e67c3b82d7 100644--- a/docs/i18n/fi/CHANGELOG.md+++ b/docs/i18n/fi/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/fr/CHANGELOG.md b/docs/i18n/fr/CHANGELOG.mdindex 33e1682eb7..a11461a7dd 100644--- a/docs/i18n/fr/CHANGELOG.md+++ b/docs/i18n/fr/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/gu/CHANGELOG.md b/docs/i18n/gu/CHANGELOG.mdindex 34c5b92c53..b7e0363909 100644--- a/docs/i18n/gu/CHANGELOG.md+++ b/docs/i18n/gu/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/he/CHANGELOG.md b/docs/i18n/he/CHANGELOG.mdindex dfb651c7e3..df506e0a21 100644--- a/docs/i18n/he/CHANGELOG.md+++ b/docs/i18n/he/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/hi/CHANGELOG.md b/docs/i18n/hi/CHANGELOG.mdindex 88193ed52d..3b9c5a2001 100644--- a/docs/i18n/hi/CHANGELOG.md+++ b/docs/i18n/hi/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/hu/CHANGELOG.md b/docs/i18n/hu/CHANGELOG.mdindex d8cba0e4c4..b24157d80f 100644--- a/docs/i18n/hu/CHANGELOG.md+++ b/docs/i18n/hu/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/id/CHANGELOG.md b/docs/i18n/id/CHANGELOG.mdindex e89b56ac96..7420d2f994 100644--- a/docs/i18n/id/CHANGELOG.md+++ b/docs/i18n/id/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/in/CHANGELOG.md b/docs/i18n/in/CHANGELOG.mdindex d8d45ea354..99e1a40dd6 100644--- a/docs/i18n/in/CHANGELOG.md+++ b/docs/i18n/in/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/it/CHANGELOG.md b/docs/i18n/it/CHANGELOG.mdindex d592c0054a..d052bb3d04 100644--- a/docs/i18n/it/CHANGELOG.md+++ b/docs/i18n/it/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ja/CHANGELOG.md b/docs/i18n/ja/CHANGELOG.mdindex 1a36824490..aec4d34bc2 100644--- a/docs/i18n/ja/CHANGELOG.md+++ b/docs/i18n/ja/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ko/CHANGELOG.md b/docs/i18n/ko/CHANGELOG.mdindex 05d5e753db..07081ef476 100644--- a/docs/i18n/ko/CHANGELOG.md+++ b/docs/i18n/ko/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/mr/CHANGELOG.md b/docs/i18n/mr/CHANGELOG.mdindex 19564c8d83..375a9004c9 100644--- a/docs/i18n/mr/CHANGELOG.md+++ b/docs/i18n/mr/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ms/CHANGELOG.md b/docs/i18n/ms/CHANGELOG.mdindex b4c645449f..764739a7a1 100644--- a/docs/i18n/ms/CHANGELOG.md+++ b/docs/i18n/ms/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/nl/CHANGELOG.md b/docs/i18n/nl/CHANGELOG.mdindex 430ffc4ce6..cdad222e1b 100644--- a/docs/i18n/nl/CHANGELOG.md+++ b/docs/i18n/nl/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/no/CHANGELOG.md b/docs/i18n/no/CHANGELOG.mdindex b14d9e9b9d..540758225a 100644--- a/docs/i18n/no/CHANGELOG.md+++ b/docs/i18n/no/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/phi/CHANGELOG.md b/docs/i18n/phi/CHANGELOG.mdindex 7a69e46cd1..934b4ab5ae 100644--- a/docs/i18n/phi/CHANGELOG.md+++ b/docs/i18n/phi/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/pl/CHANGELOG.md b/docs/i18n/pl/CHANGELOG.mdindex 5a2b6c0af1..842fdf33ee 100644--- a/docs/i18n/pl/CHANGELOG.md+++ b/docs/i18n/pl/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/pt-BR/CHANGELOG.md b/docs/i18n/pt-BR/CHANGELOG.mdindex 5db6d9b189..c11b13850c 100644--- a/docs/i18n/pt-BR/CHANGELOG.md+++ b/docs/i18n/pt-BR/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/pt/CHANGELOG.md b/docs/i18n/pt/CHANGELOG.mdindex 364cc57c2e..5c16ce49b4 100644--- a/docs/i18n/pt/CHANGELOG.md+++ b/docs/i18n/pt/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ro/CHANGELOG.md b/docs/i18n/ro/CHANGELOG.mdindex de3c1adc61..543e962002 100644--- a/docs/i18n/ro/CHANGELOG.md+++ b/docs/i18n/ro/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ru/CHANGELOG.md b/docs/i18n/ru/CHANGELOG.mdindex e13ba3fb7a..bfbf32e718 100644--- a/docs/i18n/ru/CHANGELOG.md+++ b/docs/i18n/ru/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/sk/CHANGELOG.md b/docs/i18n/sk/CHANGELOG.mdindex 40e3e3ae35..d5993cd760 100644--- a/docs/i18n/sk/CHANGELOG.md+++ b/docs/i18n/sk/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/sv/CHANGELOG.md b/docs/i18n/sv/CHANGELOG.mdindex 79e47d0c43..a91421234a 100644--- a/docs/i18n/sv/CHANGELOG.md+++ b/docs/i18n/sv/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/sw/CHANGELOG.md b/docs/i18n/sw/CHANGELOG.mdindex e0d05a0cb4..9df3b002c3 100644--- a/docs/i18n/sw/CHANGELOG.md+++ b/docs/i18n/sw/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ta/CHANGELOG.md b/docs/i18n/ta/CHANGELOG.mdindex 60eb1fc2ce..cfb4e9273a 100644--- a/docs/i18n/ta/CHANGELOG.md+++ b/docs/i18n/ta/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/te/CHANGELOG.md b/docs/i18n/te/CHANGELOG.mdindex 78338abb5b..99d60804ef 100644--- a/docs/i18n/te/CHANGELOG.md+++ b/docs/i18n/te/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/th/CHANGELOG.md b/docs/i18n/th/CHANGELOG.mdindex c6aeb022bd..e9d4d7ad2f 100644--- a/docs/i18n/th/CHANGELOG.md+++ b/docs/i18n/th/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/tr/CHANGELOG.md b/docs/i18n/tr/CHANGELOG.mdindex f39ee23476..573c4e94de 100644--- a/docs/i18n/tr/CHANGELOG.md+++ b/docs/i18n/tr/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/uk-UA/CHANGELOG.md b/docs/i18n/uk-UA/CHANGELOG.mdindex 258a01e20c..687e84c30a 100644--- a/docs/i18n/uk-UA/CHANGELOG.md+++ b/docs/i18n/uk-UA/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/ur/CHANGELOG.md b/docs/i18n/ur/CHANGELOG.mdindex c6834448a8..81878e2c0b 100644--- a/docs/i18n/ur/CHANGELOG.md+++ b/docs/i18n/ur/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/vi/CHANGELOG.md b/docs/i18n/vi/CHANGELOG.mdindex ded47a11cf..7845c11a6f 100644--- a/docs/i18n/vi/CHANGELOG.md+++ b/docs/i18n/vi/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/i18n/zh-CN/CHANGELOG.md b/docs/i18n/zh-CN/CHANGELOG.mdindex 7dfd95db1e..9da0b2dda0 100644--- a/docs/i18n/zh-CN/CHANGELOG.md+++ b/docs/i18n/zh-CN/CHANGELOG.md@@ -4,6 +4,65 @@---+## [3.8.26] — 2026-06-15++### ✨ New Features++- **feat(media): Vertex AI (Google) speech, transcription, music & video generation** — Vertex AI's Google media models are now routable through dynamic discovery: speech synthesis, audio transcription, music generation, and video generation. ([#3929](https://github.com/diegosouzapw/OmniRoute/pull/3929) — thanks @artickc)+- **feat(glm): add GLM-5.2 with effort-tier routing (high/max)** — GLM-5.2 is registered with high/max effort-tier routing. ([#3885](https://github.com/diegosouzapw/OmniRoute/pull/3885) — thanks @dhaern)+- **feat(combo): add a sticky round-robin target limit** — round-robin combos can cap how many targets stay "sticky" within a session (`stickyRoundRobinLimit`), balancing stickiness against spread. ([#3846](https://github.com/diegosouzapw/OmniRoute/pull/3846) — thanks @adivekar-utexas)+- **feat(openrouter): connection presets** — OpenRouter connections support reusable presets (provider routing / sort / quantization preferences), selectable when adding a connection. ([#3878](https://github.com/diegosouzapw/OmniRoute/pull/3878) — thanks @rdself)++### 🐛 Fixed++- **fix(compression/memory): stop memory + compression from poisoning the upstream prompt cache** — with compression and/or memory enabled, requests to caching providers (Anthropic-family) missed the prompt cache on every turn, multiplying cost. Two root causes: (1) memory injection prepended the retrieved memories — which **vary per user query** — at index 0 of the message array, shifting the entire cacheable prefix every turn; memory is now inserted just before the last user message when the request carries `cache_control` breakpoints, keeping the cacheable prefix (system prompt + prior turns) byte-stable. (2) the cache-aware `skipSystemPrompt` flag computed by `getCacheAwareStrategy()` was dropped by `selectCompressionStrategy()` (which can only return a mode), so the system prompt could still be compressed under caching; a new `resolveCacheAwareConfig()` now forces `preserveSystemPrompt` on for caching requests. ([#3936](https://github.com/diegosouzapw/OmniRoute/pull/3936), closes [#3890](https://github.com/diegosouzapw/OmniRoute/issues/3890) — thanks @xenstar / @diegosouzapw)+- **fix(providers): register BytePlus ModelArk so its API key can be added** — adding a BytePlus (`ark-…`) key reported "invalid". `byteplus` was present in the provider catalog (`APIKEY_PROVIDERS`) but **never registered in the routing registry**, so key validation fell through to `{ unsupported: true }` → HTTP 400 → the UI rendered every key as invalid (and the provider was unusable for inference). Added a registry entry modeled on the existing Volcengine Ark provider: OpenAI-compatible format, base `https://ark.ap-southeast.bytepluses.com/api/v3` (region `ap-southeast-1`), `Authorization: Bearer` auth, seeded with the catalog's advertised models (Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B). ([#3935](https://github.com/diegosouzapw/OmniRoute/pull/3935), closes [#3877](https://github.com/diegosouzapw/OmniRoute/issues/3877) — thanks @nikohd12 / @diegosouzapw)+- **fix(providers): Nous Research key validation no longer fails on a stale probe model** — adding a valid Nous Research API key reported "invalid" even though the same key worked via the portal's copy-shell `curl`. The validation probe sent `model: "nousresearch/hermes-4-70b"`, which Nous does not serve, so the API returned `400` and the validator (which only treated `200`/`429` as success) reported the key invalid. The probe now uses the real `Hermes-4-70B` slug, and any non-auth 4xx (`400`/`404`/`422`) is treated as a valid key (the request shape was wrong, not the credentials) — mirroring the longcat/nvidia validators so a future model rename can't re-break key validation. ([#3934](https://github.com/diegosouzapw/OmniRoute/pull/3934), closes [#3881](https://github.com/diegosouzapw/OmniRoute/issues/3881) — thanks @FerLuisxd / @diegosouzapw)+- **fix(stream): persist mid-stream upstream failures** — when an upstream stream fails partway through, the partial response and incremental usage are now finalized and persisted instead of lost; extracts a shared `streamFailureFinalization` path and merges incremental Claude usage (follow-up to #3879). ([#3937](https://github.com/diegosouzapw/OmniRoute/pull/3937) — thanks @rdself)+- **fix(perplexity-web): update the request payload to schema v2.18 (HTTP 400)** — Perplexity web requests started returning HTTP 400; the request payload was updated to Perplexity's v2.18 schema. ([#3938](https://github.com/diegosouzapw/OmniRoute/pull/3938) — thanks @artickc)+- **fix(stream): keep the in-flight request payload in sync** — the pending-by-id request record is now updated in place (`Object.assign`) so the in-flight payload stays consistent with what was dispatched (coexists with #3937). ([#3940](https://github.com/diegosouzapw/OmniRoute/pull/3940) — thanks @rdself)+- **fix: stabilize reasoning streams and request logs** — reasoning-token streaming and the request-log capture path were stabilized to avoid dropped/duplicated reasoning frames and inconsistent log entries. ([#3879](https://github.com/diegosouzapw/OmniRoute/pull/3879) — thanks @rdself)+- **fix(opencode-plugin): include nested combo-refs in the LCD context window** — the OpenCode plugin now follows nested combo references when computing the least-common-denominator context window, so a combo nested inside another no longer reports an inflated window. ([#3910](https://github.com/diegosouzapw/OmniRoute/pull/3910) — thanks @herjarsa)+- **fix(models): correct the failed-model auto-hide defaults** — the defaults governing when a failed model is auto-hidden were corrected, and auto-hide is now opt-in so models are no longer dropped unexpectedly. ([#3930](https://github.com/diegosouzapw/OmniRoute/pull/3930) — thanks @rdself)+- **fix(openrouter): show the preset field when editing a connection** — the connection-preset field appeared only when creating a connection, not when editing one; it now appears in both (follow-up to #3878). ([#3921](https://github.com/diegosouzapw/OmniRoute/pull/3921) — thanks @rdself)+- **fix(sse): announce the assistant role on the first delta (Responses→Chat)** — the first SSE delta of a Responses-API→Chat-Completions stream now carries `role: "assistant"`, which strict OpenAI-compatible clients expect before content deltas. ([#3911](https://github.com/diegosouzapw/OmniRoute/pull/3911) — thanks @diego-anselmo)+- **fix(vertex): add the generative-language scope so SA-JSON model discovery works** — Vertex service-account (SA-JSON) model discovery failed without the `generative-language` OAuth scope; the scope is now requested. ([#3922](https://github.com/diegosouzapw/OmniRoute/pull/3922) — thanks @artickc)+- **fix(proxy): direct-connection fallback for control-plane ops when a pinned proxy is unreachable** — control-plane operations (validation, discovery) now fall back to a direct connection when a connection's pinned proxy is unreachable, instead of failing outright. ([#3906](https://github.com/diegosouzapw/OmniRoute/pull/3906) — thanks @zhiru)+- **fix(providers): prevent zombie-socket hangs for zai/glm and tighten the default keepAlive** — zai/glm could hang on dead keep-alive sockets; the default keepAlive was tightened to evict zombie sockets. ([#3907](https://github.com/diegosouzapw/OmniRoute/pull/3907) — thanks @insoln)+- **fix(setup): remove the stale CJS bundle check from setup-open-code** — the OpenCode setup helper no longer checks for a CJS bundle that the now ESM-only plugin no longer ships. ([#3908](https://github.com/diegosouzapw/OmniRoute/pull/3908) — thanks @herjarsa)+- **fix(opencode-plugin): drop the CJS bundle to fix the OpenCode plugin loader** — the plugin is now ESM-only, fixing the OpenCode loader which failed on the dual CJS/ESM build. ([#3883](https://github.com/diegosouzapw/OmniRoute/pull/3883) — thanks @herjarsa)+- **fix(mcp): fall back to `node:sqlite` when the better-sqlite3 binding is missing** — the MCP server now falls back to Node's built-in `node:sqlite` when the native better-sqlite3 binding is unavailable, instead of crashing. ([#3887](https://github.com/diegosouzapw/OmniRoute/pull/3887) — thanks @megamen32)+- **fix(models): correct the generate-models alias lookup** — alias resolution during model generation was corrected so aliased model ids resolve to their canonical entry. ([#3870](https://github.com/diegosouzapw/OmniRoute/pull/3870) — thanks @YunyunZhai)+- **fix(combo): guard the candidate pool against an empty array** — combo candidate-pool selection no longer throws when the pool resolves to an empty array. ([#3871](https://github.com/diegosouzapw/OmniRoute/pull/3871) — thanks @YunyunZhai)++### 🔒 Security & Hardening++- **fix(security): bump form-data + vite (2 HIGH), harden workflow template-injection & allowlist guarded `workflow_run`** — two HIGH Dependabot advisories (`form-data`, `vite`) were upgraded; GitHub Actions workflows were hardened against `${{ }}` template-injection (untrusted values now passed via `env:`); and the guarded `workflow_run` trigger was allowlisted. ([#3949](https://github.com/diegosouzapw/OmniRoute/pull/3949) — thanks @diegosouzapw)++### 🧹 Internal / Quality / Docs++- **fix(ci): grant `contents: write` to the npm publish job for SBOM attach** — the v3.8.25 TokenPermissions hardening set the npm-publish `publish` job to `contents: read`, but its "Attach SBOM to GitHub Release" step (`gh release upload`) needs `contents: write` and failed with HTTP 403 on the v3.8.25 release (npm / GitHub Packages / opencode-plugin / Docker / Electron all published fine; only the SBOM attach broke — the v3.8.25 SBOM was attached manually). ([#3874](https://github.com/diegosouzapw/OmniRoute/pull/3874) — thanks @diegosouzapw)+- **ci(quality): make zizmor / gitleaks / osv scanners functional + freeze advisory baselines** — the supply-chain scanners are now actually executed (correct install + invocation) with frozen advisory baselines so new findings surface as diffs. ([#3947](https://github.com/diegosouzapw/OmniRoute/pull/3947) — thanks @diegosouzapw)+- **ci(quality): fix scanner install + size-limit preset, promote `codeqlAlerts` to blocking** — corrected the scanner install and the size-limit preset, and promoted the `codeqlAlerts` ratchet from advisory to blocking. ([#3945](https://github.com/diegosouzapw/OmniRoute/pull/3945) — thanks @diegosouzapw)+- **ci(quality): wire Stryker mutation testing as an advisory nightly** — Stryker mutation testing runs nightly (advisory) — Quality Gates Fase 7 · Task 11. ([#3898](https://github.com/diegosouzapw/OmniRoute/pull/3898) — thanks @diegosouzapw)+- **ci(quality): freeze per-module coverage floors + wire require-tighten (advisory)** — per-module coverage floors are frozen with an advisory "require-tighten" check that flags modules drifting below their floor. ([#3901](https://github.com/diegosouzapw/OmniRoute/pull/3901) — thanks @diegosouzapw)+- **ci(quality): enforce the stale-allowlist check on `check-known-symbols`** — stale allowlist entries (suppressing a symbol that no longer exists) now fail the gate — Fase 6A.3 follow-up. ([#3899](https://github.com/diegosouzapw/OmniRoute/pull/3899) — thanks @diegosouzapw)+- **test(ci): de-flake pipeline-payloads via per-test re-seed + honest reset** — the pipeline-payloads suite now re-seeds per test and performs an honest cache reset, eliminating a cross-test ordering flake. ([#3893](https://github.com/diegosouzapw/OmniRoute/pull/3893) — thanks @diegosouzapw)+- **fix(ci): drop the `secrets`-in-job-`if` from nightly-llm-security** — referencing `secrets` in a job-level `if` caused a `startup_failure` on push; the gating was moved so the workflow starts cleanly. ([#3892](https://github.com/diegosouzapw/OmniRoute/pull/3892) — thanks @diegosouzapw)+- **test: reconcile the runtime-timeouts keepAlive baseline to 4000 after the #3907 source revert** — the keepAlive assertion was realigned to the source value (4000) after #3907's source-side revert. ([#3933](https://github.com/diegosouzapw/OmniRoute/pull/3933) — thanks @diegosouzapw)+- **chore(repo): nest quality-gate state under `config/quality`, declutter the repo root** — baselines / allowlists / metrics moved under `config/quality/`, trimming the tracked root file count. ([#3896](https://github.com/diegosouzapw/OmniRoute/pull/3896) — thanks @diegosouzapw)+- **docs: refresh the provider count to 226 + regenerate `PROVIDER_REFERENCE.md`** — the README advertised a stale `177 providers`; the canonical generator (`scripts/docs/gen-provider-reference.ts`) now reports **226 unique provider IDs**, so the README badges/anchors and the generated provider reference were brought in sync. Also adds a documentation audit/sync report. (thanks @diegosouzapw)+- **docs: sync all documentation to v3.8.24 + count-guard & wiki/prose CI** — a full documentation sync with a strict provider/locale count-guard plus Vale / markdownlint prose CI. ([#3804](https://github.com/diegosouzapw/OmniRoute/pull/3804) — thanks @diegosouzapw)+- **docs: regenerate stale counts to canonical values** — 226 providers / 87 MCP tools / 15 strategies / 42 locales. ([#3904](https://github.com/diegosouzapw/OmniRoute/pull/3904) — thanks @diegosouzapw)+- **docs(quality): correct the stale gate count + add an opt-in agent-lsp scaffold** — ([#3902](https://github.com/diegosouzapw/OmniRoute/pull/3902) — thanks @diegosouzapw)+- **docs(mcp): correct the MCP tool-inventory diagram source + text to 87 tools** — ([#3909](https://github.com/diegosouzapw/OmniRoute/pull/3909) — thanks @diegosouzapw)+- **docs: update the compression section to the 9-engine multi-layer stack** — ([#3894](https://github.com/diegosouzapw/OmniRoute/pull/3894) — thanks @diegosouzapw)+- **ci(docs): automate GitHub wiki sync (add missing pages + cover counts)** — ([#3900](https://github.com/diegosouzapw/OmniRoute/pull/3900) — thanks @diegosouzapw)+- **docs: require a dedicated git worktree + branch per development task (Hard Rule #19)** — codifies the worktree-isolation rule after the shared-checkout incidents. ([#3939](https://github.com/diegosouzapw/OmniRoute/pull/3939) — thanks @diegosouzapw)+- **fix(docs): add MDX frontmatter to `DOCUMENTATION_AUDIT_REPORT` so the fumadocs build passes** — the audit report lacked the `title:` frontmatter MDX pages require. (thanks @diegosouzapw)++---+## [3.8.25] — 2026-06-14### ✨ New Featuresdiff --git a/docs/ops/DOCUMENTATION_AUDIT_REPORT.md b/docs/ops/DOCUMENTATION_AUDIT_REPORT.mdnew file mode 100644index 0000000000..8155dd5a21--- /dev/null+++ b/docs/ops/DOCUMENTATION_AUDIT_REPORT.md@@ -0,0 +1,241 @@+---+title: "Documentation Audit & Sync Report"+version: 3.8.24+lastUpdated: 2026-06-13+---++# OmniRoute — Relatório de Auditoria de Documentação & Plano de Sincronização++> **Versão do projeto:** 3.8.24 · **Data:** 2026-06-13 · **Status:** FASE 1 (pesquisa/organização) — execução **pendente de confirmação**+> **Escopo:** docs raiz · `/docs` · site `:20128/docs` (Fumadocs) · Wiki GitHub · i18n (42 locales) · CI de docs/i18n++---++## 0. TL;DR++1. **As contagens estão dessincronizadas entre 5 fontes diferentes** (código, README, AGENTS.md, site, Wiki). O caso mais grave: **providers** aparece como `177` (README) / `232` (AGENTS) / `223` (gerador, **correto**) / `212+` (Wiki) / `160+` (CLAUDE.md).+2. **Os gates de CI atuais NÃO validam os números mais visíveis** (provider count, free count, test count, locale count). Por isso o drift passou despercebido.+3. **A Wiki do GitHub está órfã**: 995 páginas, **sem automação de sync**, último update genérico, números muito antigos (`14 strategies`, `37 MCP tools`, `212+ providers`).+4. **O pipeline i18n nunca rodou para os docs**: `.i18n-state.json` não existe → drift check não tem baseline.+5. **~10–12 funcionalidades recentes não têm documentação** (Plugin Marketplace, Free Provider Rankings/Arena ELO, IPv6 egress, Feature Flags, Notion/Obsidian context, etc.).++---++## 1. Números canônicos REAIS (a fonte de verdade de cada um)++| Métrica | **Valor real** | Fonte de verdade (como medir) | README | AGENTS.md | CLAUDE.md | docs/README.md | Wiki Home | Site |+| ------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------- | -------------- | --------- | ---------- | --------------------------- | --------- | ----------------- | --- |+| **Providers (total)** | **223** | `scripts/docs/gen-provider-reference.ts` → `PROVIDER_REFERENCE.md` ("unique IDs") | ❌ 177 | ❌ 232 | ❌ "160+" | (n/a) | ❌ 212+ | via gerador |+| **Providers c/ free tier** | **103** `hasFree:true` / **98** pesquisados c/ quota | `grep hasFree:true providers.ts` / `FREE_TIERS.md` | ⚠️ "50+" | — | — | — | ⚠️ "50+" | — |+| **Free forever** | **11** (a revalidar) | README claim — sem fonte programática | "11" | — | — | — | — | — |+| **Test files (unit)** | **1.574** | `find tests/unit -name '*.test.ts'` | — | — | — | — | — | — |+| **Test files (integration)** | **76** | `find tests/integration` | — | — | — | — | — | — |+| **Test files (total)** | **~1.660** (+46 em src/open-sse) | find global | — | — | — | — | — | — |+| **Test cases (aprox)** | **~16.000** | `grep -E '(test | it)\(' tests/` | — | — | — | — | — | — |+| **`unit/` test files (CONTRIBUTING)** | **1.574** | — | — | — | — | ❌ **CONTRIBUTING diz 122** | — | — |+| **API endpoints (route.ts)** | **502** | `find src/app/api -name route.ts` | — | — | — | — | — | — |+| **Endpoints `/v1` (OpenAI-compat)** | **75** | `find src/app/api/v1 -name route.ts` | — | — | — | — | — | — |+| **MCP tools** | **87** (33 base + módulos) | `schemas/tools.ts` = 33 base; +memory/skill/notion/obsidian/gamification/plugin | ✅ 87 | ✅ 87 | ✅ 87 | — | ❌ 37 | — |+| **MCP scopes** | **30** (16 base em tools.ts) | `scopeEnforcement.ts` + módulos | — | ✅ 30 | ✅ 30 | — | — | — |+| **Routing strategies** | **15** | `open-sse/services/combo.ts` (gate valida) | ✅ 15 | ✅ 15 | ✅ 15 | ❌ 14 | ❌ 14 | — |+| **Auto-combo scoring factors** | **9** (label) / engine multifator | `AUTO-COMBO.md` | "9" | "12" | "9-factor" | ❌ "9-factor" | — | — |+| **i18n locales** | **42** (+en = 43) | `config/i18n.json` | — | ✅ 42 | — | ❌ 40 | ❌ "40+" | ✅ 40 (LANGUAGES) |+| **Executors** | **60** | gate valida ✓ | — | ✅ | — | — | — | — |+| **A2A skills** | **6** | gate valida ✓ | ✅ | ✅ | ✅ | — | — | — |+| **Cloud agents** | **3** | gate valida ✓ | ✅ | — | — | — | — | — |+| **OAuth flows / providers** | **16** flows / **19** providers OAuth | gate (16) vs `PROVIDER_REFERENCE` (19) | — | — | — | — | — | — |+| **DB modules / migrations** | **83 / 97** | gate/CLAUDE ✓ | — | ✅ | ✅ | — | — | — |++> ⚠️ **Inconsistências de número que precisam de decisão de produto (não só correção mecânica):**+>+> - **Free count:** `hasFree:true` = 103, mas inclui créditos-de-cadastro one-time. `FREE_TIERS.md` documenta 98 pesquisados (≈63 recorrentes, 29 signup-only, 6 descontinuados). O "50+/11 forever" é conservador e defensável — **decidir o headline canônico**.+> - **Auto-combo "9-factor" vs "12":** README diz 9, AGENTS diz 12. Precisa alinhar à contagem real em `AUTO-COMBO.md`.++---++## 2. Defasagens por fonte de documentação++### 2.1 Documentos da raiz++| Arquivo | Problema | Ação |+| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |+| `README.md` | `177 providers` em ~9 lugares (linhas 9, 22, 23, 62, 139, 143, 266, 322, 326, 736) + badges + âncora `#-177-ai-providers--50-free` | Corrigir para **223**; revisar badge/âncora; revalidar "50+/11 forever" |+| `AGENTS.md` | `232 provider entries` (linha 6) + live counts `providers 232` (linha 11) | Corrigir para **223** |+| `CLAUDE.md` | `"160+"` providers (linha ~40) | Corrigir para **223** |+| `CONTRIBUTING.md` | `unit/ (122 test files)` (linha 255) — defasado em >1.400 | Corrigir para **1.574** (ou texto dinâmico) |+| `CHANGELOG.md` | OK (v3.8.24 correto) | — |+| `SECURITY.md` / `CODE_OF_CONDUCT.md` / `GEMINI.md` | Genéricos, OK | — |++### 2.2 `/docs`++| Arquivo | Problema |+| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| `docs/README.md` (índice) | `9-factor scoring, 14 strategies` (linha 81 → deveria ser 15); `40 locales` (linha 121 → 42) |+| `docs/guides/I18N.md` | "supports 30 languages" (real: 42); `lastUpdated 2026-05-13` |+| `docs/frameworks/AGENT-SKILLS.md, AGENTBRIDGE.md` | `lastUpdated 2026-05-28` (v3.8.6) |+| `docs/frameworks/WEBHOOKS.md`, `docs/guides/PWA_GUIDE.md` | `lastUpdated 2026-05-13` (v3.8.0) |+| `docs/frameworks/SEARCH_TOOLS_STUDIO.md`, `PLAYGROUND_STUDIO.md` | `lastUpdated 2026-05-30` |+| `docs/guides/TROUBLESHOOTING.md, FEATURES.md, UNINSTALL.md`, `docs/reference/API_REFERENCE.md` | refs a versões antigas (v3.5.x–v3.7.x) — verificar se históricas (ok) ou stale |+| Órfãos do site (existem em `/docs` mas fora do `meta.json`) | `routing/QUOTA_SHARE.md`, `guides/CODEX-CLI-CONFIGURATION.md`, `security/SOCKET_DEV_FINDINGS.md`, `compression/EXTENDING_COMPRESSION.md` — acessíveis por URL mas **não na sidebar** |+| Raiz `/docs` nunca no site | `AGENTROUTER.md`, `PROVIDERS.md`, `DOCUMENTATION_OVERHAUL_PLAN.md`, `SUBMIT_PR.md`, `fix-opencode-context.md` |++### 2.3 Site `:20128/docs` (Fumadocs)++- **Como funciona:** `docs/<seção>/*.md` → `source.config.ts` (globs) → `.source/server.ts` (gerado) → `src/lib/source.ts` → `src/app/docs/layout.tsx` (sidebar = `pageTree` dos `meta.json`) → `[...slug]/page.tsx`. **60 docs em inglês** entram no site.+- **Navegação curada por `meta.json`** → arquivo novo em `/docs` **não aparece** até ser adicionado manualmente ao `meta.json` da seção. Hoje há 4 arquivos importados mas fora da sidebar (acima).+- **i18n no site:** `[...slug]/page.tsx` lê cookie `NEXT_LOCALE`; se ≠ en, tenta `docs/i18n/<locale>/docs/<seção>/<FILE>.md` via `marked.parse()`, com fallback para o MDX inglês. Seletor: `LanguageSelector.tsx` (40 idiomas em `LANGUAGES`).+- **API Explorer:** `openapi.generated.ts` é gerado por `scripts/docs/gen-openapi-module.mjs` a partir de `docs/reference/openapi.yaml` no `prebuild:docs`.+- **Riscos de drift:** (a) `meta.json` manual; (b) traduções não atualizam quando o inglês muda; (c) `openapi.yaml` precisa de regen; (d) `LANGUAGES` no app diz 40, config diz 42 → **divergência app vs config**.++### 2.4 Wiki do GitHub (`/wiki`) — **mais defasada de todas**++- **995 páginas** (`60 docs Title-Case` + `935 i18n`), `Home.md`, `_Sidebar.md`, `_Footer.md`.+- **Sem nenhum script/automação de sync** no repo (`grep wiki` em `scripts/`, `.github/`, `package.json` = vazio). Foi populada uma vez, manualmente.+- **Números muito antigos no `Home.md`:** `212+ providers`, `14 Routing Strategies`, `MCP Server 37 tools`, `40+ Languages`.+- **Conclusão:** a Wiki não tem "fonte de verdade" — precisa virar **espelho automatizado** de `/docs` (ver Plano §6, Fase 4).++### 2.5 i18n (42 locales)++- **Fonte de verdade dos locales:** `config/i18n.json` → **42** (+en=43). Documentação diz 30 (`I18N.md`) e 40 (`docs/README.md`, `LANGUAGES` no app) — **3 números diferentes**.+- **Subset espelhado por idioma:** ~26–27 arquivos (7 raiz: README/CONTRIBUTING/CLAUDE/GEMINI/AGENTS/SECURITY/CODE_OF_CONDUCT + llm.txt/CHANGELOG copiados + ~19 docs em architecture/frameworks/guides/ops/reference/routing).+- **`.i18n-state.json` não existe** → `i18n:check` (drift) não tem baseline; tradução de docs nunca foi executada pelo pipeline novo.+- **Duplicações/legados:** `pt` vs `pt-BR` (ambos traduzem os mesmos arquivos); `id` vs `in` (Indonésio — `in` é legado ISO 639-3, deveria deprecar).+- **CLI locales incompletos:** `bn, gu, he, mr, ms, phi, in` = 3 bytes (vazios).+- **Motor:** `run-translation.mjs` usa endpoint OpenAI-compat via env `OMNIROUTE_TRANSLATION_*` (LLM); scripts Python (`i18n_autotranslate.py`, `generate-multilang.mjs`) marcados deprecated.++---++## 3. Gaps de funcionalidades (features sem doc) — com curadoria++> Curadoria aplicada: o agente de exploração marcou 57% dos módulos como "não documentados", mas muitos (`config`, `runtime`, `middleware`, `images`, `catalog`, `system`, `display`, `events`, `embeddings`) são **internos** e não merecem doc dedicado. Lista abaixo filtrada para o que é **voltado ao usuário/operador**.++### P0 — features novas visíveis ao usuário, sem doc++| Feature | Onde no código | PR | Doc sugerido |+| ------------------------------------------------------ | -------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------- |+| **Plugin Marketplace** (customizável + SSRF hardening) | `src/app/api/plugins/marketplace/` | #3656, #3774 | `docs/frameworks/PLUGIN_MARKETPLACE.md` |+| **Free Provider Rankings (Arena ELO)** | `src/app/api/free-provider-rankings/`, `/dashboard/free-provider-rankings` | #3799 | `docs/guides/FREE_PROVIDER_RANKINGS.md` |+| **IPv6 egress family selector** (auto/ipv4/ipv6) | proxy/egress + UI form | #3777 | `docs/security/EGRESS_POLICY.md` (ou seção em PROXY_GUIDE) |+| **Feature Flags page (runtime + emergency fallback)** | `/dashboard` feature-flags | #3752, #3741 | `docs/reference/FEATURE_FLAGS.md` |++### P1 — integrações/frameworks sem doc++| Feature | Onde | Doc sugerido |+| -------------------------------------- | ----------------------------------- | ------------------------------------- |+| **Notion context source** | `src/lib/notion/` (+6 MCP tools) | `docs/frameworks/NOTION_CONTEXT.md` |+| **Obsidian context source** | `src/lib/obsidian/` (+22 MCP tools) | `docs/frameworks/OBSIDIAN_CONTEXT.md` |+| **Quota-shared routing audit** (#3779) | combo + quota | seção em `AUTO-COMBO.md` |+| **Model lockout / success-decay** | `RESILIENCE_GUIDE.md` desatualizado | atualizar `RESILIENCE_GUIDE.md` |+| **Cost/Spend tracking** | `/dashboard/costs` | `docs/guides/COST_TRACKING.md` |++### P2 — sub-documentados++Traffic Inspector, Search Tools Studio (raso), Prompt Caching, Credential Health, Background Jobs, Database Migrations guide.++> **Validação obrigatória na execução:** cada item acima será confirmado no código (trust-but-verify) antes de escrever doc — não documentar feature que não exista/esteja como descrita.++---++## 4. CI de docs/i18n — coberto vs lacunas++### Coberto (hard gates)++`check:docs-sync` (version package↔openapi↔CHANGELOG + mirrors i18n) · `check:env-doc-sync` (env code↔.env.example↔ENVIRONMENT.md) · `check:docs-symbols` (anti-alucinação rota) · `check:openapi-routes` · `check:cli-i18n` · `check-ui-keys-coverage` (floor 65%).++### Parcial / advisory++`check:docs-counts` (**soft, não no CI principal** — e **não cobre providers/free/tests/locales**) · `check:doc-links` (só internos) · `check:fabricated-docs` (soft) · `check-translation-drift` (`--warn`, não bloqueia) · `validate_translation.py` (matrix `continue-on-error`).++### Lacunas (sem gate algum)++1. **Provider count / free count / test count / locale count** — os números mais visíveis **não são validados**. → causa-raiz de todo o drift atual.+2. **Validação MDX/Fumadocs** — quebra de sintaxe só aparece no deploy.+3. **Lint de prosa (Vale/markdownlint)** — sem checagem de estilo/ortografia.+4. **Links externos** — `check:doc-links` ignora http(s); URLs mortas passam.+5. **Imagens/screenshots/diagramas órfãos.**+6. **Drift de tradução não é blocking.**+7. **`meta.json` ↔ `/docs`** — arquivo novo fora da sidebar não é detectado.+8. **Wiki sync** — inexistente.+9. **`config/i18n.json` (42) vs `LANGUAGES` app (40)** — sem gate de consistência.++---++## 5. Boas práticas 2026 (pesquisa web) aplicáveis++| Prática | Ferramenta | Aplicação no OmniRoute |+| ----------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |+| **Lint de prosa em CI** | **Vale** (Google/Microsoft style) + **markdownlint** | Novo job `docs-lint` (warning-first p/ não travar) |+| **Severidade graduada** | error = link quebrado / code-fence / alt-text faltando; warning = voz passiva / estilo | Configurar `.vale.ini` + `.markdownlint.json` |+| **Feedback local rápido** | pre-commit com markdownlint/Vale (<2s) | Adicionar ao husky lint-staged p/ `*.md` |+| **Accept-list de vocabulário** | `Vale accept.txt` | Evitar ruído com termos do projeto (OmniRoute, combo, etc.) |+| **Link checker robusto** | **lychee** (Rust, externos + internos, cache) | Job semanal/cron + flag opcional no doc-links |+| **Wiki como espelho automatizado** | **`Andrew-Chen-Wang/github-wiki-action`** ou `wiki-sync` | Workflow que espelha `/docs` → `.wiki.git` em push to main |+| **Tradução LLM roteada por tarefa** | docs técnicos → GPT-5.x; nuance → Claude; bulk → modelo barato | Já temos roteamento próprio — usar `cx/gpt-5.4-mini` p/ docs (config existente) |+| **Translation memory + glossário** | reduz drift e protege termos | Adotar glossário/accept-list compartilhado UI+docs |+| **TMS via MCP** | Crowdin/Lokalise/Tolgee/SimpleLocalize têm MCP oficial | Opcional futuro; hoje pipeline próprio já cobre |+| **Gerar docs no CI** | docs sempre refletem o código | Elevar gerador de provider/openapi + count-guard a gate |++**Fontes:** [Fern — Docs Linting Guide (jan/2026)](https://buildwithfern.com/post/docs-linting-guide) · [Netlify — Docs Linting in CI/CD](https://www.netlify.com/blog/a-key-to-high-quality-documentation-docs-linting-in-ci-cd/) · [GitLab Docs — Documentation testing](https://docs.gitlab.com/development/documentation/testing/) · [Lokalise — Best LLM for translation 2026](https://lokalise.com/blog/what-is-the-best-llm-for-translation/) · [Crowdin — AI Localization 2026](https://crowdin.com/blog/ai-localization) · [Andrew-Chen-Wang/github-wiki-action](https://github.com/Andrew-Chen-Wang/github-wiki-action) · [OneUptime — Generate Docs with GitHub Actions](https://oneuptime.com/blog/post/2026-01-27-generate-documentation-github-actions/view)++---++## 6. PLANO DE MELHORIAS & SINCRONIZAÇÃO (execução pós-confirmação)++### Fase A — Números canônicos (correção mecânica de alto impacto)++1. Regenerar `PROVIDER_REFERENCE.md` (`gen-provider-reference.ts`) e fixar **223** como fonte.+2. Corrigir **providers** em: README (9 ocorrências + badge + âncora), AGENTS.md, CLAUDE.md, Wiki Home → **223**.+3. Corrigir **tests** em CONTRIBUTING.md (122 → 1.574) — ou tornar texto dinâmico.+4. Corrigir **strategies** (14 → 15) e **locales** (30/40 → 42) em `docs/README.md`, `I18N.md`, Wiki Home, e `LANGUAGES` do app.+5. Corrigir **MCP tools** na Wiki (37 → 87) e alinhar **auto-combo factors** (9 vs 12 → valor real).+6. Decidir headline **free** (50+/11 vs 98/103) e aplicar uniformemente.++### Fase B — Sincronizar /docs + README (estrutural)++7. Atualizar `lastUpdated`/versão dos docs defasados (AGENT-SKILLS, WEBHOOKS, PWA, I18N, SEARCH/PLAYGROUND_STUDIO).+8. Adicionar os 4 arquivos órfãos ao `meta.json` (ou removê-los conscientemente).+9. Avaliar README: adicionar/atualizar seções (Quick Start, tabela de números, links p/ novos docs).++### Fase C — Novos documentos (gaps de features, P0→P1)++10. Criar P0: PLUGIN_MARKETPLACE, FREE_PROVIDER_RANKINGS, EGRESS_POLICY, FEATURE_FLAGS.+11. Atualizar RESILIENCE_GUIDE (model lockout) e AUTO-COMBO (quota-shared).+12. Criar P1: NOTION_CONTEXT, OBSIDIAN_CONTEXT, COST_TRACKING (conforme confirmação).++### Fase D — i18n++13. Bootstrapar `.i18n-state.json` (`i18n:run --dry-run`) e rodar tradução dos docs corrigidos.+14. Reconciliar `config/i18n.json` (42) ↔ `LANGUAGES` app (40); decidir sobre `in` (deprecar) e `pt`/`pt-BR`.+15. Atualizar I18N.md com o processo real e contagem 42.++### Fase E — Site `:20128/docs`++16. Regenerar `openapi.generated.ts` e validar API Explorer.+17. Garantir que os novos docs entram no `meta.json` e renderizam (verificação visual via browser).++### Fase F — Wiki GitHub (automatizar)++18. Criar workflow `wiki-sync.yml` espelhando `/docs` → `.wiki.git` (github-wiki-action) — **fim do drift manual**.+19. Re-sincronizar a Wiki com os números corrigidos.++### Fase G — CI de docs (fechar lacunas)++20. **Adicionar count-guard** a `check:docs-counts`: providers, free, tests, locales, MCP tools/scopes → **gate blocking** (matando a causa-raiz).+21. Promover `check-translation-drift` a blocking (`--strict`) após baseline.+22. Adicionar job advisory `docs-lint` (Vale + markdownlint) e link-check externo (lychee, cron).+23. Adicionar gate de consistência `config/i18n.json ↔ LANGUAGES`.++---++## 7. Decisões necessárias do usuário (antes de executar)++1. **Headline de "free"**: manter `50+ / 11 forever` ou adotar número pesquisado (`98` documentados)?+2. **Escopo dos novos docs**: criar todos P0+P1 agora, ou só P0 nesta rodada?+3. **Wiki**: automatizar via workflow (recomendado) ou só re-sincronizar manualmente desta vez?+4. **i18n**: re-traduzir os docs alterados agora (custa chamadas LLM) ou só corrigir o inglês e deixar i18n para um passo seguinte?+5. **`in`/`pt` legados**: deprecar `in` (Indonésio legado) nesta rodada?+6. **CI**: implementar os novos gates (count-guard, Vale, wiki-sync) nesta rodada ou em PR separado?++---++_Relatório gerado na Fase 1 (pesquisa). Nenhum documento de produto foi alterado ainda. A sincronização começa após confirmação do escopo acima._diff --git a/docs/ops/RELEASE_CHECKLIST.md b/docs/ops/RELEASE_CHECKLIST.mdindex ba50a99cda..e2a2dc3bef 100644--- a/docs/ops/RELEASE_CHECKLIST.md+++ b/docs/ops/RELEASE_CHECKLIST.md@@ -112,7 +112,7 @@ Breaking changes: add `BREAKING CHANGE:` footer or `!` after the scope (e.g. `fe- [ ] `npm run i18n:check` exits 0 — translation state (`.i18n-state.json`) in sync with source docs (no drifted sources in strict mode; warn-mode advisory is acceptable for last-minute doc touch-ups, but should be 0 before tagging)- [ ] `npm run i18n:check-ui-coverage` exits 0 — every UI locale at or above the 80% coverage floor-- [ ] `npm run i18n:sync-ui:dry` reports 0 missing keys across all 40 locales+- [ ] `npm run i18n:sync-ui:dry` reports 0 missing keys across all 42 locales- [ ] If source English docs changed, run `npm run i18n:run` (requires `OMNIROUTE_TRANSLATION_API_KEY` in `.env`) before tagging- [ ] Translation contributions can be deferred to next release if minor (track in CHANGELOG)diff --git a/docs/ops/meta.json b/docs/ops/meta.jsonindex b2248086f1..dfc1af0180 100644--- a/docs/ops/meta.json+++ b/docs/ops/meta.json@@ -8,6 +8,7 @@"PROXY_GUIDE","SQLITE_RUNTIME","COVERAGE_PLAN",- "E2E_DASHBOARD_SHAKEDOWN_v3.8.0"+ "E2E_DASHBOARD_SHAKEDOWN_v3.8.0",+ "DOCUMENTATION_AUDIT_REPORT"]}diff --git a/docs/reference/FEATURE_FLAGS.md b/docs/reference/FEATURE_FLAGS.mdnew file mode 100644index 0000000000..d64bd539c0--- /dev/null+++ b/docs/reference/FEATURE_FLAGS.md@@ -0,0 +1,235 @@+---+title: "Feature Flags"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Feature Flags++> Runtime toggles that change OmniRoute's behavior **without a redeploy**.+> Every flag listed here is defined in+> [`src/shared/constants/featureFlagDefinitions.ts`](../../src/shared/constants/featureFlagDefinitions.ts)+> — the single source of truth. The dashboard and the REST API both read from+> that file, so the table below is generated to match it 1:1.++---++## What Feature Flags Are++A feature flag is a named toggle (boolean or enum) whose value can be changed at+runtime and persisted in the database, with no process redeploy required. Each+flag is described by a `FeatureFlagDefinition` with a `key`, `label`,+`description`, `category`, `defaultValue`, `type`, and a `requiresRestart` hint.++### Resolution Order++The **effective value** of a flag is resolved by+[`resolveFeatureFlag()`](../../src/shared/utils/featureFlags.ts) with this+precedence (highest wins):++1. **DB override** — a value stored in the `key_value` table under the+ `feature_flags` namespace (set via the dashboard or the REST API).+2. **Environment variable** — `process.env[<KEY>]`, if set and non-empty.+3. **Definition default** — the `defaultValue` from `featureFlagDefinitions.ts`.++A boolean flag is considered **enabled** when its effective value is `"true"`,+`"1"`, or `"yes"` (see `isFeatureFlagEnabled()`).++> [!NOTE]+> Most flags also have a matching environment variable of the **same name**+> documented in [`ENVIRONMENT.md`](./ENVIRONMENT.md). The flag's DB override+> takes precedence over that environment variable. A flag with+> `requiresRestart: true` is persisted immediately but only re-read at process+> startup — toggling it surfaces a **"Restart Server"** banner in the dashboard.++---++## Flag Catalog++31 flags across 6 categories. **Default** is the definition default — the value+used when neither a DB override nor an environment variable is present.++### Security (7)++| Key | Type | Default | Description |+| -------------------------------- | ------- | -------- | ----------------------------------------------------------------------------- |+| `REQUIRE_API_KEY` | boolean | `false` | Require an API key for all incoming requests. |+| `INPUT_SANITIZER_ENABLED` | boolean | `true` | Enable input sanitization for all requests. |+| `INJECTION_GUARD_MODE` | enum | `off` | Prompt injection guard mode. Values: `off`, `warn`, `block`, `redact`. |+| `PII_REDACTION_ENABLED` | boolean | `false` | Redact personally identifiable information from requests. |+| `PII_RESPONSE_SANITIZATION` | boolean | `false` | Sanitize PII from provider responses. |+| `PII_RESPONSE_SANITIZATION_MODE` | enum | `redact` | Mode for PII response sanitization. Values: `redact`, `warn`, `block`, `off`. |+| `OUTBOUND_SSRF_GUARD_ENABLED` | boolean | `true` | Block outbound requests to private/internal IP ranges. |++### Network (6)++| Key | Type | Default | Restart | Description |+| --------------------------------------- | ------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `ENABLE_TLS_FINGERPRINT` | boolean | `false` | ✓ | Enable TLS fingerprint stealth mode. |+| `ONEPROXY_ENABLED` | boolean | `true` | | Enable 1proxy request proxying. |+| `PROXY_AUTO_SELECT_ENABLED` | boolean | `false` | | When no proxy is assigned to a connection, auto-select the first working proxy from the registry. Off by default (otherwise any registry proxy becomes a global fallback — #3332). |+| `MITM_DISABLE_TLS_VERIFY` | boolean | `false` | ✓ | Disable TLS certificate verification for the MITM proxy. **Danger.** |+| `OMNIROUTE_ALLOW_PRIVATE_PROVIDER_URLS` | boolean | `false` | | Allow provider URLs pointing to private/internal networks. |+| `ENABLE_CC_COMPATIBLE_PROVIDER` | boolean | `false` | ✓ | Enable Claude Code compatible provider mode. |++### Policies (3)++| Key | Type | Default | Restart | Description |+| ----------------------------------------- | ------- | ---------- | ------- | ---------------------------------------------------------------------- |+| `TOOL_POLICY_MODE` | enum | `disabled` | | Tool-use policy enforcement mode. Values: `disabled`, `warn`, `block`. |+| `RATE_LIMIT_AUTO_ENABLE` | boolean | `false` | | Automatically enable rate limiting based on usage patterns. |+| `ALLOW_MULTI_CONNECTIONS_PER_COMPAT_NODE` | boolean | `false` | ✓ | Allow multiple connections per compatibility node. |++### Runtime (9)++| Key | Type | Default | Restart | Description |+| ------------------------------------------- | ------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |+| `OMNIROUTE_MCP_ENFORCE_SCOPES` | boolean | `true` | | Enforce scope restrictions on MCP tool access. |+| `OMNIROUTE_MCP_COMPRESS_DESCRIPTIONS` | boolean | `false` | | Compress MCP tool descriptions to reduce token usage. |+| `OMNIROUTE_ENABLE_RUNTIME_BACKGROUND_TASKS` | boolean | `false` | | Enable background task processing at runtime. |+| `OMNIROUTE_DISABLE_BACKGROUND_SERVICES` | boolean | `false` | ✓ | Disable all background services (quota refresh, sync, etc). |+| `OMNIROUTE_RTK_TRUST_PROJECT_FILTERS` | boolean | `false` | | Trust project-level RTK filters without validation. |+| `OMNIROUTE_ENABLE_LIVE_WS` | boolean | `true` | ✓ | Start the real-time dashboard WebSocket server on import (port 20129 by default). |+| `OMNIROUTE_CODEX_WS_ENABLED` | boolean | `true` | | Allow Codex to use the Responses-over-WebSocket transport. When off, Codex falls back to HTTP Responses. |+| `OMNIROUTE_EMERGENCY_FALLBACK` | boolean | `true` | | Route budget-exhausted requests to the emergency free fallback provider/model. (See [Emergency Budget Fallback](#emergency-budget-fallback) below.) |+| `MODEL_CATALOG_INCLUDE_NAMES` | boolean | `true` | | Include display-friendly name fields in `/v1/models` responses. Disable for clients that expect model IDs only. |++### CLI (3)++| Key | Type | Default | Restart | Description |+| ---------------------------- | ------- | ------- | ------- | -------------------------------------------------------------------------------------------------------------- |+| `CLI_COMPAT_ALL` | boolean | `false` | ✓ | Enable compatibility mode for all CLI clients. |+| `MODEL_ALIAS_COMPAT_ENABLED` | boolean | `false` | | Enable model alias compatibility layer. |+| `PRICING_SYNC_ENABLED` | boolean | `false` | | Enable automatic pricing data synchronization (also requires the `PRICING_SYNC_ENABLED` environment variable). |++### Health (3)++| Key | Type | Default | Description |+| ------------------------------------- | ------- | ------- | -------------------------------------------------------- |+| `OMNIROUTE_DISABLE_LOCAL_HEALTHCHECK` | boolean | `false` | Disable the local instance health check endpoint. |+| `OMNIROUTE_DISABLE_TOKEN_HEALTHCHECK` | boolean | `false` | Disable the token validation health check. |+| `SKILLS_SANDBOX_NETWORK_ENABLED` | boolean | `false` | Enable network access in the skills sandbox environment. |++> [!NOTE]+> The `Restart` column marks flags with `requiresRestart: true` — the value is+> persisted instantly but only takes effect after the process reloads. Enum+> flags reject any value outside their allowed set (validated server-side in+> both `setFeatureFlagOverride()` and the REST `PUT` handler).++---++## Toggling Flags++### Dashboard++Navigate to **Dashboard → Settings → Feature Flags**+(`/dashboard/settings/feature-flags`). The grid+(`src/app/(dashboard)/dashboard/settings/components/FeatureFlagsGrid.tsx`)+supports:++- **Search** by key or description, and **filter** by category (plus a synthetic+ **Requires Restart** view).+- A **toggle** for boolean flags and a **dropdown** for enum flags+ (`src/app/(dashboard)/dashboard/settings/components/FeatureFlagCard.tsx`).+- A **source badge** per flag — `DB`, `ENV`, or `DEF` — showing where the+ effective value came from.+- A **Reset** button (shown only for `DB`-sourced flags) to drop the override,+ and a **Reset All Overrides** button at the bottom.+- A **Restart Server** banner when a `requiresRestart` flag is changed.++### REST API++All operations go through a single route:+[`src/app/api/settings/feature-flags/route.ts`](../../src/app/api/settings/feature-flags/route.ts).+Every method requires an authenticated dashboard session (`401` otherwise).++#### `GET /api/settings/feature-flags`++Returns every flag with its effective value, source, and a summary.++```jsonc+{+ "flags": [+ {+ "key": "REQUIRE_API_KEY",+ "label": "Require API Key",+ "description": "Require an API key for all incoming requests",+ "category": "security",+ "type": "boolean",+ "enumValues": null,+ "defaultValue": "false",+ "effectiveValue": "false",+ "source": "default", // "db" | "env" | "default"+ "requiresRestart": false,+ "warningLevel": "caution",+ },+ // ... all 31 flags+ ],+ "summary": {+ "total": 31,+ "active": 0,+ "inactive": 0,+ "overriddenByDb": 0,+ "overriddenByEnv": 0,+ },+}+```++#### `PUT /api/settings/feature-flags`++Set or remove a single override. Body: `{ key: string; value?: string }`.+Omitting `value` removes the override (restoring env / default).++```bash+# Set a DB override+curl -X PUT http://localhost:20128/api/settings/feature-flags \+ -H "Content-Type: application/json" \+ -d '{"key":"REQUIRE_API_KEY","value":"true"}'++# Remove the override (no "value")+curl -X PUT http://localhost:20128/api/settings/feature-flags \+ -H "Content-Type: application/json" \+ -d '{"key":"REQUIRE_API_KEY"}'+```++The response echoes the new `effectiveValue`/`source`, the `previousValue`/+`previousSource`, and `requiresRestart`. Unknown keys and out-of-range enum+values are rejected with `400`.++#### `DELETE /api/settings/feature-flags`++Clears **all** DB overrides at once, restoring every flag to its env / default+value. Returns `{ cleared: <count>, message: "..." }`.++> [!NOTE]+> Flags with `requiresRestart: true` only take effect after a process reload.+> The dashboard's restart flow calls `POST /api/restart` and then polls+> `GET /api/health/ping` until the server is back up.++---++## Emergency Budget Fallback++`OMNIROUTE_EMERGENCY_FALLBACK` (category `runtime`, default `true`) controls the+emergency free-fallback path in+[`open-sse/services/emergencyFallback.ts`](../../open-sse/services/emergencyFallback.ts).+When enabled, requests that exhaust their budget are routed to a free fallback+provider/model instead of failing outright. Set it to `false` (or `0`) — via the+dashboard toggle, a DB override, or the `OMNIROUTE_EMERGENCY_FALLBACK`+environment variable — to disable the behavior and let budget-exhausted requests+fail. (Surfaced as a dashboard toggle in PRs #3741 / #3752.)++---++## See Also++- [Environment Variables Reference](./ENVIRONMENT.md) — most flags have a+ same-named environment variable documented there (the DB override takes+ precedence over it).+- [`src/shared/constants/featureFlagDefinitions.ts`](../../src/shared/constants/featureFlagDefinitions.ts)+ — source of truth for every flag.+- [`src/shared/utils/featureFlags.ts`](../../src/shared/utils/featureFlags.ts)+ — resolution logic (`resolveFeatureFlag`, `isFeatureFlagEnabled`,+ `resolveAllFeatureFlags`).+- [`src/lib/db/featureFlags.ts`](../../src/lib/db/featureFlags.ts) — DB override+ persistence in the `feature_flags` namespace of the `key_value` table.diff --git a/docs/reference/PROVIDER_REFERENCE.md b/docs/reference/PROVIDER_REFERENCE.mdindex 7170e7c15f..0929accccf 100644--- a/docs/reference/PROVIDER_REFERENCE.md+++ b/docs/reference/PROVIDER_REFERENCE.md@@ -1,18 +1,16 @@---title: "Provider Reference"-version: 3.8.12-lastUpdated: 2026-06-06+version: 3.8.25+lastUpdated: 2026-06-15---# Provider Reference-> **For Users**: Looking for a simple guide? See the [Providers Guide](../getting-started/PROVIDERS-GUIDE.md) for step-by-step instructions.-> **Auto-generated** from `src/shared/constants/providers.ts` — do not edit by hand.> Regenerate with: `npm run gen:provider-reference`-> **Last generated:** 2026-06-06+> **Last generated:** 2026-06-15-Total providers: **223**. See category breakdown below.+Total providers: **226**. See category breakdown below.## Categories@@ -35,273 +33,276 @@ Use the dashboard at `/dashboard/providers` to enable, configure, and test each## OAuth Providers (19)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `agy` | `agy` | Antigravity CLI | OAuth | [link](https://antigravity.google) | Import your Antigravity CLI (`agy`) login (paste/upload its token file), auto-detect a local CLI login, or sign in with Google. Shares the Antigravity backend (incl. Claude models). |-| `amazon-q` | `aq` | Amazon Q | OAuth | [link](https://aws.amazon.com/q/developer/) | Uses the same AWS Builder ID or imported refresh-token flow as Kiro, but keeps Amazon Q connections separate. |-| `antigravity` | — | Antigravity | OAuth | — | — |-| `claude` | `cc` | Claude Code | OAuth | — | — |-| `cline` | `cl` | Cline | OAuth | — | — |-| `codex` | `cx` | OpenAI Codex | OAuth | — | — |-| `cursor` | `cu` | Cursor IDE | OAuth | — | — |-| `devin-cli` | `dv` | Devin CLI (Official) | OAuth | [link](https://cli.devin.ai) | Requires the Devin CLI binary. Run `devin auth login` to authenticate, or provide your WINDSURF_API_KEY. Install: https://cli.devin.ai |-| `gemini-cli` | `gemini-cli` | Gemini CLI | OAuth | — | Uses Gemini CLI OAuth / Cloud Code credentials. Pro models require an eligible Google account or paid plan. |-| `github` | `gh` | GitHub Copilot | OAuth | — | — |-| `gitlab-duo` | `gitlab-duo` | GitLab Duo | OAuth | [link](https://docs.gitlab.com/user/duo_agent_platform/code_suggestions/) | OAuth application with ai_features + read_user scopes. Configure GITLAB_DUO_OAUTH_CLIENT_ID and optionally GITLAB_DUO_OAUTH_CLIENT_SECRET on this OmniRoute instance. |-| `kilocode` | `kc` | Kilo Code | OAuth | — | — |-| `kimi-coding` | `kmc` | Kimi Coding | OAuth | — | — |-| `kiro` | `kr` | Kiro AI | OAuth | — | Free tier: 50 credits/month (~25K–100K tokens). ⚠️ Kiro ToS prohibits third-party proxy/harness use. |-| `qoder` | `if` | Qoder AI | OAuth | — | — |-| `qwen` | `qw` | Qwen Code | OAuth | — | ⚠️ **DEPRECATED.** Qwen OAuth free tier was discontinued on 2026-04-15. Use 'bailian-coding-plan', 'alibaba', 'alibaba-cn', or 'openrouter' provider with API key instead. |-| `trae` | `tr` | Trae | OAuth | [link](https://trae.ai) | Trae is an AI-native IDE by ByteDance (SOLO remote agent). Authorize via trae.ai in the popup, or sign in at solo.trae.ai and paste the Cloud-IDE-JWT (sent as 'Authorization: Cloud-IDE-JWT <token>', ~14-day lifetime) as the access token; web_id/biz_user_id/user_unique_id/scope/tenant/region propagate via providerSpecificData. No headless refresh for pasted tokens — re-paste on expiry. |-| `windsurf` | `ws` | Windsurf (Devin CLI) | OAuth | [link](https://windsurf.com) | Sign in at windsurf.com to get your token. Visit windsurf.com/show-auth-token after logging in and paste it here, or use the device-code login flow. |-| `zed` | `zd` | Zed IDE | OAuth | [link](https://zed.dev) | Zed stores LLM provider credentials (OpenAI, Anthropic, Google, Mistral, xAI) in the OS keychain. Use the Import button below to discover and import them automatically. |+| ID | Alias | Name | Tags | Website | Notes |+| ------------- | ------------ | -------------------- | ----- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `agy` | `agy` | Antigravity CLI | OAuth | [link](https://antigravity.google) | Import your Antigravity CLI (`agy`) login (paste/upload its token file), auto-detect a local CLI login, or sign in with Google. Shares the Antigravity backend (incl. Claude models). |+| `amazon-q` | `aq` | Amazon Q | OAuth | [link](https://aws.amazon.com/q/developer/) | Uses the same AWS Builder ID or imported refresh-token flow as Kiro, but keeps Amazon Q connections separate. |+| `antigravity` | — | Antigravity | OAuth | — | — |+| `claude` | `cc` | Claude Code | OAuth | — | — |+| `cline` | `cl` | Cline | OAuth | — | — |+| `codex` | `cx` | OpenAI Codex | OAuth | — | — |+| `cursor` | `cu` | Cursor IDE | OAuth | — | — |+| `devin-cli` | `dv` | Devin CLI (Official) | OAuth | [link](https://cli.devin.ai) | Requires the Devin CLI binary. Run `devin auth login` to authenticate, or provide your WINDSURF_API_KEY. Install: https://cli.devin.ai |+| `gemini-cli` | `gemini-cli` | Gemini CLI | OAuth | — | Uses Gemini CLI OAuth / Cloud Code credentials. Pro models require an eligible Google account or paid plan. |+| `github` | `gh` | GitHub Copilot | OAuth | — | — |+| `gitlab-duo` | `gitlab-duo` | GitLab Duo | OAuth | [link](https://docs.gitlab.com/user/duo_agent_platform/code_suggestions/) | OAuth application with ai_features + read_user scopes. Configure GITLAB_DUO_OAUTH_CLIENT_ID and optionally GITLAB_DUO_OAUTH_CLIENT_SECRET on this OmniRoute instance. |+| `kilocode` | `kc` | Kilo Code | OAuth | — | — |+| `kimi-coding` | `kmc` | Kimi Coding | OAuth | — | — |+| `kiro` | `kr` | Kiro AI | OAuth | — | Free tier: 50 credits/month (~25K–100K tokens). ⚠️ Kiro ToS prohibits third-party proxy/harness use. |+| `qoder` | `if` | Qoder AI | OAuth | — | — |+| `qwen` | `qw` | Qwen Code | OAuth | — | ⚠️ **DEPRECATED.** Qwen OAuth free tier was discontinued on 2026-04-15. Use 'bailian-coding-plan', 'alibaba', 'alibaba-cn', or 'openrouter' provider with API key instead. |+| `trae` | `tr` | Trae | OAuth | [link](https://trae.ai) | Trae is an AI-native IDE by ByteDance (SOLO remote agent). Authorize via trae.ai in the popup, or sign in at solo.trae.ai and paste the Cloud-IDE-JWT (sent as 'Authorization: Cloud-IDE-JWT <token>', ~14-day lifetime) as the access token; web_id/biz_user_id/user_unique_id/scope/tenant/region propagate via providerSpecificData. No headless refresh for pasted tokens — re-paste on expiry. |+| `windsurf` | `ws` | Windsurf (Devin CLI) | OAuth | [link](https://windsurf.com) | In the Windsurf / VS Code IDE, open the command palette and run `Windsurf: Provide Auth Token` (or click the Jupyter "Get Windsurf Authentication Token" button), then copy the shown token and paste it here. Note: opening windsurf.com/show-auth-token directly only renders a "Redirecting" page — the IDE must initiate the flow (it adds a `?state=...` param) for the token to appear. |+| `zed` | `zd` | Zed IDE | OAuth | [link](https://zed.dev) | Zed stores LLM provider credentials (OpenAI, Anthropic, Google, Mistral, xAI) in the OS keychain. Use the Import button below to discover and import them automatically. |-## Web Cookie Providers (20)+## Web Cookie Providers (22)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `adapta-web` | `adp-web` | Adapta.org (Adapta One Web) | Web cookie | [link](https://agent.adapta.one) | Paste your __client cookie value from .clerk.agent.adapta.one (DevTools → Application → Cookies) |-| `blackbox-web` | `bb-web` | Blackbox Web (Subscription) | Web cookie | [link](https://app.blackbox.ai) | Paste your __Secure-authjs.session-token value or full cookie header from app.blackbox.ai |-| `chatgpt-web` | `cgpt-web` | ChatGPT Web (Plus/Pro) | Web cookie | [link](https://chatgpt.com) | Paste your __Secure-next-auth.session-token cookie value from chatgpt.com |-| `claude-web` | `cw` | Claude Web | Web cookie | [link](https://claude.ai) | Paste your session cookie from claude.ai |-| `copilot-web` | `copilot` | Microsoft Copilot Web | Web cookie | [link](https://copilot.microsoft.com) | Paste your access_token from copilot.microsoft.com (or export a .har file from DevTools while logged in) |-| `deepseek-web` | `ds-web` | DeepSeek Web | Web cookie | [link](https://chat.deepseek.com) | Paste your userToken from chat.deepseek.com — DevTools → Application → Local Storage → userToken |-| `doubao-web` | `db` | Doubao Web (ByteDance) | Web cookie | [link](https://www.doubao.com) | Paste your session cookie from doubao.com (DevTools → Application → Cookies) |-| `gemini-web` | `gweb` | Gemini Web (Free) | Web cookie | [link](https://gemini.google.com) | Paste your __Secure-1PSID cookie value from gemini.google.com. Optionally add __Secure-1PSIDTS separated by semicolon. |-| `grok-web` | `gw` | Grok Web (Subscription) | Web cookie | [link](https://grok.com) | Paste the full grok.com cookie line from DevTools → Application → Cookies. Include both `sso` and `sso-rw` (e.g. `sso=...; sso-rw=...`) — Grok's anti-bot rejects `sso` on its own. |-| `huggingchat` | `huggingchat` | HuggingChat (Free) | Web cookie | [link](https://huggingface.co/chat) | Paste your hf-chat cookie value from huggingface.co/chat (DevTools → Application → Cookies → hf-chat). Optional — works without auth for basic use. |-| `inner-ai` | `in-ai` | Inner.ai (Subscription) | Web cookie | [link](https://app.innerai.com) | Paste your token cookie and email separated by a space: open DevTools → Application → Cookies → .innerai.com, copy the token value, then append a space and your Inner.ai login email. Example: eyJhbG... [email protected] |-| `kimi-web` | `kimi-web` | Kimi Web (Moonshot AI) | Web cookie | [link](https://kimi.moonshot.cn) | Paste your session cookie from kimi.moonshot.cn (DevTools → Application → Cookies) |-| `muse-spark-web` | `ms-web` | Muse Spark Web (Meta AI) | Web cookie | [link](https://www.meta.ai) | Paste your abra_sess value or full cookie header from meta.ai |-| `perplexity-web` | `pplx-web` | Perplexity Web (Pro/Max) | Web cookie | [link](https://www.perplexity.ai) | Paste your __Secure-next-auth.session-token cookie value from perplexity.ai |-| `phind` | `ph` | Phind (Free) | Web cookie | [link](https://www.phind.com) | Paste your session cookie from phind.com (DevTools → Application → Cookies). Optional — works with free tier. |-| `poe-web` | `poe` | Poe Web (Subscription) | Web cookie | [link](https://poe.com) | Paste your p-b cookie value from poe.com (DevTools → Application → Cookies → p-b) |-| `qwen-web` | `qwen-web` | Qwen Web (Free) | Web cookie | [link](https://chat.qwen.ai) | Open chat.qwen.ai, log in, then open DevTools → Application → Local Storage → copy the "token" value (or use tongyi_sso_ticket cookie as Bearer token). |-| `t3-web` | `t3chat` | t3.chat (Pro/Free) | Web cookie | [link](https://t3.chat) | Open t3.chat in your browser, log in, then open DevTools → Application → Local Storage → https://t3.chat. Copy the value of 'convex-session-id'. Also open DevTools → Network, copy the Cookie header from any request. Paste both values here. See provider setup docs for a step-by-step guide. |-| `v0-vercel-web` | `v0` | v0 Vercel Web (Code Gen) | Web cookie | [link](https://v0.dev) | Paste your session cookie from v0.dev (DevTools → Application → Cookies) |-| `venice-web` | `ven` | Venice Web (Privacy) | Web cookie | [link](https://venice.ai) | Paste your session cookie from venice.ai (DevTools → Application → Cookies) |+| ID | Alias | Name | Tags | Website | Notes |+| ----------------- | ------------- | ---------------------------- | ---------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `adapta-web` | `adp-web` | Adapta.org (Adapta One Web) | Web cookie | [link](https://agent.adapta.one) | Paste your \_\_client cookie value from .clerk.agent.adapta.one (DevTools → Application → Cookies) |+| `blackbox-web` | `bb-web` | Blackbox Web (Subscription) | Web cookie | [link](https://app.blackbox.ai) | Paste your \_\_Secure-authjs.session-token value or full cookie header from app.blackbox.ai |+| `chatgpt-web` | `cgpt-web` | ChatGPT Web (Plus/Pro) | Web cookie | [link](https://chatgpt.com) | Paste your \_\_Secure-next-auth.session-token cookie value from chatgpt.com |+| `claude-web` | `cw` | Claude Web | Web cookie | [link](https://claude.ai) | Paste your session cookie from claude.ai |+| `copilot-web` | `copilot` | Microsoft Copilot Web | Web cookie | [link](https://copilot.microsoft.com) | Paste your access_token from copilot.microsoft.com (or export a .har file from DevTools while logged in) |+| `deepseek-web` | `ds-web` | DeepSeek Web | Web cookie | [link](https://chat.deepseek.com) | Paste your userToken from chat.deepseek.com — DevTools → Application → Local Storage → userToken |+| `doubao-web` | `db` | Doubao Web (ByteDance) | Web cookie | [link](https://www.doubao.com) | Paste your session cookie from doubao.com (DevTools → Application → Cookies) |+| `gemini-business` | `gembiz` | Gemini Business (Enterprise) | Web cookie | [link](https://business.gemini.google) | From your enterprise account: open business.gemini.google/home/cid/{your-cid}, then copy **Secure-1PSID and **Secure-1PSIDTS cookies from DevTools → Application → Cookies. Paste as a cookie header below. |+| `gemini-web` | `gweb` | Gemini Web (Free) | Web cookie | [link](https://gemini.google.com) | Paste your **Secure-1PSID cookie value from gemini.google.com. Optionally add **Secure-1PSIDTS separated by semicolon. |+| `grok-web` | `gw` | Grok Web (Subscription) | Web cookie | [link](https://grok.com) | Paste the full grok.com cookie line from DevTools → Application → Cookies. Include both `sso` and `sso-rw` (e.g. `sso=...; sso-rw=...`) — Grok's anti-bot rejects `sso` on its own. |+| `huggingchat` | `huggingchat` | HuggingChat (Free) | Web cookie | [link](https://huggingface.co/chat) | Paste your hf-chat cookie value from huggingface.co/chat (DevTools → Application → Cookies → hf-chat). Optional — works without auth for basic use. |+| `inner-ai` | `in-ai` | Inner.ai (Subscription) | Web cookie | [link](https://app.innerai.com) | Paste your token cookie and email separated by a space: open DevTools → Application → Cookies → .innerai.com, copy the token value, then append a space and your Inner.ai login email. Example: eyJhbG... [email protected] |+| `kimi-web` | `kimi-web` | Kimi Web (Moonshot AI) | Web cookie | [link](https://kimi.moonshot.cn) | Paste your session cookie from kimi.moonshot.cn (DevTools → Application → Cookies) |+| `lmarena` | `lma` | LMArena (Free) | Web cookie | [link](https://lmarena.ai) | Paste your session cookie from lmarena.ai (DevTools → Application → Cookies). Optional — works with free tier for basic comparisons. |+| `muse-spark-web` | `ms-web` | Muse Spark Web (Meta AI) | Web cookie | [link](https://www.meta.ai) | Paste your abra_sess value or full cookie header from meta.ai |+| `perplexity-web` | `pplx-web` | Perplexity Web (Pro/Max) | Web cookie | [link](https://www.perplexity.ai) | Paste your \_\_Secure-next-auth.session-token cookie value from perplexity.ai |+| `phind` | `ph` | Phind (Free) | Web cookie | [link](https://www.phind.com) | Paste your session cookie from phind.com (DevTools → Application → Cookies). Optional — works with free tier. |+| `poe-web` | `poe` | Poe Web (Subscription) | Web cookie | [link](https://poe.com) | Paste your p-b cookie value from poe.com (DevTools → Application → Cookies → p-b) |+| `qwen-web` | `qwen-web` | Qwen Web (Free) | Web cookie | [link](https://chat.qwen.ai) | Open chat.qwen.ai, log in, then open DevTools → Application → Local Storage → copy the "token" value (or use tongyi_sso_ticket cookie as Bearer token). |+| `t3-web` | `t3chat` | t3.chat (Pro/Free) | Web cookie | [link](https://t3.chat) | Open t3.chat in your browser, log in, then open DevTools → Application → Local Storage → https://t3.chat. Copy the value of 'convex-session-id'. Also open DevTools → Network, copy the Cookie header from any request. Paste both values here. See provider setup docs for a step-by-step guide. |+| `v0-vercel-web` | `v0` | v0 Vercel Web (Code Gen) | Web cookie | [link](https://v0.dev) | Paste your session cookie from v0.dev (DevTools → Application → Cookies) |+| `venice-web` | `ven` | Venice Web (Privacy) | Web cookie | [link](https://venice.ai) | Paste your session cookie from venice.ai (DevTools → Application → Cookies) |-## API Key Providers (paid / paid-with-free-credits) (151)+## API Key Providers (paid / paid-with-free-credits) (152)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `360ai` | `360ai` | 360 AI | API key | [link](https://ai.360.cn) | Get API key at ai.360.cn |-| `agentrouter` | `agentrouter` | AgentRouter | API key, aggregator | [link](https://agentrouter.org) | $200 free credits on signup - multi-model routing gateway |-| `ai21` | `ai21` | AI21 Labs | API key | [link](https://www.ai21.com) | $10 trial credits on signup (valid 3 months), no credit card required |-| `aimlapi` | `aiml` | AI/ML API | API key, aggregator | [link](https://aimlapi.com) | $0.025/day free credits — 200+ models (GPT-4o, Claude, Gemini, Llama) via single endpoint |-| `alibaba` | `ali` | Alibaba | API key | [link](https://dashscope-intl.aliyuncs.com) | — |-| `alibaba-cn` | `ali-cn` | Alibaba (China) | API key | [link](https://dashscope.aliyuncs.com) | — |-| `anthropic` | `anthropic` | Anthropic | API key | [link](https://platform.claude.com) | — |-| `api-airforce` | `af` | Api.airforce | API key | [link](https://api.airforce) | 55 free tier models including Grok-3, Claude 3.7, Qwen3, Kimi-K2, Gemini 2.5 Flash, DeepSeek-V3 |-| `arcee-ai` | `arcee` | Arcee AI | API key | [link](https://arcee.ai) | Get API key at arcee.ai |-| `azure-ai` | `azure-ai` | Azure AI Foundry | API key, enterprise | [link](https://learn.microsoft.com/azure/ai-foundry) | Use your Azure AI Foundry key. Base URL can be https://<resource>.services.ai.azure.com/openai/v1/ or https://<resource>.openai.azure.com/openai/v1/. |-| `azure-openai` | `azure` | Azure OpenAI | API key, enterprise | [link](https://azure.microsoft.com/products/ai-services/openai-service) | Use your Azure OpenAI API key. Base URL should be your resource endpoint, for example https://my-resource.openai.azure.com. |-| `baichuan` | `baichuan` | Baichuan | API key | [link](https://baichuan.com) | Get API key at platform.baichuan-ai.com |-| `baidu` | `baidu` | Baidu (ERNIE) | API key | [link](https://yiyan.baidu.com) | Get API key at console.bce.baidu.com |-| `bailian-coding-plan` | `bcp` | Alibaba Coding Plan | API key | [link](https://www.alibabacloud.com/help/en/model-studio/coding-plan) | — |-| `baseten` | `baseten` | Baseten | API key | [link](https://baseten.co) | $30 free trial credits for GPU inference |-| `bazaarlink` | `bzl` | BazaarLink | API key | [link](https://bazaarlink.ai) | Free tier with auto:free routing — zero-cost inference, no credit card required |-| `bedrock` | `bedrock` | Amazon Bedrock | API key, enterprise | [link](https://aws.amazon.com/bedrock) | Use your Amazon Bedrock API key and configure the AWS region where your models are enabled (for example eu-west-2). OmniRoute calls Bedrock's native Converse API directly. |-| `black-forest-labs` | `bfl` | Black Forest Labs | API key, image | [link](https://blackforestlabs.ai) | — |-| `blackbox` | `bb` | Blackbox AI | API key | [link](https://blackbox.ai) | Free tier: unlimited basic chat plus Minimax-M2.5, no credit card required |-| `bluesminds` | `bm` | BluesMinds | API key | [link](https://www.bluesminds.com) | Free daily pi credits — supports 200+ models including GPT-4o, GPT-4.1, Claude Sonnet 4.5, Gemini 2.0 Flash, DeepSeek V4, Qwen, Kimi K2 |-| `byteplus` | `bpm` | BytePlus ModelArk | API key | [link](https://console.byteplus.com/ark) | — |-| `bytez` | `bytez` | Bytez | API key | [link](https://bytez.com) | $1 free credits, refreshes every 4 weeks |-| `cablyai` | `cablyai` | CablyAI | API key, aggregator | [link](https://cablyai.com) | Bearer API key for the CablyAI OpenAI-compatible gateway. |-| `cerebras` | `cerebras` | Cerebras | API key | [link](https://inference.cerebras.ai) | Free Trial: 1M tokens/day, 30K TPM, 5 RPM — no credit card. |-| `chutes` | `chutes` | Chutes.ai | API key, aggregator | [link](https://chutes.ai) | Bearer API key for the Chutes OpenAI-compatible gateway. |-| `clarifai` | `clarifai` | Clarifai | API key, enterprise | [link](https://docs.clarifai.com) | Use your Clarifai PAT or app-specific API key. OmniRoute targets the OpenAI-compatible endpoint at https://api.clarifai.com/v2/ext/openai/v1 and authenticates with Authorization: Key <token>. |-| `cloudflare-ai` | `cf` | Cloudflare Workers AI | API key | [link](https://developers.cloudflare.com/workers-ai) | Requires API Token AND Account ID (found at dash.cloudflare.com) |-| `codestral` | `codestral` | Codestral | API key | [link](https://mistral.ai) | — |-| `cohere` | `cohere` | Cohere | API key | [link](https://cohere.com) | Free Trial: 1,000 API calls/month for testing, no credit card required |-| `command-code` | `cmd` | Command Code | API key | [link](https://commandcode.ai/) | Use a Command Code API key. Requests are sent to Command Code's /alpha/generate endpoint. |-| `coze` | `coze` | Coze | API key | [link](https://coze.com) | Get API key at coze.com/open/api |-| `crof` | `crof` | CrofAI | API key | [link](https://crof.ai) | — |-| `databricks` | `databricks` | Databricks | API key, enterprise | [link](https://www.databricks.com) | — |-| `datarobot` | `datarobot` | DataRobot | API key, enterprise | [link](https://docs.datarobot.com) | Use your DataRobot API token. Optional Base URL can be the account root (for LLM Gateway) or a deployment URL under /api/v2/deployments/<id>. |-| `deepinfra` | `deepinfra` | DeepInfra | API key | [link](https://deepinfra.com) | Free signup credits for API testing and model exploration |-| `deepseek` | `ds` | DeepSeek | API key | [link](https://platform.deepseek.com) | 5M free tokens on signup - no credit card required |-| `dify` | `dify` | Dify | API key | [link](https://dify.ai) | Get API key from your Dify instance. |-| `doubao` | `doubao` | Doubao | API key | [link](https://doubao.com) | Get API key at console.volcengine.com |-| `empower` | `empower` | Empower | API key, aggregator | [link](https://docs.empower.dev) | Bearer API key for the Empower OpenAI-compatible endpoint. |-| `fal-ai` | `fal` | Fal.ai | API key, image | [link](https://fal.ai) | — |-| `featherless-ai` | `featherless` | Featherless AI | API key | [link](https://featherless.ai) | Free tier available — no credit card required |-| `fenayai` | `fenayai` | FenayAI | API key, aggregator | [link](https://fenayai.com) | Bearer API key for the FenayAI OpenAI-compatible gateway. |-| `firecrawl` | `fc` | Firecrawl | API key | [link](https://firecrawl.dev) | — |-| `fireworks` | `fireworks` | Fireworks AI | API key | [link](https://fireworks.ai) | $1 free starter credits on signup for API testing |-| `freeaiapikey` | `faik` | FreeAIAPIKey | API key | [link](https://freeaiapikey.com) | — |-| `freemodel-dev` | `fmd` | FreeModel.dev | API key | [link](https://freemodel.dev) | $300 free credits on signup — no credit card required. Access GPT-5.4 and GPT-5.5 (OpenAI's latest flagship models) through an OpenAI-compatible API. |-| `friendliai` | `friendli` | FriendliAI | API key | [link](https://friendli.ai) | Free tier for serverless inference — no credit card required |-| `galadriel` | `galadriel` | Galadriel | API key | [link](https://galadriel.com) | — |-| `gemini` | `gemini` | Gemini (Google AI Studio) | API key | [link](https://aistudio.google.com) | Free forever: 1,500 req/day for Gemini 2.5 Flash — no credit card, get key at aistudio.google.com |-| `getgoapi` | `ggo` | GoAPI | API key, aggregator | [link](https://api.getgoapi.com) | — |-| `gigachat` | `gigachat` | GigaChat (Sber) | API key | [link](https://developers.sber.ru) | — |-| `github-models` | `ghm` | GitHub Models | API key | [link](https://github.com/marketplace/models) | Create a GitHub PAT with 'models: read' scope at github.com/settings/tokens |-| `gitlab` | `gitlab` | GitLab Duo PAT | API key | [link](https://docs.gitlab.com/user/duo_agent_platform/code_suggestions/) | GitLab personal access token for the public Code Suggestions API. Configure a self-hosted base URL when not using gitlab.com. |-| `gitlawb` | `glb` | Gitlawb Opengateway (MiMo) | API key | [link](https://opengateway.gitlawb.com) | Free tier available — no credit card required |-| `gitlawb-gmi` | `glb-gmi` | Gitlawb Opengateway (GMI Cloud) | API key | [link](https://opengateway.gitlawb.com) | Free tier available — no credit card required |-| `glhf` | `glhf` | GLHF Chat | API key, aggregator | [link](https://glhf.chat) | Bearer API key for the GLHF OpenAI-compatible gateway. |-| `glm` | `glm` | GLM Coding | API key | [link](https://z.ai/subscribe) | — |-| `glm-cn` | `glmcn` | GLM Coding (China) | API key | [link](https://open.bigmodel.cn) | — |-| `glmt` | `glmt` | GLM Thinking | API key | [link](https://open.bigmodel.cn) | — |-| `groq` | `groq` | Groq | API key | [link](https://groq.com) | Free tier: 30 RPM / 14.4K RPD — no credit card |-| `hackclub` | `hc` | Hackclub AI | API key, aggregator | [link](https://ai.hackclub.com) | Sign in with your Hack Club account at ai.hackclub.com. |-| `haiper` | `hp` | Haiper | API key, video | [link](https://haiper.ai) | Get API key at haiper.ai/haiper-api |-| `heroku` | `heroku` | Heroku AI | API key, enterprise | [link](https://www.heroku.com) | — |-| `huggingchat` | `huggingchat` | HuggingChat | API key | [link](https://huggingface.co/chat) | No API key required for basic access. |-| `huggingface` | `hf` | HuggingFace | API key | [link](https://huggingface.co) | Free Inference API for thousands of models (Whisper, VITS, SDXL…) |-| `hyperbolic` | `hyp` | Hyperbolic | API key | [link](https://hyperbolic.xyz) | $1-5 trial credits on signup for serverless inference |-| `ideogram` | `ideo` | Ideogram | API key | [link](https://ideogram.ai) | Get API key at ideogram.ai/docs/api |-| `iflytek` | `iflytek` | iFlytek Spark | API key | [link](https://xinghuo.xfyun.cn) | Get API key at console.xfyun.cn |-| `inclusionai` | `inclusion` | InclusionAI | API key | [link](https://inclusionai.com) | Get API key at inclusionai.com |-| `inference-net` | `inet` | Inference.net | API key | [link](https://inference.net) | $25 free credits on signup plus research grants available |-| `jina-ai` | `jina` | Jina AI | API key, embed/rerank | [link](https://jina.ai) | Bearer API key for the Jina AI rerank API. |-| `jina-reader` | `jr` | Jina Reader | API key | [link](https://jina.ai/reader) | — |-| `kie` | `kie` | KIE.AI | API key | [link](https://kie.ai) | — |-| `kilo-gateway` | `kg` | Kilo Gateway | API key, aggregator | [link](https://kilo.ai) | — |-| `kimi` | `kimi` | Kimi | API key | [link](https://platform.moonshot.ai) | — |-| `kimi-coding-apikey` | `kmca` | Kimi Coding (API Key) | API key | [link](https://www.kimi.com/code) | — |-| `kluster` | `kluster` | Kluster AI | API key | [link](https://kluster.ai) | $5 free credits on signup - DeepSeek R1, Llama 4 Maverick/Scout, Qwen3 235B |-| `lambda-ai` | `lambda` | Lambda AI | API key | [link](https://lambda.ai) | — |-| `laozhang` | `lz` | LaoZhang AI | API key, aggregator | [link](https://api.laozhang.ai) | — |-| `leonardo` | `leo` | Leonardo AI | API key, video | [link](https://leonardo.ai) | Get API key at leonardo.ai/developer |-| `liquid` | `liquid` | Liquid AI | API key | [link](https://liquid.ai) | Get API key at liquid.ai |-| `llamagate` | `llamagate` | LlamaGate | API key | [link](https://llamagate.ai) | — |-| `llm7` | `llm7` | LLM7.io | API key | [link](https://llm7.io) | No signup required - 2 req/s, 20 RPM, 100 req/hr free tier |-| `longcat` | `lc` | LongCat AI | API key | [link](https://longcat.chat/platform/docs) | Free: 5M tokens/day on LongCat-2.0-Preview (Flash models retired 2026-05-29); up to 120M/day via feedback. |-| `maritalk` | `maritalk` | Maritalk | API key | [link](https://www.maritaca.ai) | — |-| `meta-llama` | `meta` | Meta Llama API | API key | [link](https://llama.developer.meta.com) | — |-| `minimax` | `minimax` | Minimax Coding | API key, video | [link](https://www.minimax.io) | — |-| `minimax-cn` | `minimax-cn` | Minimax (China) | API key | [link](https://www.minimaxi.com) | — |-| `mistral` | `mistral` | Mistral | API key | [link](https://mistral.ai) | Free Experiment tier: rate-limited access to all models, no credit card required |-| `modal` | `mdl` | Modal | API key, enterprise | [link](https://modal.com/docs) | Use the bearer token that protects your Modal deployment, if enabled. Base URL should point to your OpenAI-compatible Modal app, for example https://<workspace>--<app>.modal.run/v1. |-| `monsterapi` | `monster` | MonsterAPI | API key | [link](https://monsterapi.ai) | Get API key at monsterapi.ai |-| `moonshot` | `moonshot` | Moonshot AI | API key | [link](https://platform.moonshot.ai) | — |-| `morph` | `morph` | Morph | API key | [link](https://morphllm.com) | Free tier: 250K credits/month, $0 |-| `nanogpt` | `nanogpt` | NanoGPT | API key | [link](https://nano-gpt.com) | — |-| `nebius` | `nebius` | Nebius AI | API key | [link](https://nebius.com) | ~$1 trial credits on signup for API testing |-| `nlpcloud` | `nlpc` | NLP Cloud | API key | [link](https://docs.nlpcloud.com) | Use your NLP Cloud API key in Authorization: Token <key>. OmniRoute targets the chatbot endpoint on https://api.nlpcloud.io/v1/gpu/<model>/chatbot by default. |-| `nomic` | `nomic` | Nomic | API key | [link](https://nomic.ai) | Get API key at atlas.nomic.ai |-| `nous-research` | `nous` | Nous Research | API key | [link](https://portal.nousresearch.com/help) | Use your Nous Portal API key. OmniRoute targets the official OpenAI-compatible inference endpoint at https://inference-api.nousresearch.com/v1. |-| `novita` | `novita` | Novita AI | API key, aggregator | [link](https://novita.ai) | $0.50 trial credits on signup (valid about 1 year) |-| `nscale` | `nscale` | nScale | API key | [link](https://nscale.com) | $5 free credits on signup for inference testing |-| `nvidia` | `nvidia` | NVIDIA NIM | API key | [link](https://build.nvidia.com) | Free dev access: ~40 RPM, 70+ models (Kimi K2.5, GLM 4.7, DeepSeek V3.2...) |-| `oci` | `oci` | OCI Generative AI | API key, enterprise | [link](https://www.oracle.com/artificial-intelligence/generative-ai) | Use your OCI Generative AI API key or IAM bearer token. Base URL can be https://inference.generativeai.<region>.oci.oraclecloud.com/openai/v1/. |-| `ollama-cloud` | `ollamacloud` | Ollama Cloud | API key | [link](https://ollama.com/settings/api-keys) | — |-| `openai` | `openai` | OpenAI | API key | [link](https://platform.openai.com) | — |-| `opencode-go` | `opencode-go` | OpenCode Go | API key | [link](https://opencode.ai/go) | — |-| `opencode-zen` | `opencode-zen` | OpenCode Zen | API key | [link](https://opencode.ai/zen) | — |-| `openrouter` | `openrouter` | OpenRouter | API key, aggregator | [link](https://openrouter.ai) | Free models at $0/token with :free suffix - 20 RPM / 200 RPD |-| `ovhcloud` | `ovh` | OVHcloud AI | API key | [link](https://www.ovhcloud.com) | — |-| `perplexity` | `pplx` | Perplexity | API key | [link](https://www.perplexity.ai) | — |-| `phind` | `phind` | Phind | API key | [link](https://phind.com) | Get API key at phind.com |-| `piapi` | `pi` | PiAPI | API key, aggregator | [link](https://piapi.ai) | — |-| `poe` | `poe` | Poe | API key, aggregator | [link](https://creator.poe.com/api-reference) | Bearer API key for the Poe OpenAI-compatible API. |-| `pollinations` | `pol` | Pollinations AI | API key, video | [link](https://pollinations.ai) | No API key required for free public endpoint. Optional Spore tier: ~0.01 pollen/hour. |-| `predibase` | `predibase` | Predibase | API key | [link](https://predibase.com) | $25 free trial credits (30-day validity) |-| `publicai` | `publicai` | PublicAI | API key | [link](https://publicai.co) | Free community inference tier for testing |-| `puter` | `pu` | Puter AI | API key | [link](https://puter.com) | Get token at puter.com/dashboard → Copy Auth Token |-| `qianfan` | `qianfan` | Baidu Qianfan | API key | [link](https://cloud.baidu.com/product/wenxinworkshop) | — |-| `recraft` | `recraft` | Recraft | API key, image | [link](https://recraft.ai) | — |-| `reka` | `reka` | Reka | API key | [link](https://docs.reka.ai/chat/overview) | Use your Reka API key. OmniRoute supports the OpenAI-compatible base URL https://api.reka.ai/v1 and sends both Authorization and X-Api-Key headers for compatibility. |-| `runwayml` | `runway` | Runway | API key, video | [link](https://docs.dev.runwayml.com) | Use your Runway API key in Authorization: Bearer <key>. OmniRoute targets the current Runway API at https://api.dev.runwayml.com/v1 and sends the required X-Runway-Version header automatically. |-| `sambanova` | `samba` | SambaNova | API key | [link](https://sambanova.ai) | $5 free credits on signup (30-day validity), no credit card required |-| `sap` | `sap` | SAP Generative AI Hub | API key, enterprise | [link](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/generative-ai-hub-in-sap-ai-core) | Use your SAP AI Core bearer token. Base URL can be your AI_API_URL root or a deploymentUrl from Generative AI Hub. |-| `scaleway` | `scw` | Scaleway AI | API key | [link](https://www.scaleway.com/en/ai/generative-apis) | 1M free tokens for new accounts — EU/GDPR compliant (Paris), Qwen3 235B & Llama 70B |-| `sensenova` | `sensenova` | SenseNova | API key | [link](https://platform.sensenova.cn) | Get API key at platform.sensenova.cn |-| `siliconflow` | `siliconflow` | SiliconFlow | API key | [link](https://cloud.siliconflow.com) | $1 free credits plus permanently free models after identity verification |-| `snowflake` | `snowflake` | Snowflake Cortex | API key, enterprise | [link](https://www.snowflake.com) | — |-| `sparkdesk` | `sparkdesk` | SparkDesk | API key | [link](https://xinghuo.xfyun.cn) | Get API key at console.xfyun.cn |-| `stability-ai` | `stability` | Stability AI | API key, image | [link](https://stability.ai) | — |-| `stepfun` | `stepfun` | StepFun | API key | [link](https://stepfun.com) | Get API key at platform.stepfun.com |-| `suno` | `suno` | Suno | API key | [link](https://suno.ai) | Paste session cookie from suno.ai (Clerk auth) |-| `synthetic` | `synthetic` | Synthetic | API key, aggregator | [link](https://synthetic.new) | — |-| `tencent` | `tencent` | Tencent Hunyuan | API key | [link](https://hunyuan.tencent.com) | Get API key at console.cloud.tencent.com |-| `thebai` | `thebai` | TheB.AI | API key, aggregator | [link](https://theb.ai) | Bearer API key for the TheB.AI OpenAI-compatible gateway. |-| `together` | `together` | Together AI | API key, video | [link](https://www.together.ai) | $25 signup credits + 3 permanently free models: Llama 3.3 70B, Vision, DeepSeek-R1 distill |-| `topaz` | `topaz` | Topaz | API key, image | [link](https://topazlabs.com) | — |-| `udio` | `udio` | Udio | API key | [link](https://udio.com) | Paste session cookie from udio.com (Supabase auth) |-| `uncloseai` | `unc` | UncloseAI | API key | [link](https://uncloseai.com) | No auth required. API accepts any non-empty string as key for identification. |-| `upstage` | `upstage` | Upstage | API key | [link](https://www.upstage.ai) | — |-| `v0-vercel` | `v0` | v0 (Vercel) | API key | [link](https://v0.dev) | — |-| `venice` | `venice` | Venice.ai | API key | [link](https://venice.ai) | — |-| `vercel-ai-gateway` | `vag` | Vercel AI Gateway | API key, aggregator | [link](https://vercel.com/docs/ai-gateway) | — |-| `vertex` | `vertex` | Vertex AI | API key, enterprise | [link](https://cloud.google.com/vertex-ai) | Provide Service Account JSON or OAuth access_token |-| `vertex-partner` | `vp` | Vertex AI Partners | API key, enterprise | [link](https://cloud.google.com/vertex-ai) | Provide the same Service Account JSON used for Vertex AI partner models. |-| `volcengine` | `volcengine` | Volcengine | API key | [link](https://www.volcengine.com) | — |-| `voyage-ai` | `voyage` | Voyage AI | API key, embed/rerank | [link](https://www.voyageai.com) | Bearer API key for Voyage AI embeddings and rerank APIs. |-| `wandb` | `wandb` | Weights & Biases Inference | API key | [link](https://wandb.ai) | — |-| `watsonx` | `watsonx` | IBM watsonx.ai Gateway | API key, enterprise | [link](https://www.ibm.com/products/watsonx-ai) | Use your watsonx bearer token. Base URL can be https://<region>.ml.cloud.ibm.com/ml/gateway/v1/ or a self-managed /ml/gateway/v1 endpoint. |-| `xai` | `xai` | xAI (Grok) | API key | [link](https://x.ai) | — |-| `xiaomi-mimo` | `mimo` | Xiaomi MiMo | API key | [link](https://mimo.mi.com) | — |-| `yi` | `yi` | Yi (01.AI) | API key | [link](https://01.ai) | Get API key at platform.lingyiwanwu.com |-| `zai` | `zai` | Z.AI | API key | [link](https://open.bigmodel.cn) | — |+| ID | Alias | Name | Tags | Website | Notes |+| --------------------- | -------------- | ------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `360ai` | `360ai` | 360 AI | API key | [link](https://ai.360.cn) | Get API key at ai.360.cn |+| `agentrouter` | `agentrouter` | AgentRouter | API key, aggregator | [link](https://agentrouter.org) | $200 free credits on signup - multi-model routing gateway |+| `ai21` | `ai21` | AI21 Labs | API key | [link](https://www.ai21.com) | $10 trial credits on signup (valid 3 months), no credit card required |+| `aimlapi` | `aiml` | AI/ML API | API key, aggregator | [link](https://aimlapi.com) | $0.025/day free credits — 200+ models (GPT-4o, Claude, Gemini, Llama) via single endpoint |+| `alibaba` | `ali` | Alibaba | API key | [link](https://dashscope-intl.aliyuncs.com) | — |+| `alibaba-cn` | `ali-cn` | Alibaba (China) | API key | [link](https://dashscope.aliyuncs.com) | — |+| `anthropic` | `anthropic` | Anthropic | API key | [link](https://platform.claude.com) | — |+| `api-airforce` | `af` | Api.airforce | API key | [link](https://api.airforce) | 55 free tier models including Grok-3, Claude 3.7, Qwen3, Kimi-K2, Gemini 2.5 Flash, DeepSeek-V3 |+| `arcee-ai` | `arcee` | Arcee AI | API key | [link](https://arcee.ai) | Get API key at arcee.ai |+| `azure-ai` | `azure-ai` | Azure AI Foundry | API key, enterprise | [link](https://learn.microsoft.com/azure/ai-foundry) | Use your Azure AI Foundry key. Base URL can be https://<resource>.services.ai.azure.com/openai/v1/ or https://<resource>.openai.azure.com/openai/v1/. |+| `azure-openai` | `azure` | Azure OpenAI | API key, enterprise | [link](https://azure.microsoft.com/products/ai-services/openai-service) | Use your Azure OpenAI API key. Base URL should be your resource endpoint, for example https://my-resource.openai.azure.com. |+| `baichuan` | `baichuan` | Baichuan | API key | [link](https://baichuan.com) | Get API key at platform.baichuan-ai.com |+| `baidu` | `baidu` | Baidu (ERNIE) | API key | [link](https://yiyan.baidu.com) | Get API key at console.bce.baidu.com |+| `bailian-coding-plan` | `bcp` | Alibaba Coding Plan | API key | [link](https://www.alibabacloud.com/help/en/model-studio/coding-plan) | — |+| `baseten` | `baseten` | Baseten | API key | [link](https://baseten.co) | $30 free trial credits for GPU inference |+| `bazaarlink` | `bzl` | BazaarLink | API key | [link](https://bazaarlink.ai) | Free tier with auto:free routing — zero-cost inference, no credit card required |+| `bedrock` | `bedrock` | Amazon Bedrock | API key, enterprise | [link](https://aws.amazon.com/bedrock) | Use your Amazon Bedrock API key and configure the AWS region where your models are enabled (for example eu-west-2). OmniRoute calls Bedrock's native Converse API directly. |+| `black-forest-labs` | `bfl` | Black Forest Labs | API key, image | [link](https://blackforestlabs.ai) | — |+| `blackbox` | `bb` | Blackbox AI | API key | [link](https://blackbox.ai) | Free tier: unlimited basic chat plus Minimax-M2.5, no credit card required |+| `bluesminds` | `bm` | BluesMinds | API key | [link](https://www.bluesminds.com) | Free daily pi credits — supports 200+ models including GPT-4o, GPT-4.1, Claude Sonnet 4.5, Gemini 2.0 Flash, DeepSeek V4, Qwen, Kimi K2 |+| `byteplus` | `bpm` | BytePlus ModelArk | API key | [link](https://console.byteplus.com/ark) | — |+| `bytez` | `bytez` | Bytez | API key | [link](https://bytez.com) | $1 free credits, refreshes every 4 weeks |+| `cablyai` | `cablyai` | CablyAI | API key, aggregator | [link](https://cablyai.com) | Bearer API key for the CablyAI OpenAI-compatible gateway. |+| `cerebras` | `cerebras` | Cerebras | API key | [link](https://inference.cerebras.ai) | Free Trial: 1M tokens/day, 30K TPM, 5 RPM — no credit card. |+| `chutes` | `chutes` | Chutes.ai | API key, aggregator | [link](https://chutes.ai) | Bearer API key for the Chutes OpenAI-compatible gateway. |+| `clarifai` | `clarifai` | Clarifai | API key, enterprise | [link](https://docs.clarifai.com) | Use your Clarifai PAT or app-specific API key. OmniRoute targets the OpenAI-compatible endpoint at https://api.clarifai.com/v2/ext/openai/v1 and authenticates with Authorization: Key <token>. |+| `cloudflare-ai` | `cf` | Cloudflare Workers AI | API key | [link](https://developers.cloudflare.com/workers-ai) | Requires API Token AND Account ID (found at dash.cloudflare.com) |+| `codestral` | `codestral` | Codestral | API key | [link](https://mistral.ai) | — |+| `cohere` | `cohere` | Cohere | API key | [link](https://cohere.com) | Free Trial: 1,000 API calls/month for testing, no credit card required |+| `command-code` | `cmd` | Command Code | API key | [link](https://commandcode.ai/) | Use a Command Code API key. Requests are sent to Command Code's /alpha/generate endpoint. |+| `coze` | `coze` | Coze | API key | [link](https://coze.com) | Get API key at coze.com/open/api |+| `crof` | `crof` | CrofAI | API key | [link](https://crof.ai) | — |+| `databricks` | `databricks` | Databricks | API key, enterprise | [link](https://www.databricks.com) | — |+| `datarobot` | `datarobot` | DataRobot | API key, enterprise | [link](https://docs.datarobot.com) | Use your DataRobot API token. Optional Base URL can be the account root (for LLM Gateway) or a deployment URL under /api/v2/deployments/<id>. |+| `deepinfra` | `deepinfra` | DeepInfra | API key | [link](https://deepinfra.com) | Free signup credits for API testing and model exploration |+| `deepseek` | `ds` | DeepSeek | API key | [link](https://platform.deepseek.com) | 5M free tokens on signup - no credit card required |+| `dify` | `dify` | Dify | API key | [link](https://dify.ai) | Get API key from your Dify instance. |+| `doubao` | `doubao` | Doubao | API key | [link](https://doubao.com) | Get API key at console.volcengine.com |+| `empower` | `empower` | Empower | API key, aggregator | [link](https://docs.empower.dev) | Bearer API key for the Empower OpenAI-compatible endpoint. |+| `fal-ai` | `fal` | Fal.ai | API key, image | [link](https://fal.ai) | — |+| `featherless-ai` | `featherless` | Featherless AI | API key | [link](https://featherless.ai) | Free tier available — no credit card required |+| `fenayai` | `fenayai` | FenayAI | API key, aggregator | [link](https://fenayai.com) | Bearer API key for the FenayAI OpenAI-compatible gateway. |+| `firecrawl` | `fc` | Firecrawl | API key | [link](https://firecrawl.dev) | — |+| `fireworks` | `fireworks` | Fireworks AI | API key | [link](https://fireworks.ai) | $1 free starter credits on signup for API testing |+| `freeaiapikey` | `faik` | FreeAIAPIKey | API key | [link](https://freeaiapikey.com) | — |+| `freemodel-dev` | `fmd` | FreeModel.dev | API key | [link](https://freemodel.dev) | $300 free credits on signup — no credit card required. Access GPT-5.4 and GPT-5.5 (OpenAI's latest flagship models) through an OpenAI-compatible API. |+| `friendliai` | `friendli` | FriendliAI | API key | [link](https://friendli.ai) | Free tier for serverless inference — no credit card required |+| `galadriel` | `galadriel` | Galadriel | API key | [link](https://galadriel.com) | — |+| `gemini` | `gemini` | Gemini (Google AI Studio) | API key | [link](https://aistudio.google.com) | Free forever: 1,500 req/day for Gemini 2.5 Flash — no credit card, get key at aistudio.google.com |+| `getgoapi` | `ggo` | GoAPI | API key, aggregator | [link](https://api.getgoapi.com) | — |+| `gigachat` | `gigachat` | GigaChat (Sber) | API key | [link](https://developers.sber.ru) | — |+| `github-models` | `ghm` | GitHub Models | API key | [link](https://github.com/marketplace/models) | Create a GitHub PAT with 'models: read' scope at github.com/settings/tokens |+| `gitlab` | `gitlab` | GitLab Duo PAT | API key | [link](https://docs.gitlab.com/user/duo_agent_platform/code_suggestions/) | GitLab personal access token for the public Code Suggestions API. Configure a self-hosted base URL when not using gitlab.com. |+| `gitlawb` | `glb` | Gitlawb Opengateway (MiMo) | API key | [link](https://opengateway.gitlawb.com) | Free tier available — no credit card required |+| `gitlawb-gmi` | `glb-gmi` | Gitlawb Opengateway (GMI Cloud) | API key | [link](https://opengateway.gitlawb.com) | Free tier available — no credit card required |+| `glhf` | `glhf` | GLHF Chat | API key, aggregator | [link](https://glhf.chat) | Bearer API key for the GLHF OpenAI-compatible gateway. |+| `glm` | `glm` | GLM Coding | API key | [link](https://z.ai/subscribe) | — |+| `glm-cn` | `glmcn` | GLM Coding (China) | API key | [link](https://open.bigmodel.cn) | — |+| `glmt` | `glmt` | GLM Thinking | API key | [link](https://open.bigmodel.cn) | — |+| `groq` | `groq` | Groq | API key | [link](https://groq.com) | Free tier: 30 RPM / 14.4K RPD — no credit card |+| `hackclub` | `hc` | Hackclub AI | API key, aggregator | [link](https://ai.hackclub.com) | Sign in with your Hack Club account at ai.hackclub.com. |+| `haiper` | `hp` | Haiper | API key, video | [link](https://haiper.ai) | Get API key at haiper.ai/haiper-api |+| `heroku` | `heroku` | Heroku AI | API key, enterprise | [link](https://www.heroku.com) | — |+| `huggingchat` | `huggingchat` | HuggingChat | API key | [link](https://huggingface.co/chat) | No API key required for basic access. |+| `huggingface` | `hf` | HuggingFace | API key | [link](https://huggingface.co) | Free Inference API for thousands of models (Whisper, VITS, SDXL…) |+| `hyperbolic` | `hyp` | Hyperbolic | API key | [link](https://hyperbolic.xyz) | $1-5 trial credits on signup for serverless inference |+| `ideogram` | `ideo` | Ideogram | API key | [link](https://ideogram.ai) | Get API key at ideogram.ai/docs/api |+| `iflytek` | `iflytek` | iFlytek Spark | API key | [link](https://xinghuo.xfyun.cn) | Get API key at console.xfyun.cn |+| `inclusionai` | `inclusion` | InclusionAI | API key | [link](https://inclusionai.com) | Get API key at inclusionai.com |+| `inference-net` | `inet` | Inference.net | API key | [link](https://inference.net) | $25 free credits on signup plus research grants available |+| `jina-ai` | `jina` | Jina AI | API key, embed/rerank | [link](https://jina.ai) | Bearer API key for the Jina AI rerank API. |+| `jina-reader` | `jr` | Jina Reader | API key | [link](https://jina.ai/reader) | — |+| `kie` | `kie` | KIE.AI | API key | [link](https://kie.ai) | — |+| `kilo-gateway` | `kg` | Kilo Gateway | API key, aggregator | [link](https://kilo.ai) | — |+| `kimi` | `kimi` | Kimi | API key | [link](https://platform.moonshot.ai) | — |+| `kimi-coding-apikey` | `kmca` | Kimi Coding (API Key) | API key | [link](https://www.kimi.com/code) | — |+| `kluster` | `kluster` | Kluster AI | API key | [link](https://kluster.ai) | $5 free credits on signup - DeepSeek R1, Llama 4 Maverick/Scout, Qwen3 235B |+| `lambda-ai` | `lambda` | Lambda AI | API key | [link](https://lambda.ai) | — |+| `laozhang` | `lz` | LaoZhang AI | API key, aggregator | [link](https://api.laozhang.ai) | — |+| `leonardo` | `leo` | Leonardo AI | API key, video | [link](https://leonardo.ai) | Get API key at leonardo.ai/developer |+| `liquid` | `liquid` | Liquid AI | API key | [link](https://liquid.ai) | Get API key at liquid.ai |+| `llamagate` | `llamagate` | LlamaGate | API key | [link](https://llamagate.ai) | — |+| `llm7` | `llm7` | LLM7.io | API key | [link](https://llm7.io) | No signup required - 2 req/s, 20 RPM, 100 req/hr free tier |+| `longcat` | `lc` | LongCat AI | API key | [link](https://longcat.chat/platform/docs) | Free: 5M tokens/day on LongCat-2.0-Preview (Flash models retired 2026-05-29); up to 120M/day via feedback. |+| `maritalk` | `maritalk` | Maritalk | API key | [link](https://www.maritaca.ai) | — |+| `meta-llama` | `meta` | Meta Llama API | API key | [link](https://llama.developer.meta.com) | — |+| `minimax` | `minimax` | Minimax Coding | API key, video | [link](https://www.minimax.io) | — |+| `minimax-cn` | `minimax-cn` | Minimax (China) | API key | [link](https://www.minimaxi.com) | — |+| `mistral` | `mistral` | Mistral | API key | [link](https://mistral.ai) | Free Experiment tier: rate-limited access to all models, no credit card required |+| `modal` | `mdl` | Modal | API key, enterprise | [link](https://modal.com/docs) | Use the bearer token that protects your Modal deployment, if enabled. Base URL should point to your OpenAI-compatible Modal app, for example https://<workspace>--<app>.modal.run/v1. |+| `monsterapi` | `monster` | MonsterAPI | API key | [link](https://monsterapi.ai) | Get API key at monsterapi.ai |+| `moonshot` | `moonshot` | Moonshot AI | API key | [link](https://platform.moonshot.ai) | — |+| `morph` | `morph` | Morph | API key | [link](https://morphllm.com) | Free tier: 250K credits/month, $0 |+| `nanogpt` | `nanogpt` | NanoGPT | API key | [link](https://nano-gpt.com) | — |+| `nebius` | `nebius` | Nebius AI | API key | [link](https://nebius.com) | ~$1 trial credits on signup for API testing |+| `nlpcloud` | `nlpc` | NLP Cloud | API key | [link](https://docs.nlpcloud.com) | Use your NLP Cloud API key in Authorization: Token <key>. OmniRoute targets the chatbot endpoint on https://api.nlpcloud.io/v1/gpu/<model>/chatbot by default. |+| `nomic` | `nomic` | Nomic | API key | [link](https://nomic.ai) | Get API key at atlas.nomic.ai |+| `nous-research` | `nous` | Nous Research | API key | [link](https://portal.nousresearch.com/help) | Use your Nous Portal API key. OmniRoute targets the official OpenAI-compatible inference endpoint at https://inference-api.nousresearch.com/v1. |+| `novita` | `novita` | Novita AI | API key, aggregator | [link](https://novita.ai) | $0.50 trial credits on signup (valid about 1 year) |+| `nscale` | `nscale` | nScale | API key | [link](https://nscale.com) | $5 free credits on signup for inference testing |+| `nvidia` | `nvidia` | NVIDIA NIM | API key | [link](https://build.nvidia.com) | Free dev access: ~40 RPM, 70+ models (Kimi K2.5, GLM 4.7, DeepSeek V3.2...) |+| `oci` | `oci` | OCI Generative AI | API key, enterprise | [link](https://www.oracle.com/artificial-intelligence/generative-ai) | Use your OCI Generative AI API key or IAM bearer token. Base URL can be https://inference.generativeai.<region>.oci.oraclecloud.com/openai/v1/. |+| `ollama-cloud` | `ollamacloud` | Ollama Cloud | API key | [link](https://ollama.com/settings/api-keys) | — |+| `openai` | `openai` | OpenAI | API key | [link](https://platform.openai.com) | — |+| `opencode-go` | `opencode-go` | OpenCode Go | API key | [link](https://opencode.ai/go) | — |+| `opencode-zen` | `opencode-zen` | OpenCode Zen | API key | [link](https://opencode.ai/zen) | — |+| `openrouter` | `openrouter` | OpenRouter | API key, aggregator | [link](https://openrouter.ai) | Free models at $0/token with :free suffix - 20 RPM / 200 RPD |+| `ovhcloud` | `ovh` | OVHcloud AI | API key | [link](https://www.ovhcloud.com) | — |+| `perplexity` | `pplx` | Perplexity | API key | [link](https://www.perplexity.ai) | — |+| `phind` | `phind` | Phind | API key | [link](https://phind.com) | Get API key at phind.com |+| `piapi` | `pi` | PiAPI | API key, aggregator | [link](https://piapi.ai) | — |+| `poe` | `poe` | Poe | API key, aggregator | [link](https://creator.poe.com/api-reference) | Bearer API key for the Poe OpenAI-compatible API. |+| `pollinations` | `pol` | Pollinations AI | API key, video | [link](https://pollinations.ai) | No API key required for free public endpoint. Optional Spore tier: ~0.01 pollen/hour. |+| `predibase` | `predibase` | Predibase | API key | [link](https://predibase.com) | $25 free trial credits (30-day validity) |+| `publicai` | `publicai` | PublicAI | API key | [link](https://publicai.co) | Requires an API key — one-time signup credit, then paid |+| `puter` | `pu` | Puter AI | API key | [link](https://puter.com) | Get token at puter.com/dashboard → Copy Auth Token |+| `qianfan` | `qianfan` | Baidu Qianfan | API key | [link](https://cloud.baidu.com/product/wenxinworkshop) | — |+| `recraft` | `recraft` | Recraft | API key, image | [link](https://recraft.ai) | — |+| `reka` | `reka` | Reka | API key | [link](https://docs.reka.ai/chat/overview) | Use your Reka API key. OmniRoute supports the OpenAI-compatible base URL https://api.reka.ai/v1 and sends both Authorization and X-Api-Key headers for compatibility. |+| `runwayml` | `runway` | Runway | API key, video | [link](https://docs.dev.runwayml.com) | Use your Runway API key in Authorization: Bearer <key>. OmniRoute targets the current Runway API at https://api.dev.runwayml.com/v1 and sends the required X-Runway-Version header automatically. |+| `sambanova` | `samba` | SambaNova | API key | [link](https://sambanova.ai) | $5 free credits on signup (30-day validity), no credit card required |+| `sap` | `sap` | SAP Generative AI Hub | API key, enterprise | [link](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/generative-ai-hub-in-sap-ai-core) | Use your SAP AI Core bearer token. Base URL can be your AI_API_URL root or a deploymentUrl from Generative AI Hub. |+| `scaleway` | `scw` | Scaleway AI | API key | [link](https://www.scaleway.com/en/ai/generative-apis) | 1M free tokens for new accounts — EU/GDPR compliant (Paris), Qwen3 235B & Llama 70B |+| `sensenova` | `sensenova` | SenseNova | API key | [link](https://platform.sensenova.cn) | Get API key at platform.sensenova.cn |+| `siliconflow` | `siliconflow` | SiliconFlow | API key | [link](https://cloud.siliconflow.com) | $1 free credits plus permanently free models after identity verification |+| `snowflake` | `snowflake` | Snowflake Cortex | API key, enterprise | [link](https://www.snowflake.com) | — |+| `sparkdesk` | `sparkdesk` | SparkDesk | API key | [link](https://xinghuo.xfyun.cn) | Get API key at console.xfyun.cn |+| `stability-ai` | `stability` | Stability AI | API key, image | [link](https://stability.ai) | — |+| `stepfun` | `stepfun` | StepFun | API key | [link](https://stepfun.com) | Get API key at platform.stepfun.com |+| `suno` | `suno` | Suno | API key | [link](https://suno.ai) | Paste session cookie from suno.ai (Clerk auth) |+| `synthetic` | `synthetic` | Synthetic | API key, aggregator | [link](https://synthetic.new) | — |+| `tencent` | `tencent` | Tencent Hunyuan | API key | [link](https://hunyuan.tencent.com) | Get API key at console.cloud.tencent.com |+| `thebai` | `thebai` | TheB.AI | API key, aggregator | [link](https://theb.ai) | Bearer API key for the TheB.AI OpenAI-compatible gateway. |+| `together` | `together` | Together AI | API key, video | [link](https://www.together.ai) | $25 signup credits + 3 permanently free models: Llama 3.3 70B, Vision, DeepSeek-R1 distill |+| `topaz` | `topaz` | Topaz | API key, image | [link](https://topazlabs.com) | — |+| `udio` | `udio` | Udio | API key | [link](https://udio.com) | Paste session cookie from udio.com (Supabase auth) |+| `uncloseai` | `unc` | UncloseAI | API key | [link](https://uncloseai.com) | No auth required. API accepts any non-empty string as key for identification. |+| `upstage` | `upstage` | Upstage | API key | [link](https://www.upstage.ai) | — |+| `v0-vercel` | `v0` | v0 (Vercel) | API key | [link](https://v0.dev) | — |+| `venice` | `venice` | Venice.ai | API key | [link](https://venice.ai) | — |+| `vercel-ai-gateway` | `vag` | Vercel AI Gateway | API key, aggregator | [link](https://vercel.com/docs/ai-gateway) | — |+| `vertex` | `vertex` | Vertex AI | API key, enterprise | [link](https://cloud.google.com/vertex-ai) | Provide Service Account JSON or OAuth access_token |+| `vertex-partner` | `vp` | Vertex AI Partners | API key, enterprise | [link](https://cloud.google.com/vertex-ai) | Provide the same Service Account JSON used for Vertex AI partner models. |+| `volcengine` | `volcengine` | Volcengine | API key | [link](https://www.volcengine.com) | — |+| `voyage-ai` | `voyage` | Voyage AI | API key, embed/rerank | [link](https://www.voyageai.com) | Bearer API key for Voyage AI embeddings and rerank APIs. |+| `wandb` | `wandb` | Weights & Biases Inference | API key | [link](https://wandb.ai) | — |+| `watsonx` | `watsonx` | IBM watsonx.ai Gateway | API key, enterprise | [link](https://www.ibm.com/products/watsonx-ai) | Use your watsonx bearer token. Base URL can be https://<region>.ml.cloud.ibm.com/ml/gateway/v1/ or a self-managed /ml/gateway/v1 endpoint. |+| `xai` | `xai` | xAI (Grok) | API key | [link](https://x.ai) | — |+| `xiaomi-mimo` | `mimo` | Xiaomi MiMo | API key | [link](https://mimo.mi.com) | — |+| `yi` | `yi` | Yi (01.AI) | API key | [link](https://01.ai) | Get API key at platform.lingyiwanwu.com |+| `zai` | `zai` | Z.AI | API key | [link](https://open.bigmodel.cn) | — |+| `zenmux` | `zm` | ZenMux | API key | [link](https://zenmux.ai) | Use your ZenMux API key in Authorization: Bearer <key>. ZenMux is fully OpenAI-compatible. Base URL: https://zenmux.ai/api/v1. |## Local Providers (11)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `comfyui` | `comfyui` | ComfyUI | Local | [link](https://github.com/comfyanonymous/ComfyUI) | No API key required. Configure the local ComfyUI base URL (default: http://localhost:8188). |-| `docker-model-runner` | `dmr` | Docker Model Runner | Local, self-hosted | [link](https://docs.docker.com/ai/model-runner/) | API key optional. Configure the local Docker Model Runner OpenAI-compatible base URL (default: http://localhost:12434/v1). |-| `lemonade` | `lemonade` | Lemonade Server | Local, self-hosted | [link](https://lemonade-server.ai) | API key optional. Configure the local Lemonade OpenAI-compatible base URL (default: http://localhost:13305/api/v1). |-| `llama-cpp` | `llamacpp` | llama.cpp | Local, self-hosted | [link](https://github.com/ggml-org/llama.cpp) | API key optional (use any value, e.g. sk-no-key-required). Configure the llama-server OpenAI-compatible base URL (default: http://127.0.0.1:8080/v1). Note: if Llamafile is also installed, both default to port 8080 — run only one at a time or override the port. |-| `llamafile` | `llamafile` | Llamafile | Local, self-hosted | [link](https://github.com/Mozilla-Ocho/llamafile) | API key optional. Configure the local Llamafile OpenAI-compatible base URL (default: http://127.0.0.1:8080/v1). |-| `lm-studio` | `lmstudio` | LM Studio | Local, self-hosted | [link](https://lmstudio.ai) | API key optional. Configure the local LM Studio OpenAI-compatible base URL (default: http://localhost:1234/v1). |-| `oobabooga` | `ooba` | oobabooga | Local, self-hosted | [link](https://github.com/oobabooga/text-generation-webui) | API key optional. Configure the local oobabooga OpenAI-compatible base URL (default: http://localhost:5000/v1). |-| `sdwebui` | `sdwebui` | SD WebUI | Local | [link](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | No API key required. Configure the local WebUI base URL (default: http://localhost:7860). |-| `triton` | `triton` | NVIDIA Triton | Local, self-hosted | [link](https://developer.nvidia.com/triton-inference-server) | API key optional. Configure the Triton OpenAI-compatible base URL (default: http://localhost:8000/v1). |-| `vllm` | `vllm` | vLLM | Local, self-hosted | [link](https://github.com/vllm-project/vllm) | API key optional. Configure the local vLLM OpenAI-compatible base URL (default: http://localhost:8000/v1). |-| `xinference` | `xinference` | XInference | Local, self-hosted | [link](https://inference.readthedocs.io) | API key optional. Configure the local XInference OpenAI-compatible base URL (default: http://localhost:9997/v1). |+| ID | Alias | Name | Tags | Website | Notes |+| --------------------- | ------------ | ------------------- | ------------------ | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `comfyui` | `comfyui` | ComfyUI | Local | [link](https://github.com/comfyanonymous/ComfyUI) | No API key required. Configure the local ComfyUI base URL (default: http://localhost:8188). |+| `docker-model-runner` | `dmr` | Docker Model Runner | Local, self-hosted | [link](https://docs.docker.com/ai/model-runner/) | API key optional. Configure the local Docker Model Runner OpenAI-compatible base URL (default: http://localhost:12434/v1). |+| `lemonade` | `lemonade` | Lemonade Server | Local, self-hosted | [link](https://lemonade-server.ai) | API key optional. Configure the local Lemonade OpenAI-compatible base URL (default: http://localhost:13305/api/v1). |+| `llama-cpp` | `llamacpp` | llama.cpp | Local, self-hosted | [link](https://github.com/ggml-org/llama.cpp) | API key optional (use any value, e.g. sk-no-key-required). Configure the llama-server OpenAI-compatible base URL (default: http://127.0.0.1:8080/v1). Note: if Llamafile is also installed, both default to port 8080 — run only one at a time or override the port. |+| `llamafile` | `llamafile` | Llamafile | Local, self-hosted | [link](https://github.com/Mozilla-Ocho/llamafile) | API key optional. Configure the local Llamafile OpenAI-compatible base URL (default: http://127.0.0.1:8080/v1). |+| `lm-studio` | `lmstudio` | LM Studio | Local, self-hosted | [link](https://lmstudio.ai) | API key optional. Configure the local LM Studio OpenAI-compatible base URL (default: http://localhost:1234/v1). |+| `oobabooga` | `ooba` | oobabooga | Local, self-hosted | [link](https://github.com/oobabooga/text-generation-webui) | API key optional. Configure the local oobabooga OpenAI-compatible base URL (default: http://localhost:5000/v1). |+| `sdwebui` | `sdwebui` | SD WebUI | Local | [link](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | No API key required. Configure the local WebUI base URL (default: http://localhost:7860). |+| `triton` | `triton` | NVIDIA Triton | Local, self-hosted | [link](https://developer.nvidia.com/triton-inference-server) | API key optional. Configure the Triton OpenAI-compatible base URL (default: http://localhost:8000/v1). |+| `vllm` | `vllm` | vLLM | Local, self-hosted | [link](https://github.com/vllm-project/vllm) | API key optional. Configure the local vLLM OpenAI-compatible base URL (default: http://localhost:8000/v1). |+| `xinference` | `xinference` | XInference | Local, self-hosted | [link](https://inference.readthedocs.io) | API key optional. Configure the local XInference OpenAI-compatible base URL (default: http://localhost:9997/v1). |## Search Providers (11)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `brave-search` | `brave-search` | Brave Search | Search | [link](https://brave.com/search/api) | Subscription token from Brave Search API dashboard |-| `exa-search` | `exa-search` | Exa Search | Search | [link](https://exa.ai) | API key from dashboard.exa.ai |-| `google-pse-search` | `google-pse` | Google Programmable Search | Search | [link](https://developers.google.com/custom-search/v1/overview) | Requires a Google API key and your Programmable Search Engine ID (cx) |-| `linkup-search` | `linkup` | Linkup Search | Search | [link](https://docs.linkup.so) | Bearer API key from the Linkup dashboard |-| `ollama-search` | `ollama-search` | Ollama Search | Search | [link](https://ollama.com/settings/api-keys) | Same API key as Ollama Cloud (from ollama.com/settings/api-keys) |-| `perplexity-search` | `pplx-search` | Perplexity Search | Search | [link](https://docs.perplexity.ai/guides/search-quickstart) | Same API key as Perplexity (pplx-...) |-| `searchapi-search` | `searchapi` | SearchAPI | Search | [link](https://www.searchapi.io/docs) | API key from SearchAPI (query param or Bearer auth) |-| `searxng-search` | `searxng` | SearXNG Search | Search | [link](https://docs.searxng.org) | API key is optional. Set your SearXNG base URL. Some instances may require a bearer token for access. |-| `serper-search` | `serper-search` | Serper Search | Search | [link](https://serper.dev) | API key from serper.dev dashboard |-| `tavily-search` | `tavily-search` | Tavily Search | Search | [link](https://tavily.com) | API key from app.tavily.com (format: tvly-...) |-| `youcom-search` | `youcom-search` | You.com Search | Search | [link](https://you.com/docs/search/overview) | X-API-Key from the You.com platform dashboard |+| ID | Alias | Name | Tags | Website | Notes |+| ------------------- | --------------- | -------------------------- | ------ | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |+| `brave-search` | `brave-search` | Brave Search | Search | [link](https://brave.com/search/api) | Subscription token from Brave Search API dashboard |+| `exa-search` | `exa-search` | Exa Search | Search | [link](https://exa.ai) | API key from dashboard.exa.ai |+| `google-pse-search` | `google-pse` | Google Programmable Search | Search | [link](https://developers.google.com/custom-search/v1/overview) | Requires a Google API key and your Programmable Search Engine ID (cx) |+| `linkup-search` | `linkup` | Linkup Search | Search | [link](https://docs.linkup.so) | Bearer API key from the Linkup dashboard |+| `ollama-search` | `ollama-search` | Ollama Search | Search | [link](https://ollama.com/settings/api-keys) | Same API key as Ollama Cloud (from ollama.com/settings/api-keys) |+| `perplexity-search` | `pplx-search` | Perplexity Search | Search | [link](https://docs.perplexity.ai/guides/search-quickstart) | Same API key as Perplexity (pplx-...) |+| `searchapi-search` | `searchapi` | SearchAPI | Search | [link](https://www.searchapi.io/docs) | API key from SearchAPI (query param or Bearer auth) |+| `searxng-search` | `searxng` | SearXNG Search | Search | [link](https://docs.searxng.org) | API key is optional. Set your SearXNG base URL. Some instances may require a bearer token for access. |+| `serper-search` | `serper-search` | Serper Search | Search | [link](https://serper.dev) | API key from serper.dev dashboard |+| `tavily-search` | `tavily-search` | Tavily Search | Search | [link](https://tavily.com) | API key from app.tavily.com (format: tvly-...) |+| `youcom-search` | `youcom-search` | You.com Search | Search | [link](https://you.com/docs/search/overview) | X-API-Key from the You.com platform dashboard |## Audio-only Providers (7)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `assemblyai` | `aai` | AssemblyAI | Audio | [link](https://assemblyai.com) | — |-| `aws-polly` | `polly` | AWS Polly | Audio | [link](https://aws.amazon.com/polly/) | Use AWS Secret Access Key as API key; set providerSpecificData.accessKeyId and optional region. |-| `cartesia` | `cartesia` | Cartesia | Audio | [link](https://cartesia.ai) | — |-| `deepgram` | `dg` | Deepgram | Audio | [link](https://deepgram.com) | — |-| `elevenlabs` | `el` | ElevenLabs | Audio | [link](https://elevenlabs.io) | — |-| `inworld` | `inworld` | Inworld | Audio | [link](https://inworld.ai) | — |-| `playht` | `playht` | PlayHT | Audio | [link](https://play.ht) | — |+| ID | Alias | Name | Tags | Website | Notes |+| ------------ | ---------- | ---------- | ----- | ------------------------------------- | ----------------------------------------------------------------------------------------------- |+| `assemblyai` | `aai` | AssemblyAI | Audio | [link](https://assemblyai.com) | — |+| `aws-polly` | `polly` | AWS Polly | Audio | [link](https://aws.amazon.com/polly/) | Use AWS Secret Access Key as API key; set providerSpecificData.accessKeyId and optional region. |+| `cartesia` | `cartesia` | Cartesia | Audio | [link](https://cartesia.ai) | — |+| `deepgram` | `dg` | Deepgram | Audio | [link](https://deepgram.com) | — |+| `elevenlabs` | `el` | ElevenLabs | Audio | [link](https://elevenlabs.io) | — |+| `inworld` | `inworld` | Inworld | Audio | [link](https://inworld.ai) | — |+| `playht` | `playht` | PlayHT | Audio | [link](https://play.ht) | — |## Upstream Proxy Providers (2)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `9router` | `nr` | 9router | Upstream proxy | [link](https://www.npmjs.com/package/9router) | — |-| `cliproxyapi` | `cpa` | CLIProxyAPI | Upstream proxy | [link](https://github.com/router-for-me/CLIProxyAPI) | — |+| ID | Alias | Name | Tags | Website | Notes |+| ------------- | ----- | ----------- | -------------- | ---------------------------------------------------- | ----- |+| `9router` | `nr` | 9router | Upstream proxy | [link](https://www.npmjs.com/package/9router) | — |+| `cliproxyapi` | `cpa` | CLIProxyAPI | Upstream proxy | [link](https://github.com/router-for-me/CLIProxyAPI) | — |## Cloud Agent Providers (3)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `codex-cloud` | `codex-cloud` | Codex Cloud | Cloud agent | [link](https://openai.com/codex) | OpenAI API key with Codex Cloud task access. |-| `devin` | `devin` | Devin | Cloud agent | [link](https://devin.ai) | Devin API key for cloud agent sessions. |-| `jules` | `jules` | Google Jules | Cloud agent | [link](https://jules.google) | Jules API key for creating and managing cloud coding tasks. |+| ID | Alias | Name | Tags | Website | Notes |+| ------------- | ------------- | ------------ | ----------- | -------------------------------- | ----------------------------------------------------------- |+| `codex-cloud` | `codex-cloud` | Codex Cloud | Cloud agent | [link](https://openai.com/codex) | OpenAI API key with Codex Cloud task access. |+| `devin` | `devin` | Devin | Cloud agent | [link](https://devin.ai) | Devin API key for cloud agent sessions. |+| `jules` | `jules` | Google Jules | Cloud agent | [link](https://jules.google) | Jules API key for creating and managing cloud coding tasks. |## System Providers (1)-| ID | Alias | Name | Tags | Website | Notes |-|----|-------|------|------|---------|-------|-| `auto` | `auto` | Auto (Zero-Config) | System | — | — |+| ID | Alias | Name | Tags | Website | Notes |+| ------ | ------ | ------------------ | ------ | ------- | ----- |+| `auto` | `auto` | Auto (Zero-Config) | System | — | — |## Sources of truthdiff --git a/docs/reference/meta.json b/docs/reference/meta.jsonindex 5795a7c966..e7d25ec571 100644--- a/docs/reference/meta.json+++ b/docs/reference/meta.json@@ -1,4 +1,11 @@{"title": "Reference",- "pages": ["API_REFERENCE", "CLI-TOOLS", "ENVIRONMENT", "FREE_TIERS", "PROVIDER_REFERENCE"]+ "pages": [+ "API_REFERENCE",+ "CLI-TOOLS",+ "ENVIRONMENT",+ "FEATURE_FLAGS",+ "FREE_TIERS",+ "PROVIDER_REFERENCE"+ ]}diff --git a/docs/reference/openapi.yaml b/docs/reference/openapi.yamlindex 2a4c081486..1ae4e9ab05 100644--- a/docs/reference/openapi.yaml+++ b/docs/reference/openapi.yaml@@ -1,7 +1,7 @@openapi: 3.1.0info:title: OmniRoute API- version: 3.8.25+ version: 3.8.26description: |OmniRoute is a local-first AI API proxy router. It provides an OpenAI-compatibleendpoint that routes requests to multiple AI providers with load balancing,@@ -5007,6 +5007,39 @@ components:application/json:schema:$ref: "#/components/schemas/ValidationErrorResponse"+ BadRequest:+ description: The request was malformed or failed validation+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiErrorResponse"+ example:+ error:+ message: Invalid request+ type: invalid_request_error+ requestId: 8c2b1d44-7a3e-4c91-9b0f-1e2d3c4b5a60+ NotFound:+ description: The requested resource was not found+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiErrorResponse"+ example:+ error:+ message: Resource not found+ type: not_found_error+ requestId: 4d5e6f70-1a2b-3c4d-5e6f-7a8b9c0d1e2f+ InternalError:+ description: An unexpected server error occurred+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiErrorResponse"+ example:+ error:+ message: Internal server error+ type: api_error+ requestId: 0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5dschemas:PlaygroundPreset:diff --git a/docs/routing/meta.json b/docs/routing/meta.jsonindex 27a9b740b9..b785a1b930 100644--- a/docs/routing/meta.json+++ b/docs/routing/meta.json@@ -1,4 +1,4 @@{"title": "Routing",- "pages": ["AUTO-COMBO", "REASONING_REPLAY"]+ "pages": ["AUTO-COMBO", "QUOTA_SHARE", "REASONING_REPLAY"]}diff --git a/docs/security/EGRESS_POLICY.md b/docs/security/EGRESS_POLICY.mdnew file mode 100644index 0000000000..d45a940af1--- /dev/null+++ b/docs/security/EGRESS_POLICY.md@@ -0,0 +1,250 @@+---+title: "Egress IP Family Policy (IPv4/IPv6)"+version: 3.8.24+lastUpdated: 2026-06-13+---++# Egress IP Family Policy (IPv4/IPv6)++> **Pin outbound traffic to a single IP family — `auto`, `ipv4`, or `ipv6` — per proxy, so an IPv6-only egress never silently leaks back to IPv4.**++> **Source of truth:** `open-sse/utils/proxyFamily.ts`, `open-sse/utils/proxyDispatcher.ts`, `open-sse/utils/proxyFetch.ts`, `open-sse/utils/socksConnectorWithFamily.ts`, `open-sse/utils/proxyFamilyResolve.ts`, `src/shared/validation/schemas.ts`, `src/lib/db/proxies.ts`, `src/lib/db/upstreamProxy.ts`, `src/lib/db/migrations/099_proxy_family.sql`++OmniRoute lets each proxy carry an **address-family egress directive**. By default the OS picks IPv4 or IPv6 (dual-stack, "Happy Eyeballs"). When you set the directive to `ipv4` or `ipv6`, OmniRoute pins every connection through that proxy to the chosen family and **fails closed** rather than falling back to the other family.++This page documents what the directive is, why it exists, where you configure it, and how the runtime resolves it.++---++## Table of Contents++- [What It Is](#what-it-is)+- [Why It Exists](#why-it-exists)+- [The Three Values](#the-three-values)+- [How to Configure It](#how-to-configure-it)+- [How `auto` Resolves](#how-auto-resolves)+- [How `ipv4` / `ipv6` Are Enforced](#how-ipv4--ipv6-are-enforced)+- [SOCKS5 Compatibility](#socks5-compatibility)+- [Fail-Closed Behavior](#fail-closed-behavior)+- [Data Model](#data-model)+- [Related Documentation](#related-documentation)++---++## What It Is++Every proxy in the registry has a `family` field with three possible values, validated by a Zod enum:++```ts+// src/shared/validation/schemas.ts+family: z.enum(["auto", "ipv4", "ipv6"]).optional().default("auto"),+```++The field defaults to `"auto"`, which preserves the prior dual-stack behavior. Setting it to `ipv4` or `ipv6` pins the connect family for that proxy.++The directive is normalized everywhere through a single helper so any unknown value collapses to `auto`:++```ts+// open-sse/utils/proxyFamily.ts+export type ProxyFamily = "auto" | "ipv4" | "ipv6";++export function parseProxyFamily(value: unknown): ProxyFamily {+ return value === "ipv4" || value === "ipv6" ? value : "auto";+}+```++---++## Why It Exists++Introduced in PR [#3777](https://github.com/diegosouzapw/OmniRoute/pull/3777). The motivating problems:++| Problem | What the directive fixes |+| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| **IPv6-only egress leaking to IPv4** | When a proxy host has both A and AAAA records (or the OS prefers IPv4), Happy Eyeballs can dial out over IPv4 even when you intend an IPv6-only path. Pinning `ipv6` removes that leak. |+| **Shared-egress anomaly revocation** | Rotating providers (codex/openai) revoke tokens when many accounts egress through the **same** IP at high volume. Controlling the egress family is part of keeping accounts on distinct, predictable egress paths (see [`src/lib/proxyEgress.ts`](../../src/lib/proxyEgress.ts) for the egress-IP diagnostics that pair with this). |+| **Deterministic egress for compliance/testing** | When you must guarantee traffic leaves over a specific family, `auto` is not enough. |++The directive is intentionally **per-proxy**, not global — different proxies in your pool can have different policies.++---++## The Three Values++| Value | UI label | Behavior |+| ------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `auto` | `Auto (dual-stack)` | OS picks the family. For an IP-literal proxy host, the family is intrinsic to the literal; for a hostname, both families are eligible. This is the default. |+| `ipv4` | `IPv4 only` | Pins the connection to IPv4. Fails closed if the proxy host has no IPv4 (A) record. |+| `ipv6` | `IPv6 only` | Pins the connection to IPv6. Fails closed if the proxy host has no IPv6 (AAAA) record. |++UI strings live in `src/i18n/messages/en.json` (`labelFamily`, `familyAuto`, `familyIpv4`, `familyIpv6`, `familyHint`).++---++## How to Configure It++### Dashboard++The selector is in the proxy form of the **Proxy Pool** tab:++1. Open **Dashboard → Settings → Proxy → Proxy Pool**+2. Add or edit a proxy+3. Set the **IP family** dropdown to `Auto (dual-stack)`, `IPv4 only`, or `IPv6 only`+4. Save++The control is rendered by `ProxyRegistryManager.tsx` (mounted in `proxy/ProxyPoolTab.tsx`).++### API++The `family` field is part of the proxy registry create/update payloads, validated by `createProxyRegistrySchema` / `updateProxyRegistrySchema` (`src/shared/validation/schemas.ts`) and handled by `POST` / `PATCH /api/v1/management/proxies`:++```bash+# Create an IPv6-only proxy+curl -X POST http://localhost:20128/api/v1/management/proxies \+ -H "Content-Type: application/json" \+ -d '{+ "name": "IPv6 egress",+ "type": "socks5",+ "host": "proxy.example.com",+ "port": 1080,+ "family": "ipv6"+ }'++# Change an existing proxy to IPv4-only+curl -X PATCH http://localhost:20128/api/v1/management/proxies \+ -H "Content-Type: application/json" \+ -d '{ "id": "proxy-uuid-here", "family": "ipv4" }'+```++The same field is also accepted by the inline proxy config object used for upstream-proxy entries (`upstream_proxy_config.family`, see [Data Model](#data-model)).++For the rest of the proxy CRUD/assignment API, see [PROXY_GUIDE.md](../ops/PROXY_GUIDE.md).++---++## How `auto` Resolves++When `family` is `auto`, OmniRoute does **not** append any directive — the proxy URL is used as-is and the connect family is determined intrinsically.++At URL-build time (`proxyConfigToUrl` / `normalizeProxyUrl` in `open-sse/utils/proxyDispatcher.ts`), an `auto` proxy yields a plain URL with no marker:++```ts+// open-sse/utils/proxyDispatcher.ts+const fam = parseProxyFamily(config.family);+const normalized = normalizeProxyUrl(proxyUrlStr, "context proxy", { allowSocks5 });+return fam === "auto" ? normalized : `${normalized}?family=${fam}`;+```++At dispatch time (`resolveDispatcherFamily`), `auto` resolves to the intrinsic family of an IP-literal host, or `null` (let the OS decide) for a hostname:++```ts+// open-sse/utils/proxyDispatcher.ts+function resolveDispatcherFamily(parsed: URL): 4 | 6 | null {+ const directive = parseProxyFamily(parsed.searchParams.get("family") ?? undefined);+ const literal = detectIpLiteralFamily(parsed.hostname);+ if (directive === "auto") return literal; // null for a hostname → OS picks+ // ...+}+```++So:++- `auto` + IP-literal host (`192.0.2.1` / `[2001:db8::1]`) → family of that literal.+- `auto` + hostname → `null` → standard dual-stack OS resolution.++---++## How `ipv4` / `ipv6` Are Enforced++A non-`auto` directive travels as a single synthetic query marker — `?family=ipv4` or `?family=ipv6` — appended once to the normalized proxy URL. `normalizeProxyUrl` is careful to strip and re-append this marker exactly once so it never corrupts port parsing.++When the dispatcher is built, the marker is read and converted to a concrete connect family. If the host is an IP literal of the **opposite** family, OmniRoute throws (contradiction is fail-closed):++```ts+// open-sse/utils/proxyDispatcher.ts+const want = directive === "ipv6" ? 6 : 4;+if (literal !== null && literal !== want) {+ throw new Error(+ `[ProxyDispatcher] Proxy family directive ${directive} contradicts ${literal === 6 ? "IPv6" : "IPv4"} literal host`+ );+}+```++The concrete family is then pinned on the connector:++- **HTTP/HTTPS proxies** (`ProxyAgent`): `proxyTls: { family, autoSelectFamily: false }` — disables Happy Eyeballs so the chosen family is the only one dialed.+- **SOCKS5 proxies**: a custom connector threads `socket_options: { family, autoSelectFamily: false }` into the SOCKS client (see [SOCKS5 Compatibility](#socks5-compatibility)).++---++## SOCKS5 Compatibility++The family pin works with SOCKS5 proxies, but stock `fetch-socks` does not expose the socket options needed to pin the family of the proxy hop. OmniRoute ships its own connector for that:++```ts+// open-sse/utils/socksConnectorWithFamily.ts+export function buildSocksFamilySocketOptions(family: 4 | 6 | null): Record<string, unknown> {+ if (family === 6) return { family: 6, autoSelectFamily: false };+ if (family === 4) return { family: 4, autoSelectFamily: false };+ return {};+}+```++`createProxyDispatcher` chooses the connector based on whether a family is pinned:++- `family === null` (i.e. `auto` over a hostname) → stock `socksDispatcher` from `fetch-socks`.+- `family === 4 | 6` → `createSocksDispatcherWithFamily`, which threads `socket_options` into `SocksClient.createConnection` so Happy Eyeballs cannot pick IPv4 for an IPv6-only egress policy.++SOCKS5 support itself is on by default (opt-out via `ENABLE_SOCKS5_PROXY=false`); see [PROXY_GUIDE.md → Environment Variables](../ops/PROXY_GUIDE.md#environment-variables).++---++## Fail-Closed Behavior++The whole point of the directive is to **refuse** rather than silently fall back to the wrong family. Two guards enforce this:++1. **Literal contradiction** — a directive that contradicts an IP-literal host throws at dispatcher build time (`resolveDispatcherFamily`, shown above).++2. **Hostname pre-flight DNS check** — for a hostname proxy with a pinned family, `proxyFetch.ts` verifies the hostname actually has a record in the required family **before** egressing, via `assertHostnameSupportsFamily`:++ ```ts+ // open-sse/utils/proxyFamilyResolve.ts+ const hasFamily = records.some((r) => r.family === family);+ if (!hasFamily) {+ throw new Error(+ `[ProxyFamily] Proxy host ${host} has no ${family === 6 ? "IPv6 (AAAA)" : "IPv4 (A)"} record; ` ++ `refusing ${family === 6 ? "IPv6" : "IPv4"}-only egress (fail-closed)`+ );+ }+ ```++ On failure, `proxyFetch.ts` tags the error with `code = "PROXY_FAMILY_UNAVAILABLE"` and `statusCode = 503`. A DNS resolution failure is likewise treated as fail-closed (refuse to egress).++IP-literal hosts are a no-op for the DNS pre-flight — their family is intrinsic and needs no lookup.++---++## Data Model++The `family` column was added by migration `099_proxy_family.sql` to **two** tables:++```sql+-- src/lib/db/migrations/099_proxy_family.sql+ALTER TABLE proxy_registry ADD COLUMN family TEXT NOT NULL DEFAULT 'auto';+ALTER TABLE upstream_proxy_config ADD COLUMN family TEXT NOT NULL DEFAULT 'auto';+```++- `proxy_registry.family` — the per-proxy directive for registry entries (`src/lib/db/proxies.ts`). Resolution queries select `family` alongside the other proxy columns, and a missing/non-string value is coerced to `"auto"`.+- `upstream_proxy_config.family` — the directive for upstream-proxy entries (`src/lib/db/upstreamProxy.ts`), with the same `"auto"` default.++When a resolved proxy object carries a non-`auto` `family`, `proxyConfigToUrl` appends the `?family=` marker so the pin survives all the way to the dispatcher.++---++## Related Documentation++> 📖 **Related documentation:**+>+> - [Proxy Guide](../ops/PROXY_GUIDE.md) — full proxy system: registry CRUD, 4-level resolution, rotation, health checking, API reference+> - [Stealth Guide](./STEALTH_GUIDE.md) — TLS fingerprint and CLI fingerprint layers that ride on top of the proxy+> - [Route Guard Tiers](./ROUTE_GUARD_TIERS.md) — loopback enforcement for local-only routesdiff --git a/docs/security/STEALTH_GUIDE.md b/docs/security/STEALTH_GUIDE.mdindex 8adeb3c3de..0983a126bf 100644--- a/docs/security/STEALTH_GUIDE.md+++ b/docs/security/STEALTH_GUIDE.md@@ -91,7 +91,8 @@ For third-party Anthropic relays that only accept "real Claude Code" traffic:- `CLAUDE_CODE_COMPATIBLE_USER_AGENT = "claude-cli/2.1.158 (external, sdk-cli)"`- `CLAUDE_CODE_COMPATIBLE_STAINLESS_PACKAGE_VERSION = "0.94.0"`- `CLAUDE_CODE_COMPATIBLE_STAINLESS_RUNTIME_VERSION = "v24.3.0"`-- `anthropic-beta = "claude-code-20250219,interleaved-thinking-2025-05-14,effort-2025-11-24,redact-thinking-2026-02-12"`+- `anthropic-beta = "claude-code-20250219,interleaved-thinking-2025-05-14,effort-2025-11-24"` by default+- The per-connection "Enable redact-thinking beta" toggle adds `redact-thinking-2026-02-12` when a CC Compatible upstream specifically requires redacted thinking streams- `CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07"` (Opus/Sonnet 4.x family)- Default path: `/v1/messages?beta=true`diff --git a/docs/security/meta.json b/docs/security/meta.jsonindex f397b3a740..519c9fe33f 100644--- a/docs/security/meta.json+++ b/docs/security/meta.json@@ -6,7 +6,9 @@"ERROR_SANITIZATION","ROUTE_GUARD_TIERS","STEALTH_GUIDE",+ "EGRESS_POLICY","COMPLIANCE",+ "SOCKET_DEV_FINDINGS","CLI_TOKEN","CLI_TOKEN_AUTH"]diff --git a/electron/package-lock.json b/electron/package-lock.jsonindex cd6dbe15cb..a42c1dbfc8 100644--- a/electron/package-lock.json+++ b/electron/package-lock.json@@ -1,12 +1,12 @@{"name": "omniroute-desktop",- "version": "3.8.25",+ "version": "3.8.26","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "omniroute-desktop",- "version": "3.8.25",+ "version": "3.8.26","license": "MIT","dependencies": {"electron-updater": "^6.8.9"@@ -297,6 +297,45 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/@electron/windows-sign": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.2.2.tgz",+ "integrity": "sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==",+ "dev": true,+ "license": "BSD-2-Clause",+ "optional": true,+ "peer": true,+ "dependencies": {+ "cross-dirname": "^0.1.0",+ "debug": "^4.3.4",+ "fs-extra": "^11.1.1",+ "minimist": "^1.2.8",+ "postject": "^1.0.0-alpha.6"+ },+ "bin": {+ "electron-windows-sign": "bin/electron-windows-sign.js"+ },+ "engines": {+ "node": ">=14.14"+ }+ },+ "node_modules/@electron/windows-sign/node_modules/fs-extra": {+ "version": "11.3.5",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.5.tgz",+ "integrity": "sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=14.14"+ }+ },"node_modules/@isaacs/fs-minipass": {"version": "4.0.1","resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",@@ -1091,6 +1130,15 @@"dev": true,"license": "MIT"},+ "node_modules/cross-dirname": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/cross-dirname/-/cross-dirname-0.1.0.tgz",+ "integrity": "sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/cross-spawn": {"version": "7.0.6","resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",@@ -1411,6 +1459,19 @@"node": ">=14.0.0"}},+ "node_modules/electron-builder-squirrel-windows": {+ "version": "26.15.3",+ "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-26.15.3.tgz",+ "integrity": "sha512-Jc19XPV9y9+2bAdZPkXuVNGNIEFBq9poHC61l8Kv6FdK7DRG3+Ic0rerC0DXOaeHNz8yW0fg/JnF8GQROOF5MA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "app-builder-lib": "26.15.3",+ "builder-util": "26.15.3",+ "electron-winstaller": "5.4.0"+ }+ },"node_modules/electron-publish": {"version": "26.15.3","resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-26.15.3.tgz",@@ -1445,6 +1506,66 @@"tiny-typed-emitter": "^2.1.0"}},+ "node_modules/electron-winstaller": {+ "version": "5.4.0",+ "resolved": "https://registry.npmjs.org/electron-winstaller/-/electron-winstaller-5.4.0.tgz",+ "integrity": "sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@electron/asar": "^3.2.1",+ "debug": "^4.1.1",+ "fs-extra": "^7.0.1",+ "lodash": "^4.17.21",+ "temp": "^0.9.0"+ },+ "engines": {+ "node": ">=8.0.0"+ },+ "optionalDependencies": {+ "@electron/windows-sign": "^1.1.2"+ }+ },+ "node_modules/electron-winstaller/node_modules/fs-extra": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",+ "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "graceful-fs": "^4.1.2",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ },+ "engines": {+ "node": ">=6 <7 || >=8"+ }+ },+ "node_modules/electron-winstaller/node_modules/jsonfile": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/electron-winstaller/node_modules/universalify": {+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">= 4.0.0"+ }+ },"node_modules/emoji-regex": {"version": "8.0.0","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",@@ -2349,6 +2470,20 @@"node": ">= 18"}},+ "node_modules/mkdirp": {+ "version": "0.5.6",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "minimist": "^1.2.6"+ },+ "bin": {+ "mkdirp": "bin/cmd.js"+ }+ },"node_modules/ms": {"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",@@ -2622,6 +2757,36 @@"node": ">=18"}},+ "node_modules/postject": {+ "version": "1.0.0-alpha.6",+ "resolved": "https://registry.npmjs.org/postject/-/postject-1.0.0-alpha.6.tgz",+ "integrity": "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "commander": "^9.4.0"+ },+ "bin": {+ "postject": "dist/cli.js"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/postject/node_modules/commander": {+ "version": "9.5.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",+ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": "^12.20.0 || >=14"+ }+ },"node_modules/proc-log": {"version": "6.1.0","resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.1.0.tgz",@@ -2816,6 +2981,21 @@"node": ">= 4"}},+ "node_modules/rimraf": {+ "version": "2.6.3",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",+ "deprecated": "Rimraf versions prior to v4 are no longer supported",+ "dev": true,+ "license": "ISC",+ "peer": true,+ "dependencies": {+ "glob": "^7.1.3"+ },+ "bin": {+ "rimraf": "bin.js"+ }+ },"node_modules/roarr": {"version": "2.15.4","resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",@@ -3071,6 +3251,21 @@"node": ">=18"}},+ "node_modules/temp": {+ "version": "0.9.4",+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz",+ "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "mkdirp": "^0.5.1",+ "rimraf": "~2.6.2"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },"node_modules/temp-file": {"version": "3.4.0","resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.4.0.tgz",diff --git a/electron/package.json b/electron/package.jsonindex ebaa938d36..2f07ac06cd 100644--- a/electron/package.json+++ b/electron/package.json@@ -1,6 +1,6 @@{"name": "omniroute-desktop",- "version": "3.8.25",+ "version": "3.8.26","description": "OmniRoute Desktop Application","main": "main.js","author": {diff --git a/open-sse/config/audioRegistry.ts b/open-sse/config/audioRegistry.tsindex 338b6fb485..dfeac3a953 100644--- a/open-sse/config/audioRegistry.ts+++ b/open-sse/config/audioRegistry.ts@@ -23,6 +23,19 @@ export interface AudioProvider {}export const AUDIO_TRANSCRIPTION_PROVIDERS: Record<string, AudioProvider> = {+ vertex: {+ id: "vertex",+ baseUrl: "https://us-central1-aiplatform.googleapis.com/v1",+ authType: "apikey",+ authHeader: "bearer",+ format: "vertex-gemini",+ models: [+ { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash (Vertex Transcribe)" },+ { id: "gemini-2.5-pro", name: "Gemini 2.5 Pro (Vertex Transcribe)" },+ { id: "gemini-2.0-flash", name: "Gemini 2.0 Flash (Vertex Transcribe)" },+ ],+ },+openai: {id: "openai",baseUrl: "https://api.openai.com/v1/audio/transcriptions",@@ -148,6 +161,18 @@ export const AUDIO_TRANSCRIPTION_PROVIDERS: Record<string, AudioProvider> = {};export const AUDIO_SPEECH_PROVIDERS: Record<string, AudioProvider> = {+ vertex: {+ id: "vertex",+ baseUrl: "https://us-central1-aiplatform.googleapis.com/v1",+ authType: "apikey",+ authHeader: "bearer",+ format: "vertex-gemini-tts",+ models: [+ { id: "gemini-2.5-flash-preview-tts", name: "Gemini 2.5 Flash TTS (Vertex)" },+ { id: "gemini-2.5-pro-preview-tts", name: "Gemini 2.5 Pro TTS (Vertex)" },+ ],+ },+openai: {id: "openai",baseUrl: "https://api.openai.com/v1/audio/speech",diff --git a/open-sse/config/glmProvider.ts b/open-sse/config/glmProvider.tsindex 26b0e833a8..e18b5faa47 100644--- a/open-sse/config/glmProvider.ts+++ b/open-sse/config/glmProvider.ts@@ -16,6 +16,30 @@ export const GLM_ANTHROPIC_DEFAULT_BASE_URLS = Object.freeze({});export const GLM_SHARED_MODELS = Object.freeze([+ {+ id: "glm-5.2",+ name: "GLM 5.2",+ contextLength: 1000000,+ maxOutputTokens: 131072,+ toolCalling: true,+ supportsReasoning: true,+ },+ {+ id: "glm-5.2-high",+ name: "GLM 5.2 High",+ contextLength: 1000000,+ maxOutputTokens: 131072,+ toolCalling: true,+ supportsReasoning: true,+ },+ {+ id: "glm-5.2-max",+ name: "GLM 5.2 Max",+ contextLength: 1000000,+ maxOutputTokens: 131072,+ toolCalling: true,+ supportsReasoning: true,+ },{id: "glm-5.1",name: "GLM 5.1",diff --git a/open-sse/config/musicRegistry.ts b/open-sse/config/musicRegistry.tsindex 7ca68d5891..7eda3e7425 100644--- a/open-sse/config/musicRegistry.ts+++ b/open-sse/config/musicRegistry.ts@@ -24,6 +24,15 @@ interface MusicProvider {}export const MUSIC_PROVIDERS: Record<string, MusicProvider> = {+ vertex: {+ id: "vertex",+ baseUrl: "https://us-central1-aiplatform.googleapis.com/v1",+ authType: "apikey",+ authHeader: "bearer",+ format: "vertex-lyria",+ models: [{ id: "lyria-002", name: "Lyria 2 (Vertex)" }],+ },+kie: {id: "kie",baseUrl: "https://api.kie.ai",diff --git a/open-sse/config/providerModels.ts b/open-sse/config/providerModels.tsindex 33ad8050b7..47fe3671e9 100644--- a/open-sse/config/providerModels.ts+++ b/open-sse/config/providerModels.ts@@ -8,7 +8,14 @@ export const PROVIDER_ID_TO_ALIAS = generateAliasMap();// Helper functionsexport function getProviderModels(aliasOrId: string): RegistryModel[] {- return PROVIDER_MODELS[aliasOrId] || [];+ // Accept either the public alias (the /v1/models prefix, e.g. "gh") or the raw+ // provider id (e.g. "github") and resolve id→alias before reading the namespace+ // map — so callers don't need to know which form they hold. We resolve here rather+ // than mirroring raw-id keys into PROVIDER_MODELS, whose keys ARE the public+ // prefixes (a raw id like "opencode" would collide with the opencode-zen route —+ // see #2798/#3870).+ const alias = PROVIDER_ID_TO_ALIAS[aliasOrId] || aliasOrId;+ return PROVIDER_MODELS[alias] || PROVIDER_MODELS[aliasOrId] || [];}export function getDefaultModel(aliasOrId: string): string | null {diff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.tsindex 5dfa8495d9..a1e6e20325 100644--- a/open-sse/config/providerRegistry.ts+++ b/open-sse/config/providerRegistry.ts@@ -4251,6 +4251,28 @@ const _REGISTRY_EAGER: Record<string, RegistryEntry> = {],},+ // #3877: byteplus was in the APIKEY_PROVIDERS catalog but never registered here, so key+ // validation fell through to {unsupported:true} → the UI reported every key "invalid".+ // BytePlus ModelArk is an OpenAI-compatible surface (region ap-southeast-1) authed with a+ // Bearer ark-... key — same shape as the volcengine (Volcengine Ark) entry, different host.+ byteplus: {+ id: "byteplus",+ alias: "bpm",+ format: "openai",+ executor: "default",+ baseUrl: "https://ark.ap-southeast.bytepluses.com/api/v3/chat/completions",+ modelsUrl: "https://ark.ap-southeast.bytepluses.com/api/v3/models",+ authType: "apikey",+ authHeader: "bearer",+ defaultContextLength: 128000,+ models: [+ { id: "seed-2.0", name: "Seed 2.0" },+ { id: "kimi-k2-thinking", name: "Kimi K2 Thinking", supportsReasoning: true },+ { id: "glm-4.7", name: "GLM 4.7" },+ { id: "gpt-oss-120b", name: "GPT-OSS-120B" },+ ],+ },+bluesminds: {id: "bluesminds",alias: "bm",@@ -4440,15 +4462,16 @@ const _REGISTRY_EAGER: Record<string, RegistryEntry> = {baseUrls: ["https://theoldllm.vercel.app/api/chatgpt"],authType: "none",authHeader: "none",+ defaultContextLength: 200000,models: [- { id: "GPT_5_4", name: "GPT-5.4 (The Old LLM 🆓)" },+ { id: "GPT_5_4", name: "GPT-5.4 (The Old LLM 🆓)", contextLength: 400000 },{ id: "GPT_4o", name: "GPT-4o (The Old LLM 🆓)" },- { id: "claude_opus_4", name: "Claude Opus 4 (The Old LLM 🆓)" },- { id: "claude_sonnet_4", name: "Claude Sonnet 4 (The Old LLM 🆓)" },- { id: "claude_haiku_3_5", name: "Claude Haiku 3.5 (The Old LLM 🆓)" },- { id: "deepseek_v4", name: "DeepSeek V4 (The Old LLM 🆓)" },- { id: "gemini_3_flash", name: "Gemini 3 Flash (The Old LLM 🆓)" },- { id: "gemini_3_pro", name: "Gemini 3 Pro (The Old LLM 🆓)" },+ { id: "claude_opus_4", name: "Claude Opus 4 (The Old LLM 🆓)", contextLength: 200000 },+ { id: "claude_sonnet_4", name: "Claude Sonnet 4 (The Old LLM 🆓)", contextLength: 200000 },+ { id: "claude_haiku_3_5", name: "Claude Haiku 3.5 (The Old LLM 🆓)", contextLength: 200000 },+ { id: "deepseek_v4", name: "DeepSeek V4 (The Old LLM 🆓)", contextLength: 200000 },+ { id: "gemini_3_flash", name: "Gemini 3 Flash (The Old LLM 🆓)", contextLength: 1000000 },+ { id: "gemini_3_pro", name: "Gemini 3 Pro (The Old LLM 🆓)", contextLength: 1000000 },],passthroughModels: true,},@@ -4531,7 +4554,12 @@ export function generateModels(): Record<string, RegistryModel[]> {for (const entry of Object.values(_REGISTRY_EAGER)) {if (entry.models && entry.models.length > 0) {const key = entry.alias || entry.id;- // If alias already exists, don't overwrite (first wins)+ // If alias already exists, don't overwrite (first wins).+ // Keyed ONLY by the public alias — these keys ARE the /v1/models prefixes and+ // the routing namespace, so a raw provider id must NOT be added here: it would+ // surface a phantom prefix in the catalog and collide with another provider's+ // route (e.g. id "opencode" vs the "opencode/" → opencode-zen route, #2798/#3870).+ // Lookup by raw id is handled in getProviderModels() via the alias map instead.if (!models[key]) {models[key] = entry.models;}diff --git a/open-sse/config/videoRegistry.ts b/open-sse/config/videoRegistry.tsindex 6e65e5adfb..12d0c8cbc3 100644--- a/open-sse/config/videoRegistry.ts+++ b/open-sse/config/videoRegistry.ts@@ -26,6 +26,19 @@ interface VideoProvider {}export const VIDEO_PROVIDERS: Record<string, VideoProvider> = {+ vertex: {+ id: "vertex",+ baseUrl: "https://us-central1-aiplatform.googleapis.com/v1",+ authType: "apikey",+ authHeader: "bearer",+ format: "vertex-veo",+ models: [+ { id: "veo-3.0-generate-001", name: "Veo 3.0 (Vertex)" },+ { id: "veo-3.0-fast-generate-001", name: "Veo 3.0 Fast (Vertex)" },+ { id: "veo-2.0-generate-001", name: "Veo 2.0 (Vertex)" },+ ],+ },+kie: {id: "kie",baseUrl: "https://api.kie.ai",diff --git a/open-sse/executors/default.ts b/open-sse/executors/default.tsindex 2ec6fbd6b3..2a7fd968b2 100644--- a/open-sse/executors/default.ts+++ b/open-sse/executors/default.ts@@ -30,6 +30,7 @@ import { buildSapChatUrl, getSapResourceGroup } from "../config/sap.ts";import { buildMaritalkChatUrl } from "../config/maritalk.ts";import { LOCAL_PROVIDERS } from "@/shared/constants/providers";import { isForbiddenCustomHeaderName } from "@/shared/constants/upstreamHeaders";+import { getClaudeCodeCompatibleRequestDefaults } from "@/lib/providers/requestDefaults";import type { PoolConfig } from "../services/sessionPool/types.ts";@@ -151,6 +152,14 @@ function normalizeOpenAIChatUrl(baseUrl) {return `${normalized}/v1/chat/completions`;}+function getOpenRouterConnectionPreset(+ providerSpecificData?: Record<string, unknown> | null+): string | null {+ const preset =+ typeof providerSpecificData?.preset === "string" ? providerSpecificData.preset.trim() : "";+ return preset || null;+}+export class DefaultExecutor extends BaseExecutor {constructor(provider) {super(provider, PROVIDERS[provider] || PROVIDERS.openai);@@ -423,10 +432,14 @@ export class DefaultExecutor extends BaseExecutor {break;default:if (isClaudeCodeCompatible(this.provider)) {+ const ccRequestDefaults = getClaudeCodeCompatibleRequestDefaults(+ credentials?.providerSpecificData+ );const ccHeaders = buildClaudeCodeCompatibleHeaders(effectiveKey || credentials.accessToken || "",stream,- credentials?.providerSpecificData?.ccSessionId+ credentials?.providerSpecificData?.ccSessionId,+ { redactThinking: ccRequestDefaults.redactThinking === true });// CC nodes are also anthropic-compatible-*, so honor operator custom// headers here (the early return skips the shared block below).@@ -564,6 +577,16 @@ export class DefaultExecutor extends BaseExecutor {}}}++ if (this.provider === "openrouter") {+ const connectionPreset = getOpenRouterConnectionPreset(credentials?.providerSpecificData);+ if (connectionPreset && (withDefaults as Record<string, unknown>).preset === undefined) {+ withDefaults = {+ ...(withDefaults as Record<string, unknown>),+ preset: connectionPreset,+ };+ }+ }}if (this.provider === "qwen" && typeof withDefaults === "object" && withDefaults !== null) {diff --git a/open-sse/executors/glm.ts b/open-sse/executors/glm.tsindex 6e78ead8db..f83c6ae260 100644--- a/open-sse/executors/glm.ts+++ b/open-sse/executors/glm.ts@@ -50,6 +50,19 @@ function getEffectiveKey(credentials: ProviderCredentials): string {return credentials.apiKey || credentials.accessToken || "";}+/**+ * GLM-5.2 effort tiers route exclusively through the Anthropic transport,+ * where Zhipu maps Claude Code effort selectors (high/max) to reasoning+ * intensity. The base model ID sent upstream is always "glm-5.2".+ *+ * https://docs.z.ai/devpack/latest-model+ */+function parseGlm52Effort(model: string): { baseModel: string; effort: "high" | "max" } | null {+ if (model === "glm-5.2-high") return { baseModel: "glm-5.2", effort: "high" };+ if (model === "glm-5.2-max") return { baseModel: "glm-5.2", effort: "max" };+ return null;+}+function applyGlmRequestDefaults(body: unknown, defaults?: JsonRecord | null): unknown {const record = asRecord(body);if (!record || !defaults) return body;@@ -228,27 +241,61 @@ export class GlmExecutor extends DefaultExecutor {credentials: ProviderCredentials,transport: GlmTransport) {- const transformed = this.transformRequest(model, body, stream, credentials);+ const effortTier = parseGlm52Effort(model);+ const effectiveModel = effortTier ? effortTier.baseModel : model;++ const transformed = this.transformRequest(effectiveModel, body, stream, credentials);+ const record = asRecord(transformed);++ // Ensure upstream receives the base model ID, not the effort-suffixed alias+ if (record && effortTier) {+ record.model = effectiveModel;+ }if (transport === "openai") {- const record = asRecord(transformed);if (record && stream && hasTools(record) && record.tool_stream === undefined) {return { ...record, tool_stream: true };}return transformed;}- return translateRequest(+ const translated = translateRequest(FORMATS.OPENAI,FORMATS.CLAUDE,- model,- { ...(transformed as JsonRecord), _disableToolPrefix: true },+ effectiveModel,+ { ...(record ?? {}), _disableToolPrefix: true },stream,credentials,this.provider,null,{ preserveCacheControl: false });++ // Inject effort and thinking for the Anthropic transport.+ // Zhipu's Anthropic endpoint requires thinking.type=enabled to emit+ // thinking_delta blocks in the SSE response. Without it, reasoning is+ // not surfaced and clients see no thinking content.+ // The effort-2025-11-24 beta header (in GLM_ANTHROPIC_BETA) carries+ // the high/max intensity selector.+ if (effortTier) {+ const translatedRecord = asRecord(translated);+ if (translatedRecord) {+ translatedRecord.effort = effortTier.effort;+ // Zhipu's Anthropic endpoint only supports thinking.type+ // "enabled"/"disabled" — not "adaptive". Clients like Claude Code+ // default to "adaptive" for reasoning models, so force "enabled"+ // here while preserving any other fields (e.g. budget_tokens).+ const existingThinking = asRecord(translatedRecord.thinking);+ if (!existingThinking || existingThinking.type !== "enabled") {+ translatedRecord.thinking = {+ ...existingThinking,+ type: "enabled",+ };+ }+ }+ }++ return translated;}private async executeTransport(@@ -343,6 +390,15 @@ export class GlmExecutor extends DefaultExecutor {}async execute(input: ExecuteInput): Promise<GlmExecuteResult> {+ const effortTier = parseGlm52Effort(input.model);++ // GLM-5.2 effort tiers route directly through Anthropic transport (no fallback).+ // Zhipu only graduates effort on the Anthropic endpoint via the+ // effort-2025-11-24 beta header included in GLM_ANTHROPIC_BETA.+ if (effortTier) {+ return this.executeTransport(input, "anthropic");+ }+const primaryTransport = getGlmTransport(input.credentials.providerSpecificData,this.config.baseUrldiff --git a/open-sse/executors/perplexity-web.ts b/open-sse/executors/perplexity-web.tsindex bca64552ae..fbf9a53836 100644--- a/open-sse/executors/perplexity-web.ts+++ b/open-sse/executors/perplexity-web.ts@@ -17,7 +17,43 @@ import { prepareToolMessages, buildToolAwareResult } from "../translator/webToolimport { sanitizeErrorMessage } from "../utils/error.ts";const PPLX_SSE_ENDPOINT = "https://www.perplexity.ai/rest/sse/perplexity_ask";-const PPLX_API_VERSION = "client-1.11.0";+// Perplexity's current request schema version (sent in params.version). Perplexity rejects+// stale versions with HTTP 400 — keep this in lockstep with the website's payload.+const PPLX_API_VERSION = "2.18";+// Block use-cases the current web client advertises. The schematized API (use_schematized_api)+// validates the request shape, so this must be present (mirrors the browser request body).+const PPLX_SUPPORTED_BLOCK_USE_CASES = [+ "answer_modes",+ "media_items",+ "knowledge_cards",+ "inline_entity_cards",+ "place_widgets",+ "finance_widgets",+ "sports_widgets",+ "news_widgets",+ "shopping_widgets",+ "jobs_widgets",+ "search_result_widgets",+ "inline_images",+ "inline_assets",+ "placeholder_cards",+ "diff_blocks",+ "inline_knowledge_cards",+ "entity_group_v2",+ "refinement_filters",+ "canvas_mode",+ "maps_preview",+ "answer_tabs",+ "price_comparison_widgets",+ "preserve_latex",+ "generic_onboarding_widgets",+ "in_context_suggestions",+ "pending_followups",+ "inline_claims",+ "unified_assets",+ "workflow_steps",+ "background_agents",+];// Firefox 148 — must match the `firefox_148` TLS profile used by perplexityTlsClient.// A mismatched UA vs TLS fingerprint is itself a Cloudflare bot signal (issue #2459).const PPLX_USER_AGENT =@@ -268,31 +304,61 @@ function parseOpenAIMessages(messages: Array<Record<string, unknown>>): ParsedMefunction buildPplxRequestBody(query: string,+ dslQuery: string,mode: string,modelPref: string,- followUpUuid: string | null+ followUpUuid: string | null,+ requestId: string): Record<string, unknown> {const tz = typeof Intl !== "undefined" ? Intl.DateTimeFormat().resolvedOptions().timeZone : "UTC";+ // Mirrors the current www.perplexity.ai/rest/sse/perplexity_ask request body. Perplexity's+ // schematized API validates this shape; an outdated version or missing required fields → HTTP 400.+ const params: Record<string, unknown> = {+ attachments: [],+ language: "en-US",+ timezone: tz,+ search_focus: "internet",+ sources: ["web"],+ frontend_uuid: requestId,+ mode,+ model_preference: modelPref,+ is_related_query: false,+ is_sponsored: false,+ frontend_context_uuid: crypto.randomUUID(),+ prompt_source: "user",+ query_source: "home",+ is_incognito: true,+ local_search_enabled: false,+ use_schematized_api: true,+ send_back_text_in_streaming_api: false,+ supported_block_use_cases: PPLX_SUPPORTED_BLOCK_USE_CASES,+ client_coordinates: null,+ mentions: [],+ dsl_query: dslQuery && dslQuery.trim() ? dslQuery : query,+ skip_search_enabled: true,+ is_nav_suggestions_disabled: false,+ source: "default",+ always_search_override: false,+ override_no_search: false,+ client_search_results_cache_key: requestId,+ should_ask_for_mcp_tool_confirmation: true,+ browser_agent_allow_once_from_toggle: false,+ force_enable_browser_agent: false,+ supported_features: ["browser_agent_permission_banner_v1.1"],+ extended_context: false,+ version: PPLX_API_VERSION,+ rum_session_id: crypto.randomUUID(),+ };++ // Only present on follow-ups (matches the browser, which omits it for a fresh query).+ if (followUpUuid) {+ params.last_backend_uuid = followUpUuid;+ }+return {query_str: query,- params: {- query_str: query,- search_focus: "internet",- mode,- model_preference: modelPref,- sources: ["web"],- attachments: [],- frontend_uuid: crypto.randomUUID(),- frontend_context_uuid: crypto.randomUUID(),- version: PPLX_API_VERSION,- language: "en-US",- timezone: tz,- search_recency_filter: null,- is_incognito: true,- use_schematized_api: true,- last_backend_uuid: followUpUuid,- },+ params,};}@@ -713,7 +779,8 @@ export class PerplexityWebExecutor extends BaseExecutor {}// Build Perplexity request- const pplxBody = buildPplxRequestBody(query, pplxMode, modelPref, followUpUuid);+ const requestId = crypto.randomUUID();+ const pplxBody = buildPplxRequestBody(query, parsed.currentMsg, pplxMode, modelPref, followUpUuid, requestId);const headers: Record<string, string> = {"Content-Type": "application/json",@@ -721,8 +788,12 @@ export class PerplexityWebExecutor extends BaseExecutor {Origin: "https://www.perplexity.ai",Referer: "https://www.perplexity.ai/","User-Agent": PPLX_USER_AGENT,- "X-App-ApiClient": "default",- "X-App-ApiVersion": PPLX_API_VERSION,+ // Current app request headers (replaced the stale X-App-ApiVersion/X-App-ApiClient pair,+ // which the new endpoint no longer expects and which contributed to HTTP 400).+ "x-perplexity-request-endpoint": PPLX_SSE_ENDPOINT,+ "x-perplexity-request-reason": "ask-query-state-provider",+ "x-perplexity-request-try-number": "1",+ "x-request-id": requestId,};if (credentials.accessToken) {diff --git a/open-sse/executors/vertex.ts b/open-sse/executors/vertex.tsindex 02994026d0..4ca1a1ab05 100644--- a/open-sse/executors/vertex.ts+++ b/open-sse/executors/vertex.ts@@ -13,6 +13,18 @@ interface ServiceAccount {const TOKEN_CACHE = new Map<string, { token: string; expiresAt: number }>();+// OAuth scopes minted into the Vertex SA access token.+// - cloud-platform authorizes Vertex AI (aiplatform.googleapis.com) for chat/image execution.+// - generative-language.retriever is ADDITIONALLY required so model discovery can list the live+// catalog from generativelanguage.googleapis.com/v1beta/models — without it that listing returns+// 403 ACCESS_TOKEN_SCOPE_INSUFFICIENT and discovery silently falls back to the static ~10-model+// registry list. The extra scope is harmless for execution (cloud-platform still present) and for+// projects where it isn't needed (the mint never validates scope availability).+export const VERTEX_OAUTH_SCOPES = [+ "https://www.googleapis.com/auth/cloud-platform",+ "https://www.googleapis.com/auth/generative-language.retriever",+] as const;+export function parseSAFromApiKey(apiKey: string): ServiceAccount {try {return JSON.parse(apiKey);@@ -67,7 +79,7 @@ export async function getAccessToken(sa: ServiceAccount): Promise<string> {aud: "https://oauth2.googleapis.com/token",iat: now,exp: now + 3600,- scope: "https://www.googleapis.com/auth/cloud-platform",+ scope: VERTEX_OAUTH_SCOPES.join(" "),}).setProtectedHeader({ alg: "RS256", kid: sa.private_key_id }).sign(privateKey);diff --git a/open-sse/executors/vertexMedia.ts b/open-sse/executors/vertexMedia.tsnew file mode 100644index 0000000000..278230c1e1--- /dev/null+++ b/open-sse/executors/vertexMedia.ts@@ -0,0 +1,341 @@+/**+ * Vertex AI media generation client.+ *+ * Google's Vertex AI serves speech (Gemini TTS), transcription (Gemini), music+ * (Lyria) and video (Veo) — but through the same `aiplatform.googleapis.com`+ * surface that the chat executor authenticates against, NOT through the+ * third-party media registries (kie/suno/deepgram/…). This module reuses the+ * Vertex chat executor's auth (Service Account JSON → OAuth bearer, or Express+ * API key) and implements the verified per-model contracts:+ *+ * - Speech: `{model}:generateContent` + responseModalities:["AUDIO"] → PCM L16 → WAV+ * - Transcription: `{model}:generateContent` with inline audio + text prompt → text+ * - Music (Lyria): `{model}:predict` → predictions[0].bytesBase64Encoded (WAV)+ * - Video (Veo): `{model}:predictLongRunning` → poll `{model}:fetchPredictOperation`+ * → response.videos[0].bytesBase64Encoded (MP4)+ */++import { Buffer } from "node:buffer";+import { sleep } from "../utils/sleep.ts";+import {+ parseSAFromApiKey,+ getAccessToken,+ looksLikeServiceAccountJson,+ isExpressApiKey,+} from "./vertex.ts";++export interface VertexMediaCredentials {+ apiKey?: string | null;+ accessToken?: string | null;+ providerSpecificData?: Record<string, unknown> | null;+}++interface ResolvedVertexAuth {+ project: string;+ region: string;+ bearerToken: string | null;+ expressKey: string | null;+}++const DEFAULT_REGION = "us-central1";++function resolveRegion(credentials: VertexMediaCredentials | null | undefined): string {+ const psd = credentials?.providerSpecificData;+ if (psd && typeof psd === "object") {+ const region = (psd as Record<string, unknown>).region;+ if (typeof region === "string" && region.trim().length > 0) return region.trim();+ }+ return DEFAULT_REGION;+}++async function resolveVertexAuth(+ credentials: VertexMediaCredentials | null | undefined+): Promise<ResolvedVertexAuth> {+ const apiKey = typeof credentials?.apiKey === "string" ? credentials.apiKey.trim() : "";+ const region = resolveRegion(credentials);+ let bearerToken =+ typeof credentials?.accessToken === "string" && credentials.accessToken.trim().length > 0+ ? credentials.accessToken.trim()+ : null;+ let project = "";+ let expressKey: string | null = null;++ if (looksLikeServiceAccountJson(apiKey)) {+ const sa = parseSAFromApiKey(apiKey);+ project = typeof sa.project_id === "string" ? sa.project_id : "";+ if (!bearerToken) bearerToken = await getAccessToken(sa);+ } else if (isExpressApiKey(apiKey)) {+ expressKey = apiKey;+ }++ return { project, region, bearerToken, expressKey };+}++/**+ * Build the request URL + headers for a Vertex publisher-model action.+ * SA path → project-scoped regional endpoint + Bearer auth.+ * Express path (best-effort) → project-less global publisher endpoint + ?key=.+ */+function buildModelRequest(+ auth: ResolvedVertexAuth,+ model: string,+ action: string+): { url: string; headers: Record<string, string> } {+ const headers: Record<string, string> = { "Content-Type": "application/json" };++ if (auth.bearerToken && auth.project) {+ headers["Authorization"] = `Bearer ${auth.bearerToken}`;+ return {+ url: `https://${auth.region}-aiplatform.googleapis.com/v1/projects/${auth.project}/locations/${auth.region}/publishers/google/models/${model}:${action}`,+ headers,+ };+ }++ if (auth.expressKey) {+ return {+ url: `https://aiplatform.googleapis.com/v1/publishers/google/models/${model}:${action}?key=${encodeURIComponent(+ auth.expressKey+ )}`,+ headers,+ };+ }++ throw new Error(+ "Vertex AI requires a Service Account JSON (with project_id) or a Vertex AI Express API key"+ );+}++interface VertexHttpError extends Error {+ status?: number;+}++async function vertexError(res: Response): Promise<VertexHttpError> {+ let detail = "";+ try {+ detail = await res.text();+ } catch {+ /* ignore */+ }+ let message = `Vertex AI error (${res.status})`;+ if (detail) {+ try {+ const parsed = JSON.parse(detail);+ message = parsed?.error?.message || message;+ } catch {+ message = detail.slice(0, 300);+ }+ }+ const err = new Error(message) as VertexHttpError;+ err.status = res.status;+ return err;+}++/** Wrap raw little-endian 16-bit PCM mono samples in a minimal WAV container. */+export function pcmToWav(pcm: Buffer, sampleRate = 24000, channels = 1, bitsPerSample = 16): Buffer {+ const blockAlign = (channels * bitsPerSample) / 8;+ const byteRate = sampleRate * blockAlign;+ const header = Buffer.alloc(44);+ header.write("RIFF", 0);+ header.writeUInt32LE(36 + pcm.length, 4);+ header.write("WAVE", 8);+ header.write("fmt ", 12);+ header.writeUInt32LE(16, 16);+ header.writeUInt16LE(1, 20); // PCM+ header.writeUInt16LE(channels, 22);+ header.writeUInt32LE(sampleRate, 24);+ header.writeUInt32LE(byteRate, 28);+ header.writeUInt16LE(blockAlign, 32);+ header.writeUInt16LE(bitsPerSample, 34);+ header.write("data", 36);+ header.writeUInt32LE(pcm.length, 40);+ return Buffer.concat([header, pcm]);+}++function parseSampleRate(mimeType: string | undefined): number {+ if (!mimeType) return 24000;+ const match = /rate=(\d+)/i.exec(mimeType);+ return match ? parseInt(match[1], 10) : 24000;+}++function extractInlineAudio(+ data: unknown+): { base64: string; mimeType: string } | null {+ const parts = (data as { candidates?: Array<{ content?: { parts?: unknown[] } }> })?.candidates?.[0]+ ?.content?.parts;+ if (!Array.isArray(parts)) return null;+ for (const part of parts) {+ const inline = (part as { inlineData?: { data?: unknown; mimeType?: unknown } })?.inlineData;+ if (inline && typeof inline.data === "string" && inline.data.length > 0) {+ return {+ base64: inline.data,+ mimeType: typeof inline.mimeType === "string" ? inline.mimeType : "audio/L16;rate=24000",+ };+ }+ }+ return null;+}++function extractText(data: unknown): string {+ const parts = (data as { candidates?: Array<{ content?: { parts?: unknown[] } }> })?.candidates?.[0]+ ?.content?.parts;+ if (!Array.isArray(parts)) return "";+ return parts+ .map((part) => (part as { text?: unknown })?.text)+ .filter((text): text is string => typeof text === "string")+ .join("")+ .trim();+}++/** Gemini TTS → WAV audio buffer. */+export async function vertexGenerateSpeech(+ credentials: VertexMediaCredentials,+ options: { model: string; input: string; voice?: string }+): Promise<{ audio: Buffer; contentType: string }> {+ const auth = await resolveVertexAuth(credentials);+ const { url, headers } = buildModelRequest(auth, options.model, "generateContent");+ const payload = {+ contents: [{ role: "user", parts: [{ text: options.input }] }],+ generationConfig: {+ responseModalities: ["AUDIO"],+ speechConfig: {+ voiceConfig: {+ prebuiltVoiceConfig: { voiceName: options.voice && options.voice.trim() ? options.voice.trim() : "Kore" },+ },+ },+ },+ };+ const res = await fetch(url, { method: "POST", headers, body: JSON.stringify(payload) });+ if (!res.ok) throw await vertexError(res);+ const data = await res.json();+ const inline = extractInlineAudio(data);+ if (!inline) throw new Error("Vertex TTS returned no audio content");+ const pcm = Buffer.from(inline.base64, "base64");+ return { audio: pcmToWav(pcm, parseSampleRate(inline.mimeType)), contentType: "audio/wav" };+}++/** Gemini transcription (audio → text). `audioBase64` is the raw file bytes, base64-encoded. */+export async function vertexTranscribe(+ credentials: VertexMediaCredentials,+ options: { model: string; audioBase64: string; mimeType?: string; prompt?: string; language?: string }+): Promise<string> {+ const auth = await resolveVertexAuth(credentials);+ const { url, headers } = buildModelRequest(auth, options.model, "generateContent");+ const instruction =+ options.prompt && options.prompt.trim().length > 0+ ? options.prompt.trim()+ : `Transcribe this audio verbatim. Output only the spoken words${+ options.language ? ` (language: ${options.language})` : ""+ }, with no commentary.`;+ const payload = {+ contents: [+ {+ role: "user",+ parts: [+ { text: instruction },+ { inlineData: { mimeType: options.mimeType || "audio/wav", data: options.audioBase64 } },+ ],+ },+ ],+ };+ const res = await fetch(url, { method: "POST", headers, body: JSON.stringify(payload) });+ if (!res.ok) throw await vertexError(res);+ return extractText(await res.json());+}++/** Lyria music generation → { base64 WAV, format }. */+export async function vertexGenerateMusic(+ credentials: VertexMediaCredentials,+ options: { model?: string; prompt: string; negativePrompt?: string; sampleCount?: number; seed?: number }+): Promise<{ base64: string; format: string }> {+ const auth = await resolveVertexAuth(credentials);+ const model = options.model && options.model.trim() ? options.model.trim() : "lyria-002";+ const { url, headers } = buildModelRequest(auth, model, "predict");+ const instance: Record<string, unknown> = { prompt: options.prompt };+ if (options.negativePrompt) instance.negative_prompt = options.negativePrompt;+ if (typeof options.seed === "number") instance.seed = options.seed;+ const parameters: Record<string, unknown> = {};+ if (typeof options.sampleCount === "number") parameters.sample_count = options.sampleCount;+ const res = await fetch(url, {+ method: "POST",+ headers,+ body: JSON.stringify({ instances: [instance], parameters }),+ });+ if (!res.ok) throw await vertexError(res);+ const data = await res.json();+ const base64 = (data as { predictions?: Array<{ bytesBase64Encoded?: unknown }> })?.predictions?.[0]+ ?.bytesBase64Encoded;+ if (typeof base64 !== "string" || base64.length === 0) {+ throw new Error("Vertex Lyria returned no audio");+ }+ return { base64, format: "wav" };+}++/** Veo video generation (async long-running) → { base64 MP4 or gcsUri, format }. */+export async function vertexGenerateVideo(+ credentials: VertexMediaCredentials,+ options: {+ model: string;+ prompt: string;+ aspectRatio?: string;+ durationSeconds?: number;+ sampleCount?: number;+ negativePrompt?: string;+ image?: { bytesBase64Encoded: string; mimeType: string };+ pollIntervalMs?: number;+ maxWaitMs?: number;+ }+): Promise<{ base64?: string; url?: string; format: string }> {+ const auth = await resolveVertexAuth(credentials);+ const submit = buildModelRequest(auth, options.model, "predictLongRunning");++ const instance: Record<string, unknown> = { prompt: options.prompt };+ if (options.image) instance.image = options.image;+ const parameters: Record<string, unknown> = {+ sampleCount: typeof options.sampleCount === "number" ? options.sampleCount : 1,+ };+ if (options.aspectRatio) parameters.aspectRatio = options.aspectRatio;+ if (typeof options.durationSeconds === "number") parameters.durationSeconds = options.durationSeconds;+ if (options.negativePrompt) parameters.negativePrompt = options.negativePrompt;++ const submitRes = await fetch(submit.url, {+ method: "POST",+ headers: submit.headers,+ body: JSON.stringify({ instances: [instance], parameters }),+ });+ if (!submitRes.ok) throw await vertexError(submitRes);+ const op = await submitRes.json();+ const operationName = (op as { name?: unknown })?.name;+ if (typeof operationName !== "string" || operationName.length === 0) {+ throw new Error("Vertex Veo did not return an operation name");+ }++ const poll = buildModelRequest(auth, options.model, "fetchPredictOperation");+ const intervalMs = options.pollIntervalMs && options.pollIntervalMs > 0 ? options.pollIntervalMs : 10000;+ const maxWaitMs = options.maxWaitMs && options.maxWaitMs > 0 ? options.maxWaitMs : 5 * 60 * 1000;+ const deadline = Date.now() + maxWaitMs;++ while (Date.now() < deadline) {+ await sleep(intervalMs);+ const pollRes = await fetch(poll.url, {+ method: "POST",+ headers: poll.headers,+ body: JSON.stringify({ operationName }),+ });+ if (!pollRes.ok) throw await vertexError(pollRes);+ const pollData = await pollRes.json();+ if ((pollData as { done?: unknown })?.done) {+ const opError = (pollData as { error?: { message?: unknown } })?.error;+ if (opError) throw new Error(String(opError.message || "Veo operation failed"));+ const videos = (pollData as { response?: { videos?: unknown } })?.response?.videos;+ const video = Array.isArray(videos) ? (videos[0] as Record<string, unknown>) : null;+ if (video && typeof video.bytesBase64Encoded === "string") {+ return { base64: video.bytesBase64Encoded, format: "mp4" };+ }+ if (video && typeof video.gcsUri === "string") {+ return { url: video.gcsUri, format: "mp4" };+ }+ throw new Error("Veo operation completed but returned no video");+ }+ }+ throw new Error("Vertex Veo video generation timed out");+}diff --git a/open-sse/handlers/audioSpeech.ts b/open-sse/handlers/audioSpeech.tsindex ffa2542aa8..1034349016 100644--- a/open-sse/handlers/audioSpeech.ts+++ b/open-sse/handlers/audioSpeech.ts@@ -21,6 +21,7 @@ import { stripTrailingSlashes } from "../utils/urlSanitize.ts";import { getSpeechProvider, parseSpeechModel } from "../config/audioRegistry.ts";import { buildAuthHeaders } from "../config/registryUtils.ts";import { kieExecutor } from "../executors/kie.ts";+import { vertexGenerateSpeech } from "../executors/vertexMedia.ts";import { errorResponse } from "../utils/error.ts";import {getKieCallbackUrl,@@ -872,6 +873,18 @@ export async function handleAudioSpeech({try {// Route to provider-specific handler+ if (providerConfig.format === "vertex-gemini-tts") {+ const { audio, contentType } = await vertexGenerateSpeech(credentials, {+ model: modelId,+ input: body.input,+ voice: body.voice,+ });+ return new Response(audio, {+ status: 200,+ headers: { ...CORS_HEADERS, "Content-Type": contentType },+ });+ }+if (providerConfig.format === "hyperbolic") {return handleHyperbolicSpeech(providerConfig, body, token);}diff --git a/open-sse/handlers/audioTranscription.ts b/open-sse/handlers/audioTranscription.tsindex b33ce44c60..af443427c8 100644--- a/open-sse/handlers/audioTranscription.ts+++ b/open-sse/handlers/audioTranscription.ts@@ -21,6 +21,7 @@ import {} from "../config/audioRegistry.ts";import { buildAuthHeaders } from "../config/registryUtils.ts";import { kieExecutor } from "../executors/kie.ts";+import { vertexTranscribe } from "../executors/vertexMedia.ts";import { errorResponse } from "../utils/error.ts";type TranscriptionCredentials = {@@ -462,6 +463,32 @@ export async function handleAudioTranscription({}// Route to provider-specific handler+ if (providerConfig.format === "vertex-gemini") {+ try {+ const buffer = Buffer.from(await file.arrayBuffer());+ const uploadedType =+ typeof (file as { type?: unknown }).type === "string" && (file as { type?: string }).type+ ? (file as { type: string }).type+ : "audio/wav";+ const languageValue = formData.get("language");+ const promptValue = formData.get("prompt");+ const text = await vertexTranscribe(credentials ?? {}, {+ model: modelId as string,+ audioBase64: buffer.toString("base64"),+ mimeType: uploadedType,+ prompt: typeof promptValue === "string" ? promptValue : undefined,+ language: typeof languageValue === "string" ? languageValue : undefined,+ });+ return Response.json({ text }, { headers: { ...CORS_HEADERS } });+ } catch (err) {+ const error = err as { message?: string; status?: number };+ return errorResponse(+ typeof error?.status === "number" ? error.status : 500,+ `Vertex transcription failed: ${error?.message || "unknown error"}`+ );+ }+ }+if (providerConfig.format === "deepgram") {return handleDeepgramTranscription(providerConfig, file, modelId, token, formData);}diff --git a/open-sse/handlers/chatCore.ts b/open-sse/handlers/chatCore.tsindex bfe6846f44..25488919fa 100644--- a/open-sse/handlers/chatCore.ts+++ b/open-sse/handlers/chatCore.ts@@ -20,6 +20,7 @@ import { ensureStreamReadiness } from "../utils/streamReadiness.ts";import { synthesizeOpenAiSseFromJson } from "../utils/jsonToSse.ts";import { resolveStreamReadinessTimeout } from "../utils/streamReadinessPolicy.ts";import { createStreamController, pipeWithDisconnect } from "../utils/streamHandler.ts";+import * as streamFailure from "../utils/streamFailureFinalization.ts";import { createSseHeartbeatTransform, shapeForClientFormat } from "../utils/sseHeartbeat.ts";import { addBufferToUsage, filterUsageForFormat, estimateUsage } from "../utils/usageTracking.ts";import {@@ -295,7 +296,6 @@ function cloneBoundedChatLogPayload(value: unknown, depth = 0): unknown {}import { estimateSizeFast, isSmallEnoughForSemanticCache } from "../utils/estimateSize.ts";-import { finalizeMostRecentPendingRequest } from "@/lib/usage/usageHistory.ts";const MAX_LOG_BODY_CHARS = 8 * 1024; // 8KB cap for logged request/response bodies/**@@ -2131,7 +2131,9 @@ export async function handleChatCore({});}- const pipelinePayloads = detailedLoggingEnabled ? reqLogger?.getPipelinePayloads?.() : null;+ const pipelinePayloads = detailedLoggingEnabled+ ? (reqLogger?.getPipelinePayloads?.() ?? {})+ : null;if (pipelinePayloads) {if (providerRequest !== undefined && !pipelinePayloads.providerRequest) {@@ -2300,13 +2302,11 @@ export async function handleChatCore({setGeminiThoughtSignatureMode(settings.antigravitySignatureCacheMode);const semanticCacheEnabled = settings.semanticCacheEnabled !== false;- // Create request logger for this session: sourceFormat_targetFormat_modelconst reqLogger = await createRequestLogger(sourceFormat, targetFormat, model, {enabled: detailedLoggingEnabled,captureStreamChunks: capturePipelineStreamChunks,maxStreamChunkBytes: getCallLogPipelineMaxSizeBytes(),- // Provide model/provider/connectionId so streamChunks can be attached to the- // in-memory pending request record before final call-log persistence.+ requestId: pendingRequestId,model,provider: provider || undefined,connectionId: connectionId || credentials?.connectionId || undefined,@@ -2388,7 +2388,7 @@ export async function handleChatCore({// --- Modular Compression Pipeline (Phase 1 Lite + Phase 2 Standard/Caveman + Phase 3 Aggressive) ---// Runs BEFORE the existing reactive compressContext() to proactively reduce tokens.try {- const { selectCompressionStrategy, applyCompressionAsync } =+ const { selectCompressionStrategy, applyCompressionAsync, resolveCacheAwareConfig } =await import("../services/compression/strategySelector.ts");const { trackCompressionStats } = await import("../services/compression/stats.ts");let config: CompressionConfig = compressionSettings ?? {@@ -2626,9 +2626,17 @@ export async function handleChatCore({);let compressionAnalyticsRecorded = false;if (mode !== "off") {+ // #3890: in a caching context, never compress the system prompt (cacheable prefix)+ // even if the operator disabled preserveSystemPrompt — honors the cache-aware flag+ // that selectCompressionStrategy can only partially apply via the mode string.+ const compressionConfig = resolveCacheAwareConfig(config, compressionInputBody, {+ provider,+ targetFormat,+ model: effectiveModel,+ });const result = await applyCompressionAsync(compressionInputBody, mode, {model: effectiveModel,- config,+ config: compressionConfig,principalId: apiKeyInfo?.id ? String(apiKeyInfo.id) : undefined,});if (result.stats) {@@ -3677,9 +3685,12 @@ export async function handleChatCore({};};+ let onPipelineStreamError: streamFailure.PipelineStreamErrorHandler | null = null;+// Create stream controller for disconnect detectionconst streamController = createStreamController({onDisconnect,+ onError: (event) => onPipelineStreamError?.(event),provider,model,connectionId,@@ -5484,6 +5495,8 @@ export async function handleChatCore({(finalBody as Record<string, unknown> | null | undefined) ?? null);+ let streamFailureCompletionRecorded = false;+// Callback to save call log when stream completes (include responseBody when provided by stream)const onStreamComplete = ({status: streamStatus,@@ -5491,11 +5504,18 @@ export async function handleChatCore({responseBody: streamResponseBody,providerPayload,clientPayload,+ error: streamError,+ errorCode: streamErrorCode,ttft,}) => {+ const normalizedStreamStatus = streamStatus || 200;+ if (normalizedStreamStatus !== 200) {+ if (streamFailureCompletionRecorded) return;+ streamFailureCompletionRecorded = true;+ }const cacheUsageLogMeta = buildCacheUsageLogMeta(streamUsage);- if (streamStatus === 200) {+ if (normalizedStreamStatus === 200) {void maybeSyncClaudeExtraUsageState({provider,connectionId,@@ -5506,7 +5526,7 @@ export async function handleChatCore({// Reasoning Replay Cache (#1628): Capture reasoning_content from streaming responses// with tool_calls so it can be replayed on subsequent turns (DeepSeek V4, Kimi K2, etc.)- if (streamStatus === 200 && streamResponseBody) {+ if (normalizedStreamStatus === 200 && streamResponseBody) {try {const body = streamResponseBody as Record<string, unknown>;const choices = body.choices as { message?: Record<string, unknown> }[] | undefined;@@ -5521,6 +5541,18 @@ export async function handleChatCore({}effectiveServiceTier = resolveReportedServiceTier(streamResponseBody) ?? effectiveServiceTier;+ streamFailure.finalizeStreamRequestLog({+ pendingRequestId,+ model,+ provider,+ connectionId: connectionId || credentials?.connectionId || null,+ providerResponse: providerPayload ?? streamResponseBody ?? undefined,+ clientResponse: clientPayload ?? streamResponseBody ?? undefined,+ status: normalizedStreamStatus,+ error: streamError,+ errorCode: streamErrorCode,+ });+// Track cache token metrics for streaming responsesif (streamUsage && typeof streamUsage === "object") {attachCompressionUsageReceiptAfterAnalytics(streamUsage as Record<string, unknown>, "stream");@@ -5529,11 +5561,12 @@ export async function handleChatCore({provider: provider || "unknown",model: model || "unknown",tokens: streamUsage,- status: String(streamStatus || 200),- success: streamStatus === 200,+ status: String(normalizedStreamStatus),+ success: normalizedStreamStatus === 200,latencyMs: Date.now() - startTime,timeToFirstTokenMs: ttft,- errorCode: null,+ errorCode:+ normalizedStreamStatus === 200 ? null : streamErrorCode || String(normalizedStreamStatus),timestamp: new Date().toISOString(),connectionId: connectionId || undefined,apiKeyId: apiKeyInfo?.id || undefined,@@ -5544,7 +5577,7 @@ export async function handleChatCore({console.error("Failed to save usage stats:", err.message);});- if (apiKeyInfo?.id && streamStatus === 200) {+ if (apiKeyInfo?.id && normalizedStreamStatus === 200) {try {const billable = computeBillableTokens(streamUsage);if (billable > 0)@@ -5556,7 +5589,8 @@ export async function handleChatCore({}persistAttemptLogs({- status: streamStatus || 200,+ status: normalizedStreamStatus,+ error: streamError || undefined,tokens: streamUsage || {},responseBody: streamResponseBody ?? undefined,providerRequest: finalBody || translatedBody,@@ -5567,25 +5601,6 @@ export async function handleChatCore({cacheSource: "upstream",});- // Ensure the completed details cache is populated so the UI's fast-poll- // can pick up provider/client response payloads immediately after the- // streaming request finishes.- try {- // Finalize the most recent pending request (streaming corresponds to the last entry)- // Use credentials.connectionId as a fallback so finalization matches the- // pending request registration (which may have used credentials.connectionId).- const finalizedConnId = connectionId || credentials?.connectionId || null;- finalizeMostRecentPendingRequest(model, provider, finalizedConnId, {- providerResponse: providerPayload ?? streamResponseBody ?? undefined,- clientResponse: clientPayload ?? streamResponseBody ?? undefined,- });- } catch (e) {- // Best-effort — don't break the stream completion path if this fails- try {- console.warn("finalizeMostRecentPendingRequest failed:", e && (e.message || e));- } catch {}- }-if (apiKeyInfo?.id && streamUsage) {calculateCost(provider, model, streamUsage, { serviceTier: effectiveServiceTier }).then((estimatedCost) => {@@ -5598,7 +5613,7 @@ export async function handleChatCore({// Resolve the real per-request cost (calculateCost) so USD-unit pools accrue// on streaming traffic too; this previously recorded usd:0 hardcoded, which// meant DeepSeek-style `usd/monthly` shared pools never blocked on streams.- if (apiKeyInfo?.id && credentials?.connectionId && streamStatus === 200) {+ if (apiKeyInfo?.id && credentials?.connectionId && normalizedStreamStatus === 200) {const quotaApiKeyId = apiKeyInfo.id;const quotaConnectionId = credentials.connectionId;// onStreamComplete is sync — use .then() (fire-and-forget, fail-open) instead of await@@ -5611,7 +5626,7 @@ export async function handleChatCore({provider,model,streamUsage,- streamStatus,+ streamStatus: normalizedStreamStatus,serviceTier: effectiveServiceTier,},{ calculateCost, log }@@ -5671,19 +5686,14 @@ export async function handleChatCore({}};- const handleStreamFailure = (failure: {- status: number;- message: string;- code?: string;- type?: string;- }) => {- persistFailureUsage(failure.status || HTTP_STATUS.BAD_GATEWAY, failure.code || failure.type);- try {- onStreamFailure?.(failure);- } catch {- // Best-effort fallback state update only.- }- };+ const streamFailureFinalizers = streamFailure.createStreamFailureFinalizers({+ isFailureCompletionRecorded: () => streamFailureCompletionRecorded,+ onStreamComplete,+ persistFailureUsage,+ onStreamFailure,+ });+ const handleStreamFailure = streamFailureFinalizers.handleStreamFailure;+ onPipelineStreamError = streamFailureFinalizers.onPipelineStreamError;// For providers using Responses API format, translate stream back to openai (Chat Completions) format// UNLESS client is Droid CLI which expects openai-responses format back@@ -5804,9 +5814,6 @@ export async function handleChatCore({};}-/**- * Check if token is expired or about to expire- */export function isTokenExpiringSoon(expiresAt, bufferMs = 5 * 60 * 1000) {if (!expiresAt) return false;const expiresAtMs = new Date(expiresAt).getTime();diff --git a/open-sse/handlers/chatCore/memorySkillsInjection.ts b/open-sse/handlers/chatCore/memorySkillsInjection.tsindex 28719d810d..ae0fa35f58 100644--- a/open-sse/handlers/chatCore/memorySkillsInjection.ts+++ b/open-sse/handlers/chatCore/memorySkillsInjection.ts@@ -3,6 +3,7 @@ import { getMemorySettings, DEFAULT_MEMORY_SETTINGS, toMemoryRetrievalConfig } fimport { injectMemory, shouldInjectMemory } from "@/lib/memory/injection";import { injectSkills } from "@/lib/skills/injection";import { FORMATS } from "../../translator/formats.ts";+import { detectCachingContext } from "../../services/compression/cachingAware.ts";export function getSkillsProviderForFormat(format: string): "openai" | "anthropic" | "google" | "other" {switch (format) {@@ -113,10 +114,15 @@ export async function injectMemoryAndSkills({toMemoryRetrievalConfig(memorySettings, { query: lastUserQuery }));if (memories.length > 0) {+ // #3890: when the client uses prompt caching (cache_control breakpoints), inject+ // memory cache-safely (before the last user message) so the per-query memory text+ // does not poison the cacheable prefix and force a cache miss on every turn.+ const cacheSafe = detectCachingContext(body, { provider, targetFormat }).hasCacheControl;const injected = injectMemory(body as Parameters<typeof injectMemory>[0],memories,- provider+ provider,+ { cacheSafe });body = injected as typeof body;log?.debug?.("MEMORY", `Injected ${memories.length} memories for key=${memoryOwnerId}`);diff --git a/open-sse/handlers/musicGeneration.ts b/open-sse/handlers/musicGeneration.tsindex 9a32cc7001..95b9ebd409 100644--- a/open-sse/handlers/musicGeneration.ts+++ b/open-sse/handlers/musicGeneration.ts@@ -16,6 +16,7 @@import { getMusicProvider, parseMusicModel } from "../config/musicRegistry.ts";import { kieExecutor } from "../executors/kie.ts";+import { vertexGenerateMusic } from "../executors/vertexMedia.ts";import {submitComfyWorkflow,pollComfyResult,@@ -94,6 +95,29 @@ export async function handleMusicGeneration({ body, credentials, log }) {};}+ if (providerConfig.format === "vertex-lyria") {+ try {+ const { base64, format } = await vertexGenerateMusic(credentials, {+ model,+ prompt: String(body.prompt ?? ""),+ negativePrompt: typeof body.negative_prompt === "string" ? body.negative_prompt : undefined,+ sampleCount: typeof body.sample_count === "number" ? body.sample_count : undefined,+ seed: typeof body.seed === "number" ? body.seed : undefined,+ });+ return {+ success: true,+ data: { created: Math.floor(Date.now() / 1000), data: [{ b64_json: base64, format }] },+ };+ } catch (err: any) {+ log?.error?.("MUSIC", `Vertex Lyria generation failed: ${err?.message}`);+ return {+ success: false,+ status: typeof err?.status === "number" ? err.status : 502,+ error: sanitizeErrorMessage(err?.message || "Vertex Lyria generation failed"),+ };+ }+ }+if (providerConfig.format === "comfyui") {return handleComfyUIMusicGeneration({ model, provider, providerConfig, body, log });}diff --git a/open-sse/handlers/videoGeneration.ts b/open-sse/handlers/videoGeneration.tsindex 65890fdd04..1581133b7f 100644--- a/open-sse/handlers/videoGeneration.ts+++ b/open-sse/handlers/videoGeneration.ts@@ -17,6 +17,7 @@import { getVideoProvider, parseVideoModel } from "../config/videoRegistry.ts";import { kieExecutor } from "../executors/kie.ts";+import { vertexGenerateVideo } from "../executors/vertexMedia.ts";import { getExecutor } from "../executors/index.ts";import { isJsonObject, parseKieResultJson } from "../utils/kieTask.ts";import {@@ -56,6 +57,10 @@ export async function handleVideoGeneration({ body, credentials, log }) {};}+ if (providerConfig.format === "vertex-veo") {+ return handleVertexVeoGeneration({ model, body, credentials, log });+ }+if (providerConfig.format === "comfyui") {return handleComfyUIVideoGeneration({ model, provider, providerConfig, body, log });}@@ -98,6 +103,53 @@ export async function handleVideoGeneration({ body, credentials, log }) {};}+/**+ * Veo video generation via Vertex AI (predictLongRunning → poll → MP4).+ * Uses the Vertex chat credentials (Service Account JSON or Express key).+ */+async function handleVertexVeoGeneration({ model, body, credentials, log }) {+ try {+ const aspectRatio =+ typeof body.aspect_ratio === "string"+ ? body.aspect_ratio+ : typeof body.aspectRatio === "string"+ ? body.aspectRatio+ : typeof body.size === "string"+ ? body.size+ : undefined;+ const durationSeconds =+ typeof body.duration === "number"+ ? body.duration+ : typeof body.durationSeconds === "number"+ ? body.durationSeconds+ : undefined;++ const result = await vertexGenerateVideo(credentials, {+ model,+ prompt: String(body.prompt ?? ""),+ aspectRatio,+ durationSeconds,+ negativePrompt: typeof body.negative_prompt === "string" ? body.negative_prompt : undefined,+ });++ const item = result.base64+ ? { b64_json: result.base64, format: result.format }+ : { url: result.url, format: result.format };++ return {+ success: true,+ data: { created: Math.floor(Date.now() / 1000), data: [item] },+ };+ } catch (err: any) {+ log?.error?.("VIDEO", `Vertex Veo generation failed: ${err?.message}`);+ return {+ success: false,+ status: typeof err?.status === "number" ? err.status : 502,+ error: sanitizeErrorMessage(err?.message || "Vertex Veo generation failed"),+ };+ }+}+/*** Handle ComfyUI video generation* Submits an AnimateDiff or SVD workflow, polls for completion, fetches output videodiff --git a/open-sse/mcp-server/__tests__/audit.test.ts b/open-sse/mcp-server/__tests__/audit.test.tsindex 90e5713a58..d51541f17f 100644--- a/open-sse/mcp-server/__tests__/audit.test.ts+++ b/open-sse/mcp-server/__tests__/audit.test.ts@@ -86,4 +86,57 @@ describe("MCP audit shutdown", () => {expect(audit.closeAuditDb()).toBe(true);expect(mockDb.close).toHaveBeenCalledTimes(1);});++ it("falls back to node:sqlite when better-sqlite3 binding is missing", async () => {+ const [maj, min] = process.versions.node.split(".").map(Number);+ if (maj < 22 || (maj === 22 && min < 5)) {+ return; // node:sqlite not available on this Node, skip+ }++ // Simulate a global-install scenario where the bundled native binary+ // never landed in dist/node_modules/better-sqlite3/build/Release/.+ const bindingErr = new Error(+ "Could not locate the bindings file. Tried: …/better_sqlite3.node"+ ) as Error & { code?: string };+ bindingErr.code = "MODULE_NOT_FOUND";+ // Simulate the binding-missing failure as the better-sqlite3 default+ // constructor throwing — this matches reality (`new Database()` throws+ // "Could not locate the bindings file" when the prebuilt .node is absent)+ // and reaches the adapter's `catch (nativeErr)`. A factory that itself+ // throws is reported by vitest as a mock-setup error and never reaches+ // the code under test.+ const ThrowingDatabase = vi.fn(function ThrowingDatabase() {+ throw bindingErr;+ });+ vi.doMock("better-sqlite3", () => ({+ default: ThrowingDatabase,+ }));++ // node:sqlite's DatabaseSync does not expose a boolean `open` property,+ // so the mock intentionally omits it — the adapter tracks open state in+ // a local closure and exposes it via a getter.+ const mockNodeDb = {+ prepare: vi.fn(() => createStatementMock()),+ exec: vi.fn(),+ close: vi.fn(),+ };+ const DatabaseSync = vi.fn(function DatabaseSync() {+ return mockNodeDb;+ });+ vi.doMock("node:sqlite", () => ({ DatabaseSync }));++ const audit = await import("../audit.ts");++ await audit.logToolCall("omniroute_get_health", { ok: true }, { ok: true }, 4, true);+ expect(DatabaseSync).toHaveBeenCalledWith(dbFile);+ expect(mockNodeDb.prepare).toHaveBeenCalled();++ expect(audit.closeAuditDb()).toBe(true);+ expect(mockNodeDb.exec).toHaveBeenCalledWith("PRAGMA wal_checkpoint(TRUNCATE)");+ expect(mockNodeDb.close).toHaveBeenCalledTimes(1);++ // Cache is cleared after close, so a second close is a no-op.+ expect(audit.closeAuditDb()).toBe(false);+ expect(mockNodeDb.close).toHaveBeenCalledTimes(1);+ });});diff --git a/open-sse/mcp-server/__tests__/glmCodingProviderConfig.test.ts b/open-sse/mcp-server/__tests__/glmCodingProviderConfig.test.tsindex f937df26c2..b52874c6d5 100644--- a/open-sse/mcp-server/__tests__/glmCodingProviderConfig.test.ts+++ b/open-sse/mcp-server/__tests__/glmCodingProviderConfig.test.ts@@ -7,7 +7,6 @@ import {getProviderModels,} from "../../config/providerModels.ts";import { buildGlmAnthropicMessagesUrl, buildGlmOpenAIChatUrl } from "../../config/glmProvider.ts";-import { supportsToolCalling } from "../../services/modelCapabilities.ts";import { getPricingForModel } from "../../../src/shared/constants/pricing.ts";describe("GLM Coding provider registry surfaces", () => {@@ -88,6 +87,9 @@ describe("GLM Coding provider registry surfaces", () => {expect(PROVIDER_ID_TO_ALIAS.glm).toBe("glm");expect(byProviderId).toEqual(byAlias);expect(byProviderId.map((model) => model.id)).toEqual([+ "glm-5.2",+ "glm-5.2-high",+ "glm-5.2-max","glm-5.1","glm-5","glm-5-turbo",@@ -101,6 +103,30 @@ describe("GLM Coding provider registry surfaces", () => {]);});+ it("registers GLM-5.2 with correct specs and effort tier aliases", () => {+ const models = getModelsByProviderId("glm");+ const get = (id: string) => models.find((m) => m.id === id);++ // Base model+ const base = get("glm-5.2");+ expect(base).toBeDefined();+ expect(base?.contextLength).toBe(1000000);+ expect(base?.maxOutputTokens).toBe(131072);+ expect(base?.supportsReasoning).toBe(true);+ expect(base?.toolCalling).toBe(true);++ // Effort tier aliases share the same specs+ const high = get("glm-5.2-high");+ expect(high).toBeDefined();+ expect(high?.contextLength).toBe(1000000);+ expect(high?.maxOutputTokens).toBe(131072);++ const max = get("glm-5.2-max");+ expect(max).toBeDefined();+ expect(max?.contextLength).toBe(1000000);+ expect(max?.maxOutputTokens).toBe(131072);+ });+it("applies doc-backed context window overrides for GLM models", () => {const models = getModelsByProviderId("glm");const get = (id: string) => models.find((m) => m.id === id);@@ -123,9 +149,15 @@ describe("GLM Coding provider registry surfaces", () => {});it("keeps representative GLM Coding models tool-call capable and priced", () => {- expect(supportsToolCalling("glm/glm-5")).toBe(true);- expect(supportsToolCalling("glm/glm-4.7-flash")).toBe(true);- expect(supportsToolCalling("glm/glm-4.5-air")).toBe(true);+ const models = getModelsByProviderId("glm");+ const get = (id: string) => models.find((m) => m.id === id);++ expect(get("glm-5")?.toolCalling).toBe(true);+ expect(get("glm-4.7-flash")?.toolCalling).toBe(true);+ expect(get("glm-4.5-air")?.toolCalling).toBe(true);+ expect(get("glm-5.2")?.toolCalling).toBe(true);+ expect(get("glm-5.2-high")?.toolCalling).toBe(true);+ expect(get("glm-5.2-max")?.toolCalling).toBe(true);expect(getPricingForModel("glm", "glm-5")).toEqual({input: 1.0,@@ -148,6 +180,20 @@ describe("GLM Coding provider registry surfaces", () => {reasoning: 1.1,cache_creation: 0.2,});+ expect(getPricingForModel("glm", "glm-5.2")).toEqual({+ input: 1.2,+ output: 5,+ cached: 0.3,+ reasoning: 5,+ cache_creation: 1.2,+ });+ expect(getPricingForModel("glm", "glm-5.2-max")).toEqual({+ input: 1.2,+ output: 5,+ cached: 0.3,+ reasoning: 5,+ cache_creation: 1.2,+ });});it("keeps the repo-derived GLM inventory internally aligned across registry and pricing surfaces", () => {diff --git a/open-sse/mcp-server/audit.ts b/open-sse/mcp-server/audit.tsindex 18897035e0..259ded1c49 100644--- a/open-sse/mcp-server/audit.ts+++ b/open-sse/mcp-server/audit.ts@@ -7,6 +7,7 @@*/import { hashInput, summarizeOutput } from "./schemas/audit.ts";+import { isNativeSqliteLoadError } from "../../src/lib/db/core.ts";// ============ Database Connection ============@@ -21,6 +22,61 @@ interface AuditDatabase {pragma: (sql: string) => unknown;close: () => void;open?: boolean;+ driver?: "better-sqlite3" | "node:sqlite";+}++interface NodeSqliteDatabase {+ prepare: (sql: string) => {+ run: (...params: unknown[]) => { changes: number | bigint; lastInsertRowid: number | bigint };+ get: (...params: unknown[]) => unknown;+ all: (...params: unknown[]) => unknown[];+ };+ exec: (sql: string) => void;+ close: () => void;+}++/**+ * node:sqlite's `DatabaseSync` does NOT expose a boolean `open` property —+ * `open` and `close` are methods on the prototype, and the only state+ * surface is the `isOpen` getter. Track open state locally in a closure+ * so the adapter's `AuditDatabase` contract (`open?: boolean`) is honored+ * and `getCachedAuditDb()`'s truthy check doesn't return a closed handle+ * after `closeAuditDb()`.+ */+function createNodeSqliteAuditAdapter(db: NodeSqliteDatabase): AuditDatabase {+ let _isOpen = true;+ return {+ driver: "node:sqlite",+ get open() {+ return _isOpen;+ },+ prepare<TRow = unknown>(sql: string) {+ const stmt = db.prepare(sql);+ return {+ get: (...params: unknown[]) => stmt.get(...params) as TRow | undefined,+ all: (...params: unknown[]) => stmt.all(...params) as TRow[],+ run: (...params: unknown[]) => stmt.run(...params),+ };+ },+ pragma(pragmaSql: string) {+ // node:sqlite has no .pragma() helper — route through .exec() for+ // statement-shaped PRAGMAs (e.g. "wal_checkpoint(TRUNCATE)").+ try {+ db.exec(`PRAGMA ${pragmaSql}`);+ return null;+ } catch (err) {+ return err instanceof Error ? err.message : String(err);+ }+ },+ close: () => {+ if (!_isOpen) return;+ try {+ db.close();+ } finally {+ _isOpen = false;+ }+ },+ };}declare global {@@ -153,6 +209,15 @@ function toString(value: unknown): string {/*** Lazy-load the database connection.* Uses the same SQLite database as the main OmniRoute app.+ *+ * Driver priority:+ * 1. better-sqlite3 — fast native binding (when its compiled `.node`+ * binary is present, see scripts/build/postinstall.mjs).+ * 2. node:sqlite — built-in to Node 22.5+. Used as a transparent+ * fallback so the MCP audit logger still works on installs where+ * the better-sqlite3 binary failed to resolve (e.g. missing+ * `dist/node_modules/better-sqlite3/build/Release/better_sqlite3.node`+ * in some global-install / Docker scenarios).*/async function getDb(): Promise<AuditDatabase | null> {const cachedDb = getCachedAuditDb();@@ -173,12 +238,59 @@ async function getDb(): Promise<AuditDatabase | null> {return null;}- const Database = (await import("better-sqlite3")).default as unknown as new (- dbPath: string- ) => AuditDatabase;- const database = new Database(dbPath);- setCachedAuditDb(database);- return database;+ // Try better-sqlite3 first (matches the main app's default driver).+ try {+ const Database = (await import("better-sqlite3")).default as unknown as new (+ dbPath: string+ ) => AuditDatabase;+ const database = new Database(dbPath);+ setCachedAuditDb(database);+ return database;+ } catch (nativeErr) {+ // Declared once at the top of the catch: nativeMessage is read both on+ // the non-fallback bail-out and in the node:sqlite fallback warning+ // further down. A block-scoped const inside the `if` below would be out+ // of scope in the fallback path.+ const nativeMessage = nativeErr instanceof Error ? nativeErr.message : String(nativeErr);+ // Reuse the canonical detection helper from the main app's DB layer+ // so we cover every ABI/binding failure mode the rest of the codebase+ // already knows about: missing MODULE_NOT_FOUND, ERR_DLOPEN_FAILED,+ // "Module did not self-register", "Cannot find module 'better-sqlite3'",+ // the standard V8 "was compiled against a different Node.js version"+ // message, and the bindings-loader "Could not locate the bindings file".+ // Real errors (corrupt db, permission denied) still surface to the operator.+ if (!isNativeSqliteLoadError(nativeErr)) {+ console.error("[MCP Audit] Failed to connect to database:", nativeMessage);+ return null;+ }+ // Fall back to Node's built-in sqlite (Node 22.5+).+ const [maj, min] = (process.versions.node ?? "0.0").split(".").map(Number);+ if (maj < 22 || (maj === 22 && (min ?? 0) < 5)) {+ console.error(+ `[MCP Audit] better-sqlite3 native binding unavailable and Node ${process.version} ` ++ "has no built-in sqlite. Audit logging disabled. Fix: run " ++ "`npm rebuild better-sqlite3` in the omniroute install root."+ );+ return null;+ }+ try {+ const { DatabaseSync } = (await import("node:sqlite")) as {+ DatabaseSync: new (p: string) => NodeSqliteDatabase;+ };+ const nodeDb = new DatabaseSync(dbPath);+ const adapter = createNodeSqliteAuditAdapter(nodeDb);+ setCachedAuditDb(adapter);+ console.warn(+ `[MCP Audit] better-sqlite3 binding unavailable — fell back to node:sqlite ` ++ `(${nativeMessage.split("\n")[0]})`+ );+ return adapter;+ } catch (nodeErr) {+ const nodeMessage = nodeErr instanceof Error ? nodeErr.message : String(nodeErr);+ console.error("[MCP Audit] Failed to connect to database:", nodeMessage);+ return null;+ }+ }} catch (err: unknown) {const message = err instanceof Error ? err.message : String(err);console.error("[MCP Audit] Failed to connect to database:", message);diff --git a/open-sse/package.json b/open-sse/package.jsonindex 10ad729f0d..22fc9005de 100644--- a/open-sse/package.json+++ b/open-sse/package.json@@ -1,6 +1,6 @@{"name": "@omniroute/open-sse",- "version": "3.8.25",+ "version": "3.8.26","description": "Express SSE sidecar for OmniRoute — handles streaming, protocol translation, and provider orchestration","type": "module","main": "index.js",diff --git a/open-sse/services/claudeCodeCompatible.ts b/open-sse/services/claudeCodeCompatible.tsindex 9350f9ab0b..60b22d2188 100644--- a/open-sse/services/claudeCodeCompatible.ts+++ b/open-sse/services/claudeCodeCompatible.ts@@ -5,6 +5,7 @@ import { ANTHROPIC_VERSION_HEADER } from "../config/anthropicHeaders.ts";import { supportsClaudeMaxEffort, supportsXHighEffort } from "../config/providerModels.ts";import { prepareClaudeRequest } from "../translator/helpers/claudeHelper.ts";import { signRequestBody } from "./claudeCodeCCH.ts";+import { resolveClaudeCodeCompatibleAnthropicBeta } from "./claudeCodeCompatibleBeta.ts";import { remapToolNamesInRequest } from "./claudeCodeToolRemapper.ts";import {enforceThinkingTemperature,@@ -34,12 +35,11 @@ export const CLAUDE_CODE_COMPATIBLE_DEFAULT_CHAT_PATH = "/v1/messages?beta=true"export const CLAUDE_CODE_COMPATIBLE_DEFAULT_MODELS_PATH = "/models";export const CLAUDE_CODE_COMPATIBLE_DEFAULT_MAX_TOKENS = 64000;export const CLAUDE_CODE_COMPATIBLE_ANTHROPIC_VERSION = ANTHROPIC_VERSION_HEADER;-export const CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA = [- "claude-code-20250219",- "interleaved-thinking-2025-05-14",- "effort-2025-11-24",- "redact-thinking-2026-02-12",-].join(",");+export {+ CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA,+ CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA,+ resolveClaudeCodeCompatibleAnthropicBeta,+} from "./claudeCodeCompatibleBeta.ts";export const CLAUDE_CODE_COMPATIBLE_VERSION = "2.1.158";export const CLAUDE_CODE_COMPATIBLE_USER_AGENT = "claude-cli/2.1.158 (external, sdk-cli)";export const CLAUDE_CODE_COMPATIBLE_STAINLESS_PACKAGE_VERSION = "0.94.0";@@ -52,7 +52,12 @@ const CLAUDE_CODE_COMPATIBLE_DEFAULT_SYSTEM_BLOCKS = [text: "You are a Claude agent, built on Anthropic's Claude Agent SDK.",},];-const CONTEXT_1M_SUPPORTED_MODELS = ["claude-fable-5", "claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6"];+const CONTEXT_1M_SUPPORTED_MODELS = [+ "claude-fable-5",+ "claude-opus-4-8",+ "claude-opus-4-7",+ "claude-opus-4-6",+];export const CLAUDE_CODE_COMPATIBLE_STAINLESS_TIMEOUT_SECONDS = getStainlessTimeoutSeconds(process.env);@@ -80,6 +85,7 @@ type BuildRequestOptions = {sessionId?: string | null;preserveCacheControl?: boolean;preserveClaudeMessages?: boolean;+ redactThinking?: boolean;};function supportsClaudeXHighEffort(model: string | null | undefined): boolean {@@ -165,7 +171,8 @@ export function modelSupportsContext1mBeta(model: string | null | undefined): boexport function buildClaudeCodeCompatibleHeaders(apiKey: string,stream = false,- sessionId?: string | null+ sessionId?: string | null,+ options: { redactThinking?: boolean } = {}): Record<string, string> {void stream;// These headers intentionally mirror Claude Code's wire image closely.@@ -176,7 +183,9 @@ export function buildClaudeCodeCompatibleHeaders(Accept: "application/json",Authorization: `Bearer ${apiKey}`,"anthropic-version": CLAUDE_CODE_COMPATIBLE_ANTHROPIC_VERSION,- "anthropic-beta": CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA,+ "anthropic-beta": resolveClaudeCodeCompatibleAnthropicBeta({+ redactThinking: options.redactThinking === true,+ }),"anthropic-dangerous-direct-browser-access": "true","x-app": "cli","User-Agent": CLAUDE_CODE_COMPATIBLE_USER_AGENT,@@ -230,6 +239,7 @@ export function buildClaudeCodeCompatibleRequest({sessionId,preserveCacheControl = false,preserveClaudeMessages = false,+ redactThinking = false,}: BuildRequestOptions) {const normalized = normalizedBody || {};const preparedClaudeBody = claudeBody@@ -310,21 +320,6 @@ export function buildClaudeCodeCompatibleRequest({};}-/**- * Full Claude Code request processing pipeline.- *- * Applies all mechanisms that real Claude Code uses:- * 1. Build base request (system prompt, billing header, messages, tools)- * 2. Remap tool names to TitleCase- * 3. Enforce thinking temperature constraint (temp=1)- * 4. Disable thinking when tool_choice forces a specific tool- * 5. Enforce 4-block cache_control limit when markers are already present- * 6. Obfuscate sensitive words in user messages- * 7. Serialize with CCH placeholder- * 8. Sign body with xxHash64 CCH attestation- *- * Returns { bodyString, headers } ready to send upstream.- */export async function buildAndSignClaudeCodeRequest(options: BuildRequestOptions & { apiKey: string; enableObfuscation?: boolean }): Promise<{ bodyString: string; headers: Record<string, string> }> {@@ -396,7 +391,9 @@ export async function buildAndSignClaudeCodeRequest(// Build headersconst sessionId = options.sessionId || resolveClaudeCodeCompatibleSessionId();- const headers = buildClaudeCodeCompatibleHeaders(apiKey, options.stream ?? false, sessionId);+ const headers = buildClaudeCodeCompatibleHeaders(apiKey, options.stream ?? false, sessionId, {+ redactThinking: buildOptions.redactThinking === true,+ });return { bodyString, headers };}diff --git a/open-sse/services/claudeCodeCompatibleBeta.ts b/open-sse/services/claudeCodeCompatibleBeta.tsnew file mode 100644index 0000000000..5a97b97c54--- /dev/null+++ b/open-sse/services/claudeCodeCompatibleBeta.ts@@ -0,0 +1,23 @@+const CLAUDE_CODE_COMPATIBLE_BASE_BETAS = [+ "claude-code-20250219",+ "interleaved-thinking-2025-05-14",+ "effort-2025-11-24",+];++export const CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA = "redact-thinking-2026-02-12";++export type ClaudeCodeCompatibleBetaOptions = {+ redactThinking?: boolean;+};++export function resolveClaudeCodeCompatibleAnthropicBeta(+ options: ClaudeCodeCompatibleBetaOptions = {}+): string {+ const betas = [...CLAUDE_CODE_COMPATIBLE_BASE_BETAS];+ if (options.redactThinking === true) {+ betas.push(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA);+ }+ return betas.join(",");+}++export const CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA = resolveClaudeCodeCompatibleAnthropicBeta();diff --git a/open-sse/services/combo.ts b/open-sse/services/combo.tsindex 402f033096..7d5be3aca8 100644--- a/open-sse/services/combo.ts+++ b/open-sse/services/combo.ts@@ -828,6 +828,7 @@ const MAX_RR_COUNTERS = 500;const MAX_RESET_AWARE_CACHE = 200;const rrCounters = new Map<string, number>();+const rrStickyTargets = new Map<string, { executionKey: string; successCount: number }>();const resetAwareConnectionCache = new Map<string,@@ -849,6 +850,50 @@ function normalizeModelEntry(entry: unknown): { model: string; weight: number }};}+function clampStickyRoundRobinTargetLimit(value: unknown): number {+ const numericValue = Number(value);+ if (!Number.isFinite(numericValue)) return 1;+ return Math.min(Math.max(Math.floor(numericValue), 1), 1000);+}++function getStickyRoundRobinStartIndex(+ comboName: string,+ targets: ResolvedComboTarget[],+ stickyLimit: number+): { startIndex: number; counter: number } {+ const sticky = rrStickyTargets.get(comboName);+ const stickyIndex = sticky+ ? targets.findIndex((target) => target.executionKey === sticky.executionKey)+ : -1;+ if (stickyLimit > 1 && sticky && stickyIndex >= 0 && sticky.successCount < stickyLimit) {+ return { startIndex: stickyIndex, counter: rrCounters.get(comboName) || 0 };+ }++ const counter = rrCounters.get(comboName) || 0;+ return { startIndex: counter % targets.length, counter };+}++function recordStickyRoundRobinSuccess(+ comboName: string,+ target: ResolvedComboTarget,+ stickyLimit: number,+ targets: ResolvedComboTarget[]+): void {+ const sticky = rrStickyTargets.get(comboName);+ const successCount = sticky?.executionKey === target.executionKey ? sticky.successCount + 1 : 1;+ if (successCount >= stickyLimit) {+ const servedIndex = targets.findIndex((entry) => entry.executionKey === target.executionKey);+ rrCounters.set(+ comboName,+ servedIndex >= 0 ? servedIndex + 1 : (rrCounters.get(comboName) || 0) + 1+ );+ rrStickyTargets.delete(comboName);+ return;+ }++ rrStickyTargets.set(comboName, { executionKey: target.executionKey, successCount });+}+function getTargetProvider(modelStr: string, providerId?: string | null): string {const parsed = parseModel(modelStr);return providerId || parsed.provider || parsed.providerAlias || "unknown";@@ -2994,7 +3039,8 @@ export async function expandAutoComboCandidatePool((combo?.config as Record<string, unknown> | undefined) ||{};- if (Array.isArray(localAutoConfig?.candidatePool)) return eligibleTargets;+ if (Array.isArray(localAutoConfig?.candidatePool) && localAutoConfig.candidatePool.length > 0)+ return eligibleTargets;try {const allConnections = await getProviderConnections({ isActive: true });@@ -4700,14 +4746,38 @@ async function handleRoundRobinCombo({log);- // Get and increment atomic counter- const counter = rrCounters.get(combo.name) || 0;- if (!rrCounters.has(combo.name) && rrCounters.size >= MAX_RR_COUNTERS) {+ // Sticky batch size at the combo level. Reuses the global `stickyRoundRobinLimit`+ // setting so a single knob controls sticky batching for both account fallback and+ // combo targets. Values <= 1 preserve the historical one-request-per-target rotation.+ const stickyLimit = clampStickyRoundRobinTargetLimit(+ (settings as Record<string, unknown> | null)?.stickyRoundRobinLimit+ );+ const stickyRoundRobinEnabled = stickyLimit > 1;+ if (+ !rrCounters.has(combo.name) &&+ !rrStickyTargets.has(combo.name) &&+ rrCounters.size >= MAX_RR_COUNTERS+ ) {const oldest = rrCounters.keys().next().value;- if (oldest !== undefined) rrCounters.delete(oldest);+ if (oldest !== undefined) {+ rrCounters.delete(oldest);+ rrStickyTargets.delete(oldest);+ }+ }+ // Ensure rrCounters has an entry for this combo so the eviction logic above+ // applies to both maps even when sticky round-robin is enabled (in which+ // case rrCounters isn't incremented per request).+ if (!rrCounters.has(combo.name)) {+ rrCounters.set(combo.name, 0);+ }+ const { startIndex, counter } = getStickyRoundRobinStartIndex(+ combo.name,+ filteredTargets,+ stickyLimit+ );+ if (!stickyRoundRobinEnabled) {+ rrCounters.set(combo.name, counter + 1);}- rrCounters.set(combo.name, counter + 1);- const startIndex = counter % modelCount;const clientRequestedStream = body?.stream === true;const startTime = Date.now();@@ -4903,6 +4973,10 @@ async function handleRoundRobinCombo({recordProviderSuccess(provider, target.connectionId ?? undefined);}+ if (stickyRoundRobinEnabled) {+ recordStickyRoundRobinSuccess(combo.name, target, stickyLimit, filteredTargets);+ }+if (provider) {const connId = target.connectionId || undefined;void (async () => {diff --git a/open-sse/services/compression/strategySelector.ts b/open-sse/services/compression/strategySelector.tsindex 105e3da4df..20e15580a1 100644--- a/open-sse/services/compression/strategySelector.ts+++ b/open-sse/services/compression/strategySelector.ts@@ -67,6 +67,28 @@ export function selectCompressionStrategy(return selectedMode;}+/**+ * #3890: honor the cache-aware `skipSystemPrompt` decision that `getCacheAwareStrategy`+ * already computes but that `selectCompressionStrategy` (which can only return a mode+ * string) previously discarded. In a caching context the system prompt is part of the+ * cacheable prefix, so compressing it breaks the upstream prompt cache. This forces+ * `preserveSystemPrompt` on for caching requests even when the operator turned it off,+ * and leaves non-caching requests untouched.+ */+export function resolveCacheAwareConfig(+ config: CompressionConfig,+ body?: Record<string, unknown>,+ context?: CachingDetectionContext+): CompressionConfig {+ if (!body) return config;+ const ctx = detectCachingContext(body, context);+ const cacheAware = getCacheAwareStrategy(config.defaultMode, ctx);+ if (cacheAware.skipSystemPrompt && config.preserveSystemPrompt === false) {+ return { ...config, preserveSystemPrompt: true };+ }+ return config;+}+export function applyCompression(body: Record<string, unknown>,mode: CompressionMode,diff --git a/open-sse/services/provider.ts b/open-sse/services/provider.tsindex b5bb577014..6b62bea92a 100644--- a/open-sse/services/provider.ts+++ b/open-sse/services/provider.ts@@ -6,6 +6,7 @@ import {CLAUDE_CODE_COMPATIBLE_DEFAULT_CHAT_PATH,joinClaudeCodeCompatibleUrl,} from "./claudeCodeCompatible.ts";+import { getClaudeCodeCompatibleRequestDefaults } from "@/lib/providers/requestDefaults";const OPENAI_COMPATIBLE_PREFIX = "openai-compatible-";const OPENAI_COMPATIBLE_DEFAULTS = {@@ -304,10 +305,14 @@ export function buildProviderHeaders(provider, credentials, stream = true, body// Specific override for Anthropic Compatibleif (isClaudeCodeCompatible(provider)) {const token = credentials.apiKey || credentials.accessToken || "";+ const ccRequestDefaults = getClaudeCodeCompatibleRequestDefaults(+ credentials?.providerSpecificData+ );return buildClaudeCodeCompatibleHeaders(token,stream,- credentials?.providerSpecificData?.ccSessionId+ credentials?.providerSpecificData?.ccSessionId,+ { redactThinking: ccRequestDefaults.redactThinking === true });}if (isAnthropicCompatible(provider)) {diff --git a/open-sse/translator/response/claude-to-openai.ts b/open-sse/translator/response/claude-to-openai.tsindex 76126cface..22af8213b6 100644--- a/open-sse/translator/response/claude-to-openai.ts+++ b/open-sse/translator/response/claude-to-openai.ts@@ -115,6 +115,21 @@ export function claudeToOpenAIResponse(chunk, state) {// Extract usage from message_delta event (Claude native format)// Normalize to OpenAI format (prompt_tokens/completion_tokens) for consistent loggingif (chunk.usage && typeof chunk.usage === "object") {+ const previousUsage = state.usage && typeof state.usage === "object" ? state.usage : {};+ const previousInputTokens =+ typeof previousUsage.input_tokens === "number"+ ? previousUsage.input_tokens+ : typeof previousUsage.prompt_tokens === "number"+ ? previousUsage.prompt_tokens+ : 0;+ const previousCacheReadTokens =+ typeof previousUsage.cache_read_input_tokens === "number"+ ? previousUsage.cache_read_input_tokens+ : 0;+ const previousCacheCreationTokens =+ typeof previousUsage.cache_creation_input_tokens === "number"+ ? previousUsage.cache_creation_input_tokens+ : 0;const inputTokens =typeof chunk.usage.input_tokens === "number" ? chunk.usage.input_tokens : 0;const outputTokens =@@ -136,7 +151,10 @@ export function claudeToOpenAIResponse(chunk, state) {// minimum, so a 2-token "hi" can be reported as ~2008 prompt_tokens and// inflate downstream billing ~250x. cache_creation is still exposed// separately via prompt_tokens_details.cache_creation_tokens below.- const billableInputTokens = inputTokens + cacheReadTokens;+ const billableInputTokens =+ inputTokens > 0 || cacheReadTokens > 0 || cacheCreationTokens > 0+ ? inputTokens + cacheReadTokens+ : previousInputTokens;state.usage = {prompt_tokens: billableInputTokens,completion_tokens: outputTokens,@@ -145,11 +163,13 @@ export function claudeToOpenAIResponse(chunk, state) {};// Store cache tokens if present (needed for prompt_tokens_details in final chunk)- if (cacheReadTokens > 0) {- state.usage.cache_read_input_tokens = cacheReadTokens;+ const effectiveCacheReadTokens = cacheReadTokens || previousCacheReadTokens;+ const effectiveCacheCreationTokens = cacheCreationTokens || previousCacheCreationTokens;+ if (effectiveCacheReadTokens > 0) {+ state.usage.cache_read_input_tokens = effectiveCacheReadTokens;}- if (cacheCreationTokens > 0) {- state.usage.cache_creation_input_tokens = cacheCreationTokens;+ if (effectiveCacheCreationTokens > 0) {+ state.usage.cache_creation_input_tokens = effectiveCacheCreationTokens;}}diff --git a/open-sse/translator/response/openai-responses.ts b/open-sse/translator/response/openai-responses.tsindex d0c6731d18..6c54661f49 100644--- a/open-sse/translator/response/openai-responses.ts+++ b/open-sse/translator/response/openai-responses.ts@@ -490,11 +490,36 @@ function normalizeUpstreamFailure(data, fallbackType = "server_error") {};}+/**+ * OpenAI Chat Completions streams announce the assistant role on the FIRST delta+ * (e.g. `{ "role": "assistant", "content": "" }` or `{ "role": "assistant",+ * "tool_calls": [...] }`). The Responses API has no role-announcement event, so when+ * translating Responses → Chat we must synthesize it on the first emitted chunk.+ *+ * Strict streaming clients — notably @langchain/openai's `_convertDeltaToMessageChunk`+ * (used by n8n's AI Agent) — key off the first chunk's role to build an AIMessageChunk.+ * Without it, streamed tool_call deltas are dropped and the agent returns an empty+ * response, even though the underlying tool call is well-formed.+ */+function withAssistantRoleOnFirstDelta(state, result) {+ if (!result || state.roleEmitted) return result;+ const delta = result.choices?.[0]?.delta;+ if (delta && typeof delta === "object" && !Array.isArray(delta)) {+ delta.role = "assistant";+ state.roleEmitted = true;+ }+ return result;+}+/*** Translate OpenAI Responses API chunk to OpenAI Chat Completions format* This is for when Codex returns data and we need to send it to an OpenAI-compatible client*/export function openaiResponsesToOpenAIResponse(chunk, state) {+ return withAssistantRoleOnFirstDelta(state, openaiResponsesToOpenAIResponseStream(chunk, state));+}++function openaiResponsesToOpenAIResponseStream(chunk, state) {if (!chunk) {// Flush: send final chunk with finish_reasonif (!state.finishReasonSent && state.started) {diff --git a/open-sse/utils/proxyDispatcher.ts b/open-sse/utils/proxyDispatcher.tsindex 8f3c972f6b..34623d4ff8 100644--- a/open-sse/utils/proxyDispatcher.ts+++ b/open-sse/utils/proxyDispatcher.ts@@ -60,6 +60,10 @@ function getDispatcherOptions() {bodyTimeout: timeouts.fetchBodyTimeoutMs,connectTimeout: timeouts.fetchConnectTimeoutMs,keepAliveTimeout: timeouts.fetchKeepAliveTimeoutMs,+ // Without this, an upstream Keep-Alive: timeout=N header clamps+ // keepAliveTimeout UP to undici's default keepAliveMaxTimeout (600 s),+ // completely overriding the configured 1 s and restoring zombie-socket risk.+ keepAliveMaxTimeout: timeouts.fetchKeepAliveTimeoutMs,};}diff --git a/open-sse/utils/proxyFetch.ts b/open-sse/utils/proxyFetch.tsindex 98b0ff6421..42ff41394c 100644--- a/open-sse/utils/proxyFetch.ts+++ b/open-sse/utils/proxyFetch.ts@@ -201,7 +201,11 @@ function getTargetUrl(input) {return String(input);}-export async function runWithProxyContext(proxyConfig, fn) {+export async function runWithProxyContext(+ proxyConfig,+ fn,+ opts?: { directFallbackOnUnreachable?: boolean }+) {if (typeof fn !== "function") {throw new TypeError("runWithProxyContext requires a callback function");}@@ -212,6 +216,15 @@ export async function runWithProxyContext(proxyConfig, fn) {const resolvedProxyUrl = effectiveProxyConfig ? proxyConfigToUrl(effectiveProxyConfig) : null;+ // When set, a proxy that fails the reachability/family pre-checks degrades to a+ // DIRECT connection instead of throwing. Use for control-plane operations (OAuth,+ // connection tests, token refresh) where reaching the upstream matters more than+ // egress-IP pinning — a dead pinned proxy must not surface as a generic 500. Data+ // plane (chat) keeps the strict behaviour so per-account IP isolation is preserved.+ const directFallbackOnUnreachable = opts?.directFallbackOnUnreachable === true;+ // Run fn with the proxy context cleared so the request egresses directly.+ const runDirect = () => proxyContext.run(null, fn);+// T14: Proxy Fast-Fail// Perform a short TCP reachability check before issuing upstream requests.// Skip for vercel-relay type: proxyConfigToUrl returns "https://<host>" which is the@@ -221,6 +234,12 @@ export async function runWithProxyContext(proxyConfig, fn) {const reachable = await isProxyReachable(resolvedProxyUrl);if (!reachable) {const proxyLabel = proxyUrlForLogs(resolvedProxyUrl);+ if (directFallbackOnUnreachable) {+ console.warn(+ `[ProxyFetch] Proxy unreachable (${proxyLabel}); using a direct connection for this request.`+ );+ return runDirect();+ }const err = new Error(`[Proxy Fast-Fail] Proxy unreachable: ${proxyLabel}`) as Error & {code?: string;statusCode?: number;@@ -244,6 +263,12 @@ export async function runWithProxyContext(proxyConfig, fn) {await assertHostnameSupportsFamily(u.hostname, fam === "ipv6" ? 6 : 4);}} catch (familyErr) {+ if (directFallbackOnUnreachable) {+ console.warn(+ `[ProxyFetch] Proxy family pre-check failed (${proxyUrlForLogs(resolvedProxyUrl)}); using a direct connection for this request.`+ );+ return runDirect();+ }const e = familyErr as Error & { code?: string; statusCode?: number };e.code = e.code || "PROXY_FAMILY_UNAVAILABLE";e.statusCode = e.statusCode || 503;@@ -261,6 +286,19 @@ export async function runWithProxyContext(proxyConfig, fn) {});}+/**+ * Like {@link runWithProxyContext}, but if the assigned proxy is unreachable or fails+ * its pre-checks the request degrades to a DIRECT connection instead of throwing.+ *+ * For control-plane flows — OAuth code/token exchange, connection tests, token refresh —+ * where a dead pinned proxy must not block reaching the upstream (it otherwise surfaces+ * as a generic "Internal server error"). Data-plane chat keeps strict pinning via+ * runWithProxyContext so per-account egress-IP isolation is preserved.+ */+export async function runWithProxyContextOrDirect(proxyConfig, fn) {+ return runWithProxyContext(proxyConfig, fn, { directFallbackOnUnreachable: true });+}+async function patchedFetch(input: RequestInfo | URL,options: FetchWithDispatcherOptions = {},diff --git a/open-sse/utils/requestLogger.ts b/open-sse/utils/requestLogger.tsindex 350cf6ec44..bdb78be2fb 100644--- a/open-sse/utils/requestLogger.ts+++ b/open-sse/utils/requestLogger.ts@@ -48,6 +48,7 @@ type RequestLoggerOptions = {captureStreamChunks?: boolean;maxStreamChunkBytes?: number;maxStreamChunkItems?: number;+ requestId?: string | null;model?: string;provider?: string;connectionId?: string | null;@@ -219,10 +220,7 @@ function compactPipelinePayloads(return hasOwnValues(result) ? result : null;}-function makeStreamChunkMethods(- options: RequestLoggerOptions,- captureChunks: boolean-) {+function makeStreamChunkMethods(options: RequestLoggerOptions, captureChunks: boolean) {const streamChunks = createEmptyStreamChunks();const streamChunkBytes = {provider: { value: 0, truncated: false },@@ -241,29 +239,35 @@ function makeStreamChunkMethods(const push = () => {if (pendingPushed) return;- if (!options.connectionId || !options.model) return;+ if (!options.requestId && (!options.connectionId || !options.model)) return;pendingPushed = true;- try {- const pending = getPendingById();- for (const entry of pending.values()) {- if (entry?.model === options.model && entry.provider === (options.provider || "")) {- entry.streamChunks = { ...streamChunks };- return;- }+ try {+ const pending = getPendingById();+ const exactEntry = options.requestId ? pending.get(options.requestId) : null;+ if (exactEntry) {+ exactEntry.streamChunks = { ...streamChunks };+ return;+ }++ for (const entry of pending.values()) {+ if (+ entry?.connectionId === options.connectionId &&+ entry?.model === options.model &&+ entry?.provider === (options.provider || "")+ ) {+ entry.streamChunks = { ...streamChunks };+ return;}- } catch (e) {- // Do not allow logging failures to disrupt request handling- try {- console.warn("[requestLogger] updatePendingRequestStreamChunks failed:", e);- } catch {}}+ } catch (e) {+ // Do not allow logging failures to disrupt request handling+ try {+ console.warn("[requestLogger] updatePendingRequestStreamChunks failed:", e);+ } catch {}+ }};- const append = (- arr: string[],- bytes: { value: number; truncated: boolean },- chunk: string- ) => {+ const append = (arr: string[], bytes: { value: number; truncated: boolean }, chunk: string) => {if (!captureChunks) return;push();appendBoundedChunk(arr, bytes, chunk, maxBytes, maxItems);@@ -308,7 +312,9 @@ export async function createRequestLogger(logConvertedResponse() {},appendConvertedChunk: chunkMethods.appendConvertedChunk,logError() {},- getPipelinePayloads() { return null; },+ getPipelinePayloads() {+ return null;+ },};}diff --git a/open-sse/utils/stream.ts b/open-sse/utils/stream.tsindex a1347ddcce..d88c161772 100644--- a/open-sse/utils/stream.ts+++ b/open-sse/utils/stream.ts@@ -93,6 +93,9 @@ type StreamCompletePayload = {responseBody?: unknown;providerPayload?: unknown;clientPayload?: unknown;+ error?: string | null;+ errorCode?: string | null;+ ttft?: number | null;};type StreamFailurePayload = {@@ -116,7 +119,7 @@ type StreamOptions = {apiKeyInfo?: unknown;body?: unknown;onComplete?: ((payload: StreamCompletePayload) => void) | null;- onFailure?: ((payload: StreamFailurePayload) => void | Promise<void>) | null;+ onFailure?: ((payload: StreamFailurePayload) => boolean | void | Promise<void>) | null;};type TranslateState = ReturnType<typeof initState> & {@@ -824,6 +827,13 @@ export function createSSEStream(options: StreamOptions = {}) {}};+ let pendingRequestClearedByStream = false;+ const clearPendingRequestFromStream = () => {+ if (pendingRequestClearedByStream) return;+ pendingRequestClearedByStream = true;+ trackPendingRequest(model, provider, connectionId, false);+ };+const emitClaudeEmptyStreamErrorAndAbort = (controller: TransformStreamDefaultController,decrementPendingRequest = true@@ -839,13 +849,14 @@ export function createSSEStream(options: StreamOptions = {}) {reqLogger?.appendConvertedChunk?.(errOutput);clientPayloadCollector.push(errorEvent);controller.enqueue(encoder.encode(errOutput));+ let failureHandled = false;if (onFailure) {try {- void onFailure({ status: 502, message: msg, code: "empty_response" });+ failureHandled = onFailure({ status: 502, message: msg, code: "empty_response" }) === true;} catch {}}- if (decrementPendingRequest) {- trackPendingRequest(model, provider, connectionId, false);+ if (decrementPendingRequest && !failureHandled) {+ clearPendingRequestFromStream();}controller.error(markPendingRequestCleared(new Error(msg)));};@@ -1056,7 +1067,21 @@ export function createSSEStream(options: StreamOptions = {}) {clearIdleTimer();const timeoutMsg = `[STREAM] Idle timeout: no data from ${provider || "provider"} for ${STREAM_IDLE_TIMEOUT_MS}ms (model: ${model || "unknown"})`;console.warn(timeoutMsg);- trackPendingRequest(model, provider, connectionId, false);+ let failureHandled = false;+ if (onFailure) {+ try {+ failureHandled =+ onFailure({+ status: HTTP_STATUS.GATEWAY_TIMEOUT,+ message: timeoutMsg,+ code: "stream_idle_timeout",+ type: "timeout_error",+ }) === true;+ } catch {}+ }+ if (!failureHandled) {+ clearPendingRequestFromStream();+ }appendRequestLog({model,provider,@@ -1572,6 +1597,7 @@ export function createSSEStream(options: StreamOptions = {}) {const delta = parsed.choices?.[0]?.delta;let textualToolCallConverted = false;let toolCallIdCoerced = false;+ let splitMixedReasoningContent = false;// Split combined reasoning+content deltas into separate SSE events.// Standard OpenAI streaming never mixes both fields in one delta;@@ -1593,12 +1619,15 @@ export function createSSEStream(options: StreamOptions = {}) {reqLogger?.appendConvertedChunk?.(rOutput);controller.enqueue(encoder.encode(rOutput));delete delta.reasoning_content;+ splitMixedReasoningContent = true;}// Track whether we need to re-serialize (separate from injectedUsage// to avoid blocking subsequent finish_reason / usage mutations)const needsReserialization =- hadReasoningAlias || (delta?.content === "" && delta?.reasoning_content);+ splitMixedReasoningContent ||+ hadReasoningAlias ||+ (delta?.content === "" && delta?.reasoning_content);// T18: Track if we saw tool calls & accumulate for call logif (delta?.tool_calls && delta.tool_calls.length > 0) {@@ -1755,13 +1784,16 @@ export function createSSEStream(options: StreamOptions = {}) {reqLogger?.appendConvertedChunk?.(output);controller.enqueue(encoder.encode(output));if (failurePayload) {+ let failureHandled = false;if (onFailure) {try {- void onFailure(failurePayload);+ failureHandled = onFailure(failurePayload) === true;} catch {}}clearIdleTimer();- trackPendingRequest(model, provider, connectionId, false);+ if (!failureHandled) {+ clearPendingRequestFromStream();+ }controller.error(markPendingRequestCleared(new Error(failurePayload.message || "Upstream failure")));@@ -1918,7 +1950,25 @@ export function createSSEStream(options: StreamOptions = {}) {// Extract usageconst extracted = extractUsage(parsed);- if (extracted) state.usage = extracted; // Keep original usage for logging+ if (extracted) {+ if (!state.usage) {+ state.usage = extracted;+ } else {+ const su = state.usage as Record<string, number>;+ const eu = extracted as Record<string, number>;+ if (eu.prompt_tokens > 0) su.prompt_tokens = eu.prompt_tokens;+ if (eu.completion_tokens > 0) su.completion_tokens = eu.completion_tokens;+ if (eu.total_tokens > 0) su.total_tokens = eu.total_tokens;+ if (eu.input_tokens > 0) su.input_tokens = eu.input_tokens;+ if (eu.output_tokens > 0) su.output_tokens = eu.output_tokens;+ if (eu.cache_read_input_tokens > 0)+ su.cache_read_input_tokens = eu.cache_read_input_tokens;+ if (eu.cache_creation_input_tokens > 0)+ su.cache_creation_input_tokens = eu.cache_creation_input_tokens;+ if (eu.cached_tokens > 0) su.cached_tokens = eu.cached_tokens;+ if (eu.reasoning_tokens > 0) su.reasoning_tokens = eu.reasoning_tokens;+ }+ }// Translate: targetFormat -> openai -> sourceFormatconst translated = translateResponse(targetFormat, sourceFormat, parsed, state);@@ -1945,7 +1995,6 @@ export function createSSEStream(options: StreamOptions = {}) {if (streamTimedOut) {return;}- trackPendingRequest(model, provider, connectionId, false);try {const remaining = decoder.decode();if (remaining) buffer += remaining;@@ -1969,7 +2018,7 @@ export function createSSEStream(options: StreamOptions = {}) {payload),emitClaudeEmptyStreamErrorAndAbort: () =>- emitClaudeEmptyStreamErrorAndAbort(controller, false),+ emitClaudeEmptyStreamErrorAndAbort(controller),isClaudeEventPayload,updateClaudeEmptyResponseLifecycle: (payload: unknown) =>updateClaudeEmptyResponseLifecycle(claudeEmptyResponseLifecycle, payload),@@ -2046,7 +2095,7 @@ export function createSSEStream(options: StreamOptions = {}) {bufferedPayload)) {- emitClaudeEmptyStreamErrorAndAbort(controller, false);+ emitClaudeEmptyStreamErrorAndAbort(controller);return;}if (isClaudeEventPayload(bufferedPayload)) {@@ -2104,7 +2153,7 @@ export function createSSEStream(options: StreamOptions = {}) {}if (shouldInjectClaudeEmptyResponseOnFlush(claudeEmptyResponseLifecycle)) {- emitClaudeEmptyStreamErrorAndAbort(controller, false);+ emitClaudeEmptyStreamErrorAndAbort(controller);return;} else if (shouldInjectClaudeMissingFinalizersOnFlush(claudeEmptyResponseLifecycle)) {emitSyntheticClaudeEmptyResponse(controller, {@@ -2272,6 +2321,8 @@ export function createSSEStream(options: StreamOptions = {}) {}),});} catch {}+ } else {+ clearPendingRequestFromStream();}return;}@@ -2297,6 +2348,8 @@ export function createSSEStream(options: StreamOptions = {}) {if (eu.prompt_tokens > 0) su.prompt_tokens = eu.prompt_tokens;if (eu.completion_tokens > 0) su.completion_tokens = eu.completion_tokens;if (eu.total_tokens > 0) su.total_tokens = eu.total_tokens;+ if (eu.input_tokens > 0) su.input_tokens = eu.input_tokens;+ if (eu.output_tokens > 0) su.output_tokens = eu.output_tokens;if (eu.cache_read_input_tokens > 0)su.cache_read_input_tokens = eu.cache_read_input_tokens;if (eu.cache_creation_input_tokens > 0)@@ -2324,15 +2377,16 @@ export function createSSEStream(options: StreamOptions = {}) {if (state?.upstreamError) {const err = state.upstreamError;- trackPendingRequest(model, provider, connectionId, false);+ let failureHandled = false;if (onFailure) {try {- void onFailure({- status: err.status,- message: err.message,- code: err.code,- type: err.type,- });+ failureHandled =+ onFailure({+ status: err.status,+ message: err.message,+ code: err.code,+ type: err.type,+ }) === true;} catch {}}@@ -2343,6 +2397,8 @@ export function createSSEStream(options: StreamOptions = {}) {status: err.status,usage: state?.usage,responseBody: errorBody,+ error: err.message,+ errorCode: err.code,providerPayload: providerPayloadCollector.build(buildStreamSummaryFromEvents(providerPayloadCollector.getEvents(),@@ -2355,10 +2411,14 @@ export function createSSEStream(options: StreamOptions = {}) {includeEvents: false,}),});+ failureHandled = true;} catch {}}clearIdleTimer();+ if (!failureHandled) {+ clearPendingRequestFromStream();+ }controller.error(markPendingRequestCleared(new Error(err.message || "Upstream failure")));@@ -2382,7 +2442,7 @@ export function createSSEStream(options: StreamOptions = {}) {if (sourceFormat === FORMATS.CLAUDE) {if (shouldInjectClaudeEmptyResponseOnFlush(claudeEmptyResponseLifecycle)) {- emitClaudeEmptyStreamErrorAndAbort(controller, false);+ emitClaudeEmptyStreamErrorAndAbort(controller);return;} else if (shouldInjectClaudeMissingFinalizersOnFlush(claudeEmptyResponseLifecycle)) {emitSyntheticClaudeEmptyResponse(controller, {@@ -2507,6 +2567,8 @@ export function createSSEStream(options: StreamOptions = {}) {}),});} catch {}+ } else {+ clearPendingRequestFromStream();}} catch (error) {console.log(`[STREAM] Error in flush (${model || "unknown"}):`, error.message || error);diff --git a/open-sse/utils/streamFailureFinalization.ts b/open-sse/utils/streamFailureFinalization.tsnew file mode 100644index 0000000000..fc8a339ce7--- /dev/null+++ b/open-sse/utils/streamFailureFinalization.ts@@ -0,0 +1,151 @@+import {+ finalizeMostRecentPendingRequest,+ finalizePendingRequestById,+} from "@/lib/usage/usageHistory.ts";++import { HTTP_STATUS } from "../config/constants.ts";+import { buildErrorBody } from "./error.ts";++export type StreamCompletionPayload = {+ status: number;+ usage: unknown;+ responseBody?: unknown;+ providerPayload?: unknown;+ clientPayload?: unknown;+ error?: string | null;+ errorCode?: string | null;+ ttft?: number | null;+};++export type StreamFailurePayload = {+ status: number;+ message: string;+ code?: string;+ type?: string;+};++export type PipelineStreamErrorHandler = (event: {+ message: string;+ statusCode: number;+}) => boolean;++export function finalizeStreamRequestLog({+ pendingRequestId,+ model,+ provider,+ connectionId,+ providerResponse,+ clientResponse,+ status,+ error,+ errorCode,+ onWarn,+}: {+ pendingRequestId: string;+ model: string;+ provider: string;+ connectionId: string | null;+ providerResponse?: unknown;+ clientResponse?: unknown;+ status: number;+ error?: string | null;+ errorCode?: string | null;+ onWarn?: (error: unknown) => void;+}) {+ try {+ const completedById = finalizePendingRequestById(pendingRequestId, {+ providerResponse,+ clientResponse,+ status,+ error: error || null,+ errorCode: errorCode || null,+ });+ if (!completedById) {+ finalizeMostRecentPendingRequest(model, provider, connectionId, {+ providerResponse,+ clientResponse,+ status,+ error: error || null,+ errorCode: errorCode || null,+ });+ }+ } catch (error) {+ try {+ if (onWarn) {+ onWarn(error);+ } else {+ console.warn(+ "finalizeMostRecentPendingRequest failed:",+ error && typeof error === "object" && "message" in error+ ? (error as { message?: unknown }).message+ : error+ );+ }+ } catch {}+ }+}++export function createStreamFailureFinalizers({+ isFailureCompletionRecorded,+ onStreamComplete,+ persistFailureUsage,+ onStreamFailure,+}: {+ isFailureCompletionRecorded: () => boolean;+ onStreamComplete: (payload: StreamCompletionPayload) => void;+ persistFailureUsage: (status: number, errorCode?: string) => void;+ onStreamFailure?: ((failure: StreamFailurePayload) => void) | null;+}) {+ const handleStreamFailure = (failure: StreamFailurePayload) => {+ const status = failure.status || HTTP_STATUS.BAD_GATEWAY;+ const message = failure.message || "Upstream stream error";+ const code = failure.code || failure.type || String(status);++ if (!isFailureCompletionRecorded()) {+ const errorBody = buildErrorBody(status, message);+ onStreamComplete({+ status,+ usage: null,+ responseBody: errorBody,+ providerPayload: errorBody,+ clientPayload: errorBody,+ error: message,+ errorCode: code,+ ttft: 0,+ });+ }++ persistFailureUsage(status, code);+ try {+ onStreamFailure?.(failure);+ } catch {+ // Best-effort fallback state update only.+ }+ return true;+ };++ let pipelineStreamFailureFinalized = false;+ const onPipelineStreamError: PipelineStreamErrorHandler = ({ message, statusCode }) => {+ if (pipelineStreamFailureFinalized) return true;+ pipelineStreamFailureFinalized = true;++ const status =+ Number.isFinite(statusCode) && statusCode >= 400 && statusCode <= 599+ ? statusCode+ : HTTP_STATUS.BAD_GATEWAY;+ const normalizedMessage = message || "Upstream stream error";+ const code = normalizedMessage.toLowerCase().includes("terminated")+ ? "stream_terminated"+ : "stream_pipeline_error";++ handleStreamFailure({+ status,+ message: normalizedMessage,+ code,+ type: "stream_error",+ });+ return true;+ };++ return { handleStreamFailure, onPipelineStreamError };+}diff --git a/open-sse/utils/streamHandler.ts b/open-sse/utils/streamHandler.tsindex 762b2747ae..634eb61592 100644--- a/open-sse/utils/streamHandler.ts+++ b/open-sse/utils/streamHandler.ts@@ -11,8 +11,16 @@ type StreamDisconnectEvent = {duration: number;};+type StreamErrorEvent = {+ error: unknown;+ message: string;+ statusCode: number;+ duration: number;+};+type StreamControllerOptions = {onDisconnect?: (event: StreamDisconnectEvent) => void;+ onError?: (event: StreamErrorEvent) => boolean | void;provider?: string;model?: string;connectionId?: string | null;@@ -116,6 +124,30 @@ function getTimeString() {});}+function isPendingRequestClearedError(error: unknown): boolean {+ return (+ !!error &&+ typeof error === "object" &&+ (error as Record<string, unknown>)[PENDING_REQUEST_CLEARED_MARKER] === true+ );+}++function getErrorMessage(error: unknown): string {+ if (error instanceof Error && error.message) return error.message;+ if (typeof error === "string" && error.trim().length > 0) return error;+ return "Upstream stream error";+}++function getErrorStatusCode(error: unknown): number {+ if (error && typeof error === "object" && "statusCode" in error) {+ const statusCode = Number((error as { statusCode?: unknown }).statusCode);+ if (Number.isFinite(statusCode) && statusCode >= 400 && statusCode <= 599) {+ return statusCode;+ }+ }+ return 502;+}+/*** Create stream controller with abort and disconnect detection* @param {object} options@@ -127,6 +159,7 @@ function getTimeString() {/** @param {StreamControllerOptions} options */export function createStreamController({onDisconnect,+ onError,provider,model,connectionId,@@ -209,7 +242,25 @@ export function createStreamController({abortTimeout = null;}- clearPendingRequest(error);+ const alreadyCleared = isPendingRequestClearedError(error);+ let handled = false;+ if (!alreadyCleared) {+ try {+ handled =+ onError?.({+ error,+ message: getErrorMessage(error),+ statusCode: getErrorStatusCode(error),+ duration: Date.now() - startTime,+ }) === true;+ } catch {}+ }++ if (!handled) {+ clearPendingRequest(error);+ } else {+ pendingRequestCleared = true;+ }if (error instanceof Error && error.name === "AbortError") {logStream("aborted");@@ -312,11 +363,8 @@ export function createDisconnectAwareStream(transformStream, streamController) {// T35: Encapsulate mid-stream errors as SSE events instead of abruptly aborting// This prevents TransferEncodingError on the client side- const errorMsg = error instanceof Error ? error.message : "Upstream stream error";- const statusCode =- typeof error === "object" && error !== null && "statusCode" in error- ? Number((error as { statusCode?: unknown }).statusCode) || 500- : 500;+ const errorMsg = getErrorMessage(error);+ const statusCode = getErrorStatusCode(error);for (const chunk of buildStreamErrorChunks(errorMsg,diff --git a/open-sse/utils/usageTracking.ts b/open-sse/utils/usageTracking.tsindex b70dcd631c..8e3e969c4e 100644--- a/open-sse/utils/usageTracking.ts+++ b/open-sse/utils/usageTracking.ts@@ -264,6 +264,8 @@ export function normalizeUsage(usage) {assignNumber("prompt_tokens", usage?.prompt_tokens);assignNumber("completion_tokens", usage?.completion_tokens);assignNumber("total_tokens", usage?.total_tokens);+ assignNumber("input_tokens", usage?.input_tokens);+ assignNumber("output_tokens", usage?.output_tokens);assignNumber("cache_read_input_tokens", usage?.cache_read_input_tokens);assignNumber("cache_creation_input_tokens", usage?.cache_creation_input_tokens);assignNumber("cached_tokens", usage?.cached_tokens);@@ -323,6 +325,8 @@ export function extractUsage(chunk) {return normalizeUsage({prompt_tokens: inputTokens + cacheRead + cacheCreation,completion_tokens: u.output_tokens || u.completion_tokens || 0,+ input_tokens: inputTokens + cacheRead + cacheCreation,+ output_tokens: u.output_tokens || u.completion_tokens || 0,cache_read_input_tokens: u.cache_read_input_tokens,cache_creation_input_tokens: u.cache_creation_input_tokens,});@@ -337,6 +341,8 @@ export function extractUsage(chunk) {return normalizeUsage({prompt_tokens: deltaInput + deltaCacheRead + deltaCacheCreation,completion_tokens: chunk.usage.output_tokens || 0,+ input_tokens: deltaInput + deltaCacheRead + deltaCacheCreation,+ output_tokens: chunk.usage.output_tokens || 0,cache_read_input_tokens: chunk.usage.cache_read_input_tokens,cache_creation_input_tokens: chunk.usage.cache_creation_input_tokens,});diff --git a/package-lock.json b/package-lock.jsonindex e053269520..6be7d68015 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "omniroute",- "version": "3.8.25",+ "version": "3.8.26","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "omniroute",- "version": "3.8.25",+ "version": "3.8.26","hasInstallScript": true,"license": "MIT","workspaces": [@@ -90,6 +90,9 @@"devDependencies": {"@cyclonedx/cyclonedx-npm": "4.2.1","@playwright/test": "^1.60.0",+ "@size-limit/file": "^12.1.0",+ "@stryker-mutator/core": "^9.6.1",+ "@stryker-mutator/tap-runner": "^9.6.1","@tailwindcss/postcss": "^4.3.0","@testing-library/jest-dom": "^6.9.1","@testing-library/react": "^16.3.2",@@ -672,12 +675,12 @@}},"node_modules/@babel/code-frame": {- "version": "7.29.0",- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",- "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",+ "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==","license": "MIT","dependencies": {- "@babel/helper-validator-identifier": "^7.28.5",+ "@babel/helper-validator-identifier": "^7.29.7","js-tokens": "^4.0.0","picocolors": "^1.1.1"},@@ -734,13 +737,13 @@"license": "MIT"},"node_modules/@babel/generator": {- "version": "7.29.1",- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",- "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz",+ "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==","license": "MIT","dependencies": {- "@babel/parser": "^7.29.0",- "@babel/types": "^7.29.0",+ "@babel/parser": "^7.29.7",+ "@babel/types": "^7.29.7","@jridgewell/gen-mapping": "^0.3.12","@jridgewell/trace-mapping": "^0.3.28","jsesc": "^3.0.2"@@ -749,6 +752,19 @@"node": ">=6.9.0"}},+ "node_modules/@babel/helper-annotate-as-pure": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz",+ "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },"node_modules/@babel/helper-compilation-targets": {"version": "7.28.6","resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",@@ -766,38 +782,115 @@"node": ">=6.9.0"}},+ "node_modules/@babel/helper-create-class-features-plugin": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.29.7.tgz",+ "integrity": "sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-annotate-as-pure": "^7.29.7",+ "@babel/helper-member-expression-to-functions": "^7.29.7",+ "@babel/helper-optimise-call-expression": "^7.29.7",+ "@babel/helper-replace-supers": "^7.29.7",+ "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7",+ "@babel/traverse": "^7.29.7",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },"node_modules/@babel/helper-globals": {- "version": "7.28.0",- "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",- "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",+ "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==","license": "MIT","engines": {"node": ">=6.9.0"}},+ "node_modules/@babel/helper-member-expression-to-functions": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.29.7.tgz",+ "integrity": "sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },"node_modules/@babel/helper-module-imports": {- "version": "7.28.6",- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",- "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",+ "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==","license": "MIT","dependencies": {- "@babel/traverse": "^7.28.6",- "@babel/types": "^7.28.6"+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7"},"engines": {"node": ">=6.9.0"}},"node_modules/@babel/helper-module-transforms": {- "version": "7.28.6",- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",- "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",+ "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-imports": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7",+ "@babel/traverse": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-optimise-call-expression": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.29.7.tgz",+ "integrity": "sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-plugin-utils": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz",+ "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-replace-supers": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.29.7.tgz",+ "integrity": "sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==","dev": true,"license": "MIT","dependencies": {- "@babel/helper-module-imports": "^7.28.6",- "@babel/helper-validator-identifier": "^7.28.5",- "@babel/traverse": "^7.28.6"+ "@babel/helper-member-expression-to-functions": "^7.29.7",+ "@babel/helper-optimise-call-expression": "^7.29.7",+ "@babel/traverse": "^7.29.7"},"engines": {"node": ">=6.9.0"@@ -806,19 +899,33 @@"@babel/core": "^7.0.0"}},+ "node_modules/@babel/helper-skip-transparent-expression-wrappers": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.29.7.tgz",+ "integrity": "sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },"node_modules/@babel/helper-string-parser": {- "version": "7.27.1",- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",- "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",+ "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==","license": "MIT","engines": {"node": ">=6.9.0"}},"node_modules/@babel/helper-validator-identifier": {- "version": "7.28.5",- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",- "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==","license": "MIT","engines": {"node": ">=6.9.0"@@ -849,12 +956,12 @@}},"node_modules/@babel/parser": {- "version": "7.29.2",- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",- "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",+ "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==","license": "MIT","dependencies": {- "@babel/types": "^7.29.0"+ "@babel/types": "^7.29.7"},"bin": {"parser": "bin/babel-parser.js"@@ -863,6 +970,163 @@"node": ">=6.0.0"}},+ "node_modules/@babel/plugin-proposal-decorators": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.29.7.tgz",+ "integrity": "sha512-EtU0Hi3GvrTqD56xKmZvV/uCXK2ZbwVNPNLAquVItcAZpUhkXwWlo3Fmj0c2LxgSf2I8IDULeAepwNP1OefLXg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-create-class-features-plugin": "^7.29.7",+ "@babel/helper-plugin-utils": "^7.29.7",+ "@babel/plugin-syntax-decorators": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-syntax-decorators": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.29.7.tgz",+ "integrity": "sha512-9MTTLbF39X6sqM92JPEsoI7++26hjZvzkxKZy64aMhWLH2mPkJ/Q3AV4QLmls3R14FpSpkOwQQfUh962JGQxxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-syntax-jsx": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz",+ "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-syntax-typescript": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz",+ "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-destructuring": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.29.7.tgz",+ "integrity": "sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7",+ "@babel/traverse": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-explicit-resource-management": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.29.7.tgz",+ "integrity": "sha512-Rstj7coNz8sE+7Ju7ihpHLI564lsK5pUpNNlvptCIC/16E/S5hbl6n3kESPKdNRmqEWlpn5xpS5Q2dvXBsySLw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7",+ "@babel/plugin-transform-destructuring": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-modules-commonjs": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.29.7.tgz",+ "integrity": "sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-transforms": "^7.29.7",+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-typescript": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.29.7.tgz",+ "integrity": "sha512-jK52h8LaLc7JarhQV2ofeFMts4H7vnOXnqZNA6fYglBTZewRBE51KWt3BUltW1P+KoPsYkHoJeXePuz4zo2LMw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-annotate-as-pure": "^7.29.7",+ "@babel/helper-create-class-features-plugin": "^7.29.7",+ "@babel/helper-plugin-utils": "^7.29.7",+ "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7",+ "@babel/plugin-syntax-typescript": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/preset-typescript": {+ "version": "7.28.5",+ "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz",+ "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.27.1",+ "@babel/helper-validator-option": "^7.27.1",+ "@babel/plugin-syntax-jsx": "^7.27.1",+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",+ "@babel/plugin-transform-typescript": "^7.28.5"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },"node_modules/@babel/runtime": {"version": "7.29.2","resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz",@@ -873,31 +1137,31 @@}},"node_modules/@babel/template": {- "version": "7.28.6",- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",- "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",+ "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==","license": "MIT","dependencies": {- "@babel/code-frame": "^7.28.6",- "@babel/parser": "^7.28.6",- "@babel/types": "^7.28.6"+ "@babel/code-frame": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/types": "^7.29.7"},"engines": {"node": ">=6.9.0"}},"node_modules/@babel/traverse": {- "version": "7.29.0",- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",- "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz",+ "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==","license": "MIT","dependencies": {- "@babel/code-frame": "^7.29.0",- "@babel/generator": "^7.29.0",- "@babel/helper-globals": "^7.28.0",- "@babel/parser": "^7.29.0",- "@babel/template": "^7.28.6",- "@babel/types": "^7.29.0",+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.7",+ "@babel/helper-globals": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.7","debug": "^4.3.1"},"engines": {@@ -905,13 +1169,13 @@}},"node_modules/@babel/types": {- "version": "7.29.0",- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",- "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",+ "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==","license": "MIT","dependencies": {- "@babel/helper-string-parser": "^7.27.1",- "@babel/helper-validator-identifier": "^7.28.5"+ "@babel/helper-string-parser": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7"},"engines": {"node": ">=6.9.0"@@ -2779,6 +3043,350 @@"url": "https://opencollective.com/libvips"}},+ "node_modules/@inquirer/ansi": {+ "version": "2.0.7",+ "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.7.tgz",+ "integrity": "sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ }+ },+ "node_modules/@inquirer/checkbox": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.2.1.tgz",+ "integrity": "sha512-b6xmA/VlTe0ZgDQHDui+Nav470u7u49nRd8/iuhOcQPO9Ch7lGuogydhi2VOmNlZ+zXcM8IcPuNSwQcdJaF/kw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/ansi": "^2.0.7",+ "@inquirer/core": "^11.2.1",+ "@inquirer/figures": "^2.0.7",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/confirm": {+ "version": "6.1.1",+ "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.1.1.tgz",+ "integrity": "sha512-eb8DBZcz/2qHWQda4rk2JiQk5h9QV/cVHi1yjt0f69WFZMRFn0sJTye3EAP8icut8UDMjQPsaH5KbcOogefrFQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/core": {+ "version": "11.2.1",+ "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.2.1.tgz",+ "integrity": "sha512-Qd6GJT1yVyrZZCfN8W2qKF5ApmqryXRhRKCuip8h01x2w/esJQ2XIYc6f9abMIHgKQdBfFTSOdbHRLAhuM09UA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/ansi": "^2.0.7",+ "@inquirer/figures": "^2.0.7",+ "@inquirer/type": "^4.0.7",+ "cli-width": "^4.1.0",+ "fast-wrap-ansi": "^0.2.0",+ "mute-stream": "^3.0.0",+ "signal-exit": "^4.1.0"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/editor": {+ "version": "5.2.2",+ "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.2.2.tgz",+ "integrity": "sha512-ZRVd/oD+sYsUd5zVm0NflqEzlqfYCyHNsqkHl2oWXEUHs12tCbcSFi+wVFEvD8+LGRaMUsVrE7qeo6lSG/S1Vg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/external-editor": "^3.0.3",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/expand": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.1.1.tgz",+ "integrity": "sha512-YmQpenjbFSHAK3sOd44puHh3V1KXXr+JiNpUztoSQ4drLh2rTVzTap/YtlAVu/5xavifIlBfNEzJ/neZJ1a/1g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/external-editor": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.3.tgz",+ "integrity": "sha512-6thf5I8q7lZwzGLAxPaaGEREEkZ3nyePPDQ1oyobblxmEE8mqTLguScP7pDjUTAibiyb4hfXl+qjUEJ+di/aNA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "chardet": "^2.1.1",+ "iconv-lite": "^0.7.2"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/figures": {+ "version": "2.0.7",+ "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.7.tgz",+ "integrity": "sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ }+ },+ "node_modules/@inquirer/input": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.1.2.tgz",+ "integrity": "sha512-9K/DDBSQpOyZSkt6sOVP9Vo0TR7atX2kuILsUu0x3wVcVbe97lJwIJKMLdMw25tDYuXl/qp6erT0Xs1rfmcfZg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/number": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.1.1.tgz",+ "integrity": "sha512-XF4IXAbPnGPgw0wsbC/i2tPcyfdZgDpUlhsqU0SfT4IRIGWha6Xm9VRgN5yYxJq+jnyXlfXI/nQ3ulfk0iEICA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/password": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.1.1.tgz",+ "integrity": "sha512-3XBfF7DAsp5qeDsvN5Rd1HmbNokVvEQoUM0QLrRcybC9nX96w3Pbmu7qUsb3IT3J3jBvs2+mTXaKHOUsgHMLzg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/ansi": "^2.0.7",+ "@inquirer/core": "^11.2.1",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/prompts": {+ "version": "8.5.2",+ "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.5.2.tgz",+ "integrity": "sha512-IYR/3C/paEVVQYQvdDlFZVjRCJVYHHON0XXMH91KO9GSxs0TdKYWlUdvfQl2EfAHDxUaN3IBffkE/BDTh5nJ6g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/checkbox": "^5.2.1",+ "@inquirer/confirm": "^6.1.1",+ "@inquirer/editor": "^5.2.2",+ "@inquirer/expand": "^5.1.1",+ "@inquirer/input": "^5.1.2",+ "@inquirer/number": "^4.1.1",+ "@inquirer/password": "^5.1.1",+ "@inquirer/rawlist": "^5.3.1",+ "@inquirer/search": "^4.2.1",+ "@inquirer/select": "^5.2.1"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/rawlist": {+ "version": "5.3.1",+ "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.3.1.tgz",+ "integrity": "sha512-QqdTqQddL3qPX/PPrjobpsO25NZ4dWXgTLenrR445L2ptLEYE6Z+PD5c5CNDJNx4ugRgELAIpSIJxZaO2jJ2Og==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/search": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.2.1.tgz",+ "integrity": "sha512-xJj8QWKRSrfKoBIITLZK61dD3zwo0Rz11fgDImku30/Oe81zMdIdGgrLY2h6RkJ+KZ/GhNYIRMKnH/62qBTA5g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^11.2.1",+ "@inquirer/figures": "^2.0.7",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/select": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.2.1.tgz",+ "integrity": "sha512-FlDndEUww8m7BfukO2nJa25vhD+H5jxxCv4oGioKqzyWz3nPHhhw4LKdYRSlXuAx7DsdWia7iyaBPKKS95Evfw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/ansi": "^2.0.7",+ "@inquirer/core": "^11.2.1",+ "@inquirer/figures": "^2.0.7",+ "@inquirer/type": "^4.0.7"+ },+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/type": {+ "version": "4.0.7",+ "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.7.tgz",+ "integrity": "sha512-t28inv14nMQ1PhKpsJPY+kEs/c00qzeCOS2gTNRyTjG5d6qsVA2fItxW4hkvGZ5lvanGLdtCzVIx5dwdRpN1+g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },"node_modules/@ioredis/commands": {"version": "1.10.0","resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.10.0.tgz",@@ -4617,9 +5225,9 @@}},"node_modules/@oxc-project/types": {- "version": "0.122.0",- "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.122.0.tgz",- "integrity": "sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==",+ "version": "0.133.0",+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz",+ "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==","dev": true,"license": "MIT","funding": {@@ -6365,9 +6973,9 @@}},"node_modules/@rolldown/binding-android-arm64": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.12.tgz",- "integrity": "sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz",+ "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==","cpu": ["arm64"],@@ -6382,9 +6990,9 @@}},"node_modules/@rolldown/binding-darwin-arm64": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.12.tgz",- "integrity": "sha512-cFYr6zTG/3PXXF3pUO+umXxt1wkRK/0AYT8lDwuqvRC+LuKYWSAQAQZjCWDQpAH172ZV6ieYrNnFzVVcnSflAg==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz",+ "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==","cpu": ["arm64"],@@ -6399,9 +7007,9 @@}},"node_modules/@rolldown/binding-darwin-x64": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.12.tgz",- "integrity": "sha512-ZCsYknnHzeXYps0lGBz8JrF37GpE9bFVefrlmDrAQhOEi4IOIlcoU1+FwHEtyXGx2VkYAvhu7dyBf75EJQffBw==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz",+ "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==","cpu": ["x64"],@@ -6416,9 +7024,9 @@}},"node_modules/@rolldown/binding-freebsd-x64": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.12.tgz",- "integrity": "sha512-dMLeprcVsyJsKolRXyoTH3NL6qtsT0Y2xeuEA8WQJquWFXkEC4bcu1rLZZSnZRMtAqwtrF/Ib9Ddtpa/Gkge9Q==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz",+ "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==","cpu": ["x64"],@@ -6433,9 +7041,9 @@}},"node_modules/@rolldown/binding-linux-arm-gnueabihf": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.12.tgz",- "integrity": "sha512-YqWjAgGC/9M1lz3GR1r1rP79nMgo3mQiiA+Hfo+pvKFK1fAJ1bCi0ZQVh8noOqNacuY1qIcfyVfP6HoyBRZ85Q==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz",+ "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==","cpu": ["arm"],@@ -6450,13 +7058,16 @@}},"node_modules/@rolldown/binding-linux-arm64-gnu": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.12.tgz",- "integrity": "sha512-/I5AS4cIroLpslsmzXfwbe5OmWvSsrFuEw3mwvbQ1kDxJ822hFHIx+vsN/TAzNVyepI/j/GSzrtCIwQPeKCLIg==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz",+ "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==","cpu": ["arm64"],"dev": true,+ "libc": [+ "glibc"+ ],"license": "MIT","optional": true,"os": [@@ -6467,13 +7078,16 @@}},"node_modules/@rolldown/binding-linux-arm64-musl": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.12.tgz",- "integrity": "sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz",+ "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==","cpu": ["arm64"],"dev": true,+ "libc": [+ "musl"+ ],"license": "MIT","optional": true,"os": [@@ -6484,13 +7098,16 @@}},"node_modules/@rolldown/binding-linux-ppc64-gnu": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.12.tgz",- "integrity": "sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz",+ "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==","cpu": ["ppc64"],"dev": true,+ "libc": [+ "glibc"+ ],"license": "MIT","optional": true,"os": [@@ -6501,13 +7118,16 @@}},"node_modules/@rolldown/binding-linux-s390x-gnu": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.12.tgz",- "integrity": "sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz",+ "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==","cpu": ["s390x"],"dev": true,+ "libc": [+ "glibc"+ ],"license": "MIT","optional": true,"os": [@@ -6518,13 +7138,16 @@}},"node_modules/@rolldown/binding-linux-x64-gnu": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.12.tgz",- "integrity": "sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz",+ "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==","cpu": ["x64"],"dev": true,+ "libc": [+ "glibc"+ ],"license": "MIT","optional": true,"os": [@@ -6535,13 +7158,16 @@}},"node_modules/@rolldown/binding-linux-x64-musl": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.12.tgz",- "integrity": "sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz",+ "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==","cpu": ["x64"],"dev": true,+ "libc": [+ "musl"+ ],"license": "MIT","optional": true,"os": [@@ -6552,9 +7178,9 @@}},"node_modules/@rolldown/binding-openharmony-arm64": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.12.tgz",- "integrity": "sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz",+ "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==","cpu": ["arm64"],@@ -6569,9 +7195,9 @@}},"node_modules/@rolldown/binding-wasm32-wasi": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.12.tgz",- "integrity": "sha512-ykGiLr/6kkiHc0XnBfmFJuCjr5ZYKKofkx+chJWDjitX+KsJuAmrzWhwyOMSHzPhzOHOy7u9HlFoa5MoAOJ/Zg==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz",+ "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==","cpu": ["wasm32"],@@ -6579,16 +7205,18 @@"license": "MIT","optional": true,"dependencies": {- "@napi-rs/wasm-runtime": "^1.1.1"+ "@emnapi/core": "1.10.0",+ "@emnapi/runtime": "1.10.0",+ "@napi-rs/wasm-runtime": "^1.1.4"},"engines": {- "node": ">=14.0.0"+ "node": "^20.19.0 || >=22.12.0"}},"node_modules/@rolldown/binding-win32-arm64-msvc": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.12.tgz",- "integrity": "sha512-5eOND4duWkwx1AzCxadcOrNeighiLwMInEADT0YM7xeEOOFcovWZCq8dadXgcRHSf3Ulh1kFo/qvzoFiCLOL1Q==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz",+ "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==","cpu": ["arm64"],@@ -6603,9 +7231,9 @@}},"node_modules/@rolldown/binding-win32-x64-msvc": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.12.tgz",- "integrity": "sha512-PyqoipaswDLAZtot351MLhrlrh6lcZPo2LSYE+VDxbVk24LVKAGOuE4hb8xZQmrPAuEtTZW8E6D2zc5EUZX4Lw==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz",+ "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==","cpu": ["x64"],@@ -6639,6 +7267,13 @@"integrity": "sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==","license": "MIT"},+ "node_modules/@sec-ant/readable-stream": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz",+ "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==",+ "dev": true,+ "license": "MIT"+ },"node_modules/@shikijs/core": {"version": "4.1.0","resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.1.0.tgz",@@ -6831,6 +7466,32 @@"url": "https://github.com/sindresorhus/is?sponsor=1"}},+ "node_modules/@sindresorhus/merge-streams": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz",+ "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@size-limit/file": {+ "version": "12.1.0",+ "resolved": "https://registry.npmjs.org/@size-limit/file/-/file-12.1.0.tgz",+ "integrity": "sha512-eGwDcIufnNnvJRzv3liDOn6MAOGgmOTUdpeGQ2KuRTlgIgO54AJH1ilvktlJc6PIjNfwpYY0dOGyap1QgM1swQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^20.0.0 || ^22.0.0 || >=24.0.0"+ },+ "peerDependencies": {+ "size-limit": "12.1.0"+ }+ },"node_modules/@smithy/core": {"version": "3.24.6","resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.6.tgz",@@ -6931,37 +7592,343 @@"integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==","license": "Apache-2.0","dependencies": {- "@smithy/is-array-buffer": "^2.2.0",- "tslib": "^2.6.2"+ "@smithy/is-array-buffer": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@smithy/util-utf8": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-buffer-from": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@standard-schema/spec": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",+ "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",+ "license": "MIT"+ },+ "node_modules/@standard-schema/utils": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",+ "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",+ "license": "MIT"+ },+ "node_modules/@stryker-mutator/api": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/@stryker-mutator/api/-/api-9.6.1.tgz",+ "integrity": "sha512-g8VNoFWQWbx0pdal3Vt8jVCZW+v3sc3gi94iI0GVtVgUGTqphAjJF6EAruPTx0lqvtonsaAxn5TD36hcG1d6Wg==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "mutation-testing-metrics": "3.7.3",+ "mutation-testing-report-schema": "3.7.3",+ "tslib": "~2.8.0",+ "typed-inject": "~5.0.0"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@stryker-mutator/core": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/@stryker-mutator/core/-/core-9.6.1.tgz",+ "integrity": "sha512-WMgnvf+Wyh/yiruhNZwc8w8DlzmmjXhPjSn5MR8RhAXzlnWji8TQrUYgBUkHk9bEgSaIlB3KZHm37iiU5Q2cLQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@inquirer/prompts": "^8.0.0",+ "@stryker-mutator/api": "9.6.1",+ "@stryker-mutator/instrumenter": "9.6.1",+ "@stryker-mutator/util": "9.6.1",+ "ajv": "~8.18.0",+ "chalk": "~5.6.0",+ "commander": "~14.0.0",+ "diff-match-patch": "1.0.5",+ "emoji-regex": "~10.6.0",+ "execa": "~9.6.0",+ "json-rpc-2.0": "^1.7.0",+ "lodash.groupby": "~4.6.0",+ "minimatch": "~10.2.4",+ "mutation-server-protocol": "~0.4.0",+ "mutation-testing-elements": "3.7.3",+ "mutation-testing-metrics": "3.7.3",+ "mutation-testing-report-schema": "3.7.3",+ "npm-run-path": "~6.0.0",+ "progress": "~2.0.3",+ "rxjs": "~7.8.1",+ "semver": "^7.6.3",+ "source-map": "~0.7.4",+ "tree-kill": "~1.2.2",+ "tslib": "2.8.1",+ "typed-inject": "~5.0.0",+ "typed-rest-client": "~2.3.0"+ },+ "bin": {+ "stryker": "bin/stryker.js"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/brace-expansion": {+ "version": "5.0.6",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",+ "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/chalk": {+ "version": "5.6.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",+ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^12.17.0 || ^14.13 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/commander": {+ "version": "14.0.3",+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",+ "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/execa": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz",+ "integrity": "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@sindresorhus/merge-streams": "^4.0.0",+ "cross-spawn": "^7.0.6",+ "figures": "^6.1.0",+ "get-stream": "^9.0.0",+ "human-signals": "^8.0.1",+ "is-plain-obj": "^4.1.0",+ "is-stream": "^4.0.1",+ "npm-run-path": "^6.0.0",+ "pretty-ms": "^9.2.0",+ "signal-exit": "^4.1.0",+ "strip-final-newline": "^4.0.0",+ "yoctocolors": "^2.1.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.5.0"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/execa?sponsor=1"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/get-stream": {+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz",+ "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@sec-ant/readable-stream": "^0.4.1",+ "is-stream": "^4.0.1"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/human-signals": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz",+ "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/is-stream": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz",+ "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/minimatch": {+ "version": "10.2.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.5"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/npm-run-path": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz",+ "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "path-key": "^4.0.0",+ "unicorn-magic": "^0.3.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/path-key": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/semver": {+ "version": "7.8.4",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz",+ "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@stryker-mutator/core/node_modules/strip-final-newline": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz",+ "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@stryker-mutator/instrumenter": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/@stryker-mutator/instrumenter/-/instrumenter-9.6.1.tgz",+ "integrity": "sha512-5K8wH4Pthly25c2uKKik4Dfcoeou7sbJdFS6u3QIYHlulgFVDJwtEMWTZGkZfs7IiUEXIDNa0keRACq5jn5AvA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@babel/core": "~7.29.0",+ "@babel/generator": "~7.29.0",+ "@babel/parser": "~7.29.0",+ "@babel/plugin-proposal-decorators": "~7.29.0",+ "@babel/plugin-transform-explicit-resource-management": "^7.28.0",+ "@babel/preset-typescript": "~7.28.0",+ "@stryker-mutator/api": "9.6.1",+ "@stryker-mutator/util": "9.6.1",+ "angular-html-parser": "~10.4.0",+ "semver": "~7.7.0",+ "tslib": "2.8.1",+ "weapon-regex": "~1.3.2"},"engines": {- "node": ">=14.0.0"+ "node": ">=20.0.0"}},- "node_modules/@smithy/util-utf8": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",- "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",+ "node_modules/@stryker-mutator/instrumenter/node_modules/semver": {+ "version": "7.7.4",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@stryker-mutator/tap-runner": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/@stryker-mutator/tap-runner/-/tap-runner-9.6.1.tgz",+ "integrity": "sha512-b5ryfiRQHH5VoWP++VEA9KYiU6lhVbE9znooFaWRr7umaAtqKmlWrFinKA6fghwiFpdxerRpctLDT8uVKzeQEw==",+ "dev": true,"license": "Apache-2.0","dependencies": {- "@smithy/util-buffer-from": "^2.2.0",- "tslib": "^2.6.2"+ "@stryker-mutator/api": "9.6.1",+ "@stryker-mutator/util": "9.6.1",+ "glob": "~13.0.0",+ "tap-parser": "~17.0.0",+ "tslib": "~2.8.0"},"engines": {- "node": ">=14.0.0"+ "node": ">=14.18.0"+ },+ "peerDependencies": {+ "@stryker-mutator/core": "9.6.1"}},- "node_modules/@standard-schema/spec": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",- "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",- "license": "MIT"- },- "node_modules/@standard-schema/utils": {- "version": "0.3.0",- "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",- "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",- "license": "MIT"+ "node_modules/@stryker-mutator/util": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/@stryker-mutator/util/-/util-9.6.1.tgz",+ "integrity": "sha512-Lk/ALVctJjFv1vvwR+CFoKzDCWvsBlq7flDUnmnpuwTrGbm156EdZD1Jjq4o8KdOap0ezUZqQNE9OAI1m2+pUQ==",+ "dev": true,+ "license": "Apache-2.0"},"node_modules/@swc/core": {"version": "1.15.21",@@ -9030,6 +9997,16 @@"ajv": "*"}},+ "node_modules/angular-html-parser": {+ "version": "10.4.0",+ "resolved": "https://registry.npmjs.org/angular-html-parser/-/angular-html-parser-10.4.0.tgz",+ "integrity": "sha512-++nLNyZwRfHqFh7akH5Gw/JYizoFlMRz0KRigfwfsLqV8ZqlcVRb1LkPEWdYvEKDnbktknM2J4BXaYUGrQZPww==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14"+ }+ },"node_modules/ansi-align": {"version": "3.0.1","resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",@@ -10241,6 +11218,13 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/chardet": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz",+ "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==",+ "dev": true,+ "license": "MIT"+ },"node_modules/chokidar": {"version": "5.0.0","resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",@@ -10516,6 +11500,16 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/cli-width": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",+ "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">= 12"+ }+ },"node_modules/client-only": {"version": "0.0.1","resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",@@ -11901,6 +12895,17 @@"node": ">=6"}},+ "node_modules/des.js": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz",+ "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "inherits": "^2.0.1",+ "minimalistic-assert": "^1.0.0"+ }+ },"node_modules/detect-libc": {"version": "2.1.2","resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",@@ -11935,6 +12940,13 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/diff-match-patch": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz",+ "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==",+ "dev": true,+ "license": "Apache-2.0"+ },"node_modules/discontinuous-range": {"version": "1.0.0","resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz",@@ -13316,6 +14328,16 @@"integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==","license": "MIT"},+ "node_modules/events-to-array": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-2.0.3.tgz",+ "integrity": "sha512-f/qE2gImHRa4Cp2y1stEOSgw8wTFyUdVJX7G//bMwbaV9JqISFxg99NbmVQeP7YLnDUZ2un851jlaDrlpmGehQ==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=12"+ }+ },"node_modules/eventsource": {"version": "3.0.7","resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",@@ -13575,6 +14597,23 @@"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==","license": "MIT"},+ "node_modules/fast-string-truncated-width": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz",+ "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fast-string-width": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz",+ "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fast-string-truncated-width": "^3.0.2"+ }+ },"node_modules/fast-uri": {"version": "3.1.2","resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",@@ -13591,6 +14630,16 @@],"license": "BSD-3-Clause"},+ "node_modules/fast-wrap-ansi": {+ "version": "0.2.2",+ "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz",+ "integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fast-string-width": "^3.0.2"+ }+ },"node_modules/fast-xml-builder": {"version": "1.2.0","resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.2.0.tgz",@@ -13681,6 +14730,22 @@"integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==","license": "MIT"},+ "node_modules/figures": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz",+ "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-unicode-supported": "^2.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/file-entry-cache": {"version": "8.0.0","resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",@@ -13838,16 +14903,16 @@}},"node_modules/form-data": {- "version": "4.0.5",- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",- "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==","license": "MIT","dependencies": {"asynckit": "^0.4.0","combined-stream": "^1.0.8","es-set-tostringtag": "^2.1.0",- "hasown": "^2.0.2",- "mime-types": "^2.1.12"+ "hasown": "^2.0.4",+ "mime-types": "^2.1.35"},"engines": {"node": ">= 6"@@ -14692,9 +15757,9 @@}},"node_modules/hasown": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==","license": "MIT","dependencies": {"function-bind": "^1.1.2"@@ -16524,6 +17589,13 @@"node": ">=10"}},+ "node_modules/js-md4": {+ "version": "0.3.2",+ "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz",+ "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==",+ "dev": true,+ "license": "MIT"+ },"node_modules/js-stringify": {"version": "1.0.2","resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",@@ -16678,6 +17750,13 @@"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==","license": "MIT"},+ "node_modules/json-rpc-2.0": {+ "version": "1.7.1",+ "resolved": "https://registry.npmjs.org/json-rpc-2.0/-/json-rpc-2.0-1.7.1.tgz",+ "integrity": "sha512-JqZjhjAanbpkXIzFE7u8mE/iFblawwlXtONaCvRqI+pyABVz7B4M1EUNpyVW+dZjqgQ2L5HFmZCmOCgUKm00hg==",+ "dev": true,+ "license": "MIT"+ },"node_modules/json-schema-traverse": {"version": "1.0.0","resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",@@ -17888,6 +18967,13 @@"dev": true,"license": "MIT"},+ "node_modules/lodash.groupby": {+ "version": "4.6.0",+ "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz",+ "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==",+ "dev": true,+ "license": "MIT"+ },"node_modules/lodash.merge": {"version": "4.6.2","resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",@@ -19425,6 +20511,13 @@"node": ">=4"}},+ "node_modules/minimalistic-assert": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",+ "dev": true,+ "license": "ISC"+ },"node_modules/minimatch": {"version": "3.1.5","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",@@ -19689,6 +20782,53 @@"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==","license": "MIT"},+ "node_modules/mutation-server-protocol": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/mutation-server-protocol/-/mutation-server-protocol-0.4.1.tgz",+ "integrity": "sha512-SBGK0j8hLDne7bktgThKI8kGvGTx3rY3LAeQTmOKZ5bVnL/7TorLMvcVF7dIPJCu5RNUWhkkuF53kurygYVt3g==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "zod": "^4.1.12"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/mutation-testing-elements": {+ "version": "3.7.3",+ "resolved": "https://registry.npmjs.org/mutation-testing-elements/-/mutation-testing-elements-3.7.3.tgz",+ "integrity": "sha512-SMeIPxngJpfjfNYctFpYQQtlBlZaVO0aoB3FKdwrI8Ee/2bkyUuCZzAOCLv1U9fnmfA37dPFq0Owduoxs2XgGQ==",+ "dev": true,+ "license": "Apache-2.0"+ },+ "node_modules/mutation-testing-metrics": {+ "version": "3.7.3",+ "resolved": "https://registry.npmjs.org/mutation-testing-metrics/-/mutation-testing-metrics-3.7.3.tgz",+ "integrity": "sha512-B8QrP0ZomErzTPNlhrzKWPNBln+3afwBZPHv0Q7N8wZZTYxMptzb/Gdm3ExXVmioVYrtZAtsDs7W/T/b2AixOQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "mutation-testing-report-schema": "3.7.3"+ }+ },+ "node_modules/mutation-testing-report-schema": {+ "version": "3.7.3",+ "resolved": "https://registry.npmjs.org/mutation-testing-report-schema/-/mutation-testing-report-schema-3.7.3.tgz",+ "integrity": "sha512-BHm3MYq+ckO+t5CtlG8zpqxc75rdJCkxVlE+fGuGJM3F7tNCQ/OW2N+TQVHN3BHsYa84+BFc6g3AwDYkUsw2MA==",+ "dev": true,+ "license": "Apache-2.0"+ },+ "node_modules/mute-stream": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-3.0.0.tgz",+ "integrity": "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },"node_modules/mz": {"version": "2.7.0","resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",@@ -20712,16 +21852,6 @@"@oxc-parser/binding-win32-x64-msvc": "0.133.0"}},- "node_modules/oxc-parser/node_modules/@oxc-project/types": {- "version": "0.133.0",- "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz",- "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==",- "dev": true,- "license": "MIT",- "funding": {- "url": "https://github.com/sponsors/Boshen"- }- },"node_modules/oxc-resolver": {"version": "11.20.0","resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.20.0.tgz",@@ -20961,6 +22091,19 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/parse-ms": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz",+ "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/parse5": {"version": "8.0.1","resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz",@@ -21432,6 +22575,22 @@"url": "https://github.com/prettier/prettier?sponsor=1"}},+ "node_modules/pretty-ms": {+ "version": "9.3.0",+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz",+ "integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "parse-ms": "^4.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/proc-log": {"version": "6.1.0","resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.1.0.tgz",@@ -21468,6 +22627,16 @@"node": "^20.17.0 || >=22.9.0"}},+ "node_modules/progress": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.4.0"+ }+ },"node_modules/promise": {"version": "7.3.1","resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",@@ -22708,14 +23877,14 @@"license": "Unlicense"},"node_modules/rolldown": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.12.tgz",- "integrity": "sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz",+ "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==","dev": true,"license": "MIT","dependencies": {- "@oxc-project/types": "=0.122.0",- "@rolldown/pluginutils": "1.0.0-rc.12"+ "@oxc-project/types": "=0.133.0",+ "@rolldown/pluginutils": "^1.0.0"},"bin": {"rolldown": "bin/cli.mjs"@@ -22724,29 +23893,22 @@"node": "^20.19.0 || >=22.12.0"},"optionalDependencies": {- "@rolldown/binding-android-arm64": "1.0.0-rc.12",- "@rolldown/binding-darwin-arm64": "1.0.0-rc.12",- "@rolldown/binding-darwin-x64": "1.0.0-rc.12",- "@rolldown/binding-freebsd-x64": "1.0.0-rc.12",- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.12",- "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.12",- "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.12",- "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.12",- "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.12",- "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.12",- "@rolldown/binding-linux-x64-musl": "1.0.0-rc.12",- "@rolldown/binding-openharmony-arm64": "1.0.0-rc.12",- "@rolldown/binding-wasm32-wasi": "1.0.0-rc.12",- "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.12",- "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.12"- }- },- "node_modules/rolldown/node_modules/@rolldown/pluginutils": {- "version": "1.0.0-rc.12",- "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.12.tgz",- "integrity": "sha512-HHMwmarRKvoFsJorqYlFeFRzXZqCt2ETQlEDOb9aqssrnVBB1/+xgTGtuTrIk5vzLNX1MjMtTf7W9z3tsSbrxw==",- "dev": true,- "license": "MIT"+ "@rolldown/binding-android-arm64": "1.0.3",+ "@rolldown/binding-darwin-arm64": "1.0.3",+ "@rolldown/binding-darwin-x64": "1.0.3",+ "@rolldown/binding-freebsd-x64": "1.0.3",+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.3",+ "@rolldown/binding-linux-arm64-gnu": "1.0.3",+ "@rolldown/binding-linux-arm64-musl": "1.0.3",+ "@rolldown/binding-linux-ppc64-gnu": "1.0.3",+ "@rolldown/binding-linux-s390x-gnu": "1.0.3",+ "@rolldown/binding-linux-x64-gnu": "1.0.3",+ "@rolldown/binding-linux-x64-musl": "1.0.3",+ "@rolldown/binding-openharmony-arm64": "1.0.3",+ "@rolldown/binding-wasm32-wasi": "1.0.3",+ "@rolldown/binding-win32-arm64-msvc": "1.0.3",+ "@rolldown/binding-win32-x64-msvc": "1.0.3"+ }},"node_modules/roughjs": {"version": "4.6.6",@@ -24399,6 +25561,37 @@"dev": true,"license": "MIT"},+ "node_modules/tap-parser": {+ "version": "17.0.0",+ "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-17.0.0.tgz",+ "integrity": "sha512-Na7kB4ML7T77abJtYIlXh/aJcz54Azv0iAtOaDnLqsL4uWjU40uNFIFnZ5IvnGTuCIk5M6vjx7ZsceNGc1mcag==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "events-to-array": "^2.0.3",+ "tap-yaml": "3.0.0"+ },+ "bin": {+ "tap-parser": "bin/cmd.cjs"+ },+ "engines": {+ "node": ">= 18.6.0"+ }+ },+ "node_modules/tap-yaml": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-3.0.0.tgz",+ "integrity": "sha512-qtbgXJqE9xdWqlE520y+vG4c1lgqWrDHN7Y2YcrV1XudLuc2Y5aMXhAyPBGl57h8MNoprvL/mAJiISUIadvS9w==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "yaml": "^2.4.1",+ "yaml-types": "^0.3.0"+ },+ "engines": {+ "node": ">= 18.6.0"+ }+ },"node_modules/tapable": {"version": "2.3.3","resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz",@@ -24912,6 +26105,16 @@"node": "^20.17.0 || >=22.9.0"}},+ "node_modules/tunnel": {+ "version": "0.0.6",+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"+ }+ },"node_modules/tunnel-agent": {"version": "0.6.0","resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",@@ -25113,6 +26316,33 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/typed-inject": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/typed-inject/-/typed-inject-5.0.0.tgz",+ "integrity": "sha512-0Ql2ORqBORLMdAW89TQKZsb1PQkFGImFfVmncXWe7a+AA3+7dh7Se9exxZowH4kbnlvKEFkMxUYdHUpjYWFJaA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/typed-rest-client": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.3.1.tgz",+ "integrity": "sha512-k4kX5Up6qA68D0Cby2AK+6+vM5k3qTxe+/3FqhnHRExjY5cfbOnzjQZbP/LXleF8hVoDvDqxlgk9KK83HoBZlQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "des.js": "^1.1.0",+ "js-md4": "^0.3.2",+ "qs": "6.15.1",+ "tunnel": "0.0.6",+ "underscore": "^1.13.8"+ },+ "engines": {+ "node": ">= 16.0.0"+ }+ },"node_modules/typescript": {"version": "6.0.3","resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",@@ -25186,6 +26416,13 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/underscore": {+ "version": "1.13.8",+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz",+ "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==",+ "dev": true,+ "license": "MIT"+ },"node_modules/undici": {"version": "8.4.1","resolved": "https://registry.npmjs.org/undici/-/undici-8.4.1.tgz",@@ -25210,6 +26447,19 @@"node": ">=4"}},+ "node_modules/unicorn-magic": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",+ "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/unified": {"version": "11.0.5","resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",@@ -25725,17 +26975,17 @@}},"node_modules/vite": {- "version": "8.0.5",- "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.5.tgz",- "integrity": "sha512-nmu43Qvq9UopTRfMx2jOYW5l16pb3iDC1JH6yMuPkpVbzK0k+L7dfsEDH4jRgYFmsg0sTAqkojoZgzLMlwHsCQ==",+ "version": "8.0.16",+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz",+ "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==","dev": true,"license": "MIT","dependencies": {"lightningcss": "^1.32.0","picomatch": "^4.0.4",- "postcss": "^8.5.8",- "rolldown": "1.0.0-rc.12",- "tinyglobby": "^0.2.15"+ "postcss": "^8.5.15",+ "rolldown": "1.0.3",+ "tinyglobby": "^0.2.17"},"bin": {"vite": "bin/vite.js"@@ -25751,7 +27001,7 @@},"peerDependencies": {"@types/node": "^20.19.0 || >=22.12.0",- "@vitejs/devtools": "^0.1.0",+ "@vitejs/devtools": "^0.1.18","esbuild": "^0.27.0 || ^0.28.0","jiti": ">=1.21.0","less": "^4.0.0",@@ -25960,6 +27210,13 @@"node": "20 || >=22"}},+ "node_modules/weapon-regex": {+ "version": "1.3.6",+ "resolved": "https://registry.npmjs.org/weapon-regex/-/weapon-regex-1.3.6.tgz",+ "integrity": "sha512-wsf1m1jmMrso5nhwVFJJHSubEBf3+pereGd7+nBKtYJ18KoB/PWJOHS3WRkwS04VrOU0iJr2bZU+l1QaTJ+9nA==",+ "dev": true,+ "license": "Apache-2.0"+ },"node_modules/web-namespaces": {"version": "2.0.1","resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",@@ -26471,6 +27728,20 @@"url": "https://github.com/sponsors/eemeli"}},+ "node_modules/yaml-types": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/yaml-types/-/yaml-types-0.3.0.tgz",+ "integrity": "sha512-i9RxAO/LZBiE0NJUy9pbN5jFz5EasYDImzRkj8Y81kkInTi1laia3P3K/wlMKzOxFQutZip8TejvQP/DwgbU7A==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">= 16",+ "npm": ">= 7"+ },+ "peerDependencies": {+ "yaml": "^2.3.0"+ }+ },"node_modules/yargs": {"version": "17.7.2","resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",@@ -26657,7 +27928,7 @@},"open-sse": {"name": "@omniroute/open-sse",- "version": "3.8.25"+ "version": "3.8.26"}}}diff --git a/package.json b/package.jsonindex 617e5f72ca..ea8323a251 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "omniroute",- "version": "3.8.25",+ "version": "3.8.26","description": "Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, desktop, PWA, and OpenAI-compatible APIs.","type": "module","bin": {@@ -78,6 +78,8 @@"build:release": "rm -rf .build dist && OMNIROUTE_BUILD_SHA=$(git rev-parse --short HEAD) npm run build && npm run build:cli && node scripts/build/write-build-sha.mjs","start": "node scripts/dev/run-next.mjs start","lint": "eslint .",+ "lint:md": "npx --yes markdownlint-cli2 \"docs/**/*.md\" \"*.md\" \"!docs/i18n\" \"!docs/research\"",+ "lint:prose": "vale docs","electron:dev": "concurrently \"npm run dev\" \"wait-on http://localhost:20128 && cd electron && npm run dev\"","electron:build": "npm run build && cd electron && npm run build","electron:build:win": "npm run build && cd electron && npm run build:win",@@ -119,6 +121,7 @@"check:provider-consistency": "node --import tsx scripts/check/check-provider-consistency.ts","check:fetch-targets": "node scripts/check/check-fetch-targets.mjs","check:openapi-routes": "node scripts/check/check-openapi-routes.mjs",+ "check:openapi-breaking": "node scripts/check/check-openapi-breaking.mjs","check:deps": "node scripts/check/check-deps.mjs","check:file-size": "node scripts/check/check-file-size.mjs","check:duplication": "node scripts/check/check-duplication.mjs",@@ -163,6 +166,7 @@"test:protocols:e2e": "node scripts/dev/run-protocol-clients-tests.mjs","test:vitest": "vitest run --config vitest.mcp.config.ts","test:vitest:ui": "vitest run --config vitest.config.ts tests/unit/ui",+ "test:mutation": "stryker run","test:ecosystem": "node scripts/dev/run-ecosystem-tests.mjs","test:system": "cross-env DISABLE_SQLITE_AUTO_BACKUP=true node --import tsx --import ./open-sse/utils/setupPolyfill.ts --test --test-force-exit --test-concurrency=1 tests/e2e/system-failover.test.ts","test:coverage": "cross-env DISABLE_SQLITE_AUTO_BACKUP=true c8 --output-dir coverage --exclude=tests/** --exclude=**/*.test.* --reporter=text-summary --reporter=html --reporter=json-summary --reporter=lcov --check-coverage --statements 60 --lines 60 --functions 60 --branches 60 node --max-old-space-size=8192 --import tsx --import ./open-sse/utils/setupPolyfill.ts --test --test-force-exit --test-concurrency=8 tests/unit/*.test.ts \"tests/unit/{api,auth,authz,build,cli,cli-helper,compression,correctness,cors,dashboard,db,db-adapters,docs,gamification,guardrails,lib,mcp,runtime,security,services,settings,shared,ui}/**/*.test.ts\"",@@ -261,6 +265,9 @@"devDependencies": {"@cyclonedx/cyclonedx-npm": "4.2.1","@playwright/test": "^1.60.0",+ "@size-limit/file": "^12.1.0",+ "@stryker-mutator/core": "^9.6.1",+ "@stryker-mutator/tap-runner": "^9.6.1","@tailwindcss/postcss": "^4.3.0","@testing-library/jest-dom": "^6.9.1","@testing-library/react": "^16.3.2",@@ -324,6 +331,8 @@"postcss": "^8.5.14","ip-address": "10.2.0","qs": "^6.15.2",- "uuid": "^14.0.0"+ "uuid": "^14.0.0",+ "form-data": "^4.0.6",+ "vite": "^8.0.16"}}diff --git a/quality-baseline.json b/quality-baseline.jsondeleted file mode 100644index 41179c15f3..0000000000--- a/quality-baseline.json+++ /dev/null@@ -1,61 +0,0 @@-{- "_comment": "Catraca de qualidade. 'down' = nao pode aumentar; 'up' = nao pode cair. Atualize via 'npm run quality:ratchet -- --update' (somente quando melhora). Cada valor e um numero REAL medido, nunca um chute. Cobertura entra na Fase 4 a partir de um run de cobertura mergeada no CI.",- "metrics": {- "eslintWarnings": {- "value": 3669,- "direction": "down"- },- "eslintErrors": {- "value": 0,- "direction": "down",- "eps": 0- },- "coverage.statements": {- "value": 76.5,- "direction": "up"- },- "coverage.lines": {- "value": 76.5,- "direction": "up"- },- "coverage.functions": {- "value": 82,- "direction": "up"- },- "coverage.branches": {- "value": 73,- "direction": "up",- "eps": 1.5- },- "openapiCoverage.pct": {- "value": 38.3,- "direction": "up",- "eps": 0.5- },- "i18nUiCoverage.pct": {- "value": 80.1,- "direction": "up",- "eps": 0.5- },- "deadExports": {- "value": 327,- "direction": "down"- },- "cognitiveComplexity": {- "value": 738,- "direction": "down"- },- "typeCoveragePct": {- "value": 92.17,- "direction": "up",- "eps": 0.05- }- },- "_coverage_note": "Pisos anti-flake ~2pt abaixo do real do CI mergeado MEDIDO COM os 135 testes religados (run 27247237268: statements 78.4 / lines 78.4 / functions 83.84 / branches 75.73). O religamento da 6A.1 HONESTIFICOU a regua: os ~82.5 anteriores eram inflados porque modulos nunca importados ficavam fora do denominador do c8. Apertar via --require-tighten na Fase 6A (2026-06-16).",- "_eslint_rebaseline_2026_06_09": "Baseline 3482 foi congelado na branch das Fases 0-6 (base ~v3.8.17) ANTES da v3.8.18 sair; a tag v3.8.18 publicada ja media 3501 (delta nasceu no fim daquele ciclo, antes do job quality-gate existir no ci.yml). O ciclo v3.8.19 esta NEUTRO (tag 3501 == HEAD 3501). Re-baseline para o estado real da main publicada; reduzir os ~19 (any em codigo do ciclo v3.8.18) e ligar --require-tighten ficam para a Fase 6A (2026-06-16).",- "_eslint_rebaseline_2026_06_13_int6a": "3501 -> 3653. Medido: dos 152 de drift, ~132 sao pre-existentes dos ciclos v3.8.20-v3.8.24 (base 33667fcf3 mede ~3633) e ~20 vem dos scripts .mjs de tooling novos das Fases 6A.3-6A.12 (gates de qualidade; warnings de estilo aceitaveis em tooling). Apertar via --require-tighten fica para o fim do ciclo.",- "_eslint_rebaseline_2026_06_13_phase7": "3653 -> 3658: +5 warnings dos scripts .mjs de tooling novos da Fase 7 (check-vuln-ratchet/codeql/secrets/workflows/dead-code/etc). Tooling de qualidade; apertar via --require-tighten no fim do ciclo.",- "_eslint_rebaseline_2026_06_13_v3825": "3658 -> 3669: +11 drift consciente do ciclo v3.8.24->v3.8.25 (features #3799-#3806: free-provider-rankings, plugins menu, proxy IP-family). Medido em release/v3.8.25 (e38d22512). Crescimento de feature legitima, nao regressao; apertar via --require-tighten no fim do ciclo.",- "_metrics_added_2026_06_13_6a11": "openapiCoverage.pct (38.3) e i18nUiCoverage.pct (80.1) promovidas de pisos manuais THRESHOLD para metricas de catraca (direction up) na Task 6A.11. eslintErrors fixado em 0 (era metrica orfa detectada pelo motor v2 da 6A.5).",- "_int_wiring_2026_06_13": "Fase 7 INT: 3 metricas promovidas de ADVISORY para RATCHET BLOQUEANTE. Valores REAIS medidos em 2026-06-13 no HEAD desta branch: deadExports=327 (knip --reporter json, DEAD_TOTAL=exports+files), cognitiveComplexity=738 (eslint sonarjs/cognitive-complexity via eslint.sonarjs.config.mjs), typeCoveragePct=92.17 (type-coverage --json-output -p open-sse/tsconfig.json). Os scripts check-dead-code.mjs/check-cognitive-complexity.mjs/check-type-coverage.mjs foram convertidos de advisory (exit 0 sempre) para ratchet (exit 1 em regressao). vulnCount e codeqlAlerts permanecem advisory no job quality-extended: dependem de binarios externos (osv-scanner) e token GitHub (gh api) nao disponiveis localmente — nao podem ser medidos/congelados honestamente sem infraestrutura de CI."-}diff --git a/scripts/check/check-codeql-ratchet.mjs b/scripts/check/check-codeql-ratchet.mjsindex 37e62c7ead..98955d5cd5 100644--- a/scripts/check/check-codeql-ratchet.mjs+++ b/scripts/check/check-codeql-ratchet.mjs@@ -11,19 +11,38 @@// codeqlAlerts=SKIP reason=no-auth — `gh` presente mas sem autenticação// codeqlAlerts=SKIP reason=api-error:<code> — erro da API GitHub//-// Esta versão é ADVISORY (sai 0 sempre). O ratchet (direction:down) é gerenciado-// pelo motor quality-baseline.json no CI (Task 7.3 INT).+// RATCHET BLOQUEANTE (default): lê metrics.codeqlAlerts.value de+// config/quality/quality-baseline.json e SAI 1 SE — E SOMENTE SE — a contagem+// MEDIDA for MAIOR que o baseline (regressão real, mais alertas CodeQL abertos).+// Qualquer falha de MEDIÇÃO (gh ausente / sem auth / sem repo / erro de API) é um+// SKIP gracioso que SAI 0 — nunca bloqueia o build por falta de infraestrutura.+// Direction: down (a contagem só pode CAIR). Suporta --update para ratchetar.//// Uso:// node scripts/check/check-codeql-ratchet.mjs-// node scripts/check/check-codeql-ratchet.mjs --json # imprime array de alertas-// node scripts/check/check-codeql-ratchet.mjs --quiet # suprime logs de diagnóstico+// node scripts/check/check-codeql-ratchet.mjs --json # imprime array de alertas+// node scripts/check/check-codeql-ratchet.mjs --quiet # suprime logs de diagnóstico+// node scripts/check/check-codeql-ratchet.mjs --update # ratcheta o baseline (queda)+// node scripts/check/check-codeql-ratchet.mjs --advisory # nunca falha (modo coletor)import { execFileSync, spawnSync } from "node:child_process";+import fs from "node:fs";+import path from "node:path";import { pathToFileURL } from "node:url";const QUIET = process.argv.includes("--quiet");const PRINT_JSON = process.argv.includes("--json");+const UPDATE = process.argv.includes("--update");+// --advisory: nunca falha pela contagem (modo coletor legado). Sem esta flag o+// gate é BLOQUEANTE: sai 1 numa regressão real (medida > baseline).+const ADVISORY = process.argv.includes("--advisory");++const ROOT = process.cwd();+const BASELINE_PATH = path.resolve(+ process.argv.includes("--baseline")+ ? process.argv[process.argv.indexOf("--baseline") + 1]+ : path.join(ROOT, "config/quality/quality-baseline.json")+);// ---------------------------------------------------------------------------// Pure parsing function (exported for tests)@@ -88,6 +107,23 @@ export function parseCodeQLAlerts(alerts) {return { alertCount, bySeverity, byRule };}+/**+ * Avalia a contagem MEDIDA de alertas CodeQL contra o baseline.+ * Direction: down (a contagem só pode CAIR — mais alertas = regressão).+ *+ * Exported for unit testing — espelha evaluateDeadCode em check-dead-code.mjs.+ *+ * @param {number} current - Contagem de alertas medida agora.+ * @param {number} baseline - Contagem congelada em quality-baseline.json.+ * @returns {{ regressed: boolean, improved: boolean }}+ */+export function evaluateCodeqlRatchet(current, baseline) {+ return {+ regressed: current > baseline,+ improved: current < baseline,+ };+}+// ---------------------------------------------------------------------------// Repository detection// ---------------------------------------------------------------------------@@ -101,10 +137,14 @@ export function parseCodeQLAlerts(alerts) {*/export function detectRepo(ghBin) {try {- const stdout = execFileSync(ghBin, ["repo", "view", "--json", "nameWithOwner", "-q", ".nameWithOwner"], {- encoding: "utf8",- timeout: 15_000,- });+ const stdout = execFileSync(+ ghBin,+ ["repo", "view", "--json", "nameWithOwner", "-q", ".nameWithOwner"],+ {+ encoding: "utf8",+ timeout: 15_000,+ }+ );return stdout.trim() || null;} catch {return null;@@ -184,7 +224,11 @@ function fetchCodeQLAlerts(ghBin, repo) {const errMsg = String(err.stderr ?? err.message ?? "");// Sem autenticação- if (errMsg.includes("authentication") || errMsg.includes("401") || errMsg.includes("not logged")) {+ if (+ errMsg.includes("authentication") ||+ errMsg.includes("401") ||+ errMsg.includes("not logged")+ ) {return { error: "no-auth", message: errMsg };}@@ -198,8 +242,10 @@ function fetchCodeQLAlerts(ghBin, repo) {try {page_alerts = JSON.parse(stdout);} catch (parseErr) {- process.stderr.write(`[codeql-ratchet] ERRO ao parsear resposta da API: ${parseErr.message}\n`);- process.exit(2);+ // A malformed (but HTTP-200) API response is a MEASUREMENT failure, not a+ // regression. A blocking gate must never red on it — return the same+ // {error,message} shape the caller already maps to a graceful SKIP (exit 0).+ return { error: "parse-error", message: String(parseErr.message ?? parseErr) };}// A API retorna null quando não há mais páginas (ou array vazio)@@ -216,6 +262,81 @@ function fetchCodeQLAlerts(ghBin, repo) {return allAlerts;}+// ---------------------------------------------------------------------------+// Baseline+// ---------------------------------------------------------------------------++/**+ * Lê metrics.codeqlAlerts.value do quality-baseline.json.+ * Retorna null se o arquivo ou a métrica estiverem ausentes (modo coletor puro:+ * sem baseline não há ratchet, só emissão da contagem).+ *+ * @returns {number|null}+ */+function readBaselineCodeqlValue() {+ if (!fs.existsSync(BASELINE_PATH)) return null;+ let baselineJson;+ try {+ baselineJson = JSON.parse(fs.readFileSync(BASELINE_PATH, "utf8"));+ } catch {+ return null;+ }+ const metric = baselineJson?.metrics?.codeqlAlerts;+ if (!metric || typeof metric.value !== "number") return null;+ return metric.value;+}++/**+ * Aplica o ratchet (direction:down) sobre a contagem medida vs o baseline.+ * Define process.exitCode = 1 numa regressão real (medida > baseline) salvo+ * --advisory. Ratcheta o baseline com --update quando a contagem cai.+ *+ * Exported for unit testing (drives o efeito em process.exitCode).+ *+ * @param {number} alertCount - Contagem MEDIDA (medição bem-sucedida).+ */+export function applyRatchet(alertCount) {+ const baselineValue = readBaselineCodeqlValue();++ // Sem baseline → modo coletor puro (emite a contagem, não falha).+ if (baselineValue === null) {+ if (!QUIET) {+ process.stderr.write(+ "[codeql-ratchet] baseline ausente (metrics.codeqlAlerts) — modo coletor, sem ratchet.\n"+ );+ }+ process.exitCode = 0;+ return;+ }++ const { regressed, improved } = evaluateCodeqlRatchet(alertCount, baselineValue);++ if (UPDATE && improved) {+ const baselineJson = JSON.parse(fs.readFileSync(BASELINE_PATH, "utf8"));+ baselineJson.metrics.codeqlAlerts.value = alertCount;+ fs.writeFileSync(BASELINE_PATH, JSON.stringify(baselineJson, null, 2) + "\n");+ console.log(`[codeql-ratchet] baseline ratcheado: ${alertCount} (era ${baselineValue})`);+ }++ if (regressed && !ADVISORY) {+ process.stderr.write(+ `[codeql-ratchet] REGRESSÃO — ${alertCount} alertas CodeQL abertos > baseline ${baselineValue}\n` ++ " → Corrija os novos alertas em Security → Code scanning, ou rode\n" ++ " 'node scripts/check/check-codeql-ratchet.mjs --update' se a contagem caiu legitimamente.\n"+ );+ process.exitCode = 1;+ return;+ }++ if (!QUIET) {+ const verdict = regressed ? "ADVISORY — regressão ignorada (--advisory)" : "OK — sem regressão";+ process.stderr.write(+ `[codeql-ratchet] ${verdict} — ${alertCount} alertas (baseline ${baselineValue})\n`+ );+ }+ process.exitCode = 0;+}+// ---------------------------------------------------------------------------// Main// ---------------------------------------------------------------------------@@ -228,8 +349,8 @@ function main() {if (!QUIET) {process.stderr.write("[codeql-ratchet] SKIP — `gh` CLI não encontrado no PATH.\n" +- "[codeql-ratchet] Instale via: https://cli.github.com/\n" +- "[codeql-ratchet] ADVISORY — este gate sai 0 (ratchet entra no CI da Fase 7 INT).\n"+ "[codeql-ratchet] Instale via: https://cli.github.com/\n" ++ "[codeql-ratchet] ADVISORY — este gate sai 0 (ratchet entra no CI da Fase 7 INT).\n");}process.exitCode = 0;@@ -243,7 +364,7 @@ function main() {if (!QUIET) {process.stderr.write("[codeql-ratchet] SKIP — não foi possível detectar o repositório GitHub.\n" +- "[codeql-ratchet] Execute dentro de um repositório GitHub com `gh` autenticado.\n"+ "[codeql-ratchet] Execute dentro de um repositório GitHub com `gh` autenticado.\n");}process.exitCode = 0;@@ -262,7 +383,9 @@ function main() {const { error, message } = result;console.log(`codeqlAlerts=SKIP reason=${error}`);if (!QUIET) {- process.stderr.write(`[codeql-ratchet] SKIP — erro ao consultar API GitHub: ${message.slice(0, 200)}\n`);+ process.stderr.write(+ `[codeql-ratchet] SKIP — erro ao consultar API GitHub: ${message.slice(0, 200)}\n`+ );}process.exitCode = 0;return;@@ -279,14 +402,16 @@ function main() {console.log(`codeqlAlerts=${alertCount}`);if (!QUIET) {- const severitySummary = Object.entries(bySeverity)- .map(([k, v]) => `${k}=${v}`)- .join(", ") || "nenhum";- const topRules = Object.entries(byRule)- .sort(([, a], [, b]) => b - a)- .slice(0, 5)- .map(([r, n]) => `${r}(${n})`)- .join(", ") || "nenhum";+ const severitySummary =+ Object.entries(bySeverity)+ .map(([k, v]) => `${k}=${v}`)+ .join(", ") || "nenhum";+ const topRules =+ Object.entries(byRule)+ .sort(([, a], [, b]) => b - a)+ .slice(0, 5)+ .map(([r, n]) => `${r}(${n})`)+ .join(", ") || "nenhum";process.stderr.write(`[codeql-ratchet] Alertas CodeQL abertos (não-dismissed): ${alertCount}\n`@@ -295,13 +420,11 @@ function main() {process.stderr.write(`[codeql-ratchet] Por severidade: ${severitySummary}\n`);process.stderr.write(`[codeql-ratchet] Top regras: ${topRules}\n`);}- process.stderr.write(- "[codeql-ratchet] ADVISORY — esta versão não falha pela contagem (ratchet entra no CI).\n"- );}- // Sai 0 sempre nesta versão (advisory)- process.exitCode = 0;+ // Medição bem-sucedida → aplica o ratchet (bloqueante salvo --advisory).+ // Qualquer falha de MEDIÇÃO acima já retornou com exit 0 (skip gracioso).+ applyRatchet(alertCount);}if (import.meta.url === pathToFileURL(process.argv[1] || "").href) main();diff --git a/scripts/check/check-cognitive-complexity.mjs b/scripts/check/check-cognitive-complexity.mjsindex 90ea5d3e55..663fd8eb44 100644--- a/scripts/check/check-cognitive-complexity.mjs+++ b/scripts/check/check-cognitive-complexity.mjs@@ -31,7 +31,7 @@ const ESLINT_BIN = path.join(ROOT, "node_modules", ".bin", "eslint");const BASELINE_PATH = path.resolve(process.argv.includes("--baseline")? process.argv[process.argv.indexOf("--baseline") + 1]- : path.join(ROOT, "quality-baseline.json")+ : path.join(ROOT, "config/quality/quality-baseline.json"));const ESLINT_ARGS = [diff --git a/scripts/check/check-complexity.mjs b/scripts/check/check-complexity.mjsindex bc2f8c42b4..375512bdf8 100644--- a/scripts/check/check-complexity.mjs+++ b/scripts/check/check-complexity.mjs@@ -19,7 +19,7 @@ const ROOT = process.cwd();const BASELINE_PATH = path.resolve(process.argv.includes("--baseline")? process.argv[process.argv.indexOf("--baseline") + 1]- : path.join(ROOT, "complexity-baseline.json")+ : path.join(ROOT, "config/quality/complexity-baseline.json"));const UPDATE = process.argv.includes("--update");const CONFIG_PATH = path.join(ROOT, "eslint.complexity.config.mjs");diff --git a/scripts/check/check-dead-code.mjs b/scripts/check/check-dead-code.mjsindex 3e93890a07..1c7f5c5e34 100644--- a/scripts/check/check-dead-code.mjs+++ b/scripts/check/check-dead-code.mjs@@ -28,7 +28,7 @@ const UPDATE = process.argv.includes("--update");const BASELINE_PATH = path.resolve(process.argv.includes("--baseline")? process.argv[process.argv.indexOf("--baseline") + 1]- : path.join(ROOT, "quality-baseline.json")+ : path.join(ROOT, "config/quality/quality-baseline.json"));/**diff --git a/scripts/check/check-deps.mjs b/scripts/check/check-deps.mjsindex 1cc88f29c8..cb3eb28096 100644--- a/scripts/check/check-deps.mjs+++ b/scripts/check/check-deps.mjs@@ -29,7 +29,7 @@ import { execFileSync } from "node:child_process";import { assertNoStale } from "./lib/allowlist.mjs";const ROOT = process.cwd();-const ALLOWLIST_PATH = path.join(ROOT, "dependency-allowlist.json");+const ALLOWLIST_PATH = path.join(ROOT, "config/quality/dependency-allowlist.json");// Directories to exclude when discovering package.json files.// Using a set of path segment prefixes (relative to ROOT, forward slashes).@@ -141,16 +141,12 @@ export function queryNpmRegistry(pkgName, timeoutMs = 8000) {// Scope packages need URL-encoding for the `npm view` command.// `npm view` accepts scoped packages natively — no encoding needed.try {- const raw = execFileSync(- "npm",- ["view", pkgName, "time.created", "--json"],- {- encoding: "utf8",- timeout: timeoutMs,- // Suppress npm progress/warn output on stderr- stdio: ["ignore", "pipe", "pipe"],- }- );+ const raw = execFileSync("npm", ["view", pkgName, "time.created", "--json"], {+ encoding: "utf8",+ timeout: timeoutMs,+ // Suppress npm progress/warn output on stderr+ stdio: ["ignore", "pipe", "pipe"],+ });// npm view --json emits a quoted string or null/empty for missing fieldsconst trimmed = raw.trim();if (!trimmed) {@@ -165,7 +161,11 @@ export function queryNpmRegistry(pkgName, timeoutMs = 8000) {// npm exits with code 1 when the package is NOT found ("E404")const stderr = err.stderr?.toString() || "";const stdout = err.stdout?.toString() || "";- if (stderr.includes("E404") || stdout.includes("E404") || stderr.includes("npm ERR! code E404")) {+ if (+ stderr.includes("E404") ||+ stdout.includes("E404") ||+ stderr.includes("npm ERR! code E404")+ ) {return { exists: false, createdMs: null };}// Any other error (ETIMEDOUT, ENOTFOUND, etc.) = network/offline — return nulldiff --git a/scripts/check/check-docs-counts-sync.mjs b/scripts/check/check-docs-counts-sync.mjsindex c3e6e95f63..242a5d9b84 100644--- a/scripts/check/check-docs-counts-sync.mjs+++ b/scripts/check/check-docs-counts-sync.mjs@@ -1,14 +1,26 @@#!/usr/bin/env node// Validates that count-based assertions in docs match the actual code state.-// Examples checked:-// - executors count in open-sse/executors/-// - routing strategies in src/shared/constants/routingStrategies.ts-// - OAuth providers in src/lib/oauth/providers/-// - A2A skills in src/lib/a2a/skills/-// - Cloud agents in src/lib/cloudAgent/agents///-// Exits 0 on success, 1 on detected drift.+// Two tiers of checks:+// • STRICT (always blocking — exit 1 on drift): high-confidence, slow-moving counts+// that historically caused the worst drift across README / AGENTS / docs.+// - provider count (source of truth: docs/reference/PROVIDER_REFERENCE.md total,+// which is auto-generated from src/shared/constants/providers.ts)+// - i18n locale count (source of truth: config/i18n.json `locales`)+// • SOFT (heuristic — only fails with --strict): file-count based assertions that can+// false-positive.+// - executors count in open-sse/executors/+// - routing strategies in src/shared/constants/routingStrategies.ts+// - OAuth providers in src/lib/oauth/providers/+// - A2A skills in src/lib/a2a/skills/+// - Cloud agents in src/lib/cloudAgent/agents/+//+// Exits 0 on success, 1 on STRICT drift (or any drift with --strict).// Run: node scripts/check/check-docs-counts-sync.mjs+//+// NOTE: the provider check trusts PROVIDER_REFERENCE.md as the canonical total. If a+// provider is added to the code but the reference is not regenerated, this guard will+// not catch it — regenerate with `npm run gen:provider-reference` before relying on it.import fs from "node:fs";import path from "node:path";@@ -48,68 +60,144 @@ function countRoutingStrategies() {return (m[1].match(/"[^"]+"/g) || []).length;}-function docContains(docPath, needle) {- const abs = path.join(ROOT, "docs", docPath);- if (!fs.existsSync(abs)) return false;- return fs.readFileSync(abs, "utf8").includes(needle);+// PURE: parse the canonical provider total out of the auto-generated catalog text.+export function parseProviderTotal(referenceText) {+ if (!referenceText) return 0;+ const m = referenceText.match(/Total providers:\s*\*\*(\d+)\*\*/);+ return m ? Number(m[1]) : 0;}-const checks = [- {- label: "Executors count",- actual: countFiles("open-sse/executors"),- docKey: "executors",- docs: ["architecture/ARCHITECTURE.md", "architecture/CODEBASE_DOCUMENTATION.md"],- },- {- label: "Routing strategies count",- actual: countRoutingStrategies(),- docKey: "strategies",- docs: ["routing/AUTO-COMBO.md", "architecture/RESILIENCE_GUIDE.md"],- },- {- label: "OAuth providers count",- actual: countFiles("src/lib/oauth/providers"),- docKey: "OAuth providers",- docs: ["architecture/ARCHITECTURE.md"],- },- {- label: "A2A skills count",- actual: countFiles("src/lib/a2a/skills"),- docKey: "A2A skills",- docs: ["frameworks/A2A-SERVER.md"],- },- {- label: "Cloud agents count",- actual: countFiles("src/lib/cloudAgent/agents"),- docKey: "cloud agents",- docs: ["frameworks/CLOUD_AGENT.md", "frameworks/AGENT_PROTOCOLS_GUIDE.md"],- },-];+// STRICT: canonical provider total, read from the auto-generated catalog.+export function readProviderTotal() {+ const abs = path.join(ROOT, "docs", "reference", "PROVIDER_REFERENCE.md");+ if (!fs.existsSync(abs)) return 0;+ return parseProviderTotal(fs.readFileSync(abs, "utf8"));+}-let drift = 0;-console.log("Docs counts sync report");-console.log("=======================");+// STRICT: canonical i18n locale count, read from the shared config.+export function countLocales() {+ const abs = path.join(ROOT, "config", "i18n.json");+ if (!fs.existsSync(abs)) return 0;+ try {+ const cfg = JSON.parse(fs.readFileSync(abs, "utf8"));+ return Array.isArray(cfg.locales) ? cfg.locales.length : 0;+ } catch {+ return 0;+ }+}-for (const c of checks) {- console.log(`\n• ${c.label}: ${c.actual} (real)`);- for (const doc of c.docs) {- const found = docContains(doc, String(c.actual));- if (found) {- console.log(` ✓ docs/${doc} mentions "${c.actual}"`);- } else {- console.log(` ⚠ docs/${doc} does NOT mention "${c.actual}" for ${c.docKey}`);- drift++;+// PURE: tally STRICT vs SOFT drift for a list of checks, given a content lookup.+// `getContent(file) -> string | null`. A check whose `actual` is 0 is skipped (the+// source count could not be determined). Returns { strict, soft, lines }.+export function tallyDrift(checks, getContent) {+ let strict = 0;+ let soft = 0;+ const lines = [];+ for (const c of checks) {+ const tier = c.strict ? "STRICT" : "soft";+ lines.push(`\n• ${c.label}: ${c.actual} (real) [${tier}]`);+ if (!c.actual) {+ lines.push(` ⚠ could not determine ${c.docKey} count from source — skipping`);+ continue;+ }+ for (const f of c.files) {+ const content = getContent(f);+ const found = content != null && content.includes(String(c.actual));+ if (found) {+ lines.push(` ✓ ${f} mentions "${c.actual}"`);+ } else {+ lines.push(` ${c.strict ? "✗" : "⚠"} ${f} does NOT mention "${c.actual}" for ${c.docKey}`);+ if (c.strict) strict++;+ else soft++;+ }}}+ return { strict, soft, lines };}-console.log();-if (drift > 0) {- console.warn(`⚠ ${drift} potential drift(s) detected. Review the docs above.`);- // Soft-fail by default (count-based heuristic can false-positive).- // To enforce, pass --strict.- if (process.argv.includes("--strict")) process.exit(1);-} else {- console.log("✓ All checks pass.");+export function buildChecks() {+ return [+ {+ label: "Provider count",+ actual: readProviderTotal(),+ docKey: "providers",+ strict: true,+ files: ["README.md", "AGENTS.md", "CLAUDE.md"],+ },+ {+ label: "i18n locales count",+ actual: countLocales(),+ docKey: "i18n locales",+ strict: true,+ files: ["docs/README.md", "docs/guides/I18N.md", "AGENTS.md"],+ },+ {+ label: "Executors count",+ actual: countFiles("open-sse/executors"),+ docKey: "executors",+ strict: false,+ files: ["docs/architecture/ARCHITECTURE.md", "docs/architecture/CODEBASE_DOCUMENTATION.md"],+ },+ {+ label: "Routing strategies count",+ actual: countRoutingStrategies(),+ docKey: "strategies",+ strict: false,+ files: ["docs/routing/AUTO-COMBO.md", "docs/architecture/RESILIENCE_GUIDE.md"],+ },+ {+ label: "OAuth providers count",+ actual: countFiles("src/lib/oauth/providers"),+ docKey: "OAuth providers",+ strict: false,+ files: ["docs/architecture/ARCHITECTURE.md"],+ },+ {+ label: "A2A skills count",+ actual: countFiles("src/lib/a2a/skills"),+ docKey: "A2A skills",+ strict: false,+ files: ["docs/frameworks/A2A-SERVER.md"],+ },+ {+ label: "Cloud agents count",+ actual: countFiles("src/lib/cloudAgent/agents"),+ docKey: "cloud agents",+ strict: false,+ files: ["docs/frameworks/CLOUD_AGENT.md", "docs/frameworks/AGENT_PROTOCOLS_GUIDE.md"],+ },+ ];}++function main() {+ const checks = buildChecks();+ const getContent = (relPath) => {+ const abs = path.join(ROOT, relPath);+ return fs.existsSync(abs) ? fs.readFileSync(abs, "utf8") : null;+ };++ console.log("Docs counts sync report");+ console.log("=======================");+ const { strict, soft, lines } = tallyDrift(checks, getContent);+ for (const l of lines) console.log(l);++ console.log();+ if (strict > 0) {+ console.error(+ `✗ ${strict} STRICT drift(s) detected. ` ++ `Update the docs above to the real counts, or regenerate auto-generated sources ` ++ `(npm run gen:provider-reference).`+ );+ process.exit(1);+ }+ if (soft > 0) {+ console.warn(`⚠ ${soft} potential (soft) drift(s) detected. Review the docs above.`);+ if (process.argv.includes("--strict")) process.exit(1);+ } else {+ console.log("✓ All checks pass.");+ }+}++const invokedDirectly =+ process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);+if (invokedDirectly) main();diff --git a/scripts/check/check-duplication.mjs b/scripts/check/check-duplication.mjsindex 1dc283a59c..60b5a7bf5c 100644--- a/scripts/check/check-duplication.mjs+++ b/scripts/check/check-duplication.mjs@@ -15,13 +15,23 @@ const ROOT = process.cwd();const BASELINE_PATH = path.resolve(process.argv.includes("--baseline")? process.argv[process.argv.indexOf("--baseline") + 1]- : path.join(ROOT, "duplication-baseline.json")+ : path.join(ROOT, "config/quality/duplication-baseline.json"));const UPDATE = process.argv.includes("--update");const EPS = 0.05; // tolerância de ruído de float (jscpd é determinístico; isto é margem)// Use local binary (pinned in package.json devDependencies — no registry download at CI time)const JSCPD_BIN = path.join(ROOT, "node_modules", ".bin", "jscpd");-const JSCPD_FIXED_ARGS = ["src", "open-sse", "--reporters", "json", "--silent", "--min-tokens", "50", "--ignore", "**/*.test.ts,**/*.test.tsx,**/__tests__/**"];+const JSCPD_FIXED_ARGS = [+ "src",+ "open-sse",+ "--reporters",+ "json",+ "--silent",+ "--min-tokens",+ "50",+ "--ignore",+ "**/*.test.ts,**/*.test.tsx,**/__tests__/**",+];/** Avalia a % atual contra o baseline. */export function evaluateDuplication(current, baseline, eps = EPS) {diff --git a/scripts/check/check-env-doc-sync.mjs b/scripts/check/check-env-doc-sync.mjsindex ac62a048b6..d3d323277c 100644--- a/scripts/check/check-env-doc-sync.mjs+++ b/scripts/check/check-env-doc-sync.mjs@@ -76,6 +76,9 @@ const IGNORE_FROM_CODE = new Set([// CI providers (set by the runner)."GITHUB_BASE_REF","GITHUB_BASE_SHA",+ // CI passes BASE_REF=${{ github.base_ref }} to the OpenAPI breaking-change gate+ // (scripts/check/check-openapi-breaking.mjs) — a build/check signal, not OmniRoute runtime config.+ "BASE_REF",// PR body injected by GitHub Actions into the pr-evidence gate (github.event.pull_request.body);// a CI-only signal, never an OmniRoute runtime config (Phase 7.10)."PR_BODY",diff --git a/scripts/check/check-fabricated-docs.mjs b/scripts/check/check-fabricated-docs.mjsindex 6bac4aa4d9..cedc675978 100644--- a/scripts/check/check-fabricated-docs.mjs+++ b/scripts/check/check-fabricated-docs.mjs@@ -273,8 +273,8 @@ const ENV_VAR_DENYLIST = new Set([// Gate allowlist constant names (JS identifiers, not env vars) — documented in// docs/architecture/QUALITY_GATES.md and docs/research/DISCOVERY_TOOL_DESIGN.md"KNOWN_STALE_DOC_REFS", // export const in check-docs-symbols.mjs- "KNOWN_MISSING", // export const in check-fetch-targets.mjs- "KNOWN_RAW_SQL", // export const in check-db-rules.mjs+ "KNOWN_MISSING", // export const in check-fetch-targets.mjs+ "KNOWN_RAW_SQL", // export const in check-db-rules.mjs]);/** Endpoints that don't follow the standard route.ts pattern. */@@ -313,6 +313,9 @@ const SKIP_DOC_FILES = new Set(["docs/reference/PROVIDER_REFERENCE.md", // auto-generated from providers.ts"docs/reference/openapi.yaml","docs/i18n", // translations — separate workflow+ // Point-in-time documentation audit (v3.8.24): intentionally references drift,+ // counts, and not-yet-existing files as part of documenting them — not living docs.+ "docs/ops/DOCUMENTATION_AUDIT_REPORT.md",]);// ── File discovery ─────────────────────────────────────────────────────────diff --git a/scripts/check/check-file-size.mjs b/scripts/check/check-file-size.mjsindex eabc4c6807..82e4193a2a 100644--- a/scripts/check/check-file-size.mjs+++ b/scripts/check/check-file-size.mjs@@ -15,7 +15,9 @@ function getArg(name, fallback) {const i = process.argv.indexOf(name);return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : fallback;}-const BASELINE_PATH = path.resolve(getArg("--baseline", path.join(ROOT, "file-size-baseline.json")));+const BASELINE_PATH = path.resolve(+ getArg("--baseline", path.join(ROOT, "config/quality/file-size-baseline.json"))+);const UPDATE = process.argv.includes("--update");const SCAN_DIRS = ["src", "open-sse", "electron", "bin"];// Directories to skip when walking — build artifacts and installed packages.@@ -30,7 +32,8 @@ export function evaluateFileSizes(currentLocByFile, frozen, cap) {const improvements = [];for (const [file, loc] of Object.entries(currentLocByFile)) {if (file in frozen) {- if (loc > frozen[file]) violations.push(`${file}: ${loc} > congelado ${frozen[file]} (não pode crescer)`);+ if (loc > frozen[file])+ violations.push(`${file}: ${loc} > congelado ${frozen[file]} (não pode crescer)`);else if (loc < frozen[file]) improvements.push([file, loc]);} else if (loc > cap) {violations.push(`${file}: ${loc} > cap ${cap} (arquivo novo acima do limite)`);@@ -49,7 +52,11 @@ function walk(dir, acc = []) {const p = path.join(dir, e.name);if (e.isDirectory()) {if (!SKIP_DIRS.has(e.name)) walk(p, acc);- } else if (/\.(ts|tsx)$/.test(e.name) && !/\.test\.tsx?$/.test(e.name) && !/\.d\.ts$/.test(e.name)) {+ } else if (+ /\.(ts|tsx)$/.test(e.name) &&+ !/\.test\.tsx?$/.test(e.name) &&+ !/\.d\.ts$/.test(e.name)+ ) {acc.push(p);}}@@ -59,7 +66,8 @@ function walk(dir, acc = []) {function collectLoc() {const out = {};for (const d of SCAN_DIRS)- for (const f of walk(path.join(ROOT, d))) out[path.relative(ROOT, f).replace(/\\/g, "/")] = countLines(f);+ for (const f of walk(path.join(ROOT, d)))+ out[path.relative(ROOT, f).replace(/\\/g, "/")] = countLines(f);return out;}@@ -76,7 +84,8 @@ function main() {if (UPDATE && violations.length === 0 && improvements.length) {for (const [file, loc] of improvements) {- if (loc <= cap) delete frozen[file]; // caiu para dentro do cap → sai do baseline+ if (loc <= cap)+ delete frozen[file]; // caiu para dentro do cap → sai do baselineelse frozen[file] = loc; // continua grande mas encolheu → trava no novo valor}baseline.frozen = Object.fromEntries(Object.entries(frozen).sort());diff --git a/scripts/check/check-known-symbols.ts b/scripts/check/check-known-symbols.tsindex e9132e5632..f859136827 100644--- a/scripts/check/check-known-symbols.ts+++ b/scripts/check/check-known-symbols.ts@@ -12,7 +12,8 @@// (2) COMBO STRATEGIES — a cadeia de despacho `strategy === "..."` em// open-sse/services/combo.ts DEVE tratar exatamente o conjunto canônico de// ROUTING_STRATEGY_VALUES (src/shared/constants/routingStrategies.ts), exceto-// as estratégias-default implícitas (priority não tem branch; cai no+// as estratégias-default implícitas documentadas em IMPLICIT_DEFAULT_STRATEGIES+// (estratégias canônicas sem NENHUMA referência `strategy === "..."`; caem no// ordenamento padrão). Adicionar um valor canônico sem fiá-lo no despacho, ou// fiar uma string de estratégia que não é canônica (inventada), falha aqui.//@@ -38,10 +39,21 @@// Catraca: cada divergência pré-existente fica numa allowlist documentada e sai 0 hoje.// Padrão herdado de scripts/check/check-provider-consistency.ts (gate .ts via// `node --import tsx` que IMPORTA módulos reais + funções puras + main() guardado).+//+// Stale-enforcement (6A.3): a ÚNICA allowlist de SUPRESSÃO deste gate é+// IMPLICIT_DEFAULT_STRATEGIES — cada entrada suprime uma violação `canonicalNotHandled`+// (estratégia canônica sem branch de despacho). Uma entrada que não suprime mais+// nenhuma violação real (porque a estratégia ganhou um branch `strategy === "..."`)+// é obsoleta → o gate falha com instrução de remoção, fechando o furo de regressão+// silenciosa. As demais listas (KNOWN_TRANSLATOR_PAIRS, KNOWN_MCP_TOOL_NAMES) NÃO são+// allowlists de supressão e sim snapshots-catraca (falham na REMOÇÃO, não na presença):+// uma entrada nelas exige que o par/tool continue VIVO no registry — o oposto de+// supressão — então a semântica de stale-enforcement não se aplica a elas.import { readFileSync, readdirSync } from "node:fs";import { fileURLToPath, pathToFileURL } from "node:url";import { dirname, resolve as resolvePath, basename, extname } from "node:path";+import { assertNoStale } from "./lib/allowlist.mjs";const HERE = dirname(fileURLToPath(import.meta.url));const REPO_ROOT = resolvePath(HERE, "..", "..");@@ -53,12 +65,18 @@ const REPO_ROOT = resolvePath(HERE, "..", "..");/*** Estratégias canônicas que NÃO têm um branch `strategy === "..."` na cadeia de* despacho porque são o comportamento padrão (sem reordenamento explícito). Cada- * uma documentada. Remover daqui se um branch dedicado for adicionado.+ * uma documentada. Adicionar aqui se uma estratégia canônica não tiver NENHUMA+ * referência `strategy === "..."` em combo.ts (do contrário extractHandledStrategies+ * já a considera tratada e a entrada vira obsoleta — stale-enforcement abaixo falha).+ *+ * Atualmente vazio: a entrada `priority` foi removida porque combo.ts passou a+ * referenciar `strategy === "priority"` (pre-screen de latência em resolveComboTargets),+ * o que torna `priority` já-tratada por extractHandledStrategies — a supressão não+ * suprimia mais nenhuma violação `canonicalNotHandled` (era stale). Se o pre-screen+ * for removido no futuro, `priority` reaparecerá como `canonicalNotHandled` e o gate+ * pedirá para refiá-la no despacho OU redocumentá-la aqui.*/-export const IMPLICIT_DEFAULT_STRATEGIES: Record<string, string> = {- priority:- 'Default sem branch: combo.ts não tem `strategy === "priority"`; cai no ordenamento padrão de resolveComboTargets (ordem de prioridade declarada). É o fallback de normalizeRoutingStrategy.',-};+export const IMPLICIT_DEFAULT_STRATEGIES: Record<string, string> = {};/** Extrai todas as strings literais de `strategy === "..."` da fonte do combo. */export function extractHandledStrategies(comboSource: string): Set<string> {@@ -458,6 +476,16 @@ async function main(): Promise<void> {const canonical = strategiesMod.ROUTING_STRATEGY_VALUES as readonly string[];const comboSource = readFileSync(resolvePath(REPO_ROOT, "open-sse/services/combo.ts"), "utf8");const handled = extractHandledStrategies(comboSource);++ // Stale-enforcement (6A.3): IMPLICIT_DEFAULT_STRATEGIES is a suppression allowlist —+ // each entry exists ONLY to suppress a `canonicalNotHandled` violation (a canonical+ // strategy with no `strategy === "..."` dispatch reference). The live violations it+ // suppresses are the canonical strategies NOT already in `handled` (computed with an+ // EMPTY implicit-defaults map). An entry whose key IS already in `handled` suppresses+ // nothing → it is stale and the gate must fail asking for its removal.+ const liveImplicitNeeded = diffComboStrategies(canonical, handled, {}).canonicalNotHandled;+ assertNoStale(Object.keys(IMPLICIT_DEFAULT_STRATEGIES), liveImplicitNeeded, "known-symbols:combo");+const { canonicalNotHandled, handledNotCanonical } = diffComboStrategies(canonical,handled,@@ -635,6 +663,9 @@ async function main(): Promise<void> {console.error(`[known-symbols] ${failures.length} sub-checagem(ns) falharam:\n\n${failures.join("\n\n")}`);process.exit(1);}+ // assertNoStale (combo) seta process.exitCode=1 sem lançar — não imprima o OK+ // enganoso; a mensagem de stale já foi logada no stderr pelo helper.+ if (process.exitCode === 1) return;const newPairsNote = newPairs.length? ` (${newPairs.length} par(es) novo(s) não-congelado(s): ${newPairs.join(", ")} — atualize KNOWN_TRANSLATOR_PAIRS se intencional)`diff --git a/scripts/check/check-licenses.mjs b/scripts/check/check-licenses.mjsindex 3061314db6..3c265144bc 100644--- a/scripts/check/check-licenses.mjs+++ b/scripts/check/check-licenses.mjs@@ -22,7 +22,7 @@ import path from "node:path";import { pathToFileURL } from "node:url";const ROOT = process.cwd();-const ALLOWLIST_PATH = path.join(ROOT, ".license-allowlist.json");+const ALLOWLIST_PATH = path.join(ROOT, "config/quality/.license-allowlist.json");const CHECKER_BIN = path.join(ROOT, "node_modules", ".bin", "license-checker-rseidelsohn");const VERBOSE = process.argv.includes("--verbose");@@ -39,7 +39,9 @@ const PRINT_JSON = process.argv.includes("--json");*/export function loadAllowlist() {if (!fs.existsSync(ALLOWLIST_PATH)) {- throw new Error(`Allowlist not found: ${ALLOWLIST_PATH}. Create .license-allowlist.json first.`);+ throw new Error(+ `Allowlist not found: ${ALLOWLIST_PATH}. Create .license-allowlist.json first.`+ );}const raw = fs.readFileSync(ALLOWLIST_PATH, "utf-8");const parsed = JSON.parse(raw);@@ -86,7 +88,10 @@ export function classifyLicense(packageName, license, allowlist) {}// 4. Denied- return { status: "denied", reason: `license '${license}' not in allowlist and no exception registered for '${baseName}'` };+ return {+ status: "denied",+ reason: `license '${license}' not in allowlist and no exception registered for '${baseName}'`,+ };}/**@@ -195,7 +200,9 @@ function main() {// Print exceptions (informational)if (exceptions.length > 0) {- console.log("\n[check-licenses] Exceções registradas (não bloqueantes, revisar periodicamente):");+ console.log(+ "\n[check-licenses] Exceções registradas (não bloqueantes, revisar periodicamente):"+ );for (const { pkgKey, license } of exceptions) {const baseName = stripVersion(pkgKey);const exc = allowlist.exceptions[baseName];@@ -217,7 +224,9 @@ function main() {// Print violations and failif (violations.length > 0) {- console.error("\n[check-licenses] ❌ VIOLAÇÕES DE POLÍTICA — deps de produção com licença não permitida:");+ console.error(+ "\n[check-licenses] ❌ VIOLAÇÕES DE POLÍTICA — deps de produção com licença não permitida:"+ );for (const { pkgKey, license, reason } of violations) {console.error(` ✗ ${pkgKey}: ${license}`);console.error(` → ${reason}`);@@ -231,11 +240,14 @@ function main() {return;}- console.log("\n[check-licenses] ✅ Todos os pacotes de produção estão em conformidade com a política de licenças.");+ console.log(+ "\n[check-licenses] ✅ Todos os pacotes de produção estão em conformidade com a política de licenças."+ );}// Run only when invoked directly (not when imported by tests)-const isMain = process.argv[1] === pathToFileURL(import.meta.url).pathname ||+const isMain =+ process.argv[1] === pathToFileURL(import.meta.url).pathname ||process.argv[1]?.endsWith("check-licenses.mjs");if (isMain) {diff --git a/scripts/check/check-openapi-breaking.mjs b/scripts/check/check-openapi-breaking.mjsnew file mode 100644index 0000000000..cc761537b2--- /dev/null+++ b/scripts/check/check-openapi-breaking.mjs@@ -0,0 +1,357 @@+#!/usr/bin/env node+// scripts/check/check-openapi-breaking.mjs+// Catraca de breaking-change na API pública (Fase 8 B.4 — backlog opcional).+//+// Diffa a spec do PR (docs/reference/openapi.yaml na working tree = HEAD) contra+// a MESMA spec no branch base, via `oasdiff breaking`. Pega regressões de contrato:+// endpoint removido, parâmetro novo obrigatório, campo de resposta removido, enum+// estreitado, etc. — mudanças que quebram clientes existentes.+//+// Complementa os gates anti-alucinação existentes:+// • check-openapi-routes.mjs — toda `path` na spec resolve a uma rota real.+// • check-openapi-coverage.mjs — % de rotas reais documentadas (ratchet).+// Nenhum dos dois compara DUAS versões da spec; este sim.+//+// Saída (stdout, KEY=VALUE para o coletor de métricas collect-metrics.mjs):+// openapiBreaking=N — número de breaking changes+// openapiBreaking=SKIP reason=binary-absent — oasdiff não está no PATH+// openapiBreaking=SKIP reason=base-unresolved — a spec base não pôde ser lida+// (arquivo não existia no base, ou+// clone shallow sem o ref base)+//+// Esta versão é ADVISORY (sai 0 SEMPRE, mesmo com N>0). Promove a bloqueante+// depois (mesma trajetória de todo gate novo neste repo: report → ratchet → block).+//+// Base ref:+// • CI passa BASE_REF=${{ github.base_ref }} (ex.: "release/v3.8.26").+// • Local: default origin/release/v3.8.26.+// A spec base é extraída com `git show <BASE_REF>:docs/reference/openapi.yaml`.+//+// Uso:+// node scripts/check/check-openapi-breaking.mjs+// BASE_REF=origin/release/v3.8.26 node scripts/check/check-openapi-breaking.mjs+// node scripts/check/check-openapi-breaking.mjs --json # imprime JSON bruto do oasdiff+// node scripts/check/check-openapi-breaking.mjs --quiet # suprime logs de diagnóstico++import fs from "node:fs";+import os from "node:os";+import path from "node:path";+import { execFileSync, spawnSync } from "node:child_process";+import { pathToFileURL } from "node:url";++const ROOT = process.cwd();+const QUIET = process.argv.includes("--quiet");+const PRINT_JSON = process.argv.includes("--json");++const SPEC_REL = "docs/reference/openapi.yaml";+const SPEC_PATH = path.join(ROOT, "docs", "reference", "openapi.yaml");+const DEFAULT_BASE_REF = "origin/release/v3.8.26";++// ---------------------------------------------------------------------------+// Pure parsing function (exported for tests)+// ---------------------------------------------------------------------------++/**+ * Conta breaking changes no JSON emitido por `oasdiff breaking --format json`.+ *+ * O oasdiff emite um array de objetos (ou array vazio quando não há breaking+ * change). Cada objeto tem a forma:+ * [+ * {+ * id: string, // ex.: "api-path-removed-without-deprecation"+ * text: string, // descrição legível+ * level: number, // 3 = ERR, 2 = WARN, 1 = INFO+ * operation: string, // ex.: "GET"+ * path: string, // ex.: "/api/bar"+ * section: string,+ * source?: string,+ * baseSource?: { file, line, column },+ * fingerprint: string+ * },+ * ...+ * ]+ *+ * @param {Array|null} oasdiffJson - Array de breaking changes do oasdiff (ou null).+ * @returns {{ count: number, byId: Record<string, number>, byPath: Record<string, number>, items: Array }}+ */+export function parseOasdiffBreaking(oasdiffJson) {+ // null, undefined ou array vazio = nenhum breaking change.+ if (+ oasdiffJson === null ||+ oasdiffJson === undefined ||+ (Array.isArray(oasdiffJson) && oasdiffJson.length === 0)+ ) {+ return { count: 0, byId: {}, byPath: {}, items: [] };+ }++ // Defensivo: qualquer coisa que não seja array é tratada como "sem dados".+ if (!Array.isArray(oasdiffJson)) {+ return { count: 0, byId: {}, byPath: {}, items: [] };+ }++ let count = 0;+ const byId = {};+ const byPath = {};+ const items = [];++ for (const change of oasdiffJson) {+ if (!change || typeof change !== "object") continue;++ count++;+ items.push(change);++ const id = change.id ?? change.ID ?? "unknown";+ byId[id] = (byId[id] ?? 0) + 1;++ const p = change.path ?? change.Path ?? "unknown";+ byPath[p] = (byPath[p] ?? 0) + 1;+ }++ return { count, byId, byPath, items };+}++// ---------------------------------------------------------------------------+// Binary detection+// ---------------------------------------------------------------------------++/**+ * Detecta se o binário `oasdiff` está disponível no PATH.+ * Usa `which` (Unix) sem interpolação de shell — Hard Rule #13.+ *+ * @returns {string|null} Caminho para o binário, ou null se ausente.+ */+export function findOasdiff() {+ try {+ const result = spawnSync("which", ["oasdiff"], {+ encoding: "utf8",+ timeout: 5_000,+ });+ if (result.status === 0 && result.stdout.trim()) {+ return result.stdout.trim();+ }+ } catch {+ // which não disponível+ }++ // Fallback: tentar executar diretamente para distinguir ENOENT de "existe".+ try {+ const result = spawnSync("oasdiff", ["--version"], {+ encoding: "utf8",+ timeout: 5_000,+ });+ if (result.error?.code === "ENOENT") return null;+ if (result.status !== null) return "oasdiff"; // encontrado no PATH+ } catch {+ // noop+ }++ return null;+}++// ---------------------------------------------------------------------------+// Base spec resolution+// ---------------------------------------------------------------------------++/**+ * Extrai a spec base via `git show <BASE_REF>:<SPEC_REL>` para um arquivo temp.+ * Retorna o caminho do temp (chamador é responsável por limpar), ou null se a+ * spec não pôde ser resolvida (ref ausente em clone shallow, ou arquivo não+ * existia naquele ref). NUNCA lança — falha → null → SKIP gracioso.+ *+ * @param {string} baseRef+ * @returns {string|null} caminho do arquivo temp com a spec base, ou null.+ */+export function resolveBaseSpec(baseRef) {+ let stdout;+ try {+ stdout = execFileSync("git", ["show", `${baseRef}:${SPEC_REL}`], {+ cwd: ROOT,+ encoding: "utf8",+ maxBuffer: 32 * 1024 * 1024,+ timeout: 30_000,+ stdio: ["ignore", "pipe", "ignore"], // descarta stderr ruidoso do git+ });+ } catch {+ // ref desconhecido (shallow clone), arquivo inexistente no base, etc.+ return null;+ }++ if (!stdout || !stdout.trim()) return null;++ const tmpFile = path.join(+ os.tmpdir(),+ `oasdiff-base-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}.yaml`+ );+ try {+ fs.writeFileSync(tmpFile, stdout, "utf8");+ } catch {+ return null;+ }+ return tmpFile;+}++// ---------------------------------------------------------------------------+// Main+// ---------------------------------------------------------------------------++function main() {+ const baseRef = (process.env.BASE_REF || "").trim() || DEFAULT_BASE_REF;++ // 1) HEAD spec precisa existir (working tree).+ if (!fs.existsSync(SPEC_PATH)) {+ console.log("openapiBreaking=SKIP reason=head-spec-absent");+ if (!QUIET) {+ process.stderr.write(`[openapi-breaking] SKIP — spec não encontrada: ${SPEC_PATH}\n`);+ }+ process.exitCode = 0;+ return;+ }++ // 2) Binário oasdiff precisa estar no PATH.+ const oasdiffBin = findOasdiff();+ if (!oasdiffBin) {+ console.log("openapiBreaking=SKIP reason=binary-absent");+ if (!QUIET) {+ process.stderr.write(+ "[openapi-breaking] SKIP — oasdiff não encontrado no PATH.\n" ++ "[openapi-breaking] Instale via: https://github.com/oasdiff/oasdiff\n" ++ "[openapi-breaking] ADVISORY — este gate sai 0 (promove a bloqueante depois).\n"+ );+ }+ process.exitCode = 0;+ return;+ }++ // 3) Resolver a spec base (git show → temp). SKIP se não der.+ const baseTmp = resolveBaseSpec(baseRef);+ if (!baseTmp) {+ console.log(`openapiBreaking=SKIP reason=base-unresolved ref=${baseRef}`);+ if (!QUIET) {+ process.stderr.write(+ `[openapi-breaking] SKIP — não consegui ler ${SPEC_REL} em '${baseRef}'.\n` ++ "[openapi-breaking] Causas: clone shallow sem o ref base, arquivo novo (não existia no base),\n" ++ "[openapi-breaking] ou ref inválido. Em CI use fetch-depth: 0 ou git fetch do base ref.\n"+ );+ }+ process.exitCode = 0;+ return;+ }++ try {+ // 4) Rodar `oasdiff breaking --format json <baseTmp> <headSpec>`.+ // oasdiff sai 0 por padrão mesmo com breaking changes (só com --fail-on+ // é que sai 1). Capturamos stdout independentemente do exit code.+ const args = ["breaking", "--format", "json", baseTmp, SPEC_PATH];++ if (!QUIET) {+ process.stderr.write(+ `[openapi-breaking] Rodando: oasdiff breaking --format json <base:${baseRef}> ${SPEC_REL} ...\n`+ );+ }++ let stdout = "";+ try {+ stdout = execFileSync(oasdiffBin, args, {+ cwd: ROOT,+ encoding: "utf8",+ maxBuffer: 32 * 1024 * 1024,+ timeout: 90_000,+ });+ } catch (err) {+ // oasdiff PODE sair !=0 (ex.: com --fail-on em versões futuras, ou erro real).+ // Capturamos stdout de qualquer jeito: se ele tem JSON parseável, é o resultado.+ stdout = err.stdout ? String(err.stdout) : "";+ const stderr = err.stderr ? String(err.stderr) : "";+ if (!stdout.trim()) {+ // Sem stdout = erro real do oasdiff (spec inválida, etc.). Advisory → SKIP.+ console.log("openapiBreaking=SKIP reason=oasdiff-error");+ if (!QUIET) {+ process.stderr.write(`[openapi-breaking] SKIP — oasdiff falhou: ${err.message}\n`);+ if (stderr) {+ process.stderr.write(`[openapi-breaking] stderr: ${stderr.slice(0, 500)}\n`);+ }+ }+ process.exitCode = 0;+ return;+ }+ }++ const trimmed = stdout.trim();+ let parsed = [];+ if (trimmed && trimmed !== "null") {+ try {+ parsed = JSON.parse(trimmed);+ } catch (parseErr) {+ // JSON inesperado — advisory, não derruba o build.+ console.log("openapiBreaking=SKIP reason=parse-error");+ if (!QUIET) {+ process.stderr.write(+ `[openapi-breaking] SKIP — JSON do oasdiff não parseável: ${parseErr.message}\n` ++ `[openapi-breaking] stdout (primeiros 500): ${trimmed.slice(0, 500)}\n`+ );+ }+ process.exitCode = 0;+ return;+ }+ }++ if (PRINT_JSON) {+ process.stdout.write(JSON.stringify(parsed, null, 2) + "\n");+ return;+ }++ const { count, byId, byPath, items } = parseOasdiffBreaking(parsed);++ // Emitir KEY=VALUE para o coletor de métricas.+ console.log(`openapiBreaking=${count}`);++ if (!QUIET) {+ if (count > 0) {+ const topIds = Object.entries(byId)+ .sort(([, a], [, b]) => b - a)+ .slice(0, 5)+ .map(([id, n]) => `${id}(${n})`)+ .join(", ");+ process.stderr.write(+ `[openapi-breaking] ⚠️ ${count} breaking change(s) vs '${baseRef}' (top: ${topIds})\n`+ );+ for (const it of items.slice(0, 20)) {+ const op = it.operation ?? it.Operation ?? "?";+ const p = it.path ?? it.Path ?? "?";+ const txt = it.text ?? it.Text ?? it.id ?? "";+ process.stderr.write(`[openapi-breaking] ✗ ${op} ${p} — ${txt}\n`);+ }+ if (items.length > 20) {+ process.stderr.write(`[openapi-breaking] … +${items.length - 20} more\n`);+ }+ // Pista de mitigação: por path.+ const topPaths = Object.entries(byPath)+ .sort(([, a], [, b]) => b - a)+ .slice(0, 5)+ .map(([p, n]) => `${p}(${n})`)+ .join(", ");+ process.stderr.write(`[openapi-breaking] affected paths: ${topPaths}\n`);+ process.stderr.write(+ "[openapi-breaking] ADVISORY — promove a BLOQUEANTE depois. Se a quebra é\n" ++ "[openapi-breaking] intencional (major bump), documente no PR; senão, ajuste a spec.\n"+ );+ } else {+ process.stderr.write(+ `[openapi-breaking] OK — nenhuma breaking change na spec vs '${baseRef}'.\n`+ );+ }+ }++ // ADVISORY — sai 0 SEMPRE nesta versão, mesmo com count > 0.+ process.exitCode = 0;+ } finally {+ // Limpa o arquivo temp da spec base.+ try {+ fs.unlinkSync(baseTmp);+ } catch {+ // best-effort+ }+ }+}++if (import.meta.url === pathToFileURL(process.argv[1] || "").href) main();diff --git a/scripts/check/check-secrets.mjs b/scripts/check/check-secrets.mjsindex fe0110a324..b61c7ac478 100644--- a/scripts/check/check-secrets.mjs+++ b/scripts/check/check-secrets.mjs@@ -28,6 +28,21 @@ const QUIET = process.argv.includes("--quiet");const PRINT_JSON = process.argv.includes("--json");const GITLEAKS_CONFIG = path.join(ROOT, ".gitleaks.toml");+// Source directories to scan for secrets. We deliberately scope to the+// production/source trees instead of scanning the whole working dir:+// • `gitleaks dir .` (and `detect --no-git --source .`) WALKS the entire tree+// and READS every file — including a real `node_modules/` (90k+ files) when+// present (CI runs `npm ci`). gitleaks has no traversal-exclude flag: the+// `.gitleaks.toml [allowlist].paths` list filters FINDINGS *after* each file+// is read, so it does NOT speed up the walk. The full walk blows past the+// timeout in CI (confirmed: ETIMEDOUT) → the gate silently never produces a+// value. Scoping the scan to the source dirs keeps it fast (~6s) while still+// covering every place an embedded secret would actually be a risk (the same+// dirs Hard Rule #8 governs: src/open-sse/electron/bin, plus scripts/).+// • We also drop git-history mode (scanning 4500+ commits is slow and grows+// unbounded); the current working tree is what ships.+const SECRET_SCAN_DIRS = ["src", "open-sse", "bin", "electron", "scripts"];+// ---------------------------------------------------------------------------// Pure parsing function (exported for tests)// ---------------------------------------------------------------------------@@ -140,67 +155,95 @@ function main() {if (!QUIET) {process.stderr.write("[check-secrets] SKIP — gitleaks não encontrado no PATH.\n" +- "[check-secrets] Instale via: https://github.com/gitleaks/gitleaks\n" +- "[check-secrets] ADVISORY — este gate sai 0 (ratchet entra no CI da Fase 7 INT).\n"+ "[check-secrets] Instale via: https://github.com/gitleaks/gitleaks\n" ++ "[check-secrets] ADVISORY — este gate sai 0 (ratchet entra no CI da Fase 7 INT).\n");}process.exitCode = 0;return;}- // Construir args sem interpolação de variáveis no script (Hard Rule #13)- const args = [- "detect",- "--no-git", // escanear diretório em vez de histórico git (mais rápido em CI)- "--report-format", "json",- "--report-path", "-", // output para stdout- "--source", ROOT,- "--no-banner",- ];-- // Adicionar config personalizada se existir- if (fs.existsSync(GITLEAKS_CONFIG)) {- args.push("--config", GITLEAKS_CONFIG);+ // Resolver os diretórios de fonte que realmente existem (robusto se um sumir).+ const scanDirs = SECRET_SCAN_DIRS.filter((d) => fs.existsSync(path.join(ROOT, d)));++ if (scanDirs.length === 0) {+ // Nenhum dir de fonte encontrado — nada a escanear (advisory, sai 0).+ console.log("secretFindings=0");+ if (!QUIET) {+ process.stderr.write("[check-secrets] Nenhum diretório de fonte encontrado para escanear.\n");+ }+ process.exitCode = 0;+ return;}if (!QUIET) {- process.stderr.write("[check-secrets] Rodando gitleaks detect --no-git --report-format json ...\n");+ process.stderr.write(+ `[check-secrets] Rodando gitleaks dir <dir> --report-format json para: ${scanDirs.join(", ")} ...\n`+ );}- let stdout = "";- try {- stdout = execFileSync(gitleaksBin, args, {- cwd: ROOT,- encoding: "utf8",- maxBuffer: 32 * 1024 * 1024,- timeout: 120_000, // 2 min- });- } catch (err) {- // exit 1 com stdout = findings encontrados (comportamento esperado do gitleaks)- stdout = err.stdout ? String(err.stdout) : "";- const stderr = err.stderr ? String(err.stderr) : "";-- if (err.status === 1 && stdout.trim()) {- // Normal: gitleaks achou findings e saiu com exit 1- } else if (!stdout.trim()) {- process.stderr.write(`[check-secrets] ERRO ao executar gitleaks: ${err.message}\n`);- if (stderr) process.stderr.write(`[check-secrets] stderr: ${stderr.slice(0, 500)}\n`);- process.exit(2);+ // `gitleaks dir` aceita UM ÚNICO path posicional (uso: `gitleaks dir [flags]+ // [path]`). Passar múltiplos paths faz o gitleaks ignorar os extras e cair para+ // escanear o CWD inteiro (`.`) — o que re-traz node_modules/docs/tests e o+ // timeout original. Por isso escaneamos CADA diretório de fonte em uma invocação+ // separada e concatenamos os findings.+ const gitleaksJson = [];+ for (const dir of scanDirs) {+ const args = [+ "dir",+ dir,+ "--report-format",+ "json",+ "--report-path",+ "-", // output para stdout+ "--no-banner",+ ];+ if (fs.existsSync(GITLEAKS_CONFIG)) {+ args.push("--config", GITLEAKS_CONFIG);}- }- let gitleaksJson;- if (!stdout.trim() || stdout.trim() === "null") {- gitleaksJson = [];- } else {+ let stdout = "";+ try {+ stdout = execFileSync(gitleaksBin, args, {+ cwd: ROOT,+ encoding: "utf8",+ maxBuffer: 32 * 1024 * 1024,+ timeout: 90_000, // 90s por dir — o scan escopado completa em ~10s; folga ampla+ });+ } catch (err) {+ // exit 1 com stdout = findings encontrados (comportamento esperado do gitleaks)+ stdout = err.stdout ? String(err.stdout) : "";+ const stderr = err.stderr ? String(err.stderr) : "";++ if (err.status === 1 && stdout.trim()) {+ // Normal: gitleaks achou findings neste dir e saiu com exit 1+ } else if (!stdout.trim()) {+ process.stderr.write(+ `[check-secrets] ERRO ao executar gitleaks em '${dir}': ${err.message}\n`+ );+ if (stderr) process.stderr.write(`[check-secrets] stderr: ${stderr.slice(0, 500)}\n`);+ process.exit(2);+ }+ }++ if (!stdout.trim() || stdout.trim() === "null") {+ continue; // sem findings neste dir+ }+ let parsed;try {- const parsed = JSON.parse(stdout.trim());- gitleaksJson = parsed === null ? [] : parsed;+ parsed = JSON.parse(stdout.trim());} catch (parseErr) {- process.stderr.write(`[check-secrets] ERRO ao parsear JSON do gitleaks: ${parseErr.message}\n`);- process.stderr.write(`[check-secrets] stdout (primeiros 500 chars): ${stdout.slice(0, 500)}\n`);+ process.stderr.write(+ `[check-secrets] ERRO ao parsear JSON do gitleaks em '${dir}': ${parseErr.message}\n`+ );+ process.stderr.write(+ `[check-secrets] stdout (primeiros 500 chars): ${stdout.slice(0, 500)}\n`+ );process.exit(2);}+ if (Array.isArray(parsed)) {+ gitleaksJson.push(...parsed);+ }}if (PRINT_JSON) {@@ -223,7 +266,7 @@ function main() {process.stderr.write(`[check-secrets] Findings: ${findingCount} (top rules: ${topRules})\n`);process.stderr.write("[check-secrets] Para allowlistar findings legítimos (fixtures de teste, creds públicas),\n" +- "[check-secrets] adicione entradas em .gitleaks.toml [[allowlist]] com comentário.\n"+ "[check-secrets] adicione entradas em .gitleaks.toml [[allowlist]] com comentário.\n");} else {process.stderr.write("[check-secrets] Nenhum finding detectado.\n");diff --git a/scripts/check/check-test-discovery.mjs b/scripts/check/check-test-discovery.mjsindex 99948e6a2d..0d0f19d87b 100644--- a/scripts/check/check-test-discovery.mjs+++ b/scripts/check/check-test-discovery.mjs@@ -34,7 +34,7 @@ const ROOT = process.cwd();const BASELINE_PATH = path.resolve(process.argv.includes("--baseline")? process.argv[process.argv.indexOf("--baseline") + 1]- : path.join(ROOT, "test-discovery-baseline.json")+ : path.join(ROOT, "config/quality/test-discovery-baseline.json"));const UPDATE = process.argv.includes("--update");diff --git a/scripts/check/check-tracked-artifacts.mjs b/scripts/check/check-tracked-artifacts.mjsindex 833ed8dc95..a0324fc168 100644--- a/scripts/check/check-tracked-artifacts.mjs+++ b/scripts/check/check-tracked-artifacts.mjs@@ -15,7 +15,10 @@ import { execFileSync } from "node:child_process";import { pathToFileURL } from "node:url";const FORBIDDEN_PREFIXES = ["node_modules/", ".next/", "coverage/"];-const FORBIDDEN_EXACT = new Set(["quality-metrics.json"]);+const FORBIDDEN_EXACT = new Set([+ "quality-metrics.json", // legacy root location (still forbidden if a stale run writes it)+ "config/quality/quality-metrics.json", // current generated location (collect-metrics.mjs)+]);/*** Verifica se algum caminho na lista de arquivos rastreados corresponde a um@@ -80,7 +83,9 @@ function main() {process.exit(0);}- console.error(`[tracked-artifacts] FAIL — ${violations.length} forbidden artifact(s) tracked by git:`);+ console.error(+ `[tracked-artifacts] FAIL — ${violations.length} forbidden artifact(s) tracked by git:`+ );for (const v of violations) {console.error(` ✗ ${v}`);}diff --git a/scripts/check/check-type-coverage.mjs b/scripts/check/check-type-coverage.mjsindex f6291c77ba..0051063fd3 100644--- a/scripts/check/check-type-coverage.mjs+++ b/scripts/check/check-type-coverage.mjs@@ -33,7 +33,7 @@ const UPDATE = process.argv.includes("--update");const BASELINE_PATH = path.resolve(process.argv.includes("--baseline")? process.argv[process.argv.indexOf("--baseline") + 1]- : path.join(ROOT, "quality-baseline.json")+ : path.join(ROOT, "config/quality/quality-baseline.json"));// Small epsilon to absorb float noise between runs (type-coverage can vary ~0.01%).diff --git a/scripts/docs/sync-wiki.mjs b/scripts/docs/sync-wiki.mjsnew file mode 100644index 0000000000..ff8f6529dd--- /dev/null+++ b/scripts/docs/sync-wiki.mjs@@ -0,0 +1,290 @@+#!/usr/bin/env node+// scripts/docs/sync-wiki.mjs+// Full GitHub wiki content + cover-count sync.+//+// WHY: the wiki has no generator and historically drifts (it sat at "212+ providers /+// 14 strategies / 37 MCP tools" while code was at 226 / 15 / 87, and new docs like+// SUPPLY_CHAIN never appeared). This closes the loop: content + counts, automated per+// release by .github/workflows/wiki-sync.yml.+//+// DESIGN — update-in-place, never duplicates:+// 1. The wiki page names are hand-curated and NOT deterministically reproducible+// (e.g. "API-Reference" vs "Fly-io-Deployment-Guide"). So we iterate the EXISTING+// wiki pages and fuzzy-match each to a docs/ source by normalized key+// (lowercase, strip non-alphanumeric). When a source exists we rewrite that exact+// page → zero risk of creating a parallel/duplicate page.+// 2. A curated allowlist (NEW_PAGE_EXCLUDE) keeps internal docs (audit reports, plans,+// the docs index) off the public wiki; every other unmatched docs page is ADDED+// with a deterministic acronym-aware name.+// 3. Hand-curated pages with no docs source (Home, _Sidebar, Header, _Footer,+// Languages) are left untouched — except the four cover counts on Home.md.+// 4. EN by default. Localized mirrors (<locale>‐Page) are pure update-in-place and+// only touched with --include-i18n (the i18n source lags and is validated+// separately).+//+// Content transform: strip the YAML frontmatter, prepend the wiki language banner.+//+// Usage:+// node scripts/docs/sync-wiki.mjs --wiki-dir <path> # write+// node scripts/docs/sync-wiki.mjs --wiki-dir <path> --dry-run # report only+// node scripts/docs/sync-wiki.mjs --wiki-dir <path> --check # exit 1 on drift+// node scripts/docs/sync-wiki.mjs --wiki-dir <path> --include-i18n # also localized++import fs from "node:fs";+import path from "node:path";+import { fileURLToPath } from "node:url";++const __dirname = path.dirname(fileURLToPath(import.meta.url));+const ROOT = path.resolve(__dirname, "..", "..");++// U+2010 HYPHEN separates the locale prefix in localized wiki page names.+const LOCALE_SEP = "‐";+export const WIKI_BANNER = "> 🌍 [View in other languages](Languages)\n\n\n";++// Docs that must never become public wiki pages (internal reports/plans/index).+export const NEW_PAGE_EXCLUDE = new Set([+ "README", // docs index, not a page+ "DOCUMENTATION_AUDIT_REPORT",+ "DOCUMENTATION_OVERHAUL_PLAN",+ "E2E_DASHBOARD_SHAKEDOWN_v3.8.0",+ "SUBMIT_PR",+ "fix-opencode-context",+ "plugins", // docs/dev/plugins.md — internal dev note+ "SOCKET_DEV_FINDINGS",+]);++// Acronyms kept upper-case when minting a NEW page name (existing pages keep their+// curated name via fuzzy match, so this only affects brand-new pages).+const ACRONYMS = new Set([+ "api", "mcp", "a2a", "acp", "cli", "sse", "i18n", "pii", "oauth", "vm", "ai",+ "llm", "sdk", "ide", "ui", "ux", "tls", "mitm", "ws", "cors", "jwt", "db", "vps",+]);++/** Normalized matching key: lowercase, drop extension + every non-alphanumeric char. */+export function normKey(s) {+ return s.toLowerCase().replace(/\.md$/, "").replace(/[^a-z0-9]/g, "");+}++/** Deterministic wiki page name for a brand-new page (acronym-aware Title-Case-dashed). */+export function toWikiName(basename) {+ return basename+ .replace(/\.md$/, "")+ .split(/[_\-\s]+/)+ .filter(Boolean)+ .map((t) => (ACRONYMS.has(t.toLowerCase()) ? t.toUpperCase() : t[0].toUpperCase() + t.slice(1).toLowerCase()))+ .join("-");+}++/** Strip YAML frontmatter and prepend the wiki language banner. Pure; exported for tests. */+export function toWikiContent(docMarkdown) {+ const body = docMarkdown.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/, "").replace(/^\s+/, "");+ return WIKI_BANNER + body.replace(/\s*$/, "") + "\n";+}++function read(rel) {+ const p = path.join(ROOT, rel);+ return fs.existsSync(p) ? fs.readFileSync(p, "utf8") : "";+}++// ---- cover-page counts (source of truth) ----+function providerCount() {+ const m = read("docs/reference/PROVIDER_REFERENCE.md").match(/Total providers:\s*\*\*(\d+)\*\*/);+ return m ? Number(m[1]) : null;+}+function strategyCount() {+ const m = read("src/shared/constants/routingStrategies.ts").match(+ /ROUTING_STRATEGY_VALUES\s*=\s*\[([^\]]*)\]/+ );+ return m ? (m[1].match(/"[^"]+"/g) || []).length : null;+}+function localeCount() {+ try {+ const c = JSON.parse(read("config/i18n.json"));+ return Array.isArray(c.locales) ? c.locales.length : null;+ } catch {+ return null;+ }+}+function mcpToolCount() {+ // Prefer a literal; the constant is computed at runtime so best-effort only.+ const m = read("open-sse/mcp-server/server.ts").match(/TOTAL_MCP_TOOL_COUNT\s*=\s*(\d+)\b/);+ return m ? Number(m[1]) : null;+}+export function readCounts() {+ return {+ providers: providerCount(),+ strategies: strategyCount(),+ mcpTools: mcpToolCount(),+ locales: localeCount(),+ };+}++/** Apply cover-page count substitutions to Home.md text. Pure; exported for tests. */+export function syncHomeCounts(home, counts) {+ let out = home;+ if (counts.providers) {+ out = out+ .replace(/Connect every AI tool to \d+ providers/g, `Connect every AI tool to ${counts.providers} providers`)+ .replace(/\*\*\d+ AI Providers\*\*/g, `**${counts.providers} AI Providers**`)+ .replace(/All \d+ supported providers/g, `All ${counts.providers} supported providers`)+ .replace(/\b\d+ providers\b/g, `${counts.providers} providers`);+ }+ if (counts.strategies) {+ out = out.replace(/\*\*\d+ Routing Strategies\*\*/g, `**${counts.strategies} Routing Strategies**`);+ }+ if (counts.mcpTools) {+ out = out.replace(/(\|\s*\*\*MCP Server\*\*\s*\|\s*)\d+( tools)/g, `$1${counts.mcpTools}$2`);+ }+ return out;+}++// ---- docs discovery ----+function walkMarkdown(dir, acc = []) {+ if (!fs.existsSync(dir)) return acc;+ for (const e of fs.readdirSync(dir, { withFileTypes: true })) {+ const p = path.join(dir, e.name);+ if (e.isDirectory()) walkMarkdown(p, acc);+ else if (e.name.endsWith(".md")) acc.push(p);+ }+ return acc;+}++/** Build normKey → docs absolute path for English docs (docs/ minus docs/i18n). */+function indexEnglishDocs() {+ const docsRoot = path.join(ROOT, "docs");+ const files = walkMarkdown(docsRoot).filter((f) => !f.includes(`${path.sep}i18n${path.sep}`));+ const byKey = new Map();+ for (const f of files) {+ const base = path.basename(f, ".md");+ const k = normKey(base);+ // First-writer-wins keeps a deterministic pick for basename collisions.+ if (!byKey.has(k)) byKey.set(k, { file: f, base });+ }+ return byKey;+}++/** Build normKey → docs path for a given locale's i18n tree. */+function indexLocaleDocs(locale) {+ const root = path.join(ROOT, "docs", "i18n", locale);+ const byKey = new Map();+ for (const f of walkMarkdown(root)) {+ const k = normKey(path.basename(f, ".md"));+ if (!byKey.has(k)) byKey.set(k, f);+ }+ return byKey;+}++function listWikiPages(wikiDir) {+ return fs+ .readdirSync(wikiDir)+ .filter((n) => n.endsWith(".md"))+ .map((n) => n.slice(0, -3));+}++/** Split a wiki page name into { locale, name }. EN pages have locale = null. */+export function parseWikiPage(page) {+ const idx = page.indexOf(LOCALE_SEP);+ if (idx === -1) return { locale: null, name: page };+ return { locale: page.slice(0, idx), name: page.slice(idx + 1) };+}++function main() {+ const args = process.argv.slice(2);+ const wikiDir = args.includes("--wiki-dir") ? args[args.indexOf("--wiki-dir") + 1] : null;+ const dryRun = args.includes("--dry-run");+ const check = args.includes("--check");+ const includeI18n = args.includes("--include-i18n");+ const updateExisting = args.includes("--update-existing");+ if (!wikiDir || !fs.existsSync(wikiDir)) {+ console.error("usage: sync-wiki.mjs --wiki-dir <path> [--dry-run|--check] [--include-i18n]");+ process.exit(2);+ }++ const enDocs = indexEnglishDocs();+ const wikiPages = listWikiPages(wikiDir);+ const enWikiKeys = new Set();+ const localeIndexes = new Map();++ const plan = { update: [], add: [], untouched: [], countsChanged: false };++ // 1. Update existing wiki pages from their docs source.+ for (const page of wikiPages) {+ if (page === "Home") continue; // handled by counts below+ const { locale, name } = parseWikiPage(page);+ const key = normKey(name);+ let srcFile = null;+ if (!locale) {+ enWikiKeys.add(key);+ srcFile = enDocs.get(key)?.file ?? null;+ } else if (includeI18n) {+ if (!localeIndexes.has(locale)) localeIndexes.set(locale, indexLocaleDocs(locale));+ srcFile = localeIndexes.get(locale).get(key) ?? null;+ }+ if (!srcFile) {+ plan.untouched.push(page);+ continue;+ }+ const next = toWikiContent(fs.readFileSync(srcFile, "utf8"));+ const cur = fs.readFileSync(path.join(wikiDir, `${page}.md`), "utf8");+ if (next !== cur) plan.update.push({ page, srcFile });+ }++ // 2. Add curated new English pages (unmatched docs, minus the exclude list).+ for (const [key, { file, base }] of enDocs) {+ if (enWikiKeys.has(key)) continue;+ if (NEW_PAGE_EXCLUDE.has(base)) continue;+ plan.add.push({ page: toWikiName(base), srcFile: file, base });+ }++ // 3. Home cover counts.+ const counts = readCounts();+ const homePath = path.join(wikiDir, "Home.md");+ let homeAfter = null;+ if (fs.existsSync(homePath)) {+ const before = fs.readFileSync(homePath, "utf8");+ homeAfter = syncHomeCounts(before, counts);+ plan.countsChanged = homeAfter !== before;+ }++ // ---- report ----+ // Updating existing pages is opt-in: several docs SOURCES carry stale counts (e.g.+ // ARCHITECTURE.md still says "177 providers / 37 MCP tools" while the wiki cover was+ // hand-patched to 226/87). Overwriting from a staler source would REGRESS the wiki, so+ // by default we only ADD missing pages and sync Home counts. Pass --update-existing+ // once the docs sources are regenerated (see docs/ops/DOCUMENTATION_AUDIT_REPORT.md).+ const updates = updateExisting ? plan.update : [];+ const total = updates.length + plan.add.length + (plan.countsChanged ? 1 : 0);+ console.log(`[wiki-sync] counts: ${JSON.stringify(counts)}`);+ console.log(+ `[wiki-sync] add: ${plan.add.length} | Home counts: ${plan.countsChanged ? "drift" : "in-sync"} | ` ++ `existing-page updates: ${plan.update.length} (${updateExisting ? "ENABLED" : "skipped — needs --update-existing"}) | untouched: ${plan.untouched.length}`+ );+ if (dryRun || check) {+ if (plan.add.length) console.log(` add → ${plan.add.map((a) => a.page).join(", ")}`);+ if (plan.update.length)+ console.log(+ ` ${updateExisting ? "update" : "would-update (skipped)"} → ${plan.update.map((u) => u.page).slice(0, 60).join(", ")}${plan.update.length > 60 ? " …" : ""}`+ );+ if (check) {+ if (total > 0) {+ console.error(`✗ wiki out of sync (${total} change(s) pending)`);+ process.exit(1);+ }+ console.log("✓ wiki in sync");+ }+ return;+ }++ // ---- write ----+ for (const { page, srcFile } of [...updates, ...plan.add]) {+ fs.writeFileSync(path.join(wikiDir, `${page}.md`), toWikiContent(fs.readFileSync(srcFile, "utf8")));+ }+ if (plan.countsChanged && homeAfter != null) fs.writeFileSync(homePath, homeAfter);+ console.log(+ `[wiki-sync] wrote ${total} page(s) (add: ${plan.add.length}, updates: ${updates.length}, counts: ${plan.countsChanged ? 1 : 0}).`+ );+}++const invokedDirectly =+ process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);+if (invokedDirectly) main();diff --git a/scripts/quality/check-quality-ratchet.mjs b/scripts/quality/check-quality-ratchet.mjsindex 2e88519907..65bb4b1752 100644--- a/scripts/quality/check-quality-ratchet.mjs+++ b/scripts/quality/check-quality-ratchet.mjs@@ -12,8 +12,12 @@ function getArg(name, fallback) {const i = process.argv.indexOf(name);return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : fallback;}-const BASELINE = path.resolve(getArg("--baseline", path.join(cwd, "quality-baseline.json")));-const METRICS = path.resolve(getArg("--metrics", path.join(cwd, "quality-metrics.json")));+const BASELINE = path.resolve(+ getArg("--baseline", path.join(cwd, "config/quality/quality-baseline.json"))+);+const METRICS = path.resolve(+ getArg("--metrics", path.join(cwd, "config/quality/quality-metrics.json"))+);const SUMMARY = getArg("--summary", null);const UPDATE = process.argv.includes("--update");// --allow-missing: pula métricas do baseline ausentes do metrics (em vez de falhar).@@ -55,8 +59,9 @@ for (const [key, spec] of Object.entries(baseline.metrics)) {const tightenSlack = spec.tightenSlack !== undefined ? spec.tightenSlack : eps;if (current === undefined) {- if (ALLOW_MISSING) {- rows.push([key, base, "—", "SKIP (ausente)"]);+ if (ALLOW_MISSING || spec.dedicatedGate === true) {+ const reason = spec.dedicatedGate === true ? "SKIP (dedicated gate)" : "SKIP (ausente)";+ rows.push([key, base, "—", reason]);} else {failures.push(`métrica "${key}" ausente em ${path.basename(METRICS)}`);rows.push([key, base, "—", "MISSING"]);@@ -73,7 +78,7 @@ for (const [key, spec] of Object.entries(baseline.metrics)) {status = "↑ melhorou";if (REQUIRE_TIGHTEN && base - current > tightenSlack) {tightenFailures.push(- `${key}: melhorou de ${base} para ${current} (delta ${(base - current).toFixed(4)} > slack ${tightenSlack}) — rode 'npm run quality:ratchet -- --update' e commite o baseline apertado neste PR`,+ `${key}: melhorou de ${base} para ${current} (delta ${(base - current).toFixed(4)} > slack ${tightenSlack}) — rode 'npm run quality:ratchet -- --update' e commite o baseline apertado neste PR`);}}@@ -86,7 +91,7 @@ for (const [key, spec] of Object.entries(baseline.metrics)) {status = "↑ melhorou";if (REQUIRE_TIGHTEN && current - base > tightenSlack) {tightenFailures.push(- `${key}: melhorou de ${base} para ${current} (delta ${(current - base).toFixed(4)} > slack ${tightenSlack}) — rode 'npm run quality:ratchet -- --update' e commite o baseline apertado neste PR`,+ `${key}: melhorou de ${base} para ${current} (delta ${(current - base).toFixed(4)} > slack ${tightenSlack}) — rode 'npm run quality:ratchet -- --update' e commite o baseline apertado neste PR`);}}@@ -99,10 +104,10 @@ const baselineKeys = new Set(Object.keys(baseline.metrics));const orphans = Object.keys(metrics).filter((k) => !baselineKeys.has(k));if (orphans.length > 0) {console.warn(- `[quality-ratchet] WARN: ${orphans.length} métrica(s) órfã(s) — presente(s) em ${path.basename(METRICS)} mas sem entrada no baseline: ${orphans.join(", ")}`,+ `[quality-ratchet] WARN: ${orphans.length} métrica(s) órfã(s) — presente(s) em ${path.basename(METRICS)} mas sem entrada no baseline: ${orphans.join(", ")}`);console.warn(- `[quality-ratchet] WARN: adicione ${orphans.length === 1 ? "essa métrica" : "essas métricas"} ao baseline (com value/direction) para que sejam catraceadas.`,+ `[quality-ratchet] WARN: adicione ${orphans.length === 1 ? "essa métrica" : "essas métricas"} ao baseline (com value/direction) para que sejam catraceadas.`);}@@ -140,7 +145,7 @@ if (failures.length) {if (REQUIRE_TIGHTEN && !UPDATE && tightenFailures.length > 0) {console.error("[quality-ratchet] FALHOU (--require-tighten): métrica(s) melhoraram mas o baseline não foi apertado:\n" +- tightenFailures.map((f) => " ✗ " + f).join("\n"),+ tightenFailures.map((f) => " ✗ " + f).join("\n"));process.exit(1);}diff --git a/scripts/quality/collect-metrics.mjs b/scripts/quality/collect-metrics.mjsindex bf24f96b29..2807409831 100644--- a/scripts/quality/collect-metrics.mjs+++ b/scripts/quality/collect-metrics.mjs@@ -250,6 +250,9 @@ if (import.meta.url === pathToFileURL(process.argv[1] || "").href) {coverageByModule();openapiCoverage();await i18nUiCoverage();- fs.writeFileSync(path.join(cwd, "quality-metrics.json"), JSON.stringify(out, null, 2) + "\n");+ fs.writeFileSync(+ path.join(cwd, "config/quality/quality-metrics.json"),+ JSON.stringify(out, null, 2) + "\n"+ );console.log("[collect-metrics]", JSON.stringify(out));}diff --git a/src/app/(dashboard)/dashboard/providers/[id]/__tests__/useModelVisibilityHandlers.test.tsx b/src/app/(dashboard)/dashboard/providers/[id]/__tests__/useModelVisibilityHandlers.test.tsxnew file mode 100644index 0000000000..eb5a42a23a--- /dev/null+++ b/src/app/(dashboard)/dashboard/providers/[id]/__tests__/useModelVisibilityHandlers.test.tsx@@ -0,0 +1,121 @@+// @vitest-environment jsdom+import React, { act } from "react";+import { createRoot } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import {+ useModelVisibilityHandlers,+ type UseModelVisibilityHandlersReturn,+} from "../hooks/useModelVisibilityHandlers";++type HookResult = UseModelVisibilityHandlersReturn;++const t = ((key: string) => key) as ((key: string) => string) & {+ has: (key: string) => boolean;+};+t.has = () => false;++const notify = {+ success: vi.fn(),+ error: vi.fn(),+ warning: vi.fn(),+ info: vi.fn(),+};++const baseProps = {+ providerId: "anthropic-compatible-cc-test",+ modelAliases: {},+ customMap: new Map<string, unknown>(),+ providerStorageAlias: "anthropic-compatible-cc-test",+ fetchProviderModelMeta: vi.fn().mockResolvedValue(undefined),+ fetchAliases: vi.fn().mockResolvedValue(undefined),+ notify,+ t,+ selectedConnection: { id: "conn-1", provider: "anthropic-compatible-cc-test" },+ providerNode: { id: "anthropic-compatible-cc-test" },+};++function renderHook(): { get: () => HookResult } {+ let latestResult: HookResult | null = null;++ function Wrapper() {+ const result = useModelVisibilityHandlers(baseProps);+ React.useEffect(() => {+ latestResult = result;+ });+ return null;+ }++ const el = document.createElement("div");+ document.body.appendChild(el);+ const root = createRoot(el);++ act(() => {+ root.render(<Wrapper />);+ });++ roots.push({ root, el });++ return {+ get: () => {+ if (!latestResult) throw new Error("Hook did not render");+ return latestResult;+ },+ };+}++const roots: Array<{ root: ReturnType<typeof createRoot>; el: HTMLDivElement }> = [];++beforeEach(() => {+ (+ globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT?: boolean }+ ).IS_REACT_ACT_ENVIRONMENT = true;+ vi.stubGlobal("fetch", vi.fn());+ vi.clearAllMocks();+});++afterEach(() => {+ for (const { root, el } of roots.splice(0)) {+ act(() => root.unmount());+ el.remove();+ }+ vi.unstubAllGlobals();+});++describe("useModelVisibilityHandlers", () => {+ it("defaults auto-hide failed models to off", () => {+ const hook = renderHook();++ expect(hook.get().autoHideFailed).toBe(false);+ });++ it("does not hide a model when a single-model test fails", async () => {+ const fetchMock = vi.mocked(fetch);+ fetchMock.mockResolvedValueOnce({+ ok: false,+ json: () =>+ Promise.resolve({+ status: "error",+ error: "model unavailable",+ }),+ } as Response);++ const hook = renderHook();++ await act(async () => {+ await hook+ .get()+ .onTestModel("claude-opus-4-8", "anthropic-compatible-cc-test/claude-opus-4-8");+ });++ expect(fetchMock).toHaveBeenCalledTimes(1);+ expect(fetchMock).toHaveBeenCalledWith(+ "/api/models/test",+ expect.objectContaining({ method: "POST" })+ );+ expect(+ fetchMock.mock.calls.some(([url]) => String(url).startsWith("/api/provider-models"))+ ).toBe(false);+ expect(hook.get().modelTestStatus["claude-opus-4-8"]).toBe("error");+ });+});diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsxindex 1b51365760..c73ef5917a 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/ModelRow.tsx@@ -149,7 +149,14 @@ export function ModelVisibilityToolbar({</div>)}{onAutoHideFailedChange && (- <label className="flex items-center gap-1.5 text-xs text-text-muted">+ <label+ className="flex items-center gap-1.5 text-xs text-text-muted"+ title={providerText(+ t,+ "autoHideFailedHint",+ "When enabled, Test all hides non-transient failures from public catalogs such as /v1/models. Single-model tests never auto-hide."+ )}+ ><inputtype="checkbox"checked={autoHideFailed ?? false}diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/OpenRouterPresetInput.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/OpenRouterPresetInput.tsxnew file mode 100644index 0000000000..5da8ca294b--- /dev/null+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/OpenRouterPresetInput.tsx@@ -0,0 +1,55 @@+"use client";++import { useCallback, useMemo, useState } from "react";+import { Input } from "@/shared/components";+import { OPENROUTER_PRESET_MAX_LENGTH } from "@/shared/constants/openRouterPreset";+import { providerText, type ProviderMessageTranslator } from "../providerPageHelpers";++interface OpenRouterPresetInputProps {+ value: string;+ onChange: (value: string) => void;+ t: ProviderMessageTranslator;+}++export default function OpenRouterPresetInput({ value, onChange, t }: OpenRouterPresetInputProps) {+ return (+ <Input+ label={providerText(t, "openRouterPresetLabel", "OpenRouter preset")}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ placeholder="@preset/slug"+ data-testid="openrouter-preset-input"+ maxLength={OPENROUTER_PRESET_MAX_LENGTH}+ hint={providerText(+ t,+ "openRouterPresetHint",+ "Sends this connection's preset as the OpenRouter top-level preset field."+ )}+ />+ );+}++export function useOpenRouterPresetControl(+ provider: string | null | undefined,+ t: ProviderMessageTranslator+) {+ const [value, setValue] = useState("");+ const isOpenRouter = provider === "openrouter";+ const applyTo = useCallback(+ (data: Record<string, unknown>) => {+ const preset = value.trim();+ if (isOpenRouter && preset) data.preset = preset;+ },+ [isOpenRouter, value]+ );+ const getPatch = useCallback(() => {+ if (!isOpenRouter) return {};+ const preset = value.trim();+ return { preset: preset || null };+ }, [isOpenRouter, value]);+ const input = useMemo(+ () => (isOpenRouter ? <OpenRouterPresetInput t={t} value={value} onChange={setValue} /> : null),+ [isOpenRouter, t, value]+ );+ return { applyTo, getPatch, input, isOpenRouter, setValue };+}diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/PassthroughModelsSection.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/PassthroughModelsSection.tsxindex eeaff28cd9..61509f3c9c 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/components/PassthroughModelsSection.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/PassthroughModelsSection.tsx@@ -120,7 +120,7 @@ export default function PassthroughModelsSection({const [modelFilter, setModelFilter] = useState("");const [testingAll, setTestingAll] = useState(false);const [testProgress, setTestProgress] = useState<{ done: number; total: number } | null>(null);- const [localAutoHideFailed, setLocalAutoHideFailed] = useState(true);+ const [localAutoHideFailed, setLocalAutoHideFailed] = useState(false);const autoHideFailed =autoHideFailedProp !== undefined ? autoHideFailedProp : localAutoHideFailed;const setAutoHideFailed = onAutoHideFailedChange ?? setLocalAutoHideFailed;diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/ProviderModalsPanel.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/ProviderModalsPanel.tsxindex 7959d7e431..ff6d485c68 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/components/ProviderModalsPanel.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/ProviderModalsPanel.tsx@@ -2,7 +2,14 @@// Phase 1t.5 extraction — Issue #3501// Pure composition of all modal elements rendered by ProviderDetailPageClient.-import { ConfirmModal, OAuthModal, KiroOAuthWrapper, CursorAuthModal, TraeAuthModal, ProxyConfigModal } from "@/shared/components";+import {+ ConfirmModal,+ OAuthModal,+ KiroOAuthWrapper,+ CursorAuthModal,+ TraeAuthModal,+ ProxyConfigModal,+} from "@/shared/components";import RiskNoticeModal from "../../components/RiskNoticeModal";import CodexCliGuideModal from "../../components/CodexCliGuideModal";import SiliconFlowEndpointModal from "./SiliconFlowEndpointModal";@@ -13,18 +20,9 @@ import ExternalLinkModal from "./ExternalLinkModal";import BatchTestResultsModal from "./BatchTestResultsModal";import ImportProgressModal from "./ImportProgressModal";import { AdaptaTutorialModal } from "./AdaptaTutorialModal";-import {- ImportCodexAuthModal,- ApplyCodexAuthModal,-} from "./modals/ImportCodexAuthModal";-import {- ImportClaudeAuthModal,- ApplyClaudeAuthModal,-} from "./modals/ImportClaudeAuthModal";-import {- ImportGeminiAuthModal,- ApplyGeminiAuthModal,-} from "./modals/ImportGeminiAuthModal";+import { ImportCodexAuthModal, ApplyCodexAuthModal } from "./modals/ImportCodexAuthModal";+import { ImportClaudeAuthModal, ApplyClaudeAuthModal } from "./modals/ImportClaudeAuthModal";+import { ImportGeminiAuthModal, ApplyGeminiAuthModal } from "./modals/ImportGeminiAuthModal";import { type ConnectionRowConnection } from "./ConnectionRow";import { type BatchTestResults } from "../hooks/useProviderConnections";import { type ImportProgress } from "../hooks/useModelImportHandlers";@@ -97,7 +95,7 @@ interface ProviderModalsPanelProps {// Edit connectionshowEditModal: boolean;setShowEditModal: (open: boolean) => void;- selectedConnection: { id: string } | null;+ selectedConnection: ConnectionRowConnection | null;handleUpdateConnection: (data: any) => Promise<string | null>;// Edit compatible nodeshowEditNodeModal: boolean;@@ -316,6 +314,7 @@ export default function ProviderModalsPanel({<EditConnectionModalisOpen={showEditModal}connection={selectedConnection}+ providerId={providerId}onSave={handleUpdateConnection}onClose={() => setShowEditModal(false)}/>diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsxindex df432143dc..9fff5feff8 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx@@ -1,15 +1,9 @@"use client";-// Issue #3501 Phase 1c — extracted from the god-component.-// ~787-LOC modal for adding a new API key / credential to a provider.-import { useState, useEffect, useRef } from "react";import { useTranslations } from "next-intl";import { Button, Badge, Input, Modal, Toggle } from "@/shared/components";-import {- providerAllowsOptionalApiKey,- supportsBulkApiKey,-} from "@/shared/constants/providers";+import { providerAllowsOptionalApiKey, supportsBulkApiKey } from "@/shared/constants/providers";import { parseBulkApiKeys } from "@/shared/utils/bulkApiKeyParser";import {isBaseUrlConfigurableProvider,@@ -30,7 +24,10 @@ import {type CommandCodeAuthFlowState,} from "../../providerPageHelpers";import { getWebSessionCredentialRequirement } from "../../webSessionCredentials";+import { useOpenRouterPresetControl } from "../OpenRouterPresetInput";import WebSessionCredentialGuide from "../WebSessionCredentialGuide";+import CcCompatibleRequestDefaultsFields from "./CcCompatibleRequestDefaultsFields";+import { assignCcCompatibleRequestDefaults } from "./ccCompatibleRequestDefaults";export interface AddApiKeyModalProps {isOpen: boolean;@@ -76,6 +73,7 @@ export default function AddApiKeyModal({const defaultRegion = isBedrock ? "eu-west-2" : "us-central1";const isGlm = isGlmProvider(provider);const isQoder = provider === "qoder";+ const openRouterPreset = useOpenRouterPresetControl(provider, t);const isCloudflare = provider === "cloudflare-ai";const localProviderMetadata = getLocalProviderMetadata(provider);const isLocalSelfHostedProvider = !!localProviderMetadata;@@ -98,7 +96,6 @@ export default function AddApiKeyModal({error: "Connection failed",}[commandCodeAuthState.phase]: null;-const [formData, setFormData] = useState({name: "",apiKey: "",@@ -114,6 +111,7 @@ export default function AddApiKeyModal({accountId: "",consoleApiKey: "",ccCompatibleContext1m: false,+ ccCompatibleRedactThinking: false,passthroughModels: false,});const [validating, setValidating] = useState(false);@@ -123,7 +121,6 @@ export default function AddApiKeyModal({const [showAdvanced, setShowAdvanced] = useState(false);const [copiedCommandCodeField, setCopiedCommandCodeField] = useState<string | null>(null);const wasOpenRef = useRef(false);-useEffect(() => {const wasOpen = wasOpenRef.current;wasOpenRef.current = isOpen;@@ -133,7 +130,6 @@ export default function AddApiKeyModal({baseUrl: initialBaseUrl || defaultBaseUrl,}));}, [defaultBaseUrl, initialBaseUrl, isOpen]);-const bulkSupported = supportsBulkApiKey(provider);const [mode, setMode] = useState<"single" | "bulk">("single");const [bulkText, setBulkText] = useState("");@@ -208,7 +204,6 @@ export default function AddApiKeyModal({setValidating(false);}};-const copyCommandCodeValue = async (value: string | undefined, key: string) => {if (!value) return;try {@@ -278,7 +273,6 @@ export default function AddApiKeyModal({if (!isValid) {if (apiKeyOptional && !credentialInput) {- // Bypass validation block for local/optional providers when no key is providedconsole.debug("Validation failed but apiKey is optional; proceeding to save.");} else {setSaveError(validationError || credentialValidationFailedMessage);@@ -290,6 +284,7 @@ export default function AddApiKeyModal({if (formData.customUserAgent.trim()) {providerSpecificData.customUserAgent = formData.customUserAgent.trim();}+ openRouterPreset.applyTo(providerSpecificData);if (formData.routingTags.trim()) {providerSpecificData.tags = parseRoutingTagsInput(formData.routingTags);}@@ -314,9 +309,7 @@ export default function AddApiKeyModal({} else if (isCloudflare && formData.accountId.trim()) {providerSpecificData.accountId = formData.accountId.trim();}- if (isCcCompatible && formData.ccCompatibleContext1m) {- providerSpecificData.requestDefaults = { context1m: true };- }+ if (isCcCompatible) assignCcCompatibleRequestDefaults(providerSpecificData, formData);const payload = {name: formData.name,@@ -347,15 +340,18 @@ export default function AddApiKeyModal({setSaveError(null);try {- let providerSpecificData: Record<string, unknown> | undefined;+ const bulkProviderSpecificData: Record<string, unknown> = {};if (usesBaseUrl) {const checked = normalizeAndValidateHttpBaseUrl(formData.baseUrl, defaultBaseUrl);if (checked.error) {setSaveError(checked.error);return;}- providerSpecificData = { baseUrl: checked.value };+ bulkProviderSpecificData.baseUrl = checked.value;}+ openRouterPreset.applyTo(bulkProviderSpecificData);+ const providerSpecificData =+ Object.keys(bulkProviderSpecificData).length > 0 ? bulkProviderSpecificData : undefined;const res = await fetch("/api/providers/bulk", {method: "POST",@@ -432,6 +428,7 @@ export default function AddApiKeyModal({{bulkSupported && mode === "bulk" && (<div className="flex flex-col gap-3"><p className="text-xs text-text-muted">{t("bulkAddFormatHint")}</p>+ {openRouterPreset.input}<textareaclassName="w-full rounded border border-border bg-background p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary"placeholder={"name1|sk-key1\nname2|sk-key2\nsk-key-only-auto-named"}@@ -675,16 +672,21 @@ export default function AddApiKeyModal({{saveError}</div>)}- {isCcCompatible && (+ {(isCcCompatible || openRouterPreset.input) && (<div className="flex flex-col gap-4 rounded-lg border border-border/50 bg-surface/20 p-4">- <Toggle- checked={formData.ccCompatibleContext1m}- onChange={(checked) =>- setFormData({ ...formData, ccCompatibleContext1m: checked })- }- label={t("ccCompatibleContext1mLabel")}- description={t("ccCompatibleContext1mDescription")}- />+ {isCcCompatible && (+ <CcCompatibleRequestDefaultsFields+ context1m={formData.ccCompatibleContext1m}+ redactThinking={formData.ccCompatibleRedactThinking}+ onContext1mChange={(checked) =>+ setFormData({ ...formData, ccCompatibleContext1m: checked })+ }+ onRedactThinkingChange={(checked) =>+ setFormData({ ...formData, ccCompatibleRedactThinking: checked })+ }+ />+ )}+ {openRouterPreset.input}</div>)}{isCompatible && !isCcCompatible && (diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/CcCompatibleRequestDefaultsFields.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/CcCompatibleRequestDefaultsFields.tsxnew file mode 100644index 0000000000..f8107df0be--- /dev/null+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/CcCompatibleRequestDefaultsFields.tsx@@ -0,0 +1,37 @@+"use client";++import { useTranslations } from "next-intl";+import { Toggle } from "@/shared/components";++type CcCompatibleRequestDefaultsFieldsProps = {+ context1m: boolean;+ redactThinking: boolean;+ onContext1mChange: (checked: boolean) => void;+ onRedactThinkingChange: (checked: boolean) => void;+};++export default function CcCompatibleRequestDefaultsFields({+ context1m,+ redactThinking,+ onContext1mChange,+ onRedactThinkingChange,+}: CcCompatibleRequestDefaultsFieldsProps) {+ const t = useTranslations("providers");++ return (+ <div className="flex flex-col gap-4 rounded-lg border border-border/50 bg-surface/20 p-4">+ <Toggle+ checked={context1m}+ onChange={onContext1mChange}+ label={t("ccCompatibleContext1mLabel")}+ description={t("ccCompatibleContext1mDescription")}+ />+ <Toggle+ checked={redactThinking}+ onChange={onRedactThinkingChange}+ label={t("ccCompatibleRedactThinkingLabel")}+ description={t("ccCompatibleRedactThinkingDescription")}+ />+ </div>+ );+}diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsxindex 5103fe1cc2..e82615876c 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx@@ -1,8 +1,5 @@"use client";-// Issue #3501 Phase 1c — extracted from the god-component.-// ~1091-LOC modal for editing an existing provider connection.-import { useState, useEffect, useMemo } from "react";import { useTranslations } from "next-intl";import { Button, Badge, Input, Modal, Toggle, Select } from "@/shared/components";@@ -48,7 +45,10 @@ import {formatTimeAgo,} from "../../providerPageHelpers";import { getWebSessionCredentialRequirement } from "../../webSessionCredentials";+import { useOpenRouterPresetControl } from "../OpenRouterPresetInput";import WebSessionCredentialGuide from "../WebSessionCredentialGuide";+import CcCompatibleRequestDefaultsFields from "./CcCompatibleRequestDefaultsFields";+import { mergeCcCompatibleRequestDefaults } from "./ccCompatibleRequestDefaults";export interface EditConnectionModalConnection {id?: string;@@ -68,18 +68,23 @@ export interface EditConnectionModalConnection {export interface EditConnectionModalProps {isOpen: boolean;connection: EditConnectionModalConnection | null;+ providerId: string;onSave: (data: unknown) => Promise<void | unknown>;onClose: () => void;}+const stringField = (value: unknown) => (typeof value === "string" ? value : "");+export default function EditConnectionModal({isOpen,connection,+ providerId,onSave,onClose,}: EditConnectionModalProps) {const t = useTranslations("providers");const notify = useNotificationStore();+ const provider = connection?.provider || providerId;const [formData, setFormData] = useState({name: "",priority: 1,@@ -106,11 +111,12 @@ export default function EditConnectionModal({codexOpenaiStoreEnabled: false,consoleApiKey: "",ccCompatibleContext1m: false,+ ccCompatibleRedactThinking: false,cloudCodeProjectId: "",antigravityClientProfile: "ide",blockExtraUsage:- connection?.provider === "claude"- ? isClaudeExtraUsageBlockEnabled(connection?.provider, connection?.providerSpecificData)+ provider === "claude"+ ? isClaudeExtraUsageBlockEnabled(provider, connection?.providerSpecificData): false,passthroughModels: connection?.providerSpecificData?.passthroughModels === true,disableCooling: connection?.providerSpecificData?.disableCooling === true,@@ -138,31 +144,36 @@ export default function EditConnectionModal({const [showAdvanced, setShowAdvanced] = useState(false);const showEmail = useEmailPrivacyStore((state) => state.emailsVisible);- const usesBaseUrl = isBaseUrlConfigurableProvider(connection?.provider);- const defaultBaseUrl = getProviderBaseUrlDefault(connection?.provider);- const isVertex = connection?.provider === "vertex" || connection?.provider === "vertex-partner";- const isBedrock = connection?.provider === "bedrock";+ const usesBaseUrl = isBaseUrlConfigurableProvider(provider);+ const defaultBaseUrl = getProviderBaseUrlDefault(provider);+ const isVertex = provider === "vertex" || provider === "vertex-partner";+ const isBedrock = provider === "bedrock";const showsRegion = isVertex || isBedrock;- const isGlm = isGlmProvider(connection?.provider);- const isCloudflare = connection?.provider === "cloudflare-ai";- const isCodex = connection?.provider === "codex";- const isClaude = connection?.provider === "claude";- const isGeminiCli = connection?.provider === "gemini-cli";- const isAntigravity = connection?.provider === "antigravity";+ const isGlm = isGlmProvider(provider);+ const isCloudflare = provider === "cloudflare-ai";+ const openRouterPreset = useOpenRouterPresetControl(provider, t);+ const setOpenRouterPreset = openRouterPreset.setValue;+ const isCodex = provider === "codex";+ const isClaude = provider === "claude";+ const isGeminiCli = provider === "gemini-cli";+ const isAntigravity = provider === "antigravity";const supportsGoogleProjectId = isGeminiCli || isAntigravity;- const localProviderMetadata = getLocalProviderMetadata(connection?.provider);+ const localProviderMetadata = getLocalProviderMetadata(provider);const isLocalSelfHostedProvider = !!localProviderMetadata;- const isGooglePse = connection?.provider === "google-pse-search";- const webSessionCredential = getWebSessionCredentialRequirement(connection?.provider);+ const isGooglePse = provider === "google-pse-search";+ const webSessionCredential = getWebSessionCredentialRequirement(provider);const isNoAuthWebSessionCredential = webSessionCredential?.kind === "none";const isWebSessionCredential = !!webSessionCredential && webSessionCredential.kind !== "none";const providerDisplayName =- (connection?.provider ? resolveDashboardProviderInfo(connection.provider)?.name : null) ||- connection?.provider ||+ (provider ? resolveDashboardProviderInfo(provider)?.name : null) ||+ localProviderMetadata?.name ||+ provider ||"";const apiKeyOptional =- providerAllowsOptionalApiKey(connection?.provider) || Boolean(isNoAuthWebSessionCredential);- const isCcCompatible = isClaudeCodeCompatibleProvider(connection?.provider);+ providerAllowsOptionalApiKey(provider) || Boolean(isNoAuthWebSessionCredential);+ const isCcCompatible = isClaudeCodeCompatibleProvider(provider);+ const isCompatible =+ isOpenAICompatibleProvider(provider) || isAnthropicCompatibleProvider(provider);const defaultRegion = isBedrock ? "eu-west-2" : "us-central1";const apiCredentialLabel = webSessionCredential? getWebSessionCredentialLabel(t, webSessionCredential, apiKeyOptional)@@ -178,7 +189,7 @@ export default function EditConnectionModal({? getWebSessionCredentialHint(t, webSessionCredential, providerDisplayName, true): isLocalSelfHostedProvider? t("localProviderApiKeyOptionalHint", {- provider: localProviderMetadata?.name || connection?.provider || "",+ provider: localProviderMetadata?.name || provider || "",}): apiKeyOptional? t("apiKeyOptionalHint")@@ -194,23 +205,18 @@ export default function EditConnectionModal({useEffect(() => {if (isOpen && connection) {- const rawBaseUrl = connection.providerSpecificData?.baseUrl;- const existingBaseUrl = typeof rawBaseUrl === "string" ? rawBaseUrl : "";- const rawRegion = connection.providerSpecificData?.region;- const existingRegion = typeof rawRegion === "string" ? rawRegion : "";- const rawCustomUserAgent = connection.providerSpecificData?.customUserAgent;- const existingCustomUserAgent =- typeof rawCustomUserAgent === "string" ? rawCustomUserAgent : "";- const rawCx = connection.providerSpecificData?.cx;- const existingCx = typeof rawCx === "string" ? rawCx : "";- const rawAccountId = connection.providerSpecificData?.accountId;- const existingAccountId = typeof rawAccountId === "string" ? rawAccountId : "";+ const effectiveProvider = connection.provider || providerId;+ const existingBaseUrl = stringField(connection.providerSpecificData?.baseUrl);+ const existingRegion = stringField(connection.providerSpecificData?.region);+ const existingCustomUserAgent = stringField(connection.providerSpecificData?.customUserAgent);+ const existingOpenRouterPreset = stringField(connection.providerSpecificData?.preset);+ const existingCx = stringField(connection.providerSpecificData?.cx);+ const existingAccountId = stringField(connection.providerSpecificData?.accountId);const codexRequestDefaults = getCodexRequestDefaults(connection.providerSpecificData);const ccRequestDefaults = getClaudeCodeCompatibleRequestDefaults(connection.providerSpecificData);- const rawConsoleApiKey = connection.providerSpecificData?.consoleApiKey;- const existingConsoleApiKey = typeof rawConsoleApiKey === "string" ? rawConsoleApiKey : "";+ const existingConsoleApiKey = stringField(connection.providerSpecificData?.consoleApiKey);setFormData({name: connection.name || "",priority: connection.priority || 1,@@ -258,22 +264,21 @@ export default function EditConnectionModal({codexOpenaiStoreEnabled: connection.providerSpecificData?.openaiStoreEnabled === true,consoleApiKey: existingConsoleApiKey,ccCompatibleContext1m: ccRequestDefaults.context1m,+ ccCompatibleRedactThinking: ccRequestDefaults.redactThinking,cloudCodeProjectId:(connection.providerSpecificData?.projectId as string) || connection.projectId || "",antigravityClientProfile: normalizeAntigravityClientProfileSetting(connection.providerSpecificData?.clientProfile),blockExtraUsage: isClaudeExtraUsageBlockEnabled(- connection.provider,+ effectiveProvider,connection.providerSpecificData),passthroughModels: connection?.providerSpecificData?.passthroughModels === true,disableCooling: connection?.providerSpecificData?.disableCooling === true,});- // Load existing extra keys from providerSpecificDataconst existing = connection.providerSpecificData?.extraApiKeys;setExtraApiKeys(Array.isArray(existing) ? existing : []);- // Load API key health statusconst health = connection.providerSpecificData?.apiKeyHealth as| Record<string,@@ -288,16 +293,24 @@ export default function EditConnectionModal({| undefined;setApiKeyHealth(health || {});setNewExtraKey("");+ setOpenRouterPreset(existingOpenRouterPreset);setShowAdvanced(!!existingCustomUserAgent);- // email visibility controlled by global storesetTestResult(null);setValidationResult(null);setSaveError(null);}- }, [isOpen, connection, defaultBaseUrl, showsRegion, defaultRegion]);+ }, [+ isOpen,+ connection,+ providerId,+ defaultBaseUrl,+ showsRegion,+ defaultRegion,+ setOpenRouterPreset,+ ]);const handleTest = async () => {- if (!connection?.provider) return;+ if (!provider) return;setTesting(true);setTestResult(null);try {@@ -327,7 +340,7 @@ export default function EditConnectionModal({const handleValidate = async () => {if (- !connection?.provider ||+ !provider ||isNoAuthWebSessionCredential ||(!isCompatible && !apiKeyOptional && !formData.apiKey)) {@@ -340,7 +353,7 @@ export default function EditConnectionModal({method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify({- provider: connection.provider,+ provider,apiKey: formData.apiKey,validationModelId: formData.validationModelId || undefined,customUserAgent: formData.customUserAgent.trim() || undefined,@@ -392,7 +405,6 @@ export default function EditConnectionModal({healthCheckInterval: formData.healthCheckInterval,};- // Build rateLimitOverrides from non-empty fieldsconst overrides: Record<string, number> = {};if (formData.rpm.trim()) overrides.rpm = Number(formData.rpm);if (formData.tpm.trim()) overrides.tpm = Number(formData.tpm);@@ -432,7 +444,7 @@ export default function EditConnectionModal({method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify({- provider: connection.provider,+ provider,apiKey: formData.apiKey,validationModelId: formData.validationModelId || undefined,customUserAgent: formData.customUserAgent.trim() || undefined,@@ -460,7 +472,6 @@ export default function EditConnectionModal({updates.rateLimitedUntil = null;}}- // Persist extra API keys and baseUrl in providerSpecificDataif (!isOAuth) {updates.providerSpecificData = {...(connection.providerSpecificData || {}),@@ -469,10 +480,10 @@ export default function EditConnectionModal({tags: parseRoutingTagsInput(formData.routingTags),excludedModels: parseExcludedModelsInput(formData.excludedModels),customUserAgent: formData.customUserAgent.trim(),- // Only write when explicitly enabled; omit to let registry default take effect+ ...openRouterPreset.getPatch(),...(formData.passthroughModels ? { passthroughModels: true } : {}),};- if (connection.provider === "bailian-coding-plan") {+ if (provider === "bailian-coding-plan") {if (formData.consoleApiKey.trim()) {updates.providerSpecificData.consoleApiKey = formData.consoleApiKey.trim();} else {@@ -498,22 +509,12 @@ export default function EditConnectionModal({updates.providerSpecificData.projectId = trimmedCloudCodeProjectId || null;}if (isCcCompatible) {- const currentRequestDefaults =- updates.providerSpecificData.requestDefaults &&- typeof updates.providerSpecificData.requestDefaults === "object" &&- !Array.isArray(updates.providerSpecificData.requestDefaults)- ? { ...(updates.providerSpecificData.requestDefaults as Record<string, unknown>) }- : {};- if (formData.ccCompatibleContext1m) {- currentRequestDefaults.context1m = true;- } else {- delete currentRequestDefaults.context1m;- }- updates.providerSpecificData.requestDefaults =- Object.keys(currentRequestDefaults).length > 0 ? currentRequestDefaults : undefined;+ updates.providerSpecificData.requestDefaults = mergeCcCompatibleRequestDefaults(+ updates.providerSpecificData.requestDefaults,+ formData+ );}} else {- // Also persist tag for OAuth accountsupdates.providerSpecificData = {...(connection.providerSpecificData || {}),tag: formData.tag.trim() || undefined,@@ -546,8 +547,6 @@ export default function EditConnectionModal({),};}- // #2997: persist the transient-cooldown opt-out; write only when enabled,- // clear it otherwise so a disabled toggle does not linger as `false`.if (updates.providerSpecificData) {updates.providerSpecificData.disableCooling = formData.disableCooling ? true : undefined;}@@ -563,9 +562,6 @@ export default function EditConnectionModal({if (!connection) return null;const isOAuth = connection.authType === "oauth";- const isCompatible =- isOpenAICompatibleProvider(connection.provider) ||- isAnthropicCompatibleProvider(connection.provider);const testErrorMeta =!testResult?.valid && testResult?.diagnosis?.type? ERROR_TYPE_LABELS[testResult.diagnosis.type] || null@@ -644,17 +640,23 @@ export default function EditConnectionModal({/></div>)}- {isCcCompatible && (+ {(isCcCompatible || openRouterPreset.input) && (<div className="flex flex-col gap-4 rounded-lg border border-border/50 bg-surface/20 p-4">- <Toggle- checked={formData.ccCompatibleContext1m}- onChange={(checked) => setFormData({ ...formData, ccCompatibleContext1m: checked })}- label={t("ccCompatibleContext1mLabel")}- description={t("ccCompatibleContext1mDescription")}- />+ {isCcCompatible && (+ <CcCompatibleRequestDefaultsFields+ context1m={formData.ccCompatibleContext1m}+ redactThinking={formData.ccCompatibleRedactThinking}+ onContext1mChange={(checked) =>+ setFormData({ ...formData, ccCompatibleContext1m: checked })+ }+ onRedactThinkingChange={(checked) =>+ setFormData({ ...formData, ccCompatibleRedactThinking: checked })+ }+ />+ )}+ {openRouterPreset.input}</div>)}- {/* #2997: per-connection transient-cooldown opt-out (provider-agnostic) */}<div className="flex flex-col gap-4 rounded-lg border border-border/50 bg-surface/20 p-4"><Togglechecked={formData.disableCooling}@@ -838,7 +840,7 @@ export default function EditConnectionModal({label={t("perModelQuotaLabel")}description={t("perModelQuotaDescription")}/>- {connection.provider === "bailian-coding-plan" && (+ {provider === "bailian-coding-plan" && (<Inputlabel={t("consoleApiKeyOracleLabel")}value={formData.consoleApiKey}@@ -919,8 +921,8 @@ export default function EditConnectionModal({label={t("baseUrlLabel")}value={formData.baseUrl}onChange={(e) => setFormData({ ...formData, baseUrl: e.target.value })}- placeholder={getProviderBaseUrlPlaceholder(connection.provider)}- hint={getProviderBaseUrlHint(connection.provider, t)}+ placeholder={getProviderBaseUrlPlaceholder(provider)}+ hint={getProviderBaseUrlHint(provider, t)}/>)}@@ -961,12 +963,10 @@ export default function EditConnectionModal({</div>)}- {/* T07: API Key Health Status */}{!isOAuth && connection?.apiKey && (<div className="flex flex-col gap-2"><label className="text-sm font-medium text-text-main">{t("apiKeyHealthLabel")}</label><div className="flex flex-col gap-1.5">- {/* Primary Key Health */}{(() => {const keyId = "primary";const health = apiKeyHealth[keyId];@@ -1012,7 +1012,6 @@ export default function EditConnectionModal({</div>)}- {/* T07: Extra API Keys for round-robin rotation */}{!isOAuth && (<div className="flex flex-col gap-2"><div className="flex items-center justify-between gap-2">@@ -1136,7 +1135,6 @@ export default function EditConnectionModal({</div>)}- {/* Test Connection */}{!isCompatible && (<div className="flex items-center gap-3"><Button onClick={handleTest} variant="secondary" disabled={testing}>diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/__tests__/connModals.test.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/__tests__/connModals.test.tsxindex ce4e2ac998..d74f01579f 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/__tests__/connModals.test.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/__tests__/connModals.test.tsx@@ -87,11 +87,28 @@ describe("conn-modals (Phase 1c extraction)", () => {expect(c.querySelector("*")).not.toBeNull();});- it("AddApiKeyModal returns null when provider is falsy", () => {+ it("AddApiKeyModal renders OpenRouter preset outside advanced settings", () => {const onSave = vi.fn().mockResolvedValue(undefined);const c = renderModal(- <AddApiKeyModal isOpen={true} onSave={onSave} onClose={vi.fn()} />+ <AddApiKeyModal+ isOpen={true}+ provider="openrouter"+ providerName="OpenRouter"+ isCompatible={true}+ onSave={onSave}+ onClose={vi.fn()}+ />+ );+ const presetInput = c.querySelector<HTMLInputElement>(+ '[data-testid="openrouter-preset-input"]');+ expect(presetInput?.placeholder).toBe("@preset/slug");+ expect(presetInput?.closest("#add-api-key-advanced-settings")).toBeNull();+ });++ it("AddApiKeyModal returns null when provider is falsy", () => {+ const onSave = vi.fn().mockResolvedValue(undefined);+ const c = renderModal(<AddApiKeyModal isOpen={true} onSave={onSave} onClose={vi.fn()} />);// No provider → renders nullexpect(c.textContent).toBe("");});@@ -102,6 +119,7 @@ describe("conn-modals (Phase 1c extraction)", () => {<EditConnectionModalisOpen={false}connection={null}+ providerId="openai"onSave={onSave}onClose={vi.fn()}/>@@ -123,6 +141,7 @@ describe("conn-modals (Phase 1c extraction)", () => {<EditConnectionModalisOpen={true}connection={connection}+ providerId="openai"onSave={onSave}onClose={vi.fn()}/>@@ -130,6 +149,32 @@ describe("conn-modals (Phase 1c extraction)", () => {expect(c.querySelector("*")).not.toBeNull();});+ it("EditConnectionModal renders OpenRouter preset when provider comes from the page", () => {+ const onSave = vi.fn().mockResolvedValue(undefined);+ const connection = {+ id: "conn-openrouter",+ name: "OpenRouter",+ authType: "apikey",+ priority: 1,+ providerSpecificData: { preset: "prefer" },+ };+ const c = renderModal(+ <EditConnectionModal+ isOpen={true}+ connection={connection}+ providerId="openrouter"+ onSave={onSave}+ onClose={vi.fn()}+ />+ );+ const presetInput = c.querySelector<HTMLInputElement>(+ '[data-testid="openrouter-preset-input"]'+ );+ expect(presetInput?.value).toBe("prefer");+ expect(presetInput?.placeholder).toBe("@preset/slug");+ expect(presetInput?.closest("#edit-connection-advanced-settings")).toBeNull();+ });+it("EditConnectionModal renders without ReferenceError for oauth connection", () => {const onSave = vi.fn().mockResolvedValue(undefined);const connection = {@@ -146,6 +191,7 @@ describe("conn-modals (Phase 1c extraction)", () => {<EditConnectionModalisOpen={true}connection={connection}+ providerId="claude"onSave={onSave}onClose={vi.fn()}/>diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/modals/ccCompatibleRequestDefaults.ts b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/ccCompatibleRequestDefaults.tsnew file mode 100644index 0000000000..91dfd7e04a--- /dev/null+++ b/src/app/(dashboard)/dashboard/providers/[id]/components/modals/ccCompatibleRequestDefaults.ts@@ -0,0 +1,45 @@+type CcCompatibleRequestDefaultsForm = {+ ccCompatibleContext1m: boolean;+ ccCompatibleRedactThinking: boolean;+};++const CC_COMPATIBLE_BOOLEAN_DEFAULTS = [+ ["context1m", "ccCompatibleContext1m"],+ ["redactThinking", "ccCompatibleRedactThinking"],+] as const;++function asRecord(value: unknown): Record<string, unknown> {+ return value && typeof value === "object" && !Array.isArray(value)+ ? (value as Record<string, unknown>)+ : {};+}++export function getCcCompatibleRequestDefaults(+ formData: CcCompatibleRequestDefaultsForm+): Record<string, true> | undefined {+ const defaults: Record<string, true> = {};+ for (const [requestKey, formKey] of CC_COMPATIBLE_BOOLEAN_DEFAULTS) {+ if (formData[formKey]) defaults[requestKey] = true;+ }+ return Object.keys(defaults).length > 0 ? defaults : undefined;+}++export function assignCcCompatibleRequestDefaults(+ target: Record<string, unknown>,+ formData: CcCompatibleRequestDefaultsForm+): void {+ const requestDefaults = getCcCompatibleRequestDefaults(formData);+ if (requestDefaults) target.requestDefaults = requestDefaults;+}++export function mergeCcCompatibleRequestDefaults(+ existing: unknown,+ formData: CcCompatibleRequestDefaultsForm+): Record<string, unknown> | undefined {+ const requestDefaults = { ...asRecord(existing) };+ for (const [requestKey, formKey] of CC_COMPATIBLE_BOOLEAN_DEFAULTS) {+ if (formData[formKey]) requestDefaults[requestKey] = true;+ else delete requestDefaults[requestKey];+ }+ return Object.keys(requestDefaults).length > 0 ? requestDefaults : undefined;+}diff --git a/src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelVisibilityHandlers.ts b/src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelVisibilityHandlers.tsindex 72f8e719aa..b2ba946b20 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelVisibilityHandlers.ts+++ b/src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelVisibilityHandlers.ts@@ -78,11 +78,7 @@ export interface UseModelVisibilityHandlersReturn {setAutoHideFailed: (v: boolean) => void;setVisibilityFilter: (v: "all" | "visible" | "hidden") => void;saveModelCompatFlags: (modelId: string, patch: ModelCompatSavePatch) => Promise<void>;- handleToggleModelHidden: (- providerKey: string,- modelId: string,- hidden: boolean- ) => Promise<void>;+ handleToggleModelHidden: (providerKey: string, modelId: string, hidden: boolean) => Promise<void>;handleBulkToggleModelHidden: (providerKey: string,modelIds: string[],@@ -112,16 +108,16 @@ export function useModelVisibilityHandlers({}: UseModelVisibilityHandlersParams): UseModelVisibilityHandlersReturn {const [compatSavingModelId, setCompatSavingModelId] = useState<string | null>(null);const [togglingModelId, setTogglingModelId] = useState<string | null>(null);- const [bulkVisibilityAction, setBulkVisibilityAction] = useState<- "select" | "deselect" | null- >(null);+ const [bulkVisibilityAction, setBulkVisibilityAction] = useState<"select" | "deselect" | null>(+ null+ );const [clearingModels, setClearingModels] = useState(false);const [modelFilter, setModelFilter] = useState("");const [testingModelId, setTestingModelId] = useState<string | null>(null);const [modelTestStatus, setModelTestStatus] = useState<Record<string, "ok" | "error">>({});const [testingAll, setTestingAll] = useState(false);const [testProgress, setTestProgress] = useState<{ done: number; total: number } | null>(null);- const [autoHideFailed, setAutoHideFailed] = useState(true);+ const [autoHideFailed, setAutoHideFailed] = useState(false);const [visibilityFilter, setVisibilityFilter] = useState<"all" | "visible" | "hidden">("all");const providerAliasEntries = useMemo(@@ -303,25 +299,24 @@ export function useModelVisibilityHandlers({const data = await res.json();if (res.ok && data.status === "ok") {notify.success(- providerText(t, "testModelSuccess", `Model ${modelId} is working. Latency: ${data.latencyMs}ms`, {- modelId,- latencyMs: data.latencyMs,- })+ providerText(+ t,+ "testModelSuccess",+ `Model ${modelId} is working. Latency: ${data.latencyMs}ms`,+ {+ modelId,+ latencyMs: data.latencyMs,+ }+ ));setModelTestStatus((prev) => ({ ...prev, [modelId]: "ok" }));} else {notify.error(data.error || "Model test failed");setModelTestStatus((prev) => ({ ...prev, [modelId]: "error" }));- // Hidden flag keyed by providerId — same as the manual eye toggle and the read- // (fetchProviderModelMeta). providerStorageAlias wrote it under the alias while the- // read looked under the canonical id, so auto-hide never reflected.- await handleToggleModelHidden(providerId, modelId, true);}} catch (err) {notify.error("Network error testing model");setModelTestStatus((prev) => ({ ...prev, [modelId]: "error" }));- // Hidden flag keyed by providerId (see the test-failure branch above).- await handleToggleModelHidden(providerId, modelId, true);} finally {setTestingModelId(null);}diff --git a/src/app/(dashboard)/dashboard/providers/[id]/providerPageHelpers.ts b/src/app/(dashboard)/dashboard/providers/[id]/providerPageHelpers.tsindex 4790dbfbee..69b15c665f 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/providerPageHelpers.ts+++ b/src/app/(dashboard)/dashboard/providers/[id]/providerPageHelpers.ts@@ -677,12 +677,11 @@ export function getCodexRequestDefaults(providerSpecificData: unknown): {};}-export function getClaudeCodeCompatibleRequestDefaults(providerSpecificData: unknown): {- context1m: boolean;-} {+export function getClaudeCodeCompatibleRequestDefaults(providerSpecificData: unknown) {const defaults = _getClaudeCodeCompatibleRequestDefaults(providerSpecificData);return {context1m: defaults.context1m === true,+ redactThinking: defaults.redactThinking === true,};}diff --git a/src/app/api/logs/[id]/route.ts b/src/app/api/logs/[id]/route.tsindex 5fb9c62bbe..d88ee3c3f1 100644--- a/src/app/api/logs/[id]/route.ts+++ b/src/app/api/logs/[id]/route.ts@@ -75,13 +75,14 @@ export async function GET(id: inMem.id,timestamp: new Date(inMem.startedAt).toISOString(),path: inMem.clientEndpoint || "",- status: 0,+ status: typeof inMem.status === "number" ? inMem.status : inMem.error ? 502 : 0,model: inMem.model,provider: inMem.provider,connectionId: inMem.connectionId,duration: Date.now() - inMem.startedAt,detailState: "in-memory",active: false,+ error: inMem.error || null,pipelinePayloads,hasPipelineDetails: true,};diff --git a/src/app/api/oauth/[provider]/[action]/route.ts b/src/app/api/oauth/[provider]/[action]/route.tsindex 053db9a580..2ec85a9e3d 100755--- a/src/app/api/oauth/[provider]/[action]/route.ts+++ b/src/app/api/oauth/[provider]/[action]/route.ts@@ -21,7 +21,7 @@ import {import { getConsistentMachineId } from "@/shared/utils/machineId";import { syncToCloud } from "@/lib/cloudSync";import { startLocalServer } from "@/lib/oauth/utils/server";-import { runWithProxyContext } from "@omniroute/open-sse/utils/proxyFetch.ts";+import { runWithProxyContextOrDirect } from "@omniroute/open-sse/utils/proxyFetch.ts";import {jsonObjectSchema,oauthDeviceCompleteSchema,@@ -166,7 +166,7 @@ export async function GET(error:"GitLab Duo OAuth is not configured. Register an OAuth application at " +"https://gitlab.com/-/profile/applications with redirect URI " +- "http://localhost:20128/callback and scopes \"ai_features read_user\", then set " ++ 'http://localhost:20128/callback and scopes "ai_features read_user", then set ' +"GITLAB_DUO_OAUTH_CLIENT_ID (and optionally GITLAB_DUO_OAUTH_CLIENT_SECRET) and restart.",});}@@ -211,15 +211,17 @@ export async function GET(ssoOidcEndpoint: `https://oidc.${region}.amazonaws.com`,};- deviceData = await runWithProxyContext(proxy, () =>+ deviceData = await runWithProxyContextOrDirect(proxy, () =>(requestDeviceCode as any)(provider, null, providerOverrideConfig));} else {- deviceData = await runWithProxyContext(proxy, () => (requestDeviceCode as any)(provider));+ deviceData = await runWithProxyContextOrDirect(proxy, () =>+ (requestDeviceCode as any)(provider)+ );}} else {// Qwen and other providers use PKCE- deviceData = await runWithProxyContext(proxy, () =>+ deviceData = await runWithProxyContextOrDirect(proxy, () =>requestDeviceCode(provider, authData.codeChallenge));}@@ -454,7 +456,7 @@ export async function POST(const proxy = await resolveProxyForProvider(provider);// Exchange code for tokens (through proxy if configured)- const tokenData = await runWithProxyContext(proxy, () =>+ const tokenData = await runWithProxyContextOrDirect(proxy, () =>exchangeTokens(provider, code, redirectUri, codeVerifier, normalizedState));@@ -527,12 +529,12 @@ export async function POST(let result;if (provider === "github" || provider === "kimi-coding" || provider === "kilocode") {// For providers that don't use PKCE (GitHub, Kimi Coding, KiloCode), don't pass codeVerifier- result = await runWithProxyContext(proxy, () =>+ result = await runWithProxyContextOrDirect(proxy, () =>(pollForToken as any)(provider, deviceCode));} else if (provider === "kiro" || provider === "amazon-q") {// Kiro needs extraData (clientId, clientSecret) from device code response- result = await runWithProxyContext(proxy, () =>+ result = await runWithProxyContextOrDirect(proxy, () =>(pollForToken as any)(provider, deviceCode, null, extraData));} else {@@ -540,7 +542,7 @@ export async function POST(if (!codeVerifier) {return NextResponse.json({ error: "Missing code verifier" }, { status: 400 });}- result = await runWithProxyContext(proxy, () =>+ result = await runWithProxyContextOrDirect(proxy, () =>(pollForToken as any)(provider, deviceCode, codeVerifier));}@@ -675,7 +677,7 @@ export async function POST(const proxy = await resolveProxyForProvider(provider);// Exchange code for tokens (through proxy if configured)- const tokenData = await runWithProxyContext(proxy, () =>+ const tokenData = await runWithProxyContextOrDirect(proxy, () =>exchangeTokens(provider, params.code, redirectUri, codeVerifier, params.state));diff --git a/src/app/api/providers/validate/route.ts b/src/app/api/providers/validate/route.tsindex 3c2c51e0c6..4e2322bd14 100644--- a/src/app/api/providers/validate/route.ts+++ b/src/app/api/providers/validate/route.ts@@ -11,7 +11,7 @@ import { validateProviderApiKey } from "@/lib/providers/validation";import { getProxyForLevel, resolveProxyForProvider } from "@/lib/localDb";import { validateProviderApiKeySchema } from "@/shared/validation/schemas";import { isValidationFailure, validateBody } from "@/shared/validation/helpers";-import { runWithProxyContext } from "@omniroute/open-sse/utils/proxyFetch.ts";+import { runWithProxyContextOrDirect } from "@omniroute/open-sse/utils/proxyFetch.ts";function sanitizeAuditUrl(url: string | null | undefined) {if (!url) return null;@@ -104,7 +104,7 @@ export async function POST(request) {proxyToUse = providerProxy || globalProxy || null;}- const result = await runWithProxyContext(proxyToUse || null, () =>+ const result = await runWithProxyContextOrDirect(proxyToUse || null, () =>validateProviderApiKey({provider,apiKey,diff --git a/src/app/api/usage/call-logs/route.ts b/src/app/api/usage/call-logs/route.tsindex 9fc5e85cf0..5a469cb59e 100644--- a/src/app/api/usage/call-logs/route.ts+++ b/src/app/api/usage/call-logs/route.ts@@ -1,9 +1,115 @@import { NextResponse } from "next/server";import { requireManagementAuth } from "@/lib/api/requireManagementAuth";import { getCallLogs } from "@/lib/usageDb";-import { getPendingById } from "@/lib/usage/usageHistory";+import { getCompletedDetails, getPendingById } from "@/lib/usage/usageHistory";import { getProviderConnections } from "@/lib/localDb";+type CallLogListRowsInput = {+ logs: any[];+ connections: any[];+ pendingDetails: Iterable<any>;+ completedDetails: Iterable<any>;+ now?: number;+};++function rowTimestampMs(row: any): number {+ const value = Date.parse(String(row?.timestamp || ""));+ return Number.isFinite(value) ? value : 0;+}++function rowPriority(row: any): number {+ if (row?.active) return 0;+ if (row?.completed) return 1;+ return 2;+}++export function buildCallLogListRows({+ logs,+ connections,+ pendingDetails,+ completedDetails,+ now = Date.now(),+}: CallLogListRowsInput): any[] {+ const connectionNames = new Map(+ connections.map((connection: any) => [+ connection.id,+ connection.displayName || connection.name || connection.email || connection.id,+ ])+ );++ // Include active (in-flight) requests from the pending-by-id map+ // so they appear in the logs grid alongside persisted entries.+ const activeEntries: any[] = [];+ const persistedIds = new Set(logs.map((log: any) => log.id).filter(Boolean));++ for (const detail of pendingDetails) {+ activeEntries.push({+ id: detail.id,+ timestamp: new Date(detail.startedAt).toISOString(),+ method: "",+ path: detail.clientEndpoint || "",+ status: 0,+ model: detail.model,+ requestedModel: null,+ provider: detail.provider,+ account: connectionNames.get(detail.connectionId || "") || detail.connectionId || "unknown",+ connectionId: detail.connectionId,+ duration: Math.max(0, now - detail.startedAt),+ tokens: { in: 0, out: 0 },+ cacheSource: null,+ sourceFormat: null,+ targetFormat: null,+ apiKeyId: null,+ apiKeyName: null,+ comboName: null,+ error: null,+ active: true,+ });+ }++ const pendingIds = new Set(activeEntries.map((entry) => entry.id));+ const completedEntries: any[] = [];+ for (const detail of completedDetails) {+ if (persistedIds.has(detail.id) || pendingIds.has(detail.id)) continue;+ const completedAt = typeof detail.completedAt === "number" ? detail.completedAt : null;+ const duration =+ typeof detail.durationMs === "number" && Number.isFinite(detail.durationMs)+ ? detail.durationMs+ : Math.max(0, (completedAt ?? now) - detail.startedAt);+ completedEntries.push({+ id: detail.id,+ timestamp: new Date(detail.startedAt).toISOString(),+ method: "",+ path: detail.clientEndpoint || "",+ status: typeof detail.status === "number" ? detail.status : detail.error ? 502 : 200,+ model: detail.model,+ requestedModel: null,+ provider: detail.provider,+ account: connectionNames.get(detail.connectionId || "") || detail.connectionId || "unknown",+ connectionId: detail.connectionId,+ duration,+ tokens: { in: 0, out: 0 },+ cacheSource: null,+ sourceFormat: null,+ targetFormat: null,+ apiKeyId: null,+ apiKeyName: null,+ comboName: null,+ error: detail.error || null,+ active: false,+ completed: true,+ completedAt: completedAt ? new Date(completedAt).toISOString() : null,+ detailState: "in-memory",+ });+ }++ return [...activeEntries, ...completedEntries, ...logs].sort((a, b) => {+ const timestampDelta = rowTimestampMs(b) - rowTimestampMs(a);+ if (timestampDelta !== 0) return timestampDelta;+ return rowPriority(a) - rowPriority(b);+ });+}+export async function GET(request: Request) {try {const authError = await requireManagementAuth(request);@@ -22,55 +128,16 @@ export async function GET(request: Request) {if (searchParams.get("limit")) filter.limit = parseInt(searchParams.get("limit"));if (searchParams.get("offset")) filter.offset = parseInt(searchParams.get("offset"));- const [logs, connections] = await Promise.all([- getCallLogs(filter),- getProviderConnections(),- ]);+ const [logs, connections] = await Promise.all([getCallLogs(filter), getProviderConnections()]);- const connectionNames = new Map(- connections.map((connection: any) => [- connection.id,- connection.displayName || connection.name || connection.email || connection.id,- ])+ return NextResponse.json(+ buildCallLogListRows({+ logs,+ connections,+ pendingDetails: getPendingById().values(),+ completedDetails: getCompletedDetails().values(),+ }));-- // Include active (in-flight) requests from the pending-by-id map- // so they appear in the logs grid alongside persisted entries.- const now = Date.now();- const activeEntries: any[] = [];-- for (const detail of getPendingById().values()) {- activeEntries.push({- id: detail.id,- timestamp: new Date(detail.startedAt).toISOString(),- method: "",- path: detail.clientEndpoint || "",- status: 0,- model: detail.model,- requestedModel: null,- provider: detail.provider,- account:- connectionNames.get(detail.connectionId || "") ||- detail.connectionId ||- "unknown",- connectionId: detail.connectionId,- duration: Math.max(0, now - detail.startedAt),- tokens: { in: 0, out: 0 },- cacheSource: null,- sourceFormat: null,- targetFormat: null,- apiKeyId: null,- apiKeyName: null,- comboName: null,- error: null,- active: true,- });- }-- // Prepend active entries (newest first) ahead of persisted logs- activeEntries.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());-- return NextResponse.json([...activeEntries, ...logs]);} catch (error) {console.error("[API ERROR] /api/usage/call-logs failed:", error);return NextResponse.json({ error: "Failed to fetch call logs" }, { status: 500 });diff --git a/src/app/docs/lib/openapi.generated.ts b/src/app/docs/lib/openapi.generated.tsindex 2b839c7922..3681b7770c 100644--- a/src/app/docs/lib/openapi.generated.ts+++ b/src/app/docs/lib/openapi.generated.ts@@ -25,7 +25,7 @@ export interface OpenApiEndpoint {hasRequestBody: boolean;}-export const OPENAPI_VERSION = "3.8.7";+export const OPENAPI_VERSION = "3.8.24";export const OPENAPI_TITLE = "OmniRoute API";export const OPENAPI_ENDPOINTS: OpenApiEndpoint[] = [@@ -173,7 +173,8 @@ export const OPENAPI_ENDPOINTS: OpenApiEndpoint[] = [path: "/api/v1/providers/{provider}/models",method: "GET",summary: "List models for a specific provider",- description: "Returns only models for the selected provider with provider prefix removed from each model id.",+ description:+ "Returns only models for the selected provider with provider prefix removed from each model id.",tag: "Models",tags: ["Models"],requiresAuth: true,diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.jsonindex 1358f77de4..33aacbb798 100644--- a/src/i18n/messages/ar.json+++ b/src/i18n/messages/ar.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/az.json b/src/i18n/messages/az.jsonindex 47d64bb9db..d9f5df4dcd 100644--- a/src/i18n/messages/az.json+++ b/src/i18n/messages/az.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Defaults to Claude Code's strict Messages API path. Change only if your relay documents a different path.","ccCompatibleContext1mDescription": "Adds the context-1m beta header when the selected Claude model supports it.","ccCompatibleContext1mLabel": "Enable 1M context beta",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "CC-compatible relay details","ccCompatibleLabel": "CC Compatible","ccCompatibleModelsDescription": "CC-compatible relays do not expose model listing. Add the Claude model IDs your relay accepts.",diff --git a/src/i18n/messages/bg.json b/src/i18n/messages/bg.jsonindex 3f54744613..cfe0b8439a 100644--- a/src/i18n/messages/bg.json+++ b/src/i18n/messages/bg.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/bn.json b/src/i18n/messages/bn.jsonindex 0e390d56ac..a566553042 100644--- a/src/i18n/messages/bn.json+++ b/src/i18n/messages/bn.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/cs.json b/src/i18n/messages/cs.jsonindex a323625590..3c92da146d 100644--- a/src/i18n/messages/cs.json+++ b/src/i18n/messages/cs.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/da.json b/src/i18n/messages/da.jsonindex a02edf11c1..60cbd64700 100644--- a/src/i18n/messages/da.json+++ b/src/i18n/messages/da.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.jsonindex 123e4a6fcf..0f59e99397 100644--- a/src/i18n/messages/de.json+++ b/src/i18n/messages/de.json@@ -4159,6 +4159,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.jsonindex 2b2c87e505..204ac3e040 100644--- a/src/i18n/messages/en.json+++ b/src/i18n/messages/en.json@@ -3921,6 +3921,7 @@"showHiddenOnly": "Hidden only","filterByVisibility": "Filter by visibility","autoHideFailed": "Auto-hide failed models",+ "autoHideFailedHint": "When enabled, Test all hides non-transient failures from public catalogs such as /v1/models. Single-model tests never auto-hide.","connected": "{count} Connected","errorCount": "{count} Error ({code})","errorCountNoCode": "{count} Error",@@ -4458,6 +4459,8 @@"ccCompatibleChatPathHint": "Defaults to Claude Code's strict Messages API path. Change only if your relay documents a different path.","ccCompatibleContext1mDescription": "Adds the context-1m beta header when the selected Claude model supports it.","ccCompatibleContext1mLabel": "Enable 1M context beta",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "CC-compatible relay details","ccCompatibleLabel": "CC Compatible","ccCompatibleModelsDescription": "CC-compatible relays do not expose model listing. Add the Claude model IDs your relay accepts.",diff --git a/src/i18n/messages/es.json b/src/i18n/messages/es.jsonindex ec182d2096..d199ed622e 100644--- a/src/i18n/messages/es.json+++ b/src/i18n/messages/es.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/fa.json b/src/i18n/messages/fa.jsonindex c5ce1e09c0..3b206db331 100644--- a/src/i18n/messages/fa.json+++ b/src/i18n/messages/fa.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/fi.json b/src/i18n/messages/fi.jsonindex e4d4084427..d6b9d82d1b 100644--- a/src/i18n/messages/fi.json+++ b/src/i18n/messages/fi.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.jsonindex 07042fcc7c..340d5a262e 100644--- a/src/i18n/messages/fr.json+++ b/src/i18n/messages/fr.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/gu.json b/src/i18n/messages/gu.jsonindex b1a0f8124e..b110b16a70 100644--- a/src/i18n/messages/gu.json+++ b/src/i18n/messages/gu.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/he.json b/src/i18n/messages/he.jsonindex 5244613f53..94095390ec 100644--- a/src/i18n/messages/he.json+++ b/src/i18n/messages/he.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/hi.json b/src/i18n/messages/hi.jsonindex 50c2f0693e..cc869fbf8b 100644--- a/src/i18n/messages/hi.json+++ b/src/i18n/messages/hi.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/hu.json b/src/i18n/messages/hu.jsonindex 925f66fcfe..c6ff316008 100644--- a/src/i18n/messages/hu.json+++ b/src/i18n/messages/hu.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/id.json b/src/i18n/messages/id.jsonindex a2df9f457e..1485b4ce54 100644--- a/src/i18n/messages/id.json+++ b/src/i18n/messages/id.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/in.json b/src/i18n/messages/in.jsonindex 22cbe043ce..92f7c3d7ad 100644--- a/src/i18n/messages/in.json+++ b/src/i18n/messages/in.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/it.json b/src/i18n/messages/it.jsonindex 14cf84d5f8..4123f0e0f0 100644--- a/src/i18n/messages/it.json+++ b/src/i18n/messages/it.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ja.json b/src/i18n/messages/ja.jsonindex cc9601f1e0..ea3aed39fa 100644--- a/src/i18n/messages/ja.json+++ b/src/i18n/messages/ja.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ko.json b/src/i18n/messages/ko.jsonindex defb703c7a..e6b492079e 100644--- a/src/i18n/messages/ko.json+++ b/src/i18n/messages/ko.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/mr.json b/src/i18n/messages/mr.jsonindex d4202a3cdf..f2b7b19106 100644--- a/src/i18n/messages/mr.json+++ b/src/i18n/messages/mr.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ms.json b/src/i18n/messages/ms.jsonindex b7641761cf..c6a3c96a4c 100644--- a/src/i18n/messages/ms.json+++ b/src/i18n/messages/ms.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/nl.json b/src/i18n/messages/nl.jsonindex 18cdca568c..fc863fc5a2 100644--- a/src/i18n/messages/nl.json+++ b/src/i18n/messages/nl.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/no.json b/src/i18n/messages/no.jsonindex 7c95b6775f..5f6ed136f8 100644--- a/src/i18n/messages/no.json+++ b/src/i18n/messages/no.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/phi.json b/src/i18n/messages/phi.jsonindex 812d24e7b2..29d7bc6a27 100644--- a/src/i18n/messages/phi.json+++ b/src/i18n/messages/phi.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/pl.json b/src/i18n/messages/pl.jsonindex 10d80cf90a..927a21aed5 100644--- a/src/i18n/messages/pl.json+++ b/src/i18n/messages/pl.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/pt-BR.json b/src/i18n/messages/pt-BR.jsonindex 161cdefce2..7e55cf741d 100644--- a/src/i18n/messages/pt-BR.json+++ b/src/i18n/messages/pt-BR.json@@ -4909,6 +4909,8 @@"ccCompatibleChatPathHint": "O padrão é o caminho estrito de messages compatível com Claude Code.","ccCompatibleContext1mDescription": "Quando habilitado, esta conexão adiciona `anthropic-beta: context-1m-2025-08-07`.","ccCompatibleContext1mLabel": "Contexto 1M CC Compatível",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Detalhes CC Compatível","ccCompatibleLabel": "CC Compatível","ccCompatibleModelsDescription": "Os modelos disponíveis de CC Compatível espelham a lista do provedor OAuth Claude Code.",diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.jsonindex 7be9308eda..bbce2db264 100644--- a/src/i18n/messages/pt.json+++ b/src/i18n/messages/pt.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ro.json b/src/i18n/messages/ro.jsonindex 870eeda802..6402a73f90 100644--- a/src/i18n/messages/ro.json+++ b/src/i18n/messages/ro.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.jsonindex ae2426358b..7c3ca24f5d 100644--- a/src/i18n/messages/ru.json+++ b/src/i18n/messages/ru.json@@ -4370,6 +4370,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/sk.json b/src/i18n/messages/sk.jsonindex 642f26b44f..902d2147b7 100644--- a/src/i18n/messages/sk.json+++ b/src/i18n/messages/sk.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/sv.json b/src/i18n/messages/sv.jsonindex f93e3e5120..ad90daeb1c 100644--- a/src/i18n/messages/sv.json+++ b/src/i18n/messages/sv.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/sw.json b/src/i18n/messages/sw.jsonindex 3a0df74d85..9140a60c4c 100644--- a/src/i18n/messages/sw.json+++ b/src/i18n/messages/sw.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ta.json b/src/i18n/messages/ta.jsonindex 2da5b4ef2f..f75d1da570 100644--- a/src/i18n/messages/ta.json+++ b/src/i18n/messages/ta.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/te.json b/src/i18n/messages/te.jsonindex 253cda5b8b..98ad65d66e 100644--- a/src/i18n/messages/te.json+++ b/src/i18n/messages/te.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/th.json b/src/i18n/messages/th.jsonindex ee67991a1c..269ba10762 100644--- a/src/i18n/messages/th.json+++ b/src/i18n/messages/th.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/tr.json b/src/i18n/messages/tr.jsonindex 7173330b9d..ac4dd02277 100644--- a/src/i18n/messages/tr.json+++ b/src/i18n/messages/tr.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/uk-UA.json b/src/i18n/messages/uk-UA.jsonindex 9f677eb9c4..37009a0c67 100644--- a/src/i18n/messages/uk-UA.json+++ b/src/i18n/messages/uk-UA.json@@ -4151,6 +4151,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/ur.json b/src/i18n/messages/ur.jsonindex 81113e592c..84fad68109 100644--- a/src/i18n/messages/ur.json+++ b/src/i18n/messages/ur.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/vi.json b/src/i18n/messages/vi.jsonindex 144ef76eaf..fc087904cb 100644--- a/src/i18n/messages/vi.json+++ b/src/i18n/messages/vi.json@@ -4154,6 +4154,8 @@"ccCompatibleChatPathHint": "Cc Compatible Chat Path Hint","ccCompatibleContext1mDescription": "Cc Compatible Context1M Description","ccCompatibleContext1mLabel": "Cc Compatible Context1M Label",+ "ccCompatibleRedactThinkingDescription": "Adds the redact-thinking beta header for CC Compatible upstreams that require hidden Claude thinking streams.",+ "ccCompatibleRedactThinkingLabel": "Enable redact-thinking beta","ccCompatibleDetailsTitle": "Cc Compatible Details Title","ccCompatibleLabel": "Cc Compatible Label","ccCompatibleModelsDescription": "Cc Compatible Models Description",diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.jsonindex 72b4d9aafd..4a089f2108 100644--- a/src/i18n/messages/zh-CN.json+++ b/src/i18n/messages/zh-CN.json@@ -4396,6 +4396,8 @@"ccCompatibleChatPathHint": "默认使用 Claude Code 严格的 Messages API 路径。仅在中转站文档要求时修改。","ccCompatibleContext1mDescription": "当所选 Claude 模型支持时,添加 context-1m beta header。","ccCompatibleContext1mLabel": "启用 1M context beta",+ "ccCompatibleRedactThinkingDescription": "为要求隐藏 Claude 思考流的 CC Compatible 上游添加 redact-thinking beta header。",+ "ccCompatibleRedactThinkingLabel": "启用 redact-thinking beta","ccCompatibleDetailsTitle": "CC 兼容中转站详情","ccCompatibleLabel": "CC 兼容","ccCompatibleModelsDescription": "CC 兼容中转站不提供模型列表。请添加该中转站接受的 Claude 模型 ID。",@@ -4692,6 +4694,7 @@"showHiddenOnly": "仅隐藏","filterByVisibility": "按可见性筛选","autoHideFailed": "自动隐藏失败模型",+ "autoHideFailedHint": "启用后,测试全部会把非临时失败的模型从 /v1/models 等公共目录中隐藏。单模型测试永远不会自动隐藏。","testAllCompleted": "已测试 {total} 个模型:{ok} 个通过,{failed} 个失败","modelAutoHidden": "模型 {model} 已自动隐藏(测试失败)","filterVisible": "仅可见",diff --git a/src/lib/memory/injection.ts b/src/lib/memory/injection.tsindex 283bb28bd2..b9a6199bb5 100644--- a/src/lib/memory/injection.ts+++ b/src/lib/memory/injection.ts@@ -79,10 +79,24 @@ export function formatMemoryContext(memories: Memory[]): string {* @param provider - Provider identifier used to choose injection strategy* @returns A new request body with memories prepended to messages*/+export interface InjectMemoryOptions {+ /**+ * #3890: when the request uses prompt caching (cache_control breakpoints), prepending+ * the memory message at index 0 shifts the entire cacheable prefix — and since the+ * retrieved memories vary per user query, every cache breakpoint then misses on each+ * turn (observed as a sustained cache-miss / cost spike). When `cacheSafe` is set, the+ * memory message is inserted immediately before the LAST user message instead, so the+ * cacheable prefix (system prompt + prior turns) stays byte-stable while memory still+ * contextualizes the current turn.+ */+ cacheSafe?: boolean;+}+export function injectMemory(request: ChatRequest,memories: Memory[],- provider: string | null | undefined+ provider: string | null | undefined,+ options: InjectMemoryOptions = {}): ChatRequest {if (!memories || memories.length === 0) {log.info("memory.injection.skipped", { reason: "no_memories", model: request.model });@@ -97,26 +111,41 @@ export function injectMemory(const messages: ChatMessage[] = Array.isArray(request.messages) ? [...request.messages] : [];+ // #3890: in a caching context, anchor the injection just before the LAST user message so+ // the cacheable prefix (system prompt + prior turns) is preserved byte-for-byte. Falls+ // back to a leading message when caching is off or there is no user turn to anchor on.+ const cacheSafeIndex = options.cacheSafe ? messages.findLastIndex((m) => m.role === "user") : -1;+if (providerSupportsSystemMessage(provider)) {- // Strategy 1: inject as a leading system message.+ // Strategy 1: inject as a system message.// Prepending before any existing system messages keeps memory context// accessible without overriding the caller's own system instructions.const memorySystemMessage: ChatMessage = { role: "system", content: memoryText };log.info("memory.injection.injected", {count: memories.length,- strategy: "system",+ strategy: cacheSafeIndex >= 0 ? "system-cache-safe" : "system",model: request.model,});+ if (cacheSafeIndex >= 0) {+ const next = [...messages];+ next.splice(cacheSafeIndex, 0, memorySystemMessage);+ return { ...request, messages: next };+ }return { ...request, messages: [memorySystemMessage, ...messages] };} else {- // Strategy 2 (fallback): inject as the first user message.+ // Strategy 2 (fallback): inject as a user message.// Used for providers like o1-mini that reject the system role.const memoryUserMessage: ChatMessage = { role: "user", content: memoryText };log.info("memory.injection.injected", {count: memories.length,- strategy: "user",+ strategy: cacheSafeIndex >= 0 ? "user-cache-safe" : "user",model: request.model,});+ if (cacheSafeIndex >= 0) {+ const next = [...messages];+ next.splice(cacheSafeIndex, 0, memoryUserMessage);+ return { ...request, messages: next };+ }return { ...request, messages: [memoryUserMessage, ...messages] };}}diff --git a/src/lib/providers/requestDefaults.ts b/src/lib/providers/requestDefaults.tsindex 5f6debadff..479d6f532f 100644--- a/src/lib/providers/requestDefaults.ts+++ b/src/lib/providers/requestDefaults.ts@@ -3,6 +3,7 @@ const CLAUDE_CODE_COMPATIBLE_PROVIDER_PREFIX = "anthropic-compatible-cc-";import { normalizeExcludedModelPatterns } from "@/domain/connectionModelRules";import { normalizeRoutingTags } from "@/domain/tagRouter";+import { normalizeOpenRouterPreset } from "@/shared/constants/openRouterPreset";export const CODEX_REASONING_EFFORT_VALUES = ["none", "low", "medium", "high", "xhigh"] as const;@@ -60,6 +61,10 @@ export function normalizeClaudeCodeCompatibleContext1m(value: unknown): true | ureturn value === true ? true : undefined;}+export function normalizeClaudeCodeCompatibleRedactThinking(value: unknown): true | undefined {+ return value === true ? true : undefined;+}+export function normalizeRequestDefaults(provider: string | null | undefined,value: unknown@@ -92,6 +97,13 @@ export function normalizeRequestDefaults(} else {delete normalized.context1m;}++ const redactThinking = normalizeClaudeCodeCompatibleRedactThinking(record.redactThinking);+ if (redactThinking) {+ normalized.redactThinking = true;+ } else {+ delete normalized.redactThinking;+ }}return Object.keys(normalized).length > 0 ? normalized : undefined;@@ -132,6 +144,15 @@ export function normalizeProviderSpecificData(delete normalized.autoFetchModels;}+ if ("preset" in normalized) {+ const preset = provider === "openrouter" ? normalizeOpenRouterPreset(normalized.preset) : null;+ if (preset) {+ normalized.preset = preset;+ } else {+ delete normalized.preset;+ }+ }+if (provider === "bedrock" && "region" in normalized) {const region = normalizeAwsRegion(normalized.region);if (region) {@@ -257,13 +278,16 @@ export function getCodexRequestDefaults(providerSpecificData: unknown): {export function getClaudeCodeCompatibleRequestDefaults(providerSpecificData: unknown): {context1m?: true;+ redactThinking?: true;} {const defaults = getProviderRequestDefaults("anthropic-compatible-cc-default",providerSpecificData);const context1m = normalizeClaudeCodeCompatibleContext1m(defaults.context1m);+ const redactThinking = normalizeClaudeCodeCompatibleRedactThinking(defaults.redactThinking);return {...(context1m ? { context1m } : {}),+ ...(redactThinking ? { redactThinking } : {}),};}diff --git a/src/lib/providers/validation.ts b/src/lib/providers/validation.tsindex a250836c28..a335534488 100644--- a/src/lib/providers/validation.ts+++ b/src/lib/providers/validation.ts@@ -2120,7 +2120,7 @@ async function validateNousResearchProvider({ apiKey, providerSpecificData = {}typeof providerSpecificData.validationModelId === "string" &&providerSpecificData.validationModelId.trim()? providerSpecificData.validationModelId.trim()- : "nousresearch/hermes-4-70b";+ : "Hermes-4-70B";try {const response = await validationWrite(chatUrl, {@@ -2157,6 +2157,19 @@ async function validateNousResearchProvider({ apiKey, providerSpecificData = {}if (response.status >= 500) {return { valid: false, error: `Provider unavailable (${response.status})` };}++ // #3881: any other non-auth 4xx (e.g. 400 model-not-found, 404, 422) means the+ // credentials were accepted — only the probe model/request shape was rejected.+ // Treat as valid (mirrors the longcat/nvidia validators) so a model rename upstream+ // can't make a working key read as "invalid".+ if (response.status >= 400 && response.status < 500) {+ return {+ valid: true,+ error: null,+ method: "nous_chat_completions",+ warning: `Credentials valid (probe returned ${response.status})`,+ };+ }} catch (error: any) {return toValidationErrorResult(error);}@@ -4189,6 +4202,52 @@ export async function validateProviderApiKey({ provider, apiKey, providerSpecifireturn toValidationErrorResult(error);}},+ // Z.AI (glm) — bypass the proxy/TLS-patched fetch for the same reason as nvidia+ // above (#3905): the undici dispatcher stalls against api.z.ai after the provider+ // returns 502 "job timed out" responses, because z.ai silently drops idle+ // keep-alive sockets without sending TCP RST. Using directHttpsRequest (native+ // Node.js HTTPS, no undici pool) avoids the zombie-socket hang on validation.+ // Z.AI uses the Anthropic wire format with x-api-key auth, not Bearer.+ zai: async ({ apiKey, providerSpecificData }: any) => {+ try {+ // providerSpecificData.baseUrl allows test overrides to point at a local+ // HTTP server; production always uses the fixed api.z.ai endpoint.+ const messagesUrl = providerSpecificData?.baseUrl+ ? `${normalizeBaseUrl(providerSpecificData.baseUrl).split("?")[0]}?beta=true`+ : "https://api.z.ai/api/anthropic/v1/messages?beta=true";+ const res = await directHttpsRequest(+ messagesUrl,+ {+ method: "POST",+ headers: {+ "x-api-key": apiKey,+ "anthropic-version": "2023-06-01",+ "content-type": "application/json",+ },+ body: JSON.stringify({+ model: "glm-5.1",+ messages: [{ role: "user", content: "test" }],+ max_tokens: 1,+ }),+ },+ 20000+ );+ if (res.status === 401 || res.status === 403) {+ return { valid: false, error: "Invalid API key" };+ }+ if (res.status === 404 || res.status === 405) {+ return { valid: false, error: "Provider validation endpoint not supported" };+ }+ if (res.status >= 500 && res.status !== 502) {+ return { valid: false, error: `Provider unavailable (${res.status})` };+ }+ // Any non-auth response (200, 400, 422, 429, 502) means auth passed;+ // 502 "job timed out" is z.ai's own server-side queue limit, not an auth error.+ return { valid: true, error: null };+ } catch (error: any) {+ return toValidationErrorResult(error);+ }+ },// Xiaomi MiMo — Token Plan keys (tp-*) only work on regional endpoints// (e.g. token-plan-sgp, token-plan-ams), not api.xiaomimimo.com.// /v1/models works but validate via chat/completions for stronger auth check.diff --git a/src/lib/usage/completedRequestDetails.ts b/src/lib/usage/completedRequestDetails.tsnew file mode 100644index 0000000000..b9d06649bf--- /dev/null+++ b/src/lib/usage/completedRequestDetails.ts@@ -0,0 +1,103 @@+import { getDbInstance } from "../db/core";+import type { PendingRequestDetail } from "./usageHistory";++const COMPLETED_DETAIL_TTL_MS = 120_000;+const MAX_COMPLETED_DETAILS = 256;++const completedDetails = new Map<string, PendingRequestDetail>();+const completedDetailTimers = new Map<string, ReturnType<typeof setTimeout>>();++function deleteCompletedDetail(id: string) {+ completedDetails.delete(id);+ const existingTimer = completedDetailTimers.get(id);+ if (existingTimer) {+ clearTimeout(existingTimer);+ completedDetailTimers.delete(id);+ }+}++function trimCompletedDetails() {+ while (completedDetails.size > MAX_COMPLETED_DETAILS) {+ const oldestId = completedDetails.keys().next().value;+ if (!oldestId) break;+ deleteCompletedDetail(oldestId);+ }+}++export function getCompletedDetails(): Map<string, PendingRequestDetail> {+ return completedDetails;+}++export function storeCompletedDetail(detail: PendingRequestDetail) {+ completedDetails.set(detail.id, detail);+ trimCompletedDetails();+}++export function scheduleCompletedDetailCleanup(id: string) {+ const existingTimer = completedDetailTimers.get(id);+ if (existingTimer) clearTimeout(existingTimer);+ const timer = setTimeout(() => {+ completedDetails.delete(id);+ completedDetailTimers.delete(id);+ }, COMPLETED_DETAIL_TTL_MS);+ timer.unref?.();+ completedDetailTimers.set(id, timer);+}++export function clearCompletedDetails() {+ for (const timer of completedDetailTimers.values()) clearTimeout(timer);+ completedDetailTimers.clear();+ completedDetails.clear();+}++export function maybeEnrichCompletedDetail(updated: PendingRequestDetail, connectionId: string) {+ void (async () => {+ try {+ const missingProvider =+ updated.providerResponse === undefined || updated.providerResponse === null;+ const missingClient = updated.clientResponse === undefined || updated.clientResponse === null;+ if (!missingProvider && !missingClient) return;++ const db = getDbInstance();+ const sinceIso = new Date(Date.now() - 30_000).toISOString();+ const rows = db+ .prepare(+ `SELECT artifact_relpath FROM call_logs WHERE connection_id = ? AND model = ? AND timestamp >= ? ORDER BY timestamp DESC LIMIT 5`+ )+ .all(connectionId, updated.model, sinceIso) as Array<{ artifact_relpath: string | null }>;+ for (const row of rows) {+ if (!row.artifact_relpath) continue;+ const { readCallArtifact } = await import("./callLogArtifacts");+ const art = readCallArtifact(row.artifact_relpath);+ if (art.state !== "ready" || !art.artifact) continue;+ const pipeline = art.artifact.pipeline as+ | { providerResponse?: unknown; clientResponse?: unknown }+ | undefined;+ if (missingProvider && pipeline?.providerResponse) {+ updated.providerResponse = pipeline.providerResponse;+ }+ if (missingClient && pipeline?.clientResponse) {+ updated.clientResponse = pipeline.clientResponse;+ }+ if (+ (missingProvider && art.artifact.responseBody) ||+ (missingClient && art.artifact.responseBody)+ ) {+ if (missingProvider) updated.providerResponse = art.artifact.responseBody;+ if (missingClient) updated.clientResponse = art.artifact.responseBody;+ }+ if (updated.providerResponse || updated.clientResponse) {+ if (completedDetails.has(updated.id)) storeCompletedDetail(updated);+ break;+ }+ }+ } catch (e) {+ try {+ console.warn(+ "[usageHistory] failed to enrich completed detail from artifacts:",+ e && (e.message || e)+ );+ } catch {}+ }+ })();+}diff --git a/src/lib/usage/usageHistory.ts b/src/lib/usage/usageHistory.tsindex 6e2b93394f..d194fe03fe 100644--- a/src/lib/usage/usageHistory.ts+++ b/src/lib/usage/usageHistory.ts@@ -9,6 +9,12 @@import { getDbInstance } from "../db/core";import { protectPayloadForLog } from "../logPayloads";+import {+ clearCompletedDetails,+ maybeEnrichCompletedDetail,+ scheduleCompletedDetailCleanup,+ storeCompletedDetail,+} from "./completedRequestDetails";import { shouldPersistToDisk } from "./migrations";import { emitUsageRecorded } from "./usageEvents";import {@@ -27,10 +33,13 @@ type PendingRequestMetadata = {providerUrl?: string | null;providerResponse?: unknown;clientResponse?: unknown;+ status?: number | null;+ error?: string | null;+ errorCode?: string | null;stage?: string | null;stageUpdatedAt?: number | null;};-type PendingRequestDetail = {+export type PendingRequestDetail = {id: string;model: string;provider: string;@@ -42,6 +51,11 @@ type PendingRequestDetail = {providerUrl?: string | null;providerResponse?: unknown;clientResponse?: unknown;+ status?: number | null;+ error?: string | null;+ errorCode?: string | null;+ completedAt?: number | null;+ durationMs?: number | null;stage?: string | null;stageUpdatedAt?: number | null;streamChunks?: {@@ -169,6 +183,16 @@ function normalizePendingMetadata(metadata?: PendingRequestMetadata): PendingReqprotectPayloadForLog(metadata.clientResponse));}+ if (metadata.status !== undefined) {+ const status = Number(metadata.status);+ normalized.status = Number.isFinite(status) ? status : null;+ }+ if (metadata.error !== undefined) {+ normalized.error = toStringOrNull(metadata.error) || null;+ }+ if (metadata.errorCode !== undefined) {+ normalized.errorCode = toStringOrNull(metadata.errorCode) || null;+ }return normalized;}@@ -281,7 +305,7 @@ export function updatePendingRequest(const details = pendingRequests.details[connectionId]?.[modelKey];if (!details?.length) return;const lastIdx = details.length - 1;- details[lastIdx] = { ...details[lastIdx], ...normalizePendingMetadata(metadata) };+ Object.assign(details[lastIdx], normalizePendingMetadata(metadata));}/**@@ -290,13 +314,69 @@ export function updatePendingRequest(* for the non-streaming completion path where the oldest entry must be finalized* before trackPendingRequest(false) removes it from the FIFO queue.*/-/**- * Completed details cache — keeps finalized response data available for the- * active endpoint's fast-poll for a brief window after the pending detail is- * removed, so the frontend can show providerResponse/clientResponse before- * the persisted call log is fetched.- */-const completedDetails = new Map<string, PendingRequestDetail>();+function decrementPendingCounters(modelKey: string, connectionId: string) {+ if (Object.hasOwn(pendingRequests.byModel, modelKey)) {+ pendingRequests.byModel[modelKey] = Math.max(0, pendingRequests.byModel[modelKey] - 1);+ if (pendingRequests.byModel[modelKey] === 0) delete pendingRequests.byModel[modelKey];+ }+ if (Object.hasOwn(pendingRequests.byAccount, connectionId)) {+ if (Object.hasOwn(pendingRequests.byAccount[connectionId], modelKey)) {+ pendingRequests.byAccount[connectionId][modelKey] = Math.max(+ 0,+ pendingRequests.byAccount[connectionId][modelKey] - 1+ );+ if (pendingRequests.byAccount[connectionId][modelKey] === 0) {+ delete pendingRequests.byAccount[connectionId][modelKey];+ }+ }+ if (+ !pendingRequests.byAccount[connectionId] ||+ Object.keys(pendingRequests.byAccount[connectionId]).length === 0+ ) {+ delete pendingRequests.byAccount[connectionId];+ }+ }+}++function cleanupPendingDetails(connectionId: string, modelKey: string) {+ if (!pendingRequests.details[connectionId]?.[modelKey]?.length) {+ delete pendingRequests.details[connectionId]?.[modelKey];+ }+ if (+ !pendingRequests.details[connectionId] ||+ Object.keys(pendingRequests.details[connectionId]).length === 0+ ) {+ delete pendingRequests.details[connectionId];+ }+}++function finalizePendingDetailAt(+ connectionId: string,+ modelKey: string,+ index: number,+ metadata: PendingRequestMetadata+): string | null {+ if (!isSafeKey(modelKey)) return null;+ const details = pendingRequests.details[connectionId]?.[modelKey];+ if (!details?.length || index < 0 || index >= details.length) return null;++ const completedAt = Date.now();+ const updated = {+ ...details[index],+ ...normalizePendingMetadata(metadata),+ completedAt,+ durationMs: Math.max(0, completedAt - details[index].startedAt),+ };+ storeCompletedDetail(updated);+ maybeEnrichCompletedDetail(updated, connectionId);+ scheduleCompletedDetailCleanup(updated.id);++ details.splice(index, 1);+ pendingById.delete(updated.id);+ cleanupPendingDetails(connectionId, modelKey);+ decrementPendingCounters(modelKey, connectionId);+ return updated.id;+}export function finalizePendingRequest(model: string,@@ -306,20 +386,26 @@ export function finalizePendingRequest() {if (!connectionId) return;const modelKey = provider ? `${model} (${provider})` : model;- if (!isSafeKey(modelKey)) return;- const details = pendingRequests.details[connectionId]?.[modelKey];- if (!details?.length) return;- const updated = { ...details[0], ...normalizePendingMetadata(metadata) };- completedDetails.set(updated.id, updated);- setTimeout(() => completedDetails.delete(updated.id), 5000);- trackPendingRequest(model, provider, connectionId, false);+ finalizePendingDetailAt(connectionId, modelKey, 0, metadata);+}++export function finalizePendingRequestById(+ id: string | null | undefined,+ metadata: PendingRequestMetadata+): boolean {+ if (!id) return false;+ const detail = pendingById.get(id);+ if (!detail?.connectionId) return false;+ const modelKey = detail.provider ? `${detail.model} (${detail.provider})` : detail.model;+ if (!isSafeKey(modelKey)) return false;+ const details = pendingRequests.details[detail.connectionId]?.[modelKey];+ const index = details?.findIndex((entry) => entry.id === id) ?? -1;+ return finalizePendingDetailAt(detail.connectionId, modelKey, index, metadata) !== null;}/*** Finalize the most recent (last) pending request for the given model/provider/connection.- * This is used for streaming requests where the active stream corresponds to the last- * entry in the FIFO for the connection/model key. It removes that specific entry and- * moves it to completedDetails so the UI fast-poll can pick it up.+ * This remains as a compatibility fallback for callers that do not have a request id.*/export function finalizeMostRecentPendingRequest(model: string,@@ -332,104 +418,10 @@ export function finalizeMostRecentPendingRequest(if (!isSafeKey(modelKey)) return;const details = pendingRequests.details[connectionId]?.[modelKey];if (!details?.length) return;- const lastIdx = details.length - 1;- const updated = { ...details[lastIdx], ...normalizePendingMetadata(metadata) };- // Move to completed cache- completedDetails.set(updated.id, updated);-- // If provider/client responses are missing, attempt to enrich the completed- // detail from persisted call_log artifacts (best-effort, non-blocking).- (async () => {- try {- const missingProvider =- updated.providerResponse === undefined || updated.providerResponse === null;- const missingClient = updated.clientResponse === undefined || updated.clientResponse === null;- if ((missingProvider || missingClient) && connectionId) {- const db = getDbInstance();- const sinceIso = new Date(Date.now() - 30_000).toISOString();- const rows = db- .prepare(- `SELECT artifact_relpath FROM call_logs WHERE connection_id = ? AND model = ? AND timestamp >= ? ORDER BY timestamp DESC LIMIT 5`- )- .all(connectionId, model, sinceIso) as Array<{ artifact_relpath: string | null }>;- for (const row of rows) {- if (!row.artifact_relpath) continue;- const { readCallArtifact } = await import("./callLogArtifacts");- const art = readCallArtifact(row.artifact_relpath);- if (art.state !== "ready" || !art.artifact) continue;- const pipeline = art.artifact.pipeline as any | undefined;- // Prefer pipeline payloads over responseBody for structured data- if (missingProvider && pipeline?.providerResponse) {- updated.providerResponse = pipeline.providerResponse;- }- if (missingClient && pipeline?.clientResponse) {- updated.clientResponse = pipeline.clientResponse;- }- if (- (missingProvider && art.artifact.responseBody) ||- (missingClient && art.artifact.responseBody)- ) {- // use responseBody as a fallback for both- if (missingProvider) updated.providerResponse = art.artifact.responseBody;- if (missingClient) updated.clientResponse = art.artifact.responseBody;- }- if (updated.providerResponse || updated.clientResponse) {- // write-back to completed cache and stop searching- completedDetails.set(updated.id, updated);- break;- }- }- }- } catch (e) {- try {- console.warn(- "[usageHistory] failed to enrich completed detail from artifacts:",- e && (e.message || e)- );- } catch {}- }- })();-- setTimeout(() => completedDetails.delete(updated.id), 5000);-- // Remove the specific pending detail- details.splice(lastIdx, 1);- pendingById.delete(updated.id);-- // Decrement counters (mirror trackPendingRequest(false) behaviour)- if (Object.hasOwn(pendingRequests.byModel, modelKey)) {- pendingRequests.byModel[modelKey] = Math.max(0, pendingRequests.byModel[modelKey] - 1);- if (pendingRequests.byModel[modelKey] === 0) delete pendingRequests.byModel[modelKey];- }- if (connectionId && Object.hasOwn(pendingRequests.byAccount, connectionId)) {- if (Object.hasOwn(pendingRequests.byAccount[connectionId], modelKey)) {- pendingRequests.byAccount[connectionId][modelKey] = Math.max(- 0,- pendingRequests.byAccount[connectionId][modelKey] - 1- );- if (pendingRequests.byAccount[connectionId][modelKey] === 0) {- delete pendingRequests.byAccount[connectionId][modelKey];- }- }- // Clean up details map if empty- if (- !pendingRequests.details[connectionId] ||- Object.keys(pendingRequests.details[connectionId]).length === 0- ) {- delete pendingRequests.details[connectionId];- }- if (- !pendingRequests.byAccount[connectionId] ||- Object.keys(pendingRequests.byAccount[connectionId]).length === 0- ) {- delete pendingRequests.byAccount[connectionId];- }- }+ finalizePendingDetailAt(connectionId, modelKey, details.length - 1, metadata);}-export function getCompletedDetails(): Map<string, PendingRequestDetail> {- return completedDetails;-}+export { getCompletedDetails } from "./completedRequestDetails";export function updatePendingRequestStreamChunks(model: string,@@ -476,6 +468,7 @@ export function clearPendingRequests() {Record<string, PendingRequestDetail[]>>;pendingById.clear();+ clearCompletedDetails();}// ──────────────── getUsageDb Shim (backward compat) ────────────────diff --git a/src/shared/constants/modelSpecs.ts b/src/shared/constants/modelSpecs.tsindex 7dbd2764c7..0d1f3caa22 100644--- a/src/shared/constants/modelSpecs.ts+++ b/src/shared/constants/modelSpecs.ts@@ -354,6 +354,26 @@ export const MODEL_SPECS: Record<string, ModelSpec> = {supportsTools: true,},+ // ── Z.AI GLM-5.2 (1M context, 128K max output, effort tiers) ────+ "glm-5.2": {+ maxOutputTokens: 131072,+ contextWindow: 1000000,+ supportsThinking: true,+ supportsTools: true,+ },+ "glm-5.2-high": {+ maxOutputTokens: 131072,+ contextWindow: 1000000,+ supportsThinking: true,+ supportsTools: true,+ },+ "glm-5.2-max": {+ maxOutputTokens: 131072,+ contextWindow: 1000000,+ supportsThinking: true,+ supportsTools: true,+ },+// ── Z.AI GLM-5.x (200K context, 128K max output) ─────────────────"glm-5.1": {maxOutputTokens: 128000,diff --git a/src/shared/constants/openRouterPreset.ts b/src/shared/constants/openRouterPreset.tsnew file mode 100644index 0000000000..745ddef85b--- /dev/null+++ b/src/shared/constants/openRouterPreset.ts@@ -0,0 +1,11 @@+export const OPENROUTER_PRESET_MAX_LENGTH = 200;++export function isOpenRouterPresetValue(value: unknown): value is string {+ return typeof value === "string" && value.trim().length <= OPENROUTER_PRESET_MAX_LENGTH;+}++export function normalizeOpenRouterPreset(value: unknown): string | undefined {+ if (!isOpenRouterPresetValue(value)) return undefined;+ const normalized = value.trim();+ return normalized || undefined;+}diff --git a/src/shared/constants/pricing.ts b/src/shared/constants/pricing.tsindex d245c9aab9..392afafd50 100644--- a/src/shared/constants/pricing.ts+++ b/src/shared/constants/pricing.ts@@ -60,6 +60,27 @@ const CLAUDE_SONNET_46_PRICING = {};const GLM_PRICING = {+ "glm-5.2": {+ input: 1.2,+ output: 5,+ cached: 0.3,+ reasoning: 5,+ cache_creation: 1.2,+ },+ "glm-5.2-high": {+ input: 1.2,+ output: 5,+ cached: 0.3,+ reasoning: 5,+ cache_creation: 1.2,+ },+ "glm-5.2-max": {+ input: 1.2,+ output: 5,+ cached: 0.3,+ reasoning: 5,+ cache_creation: 1.2,+ },"glm-5.1": {input: 1.2,output: 5,diff --git a/src/shared/validation/providerSpecificData.ts b/src/shared/validation/providerSpecificData.tsnew file mode 100644index 0000000000..3258d389e7--- /dev/null+++ b/src/shared/validation/providerSpecificData.ts@@ -0,0 +1,266 @@+import { z } from "zod";+import {+ OPENROUTER_PRESET_MAX_LENGTH,+ isOpenRouterPresetValue,+} from "@/shared/constants/openRouterPreset";++function isHttpUrl(value: string): boolean {+ try {+ const parsed = new URL(value);+ return parsed.protocol === "http:" || parsed.protocol === "https:";+ } catch {+ return false;+ }+}++const CODEX_REASONING_EFFORT_VALUES = new Set(["none", "low", "medium", "high", "xhigh"]);+const REQUEST_DEFAULT_SERVICE_TIER_VALUES = new Set(["default", "priority", "fast", "flex"]);++export function validateProviderSpecificData(+ data: Record<string, unknown> | undefined,+ ctx: z.RefinementCtx+): void {+ if (!data) return;++ const baseUrl = data.baseUrl;+ if (baseUrl !== undefined && (typeof baseUrl !== "string" || !isHttpUrl(baseUrl))) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.baseUrl must be a valid http(s) URL",+ path: ["baseUrl"],+ });+ }++ const customUserAgent = data.customUserAgent;+ if (+ customUserAgent !== undefined &&+ customUserAgent !== null &&+ (typeof customUserAgent !== "string" || customUserAgent.length > 500)+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.customUserAgent must be a string up to 500 chars",+ path: ["customUserAgent"],+ });+ }++ const cx = data.cx;+ if (cx !== undefined && cx !== null && (typeof cx !== "string" || cx.length > 500)) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.cx must be a string up to 500 chars",+ path: ["cx"],+ });+ }++ const region = data.region;+ if (+ region !== undefined &&+ region !== null &&+ (typeof region !== "string" || region.length > 64)+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.region must be a string up to 64 chars",+ path: ["region"],+ });+ }++ const openaiStoreEnabled = data.openaiStoreEnabled;+ if (openaiStoreEnabled !== undefined && typeof openaiStoreEnabled !== "boolean") {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.openaiStoreEnabled must be a boolean",+ path: ["openaiStoreEnabled"],+ });+ }++ const blockExtraUsage = data.blockExtraUsage;+ if (blockExtraUsage !== undefined && typeof blockExtraUsage !== "boolean") {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.blockExtraUsage must be a boolean",+ path: ["blockExtraUsage"],+ });+ }++ const autoFetchModels = data.autoFetchModels;+ if (autoFetchModels !== undefined && typeof autoFetchModels !== "boolean") {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.autoFetchModels must be a boolean",+ path: ["autoFetchModels"],+ });+ }++ const disableStreamOptions = data.disableStreamOptions;+ if (disableStreamOptions !== undefined && typeof disableStreamOptions !== "boolean") {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.disableStreamOptions must be a boolean",+ path: ["disableStreamOptions"],+ });+ }++ const preset = data.preset;+ if (preset !== undefined && preset !== null && !isOpenRouterPresetValue(preset)) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: `providerSpecificData.preset must be a string up to ${OPENROUTER_PRESET_MAX_LENGTH} chars`,+ path: ["preset"],+ });+ }++ const requestDefaults = data.requestDefaults;+ if (requestDefaults !== undefined) {+ if (!requestDefaults || typeof requestDefaults !== "object" || Array.isArray(requestDefaults)) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.requestDefaults must be an object",+ path: ["requestDefaults"],+ });+ } else {+ const requestDefaultsRecord = requestDefaults as Record<string, unknown>;+ const reasoningEffort = requestDefaultsRecord.reasoningEffort;+ if (+ reasoningEffort !== undefined &&+ reasoningEffort !== null &&+ (typeof reasoningEffort !== "string" ||+ !CODEX_REASONING_EFFORT_VALUES.has(reasoningEffort.trim().toLowerCase()))+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message:+ "providerSpecificData.requestDefaults.reasoningEffort must be one of none, low, medium, high, xhigh",+ path: ["requestDefaults", "reasoningEffort"],+ });+ }++ const serviceTier = requestDefaultsRecord.serviceTier;+ if (+ serviceTier !== undefined &&+ serviceTier !== null &&+ (typeof serviceTier !== "string" ||+ !REQUEST_DEFAULT_SERVICE_TIER_VALUES.has(serviceTier.trim().toLowerCase()))+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message:+ "providerSpecificData.requestDefaults.serviceTier must be one of default, priority, fast, flex when provided",+ path: ["requestDefaults", "serviceTier"],+ });+ }++ for (const booleanKey of ["context1m", "redactThinking"] as const) {+ const value = requestDefaultsRecord[booleanKey];+ if (value === undefined || value === null || typeof value === "boolean") continue;+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: `providerSpecificData.requestDefaults.${booleanKey} must be a boolean`,+ path: ["requestDefaults", booleanKey],+ });+ }+ }+ }++ const consoleApiKey = data.consoleApiKey;+ if (consoleApiKey !== undefined && consoleApiKey !== null && typeof consoleApiKey !== "string") {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.consoleApiKey must be a string",+ path: ["consoleApiKey"],+ });+ }+ if (typeof consoleApiKey === "string" && consoleApiKey.length > 10000) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.consoleApiKey must be at most 10000 characters",+ path: ["consoleApiKey"],+ });+ }++ const groupTag = data.tag;+ if (+ groupTag !== undefined &&+ groupTag !== null &&+ (typeof groupTag !== "string" || groupTag.length > 100)+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.tag must be a string up to 100 chars",+ path: ["tag"],+ });+ }++ const routingTags = data.tags;+ if (routingTags !== undefined && routingTags !== null) {+ if (!Array.isArray(routingTags) || routingTags.length > 50) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.tags must be an array with at most 50 items",+ path: ["tags"],+ });+ } else if (+ routingTags.some(+ (tag) => typeof tag !== "string" || tag.trim().length === 0 || tag.trim().length > 64+ )+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message:+ "providerSpecificData.tags must contain non-empty strings up to 64 characters each",+ path: ["tags"],+ });+ }+ }++ const excludedModels = data.excludedModels ?? data.excluded_models;+ if (excludedModels !== undefined && excludedModels !== null) {+ if (typeof excludedModels === "string") {+ if (excludedModels.length > 5000) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.excludedModels string must be up to 5000 chars",+ path: ["excludedModels"],+ });+ }+ } else if (!Array.isArray(excludedModels) || excludedModels.length > 100) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "providerSpecificData.excludedModels must be an array with at most 100 items",+ path: ["excludedModels"],+ });+ } else if (+ excludedModels.some(+ (pattern) =>+ typeof pattern !== "string" ||+ pattern.trim().length === 0 ||+ pattern.trim().length > 200 ||+ pattern.trim() === "**"+ )+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message:+ "providerSpecificData.excludedModels must contain non-empty patterns up to 200 characters",+ path: ["excludedModels"],+ });+ }+ }++ const clientProfile = data.clientProfile;+ if (clientProfile !== undefined && clientProfile !== null) {+ const normalized = typeof clientProfile === "string" ? clientProfile.trim().toLowerCase() : "";+ if (+ typeof clientProfile !== "string" ||+ !["ide", "harness", "cli", "sdk"].includes(normalized)+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message:+ "providerSpecificData.clientProfile must be ide, harness, cli, or sdk (cli/sdk map to harness)",+ path: ["clientProfile"],+ });+ }+ }+}diff --git a/src/shared/validation/schemas.ts b/src/shared/validation/schemas.tsindex dc2084a672..480a01e9c6 100644--- a/src/shared/validation/schemas.ts+++ b/src/shared/validation/schemas.ts@@ -13,259 +13,7 @@ import {isForbiddenCustomHeaderName,} from "@/shared/constants/upstreamHeaders";import { MAX_TIMER_TIMEOUT_MS } from "@/shared/utils/runtimeTimeouts";--function isHttpUrl(value: string): boolean {- try {- const parsed = new URL(value);- return parsed.protocol === "http:" || parsed.protocol === "https:";- } catch {- return false;- }-}--const CODEX_REASONING_EFFORT_VALUES = new Set(["none", "low", "medium", "high", "xhigh"]);-const REQUEST_DEFAULT_SERVICE_TIER_VALUES = new Set(["default", "priority", "fast", "flex"]);--function validateProviderSpecificData(- data: Record<string, unknown> | undefined,- ctx: z.RefinementCtx-): void {- if (!data) return;-- const baseUrl = data.baseUrl;- if (baseUrl !== undefined && (typeof baseUrl !== "string" || !isHttpUrl(baseUrl))) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.baseUrl must be a valid http(s) URL",- path: ["baseUrl"],- });- }-- const customUserAgent = data.customUserAgent;- if (- customUserAgent !== undefined &&- customUserAgent !== null &&- (typeof customUserAgent !== "string" || customUserAgent.length > 500)- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.customUserAgent must be a string up to 500 chars",- path: ["customUserAgent"],- });- }-- const cx = data.cx;- if (cx !== undefined && cx !== null && (typeof cx !== "string" || cx.length > 500)) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.cx must be a string up to 500 chars",- path: ["cx"],- });- }-- const region = data.region;- if (- region !== undefined &&- region !== null &&- (typeof region !== "string" || region.length > 64)- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.region must be a string up to 64 chars",- path: ["region"],- });- }-- const openaiStoreEnabled = data.openaiStoreEnabled;- if (openaiStoreEnabled !== undefined && typeof openaiStoreEnabled !== "boolean") {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.openaiStoreEnabled must be a boolean",- path: ["openaiStoreEnabled"],- });- }-- const blockExtraUsage = data.blockExtraUsage;- if (blockExtraUsage !== undefined && typeof blockExtraUsage !== "boolean") {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.blockExtraUsage must be a boolean",- path: ["blockExtraUsage"],- });- }-- const autoFetchModels = data.autoFetchModels;- if (autoFetchModels !== undefined && typeof autoFetchModels !== "boolean") {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.autoFetchModels must be a boolean",- path: ["autoFetchModels"],- });- }-- const disableStreamOptions = data.disableStreamOptions;- if (disableStreamOptions !== undefined && typeof disableStreamOptions !== "boolean") {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.disableStreamOptions must be a boolean",- path: ["disableStreamOptions"],- });- }-- const requestDefaults = data.requestDefaults;- if (requestDefaults !== undefined) {- if (!requestDefaults || typeof requestDefaults !== "object" || Array.isArray(requestDefaults)) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.requestDefaults must be an object",- path: ["requestDefaults"],- });- } else {- const requestDefaultsRecord = requestDefaults as Record<string, unknown>;- const reasoningEffort = requestDefaultsRecord.reasoningEffort;- if (- reasoningEffort !== undefined &&- reasoningEffort !== null &&- (typeof reasoningEffort !== "string" ||- !CODEX_REASONING_EFFORT_VALUES.has(reasoningEffort.trim().toLowerCase()))- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message:- "providerSpecificData.requestDefaults.reasoningEffort must be one of none, low, medium, high, xhigh",- path: ["requestDefaults", "reasoningEffort"],- });- }-- const serviceTier = requestDefaultsRecord.serviceTier;- if (- serviceTier !== undefined &&- serviceTier !== null &&- (typeof serviceTier !== "string" ||- !REQUEST_DEFAULT_SERVICE_TIER_VALUES.has(serviceTier.trim().toLowerCase()))- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message:- "providerSpecificData.requestDefaults.serviceTier must be one of default, priority, fast, flex when provided",- path: ["requestDefaults", "serviceTier"],- });- }-- const context1m = requestDefaultsRecord.context1m;- if (context1m !== undefined && context1m !== null && typeof context1m !== "boolean") {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.requestDefaults.context1m must be a boolean",- path: ["requestDefaults", "context1m"],- });- }- }- }-- // [Oracle CONDITIONAL] consoleApiKey는 bailian-coding-plan 전용 필드.- // 다른 프로바이더 공통 규약으로 재사용하지 않는다.- const consoleApiKey = data.consoleApiKey;- if (consoleApiKey !== undefined && consoleApiKey !== null && typeof consoleApiKey !== "string") {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.consoleApiKey must be a string",- path: ["consoleApiKey"],- });- }- if (typeof consoleApiKey === "string" && consoleApiKey.length > 10000) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.consoleApiKey must be at most 10000 characters",- path: ["consoleApiKey"],- });- }-- const groupTag = data.tag;- if (- groupTag !== undefined &&- groupTag !== null &&- (typeof groupTag !== "string" || groupTag.length > 100)- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.tag must be a string up to 100 chars",- path: ["tag"],- });- }-- const routingTags = data.tags;- if (routingTags !== undefined && routingTags !== null) {- if (!Array.isArray(routingTags) || routingTags.length > 50) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.tags must be an array with at most 50 items",- path: ["tags"],- });- } else if (- routingTags.some(- (tag) => typeof tag !== "string" || tag.trim().length === 0 || tag.trim().length > 64- )- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message:- "providerSpecificData.tags must contain non-empty strings up to 64 characters each",- path: ["tags"],- });- }- }-- const excludedModels = data.excludedModels ?? data.excluded_models;- if (excludedModels !== undefined && excludedModels !== null) {- if (typeof excludedModels === "string") {- if (excludedModels.length > 5000) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.excludedModels string must be up to 5000 chars",- path: ["excludedModels"],- });- }- } else if (!Array.isArray(excludedModels) || excludedModels.length > 100) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message: "providerSpecificData.excludedModels must be an array with at most 100 items",- path: ["excludedModels"],- });- } else if (- excludedModels.some(- (pattern) =>- typeof pattern !== "string" ||- pattern.trim().length === 0 ||- pattern.trim().length > 200 ||- pattern.trim() === "**"- )- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message:- "providerSpecificData.excludedModels must contain non-empty patterns up to 200 characters",- path: ["excludedModels"],- });- }- }-- const clientProfile = data.clientProfile;- if (clientProfile !== undefined && clientProfile !== null) {- const normalized = typeof clientProfile === "string" ? clientProfile.trim().toLowerCase() : "";- if (- typeof clientProfile !== "string" ||- !["ide", "harness", "cli", "sdk"].includes(normalized)- ) {- ctx.addIssue({- code: z.ZodIssueCode.custom,- message:- "providerSpecificData.clientProfile must be ide, harness, cli, or sdk (cli/sdk map to harness)",- path: ["clientProfile"],- });- }- }-}+import { validateProviderSpecificData } from "./providerSpecificData";// Re-export validation helpers from dedicated module to avoid webpack barrel-file// optimization bug that truncates exports from large files.diff --git a/stryker.conf.json b/stryker.conf.jsonindex 104b910280..e76ea6a978 100644--- a/stryker.conf.json+++ b/stryker.conf.json@@ -5,23 +5,181 @@"NIGHTLY ONLY — DO NOT run on every PR. Mutation testing is expensive:"," - Each mutant requires a full test suite execution."," - The 8 modules produce ~200–500 mutants; est. 30–90 min per run.",- " - Wired to the 'nightly' CI job (not 'lint' or 'quality-gate').",+ " - Wired to the nightly CI workflow (.github/workflows/nightly-mutation.yml),",+ " NOT to the 'lint' / 'quality-gate' PR jobs.",+ "",+ "TEST RUNNER — @stryker-mutator/tap-runner (NOT vitest):",+ " The 8 critical modules are covered by node:test files in tests/unit/",+ " (run via `node --import tsx --test`), NOT by vitest. The vitest config",+ " only includes a small set of .test.tsx + open-sse/**/__tests__ files, so",+ " the vitest-runner would find ZERO covering tests for these modules. The",+ " tap-runner spawns each node:test file individually and parses its TAP",+ " output, which matches how this repo actually exercises the modules.",+ " Each test file is loaded with tsx (TypeScript/ESM) + the project polyfill,",+ " the same way `npm run test:unit` runs.","","Install before running (not bundled to avoid E2E / CI bloat):",- " npm install --save-dev @stryker-mutator/core @stryker-mutator/vitest-runner",- " (or @stryker-mutator/tap-runner if using node:test natively)",+ " npm install --save-dev @stryker-mutator/core @stryker-mutator/tap-runner","","Run manually:",- " npx stryker run",- " npx stryker run --filePattern 'open-sse/handlers/chatCore.ts'",+ " npm run test:mutation # full run (slow — nightly budget)",+ " npx stryker run --dryRunOnly # validate the baseline only (no mutants)",+ " (single-module probe: temporarily narrow `mutate` + `tap.testFiles` in this file)",+ "",+ "VALIDATED 2026-06-15: `npx stryker run --dryRunOnly` exits 0 — all 129 covering",+ "test files run green in the Stryker sandbox and the perTest coverage map builds for",+ "all 8 instrumented modules (15k+ mutants). The baseline dry-run takes ~20 min with",+ "concurrency=1; the full mutation phase runs on top (advisory, capped by the workflow",+ "timeout). So the nightly produces REAL mutation scores for the 8 modules.","","Mutation score per module → quality-baseline.json key 'mutationScore.<module>'",- "Direction: up (score can only improve; ratchet blocks drops — wired in INT phase)."+ "Direction: up (score can only improve; ratchet blocks drops — wired in a later INT phase)."],"packageManager": "npm",- "testRunner": "vitest",- "vitest": {- "configFile": "vitest.config.ts"+ "testRunner": "tap",+ "plugins": ["@stryker-mutator/tap-runner"],+ "tap": {+ "testFiles": [+ "tests/unit/account-fallback-anthropic-quota.test.ts",+ "tests/unit/account-fallback-route-restriction-403.test.ts",+ "tests/unit/account-fallback-service.test.ts",+ "tests/unit/api-key-rotator-health.test.ts",+ "tests/unit/appearance-widget-settings-schema.test.ts",+ "tests/unit/auth-clear-account-error.test.ts",+ "tests/unit/auth-disable-cooling-2997.test.ts",+ "tests/unit/auth-extract-api-key.test.ts",+ "tests/unit/auth-noauth-fallback-loop-3061.test.ts",+ "tests/unit/auth-ollama-cloud-per-model-403-3027.test.ts",+ "tests/unit/auth-opencode-zen-noauth-fallback.test.ts",+ "tests/unit/auth-terminal-status.test.ts",+ "tests/unit/authz/routeGuard.test.ts",+ "tests/unit/auto-combo-context-advertising.test.ts",+ "tests/unit/auto-combo-engine.test.ts",+ "tests/unit/auto-combo-scoring-clamp.test.ts",+ "tests/unit/build/check-circular-deps.test.ts",+ "tests/unit/cache-sweeps.test.ts",+ "tests/unit/cc-compatible-provider.test.ts",+ "tests/unit/chat-context-relay.test.ts",+ "tests/unit/chat-cooldown-aware-retry.test.ts",+ "tests/unit/chat-helpers.test.ts",+ "tests/unit/chat-route-coverage.test.ts",+ "tests/unit/chat-route-edge-cases.test.ts",+ "tests/unit/chatcore-compression-integration.test.ts",+ "tests/unit/chatcore-extracted-modules-3821.test.ts",+ "tests/unit/chatcore-imports-cleanly.test.ts",+ "tests/unit/chatcore-sanitization.test.ts",+ "tests/unit/chatcore-strip-stale-headers.test.ts",+ "tests/unit/chatcore-translation-paths.test.ts",+ "tests/unit/check-error-helper.test.ts",+ "tests/unit/check-route-guard-membership.test.ts",+ "tests/unit/check-test-discovery.test.ts",+ "tests/unit/circuit-breaker-failure-kind.test.ts",+ "tests/unit/claude-code-parity.test.ts",+ "tests/unit/claude-effort-suffix-strip.test.ts",+ "tests/unit/claude-oauth-provider.test.ts",+ "tests/unit/claude-passthrough-stream-boolean.test.ts",+ "tests/unit/claude-passthrough-thinking-2454.test.ts",+ "tests/unit/cli-simulate.test.ts",+ "tests/unit/codex-failover.test.ts",+ "tests/unit/codex-stream-false.test.ts",+ "tests/unit/collect-metrics-module-coverage.test.ts",+ "tests/unit/combo-499-abort.test.ts",+ "tests/unit/combo-auto-candidate-expansion.test.ts",+ "tests/unit/combo-cache-invalidation.test.ts",+ "tests/unit/combo-config.test.ts",+ "tests/unit/combo-context-relay.test.ts",+ "tests/unit/combo-health-autopilot.test.ts",+ "tests/unit/combo-health-dashboard.test.ts",+ "tests/unit/combo-health-route.test.ts",+ "tests/unit/combo-hedging.test.ts",+ "tests/unit/combo-max-depth-config.test.ts",+ "tests/unit/combo-omnimodel-tag-stripping.test.ts",+ "tests/unit/combo-prescreen.test.ts",+ "tests/unit/combo-provider-cooldown.test.ts",+ "tests/unit/combo-provider-diversity-wiring.test.ts",+ "tests/unit/combo-quality-validator-reasoning.test.ts",+ "tests/unit/combo-quota-soft-penalty.test.ts",+ "tests/unit/combo-round-robin-streaming-lock-3811.test.ts",+ "tests/unit/combo-routing-engine.test.ts",+ "tests/unit/combo-scoring-inspector.test.ts",+ "tests/unit/combo-sessionless-pin-3825.test.ts",+ "tests/unit/combo-strategies.test.ts",+ "tests/unit/combo-strategy-fallbacks.test.ts",+ "tests/unit/combo-streaming-empty-content-failover.test.ts",+ "tests/unit/combo-target-defensive-modelstr.test.ts",+ "tests/unit/complexity-aware-scoring-wiring.test.ts",+ "tests/unit/context-pinning-tool-calls.test.ts",+ "tests/unit/correctness/combo.property.test.ts",+ "tests/unit/correctness/sanitizers.property.test.ts",+ "tests/unit/custom-model-target-format.test.ts",+ "tests/unit/db-reset-module-state.test.ts",+ "tests/unit/domain-persistence.test.ts",+ "tests/unit/embeddings-auth.test.ts",+ "tests/unit/error-classification.test.ts",+ "tests/unit/error-message-sanitization.test.ts",+ "tests/unit/executor-antigravity.test.ts",+ "tests/unit/executor-web-cookie-sweep.test.ts",+ "tests/unit/gemini-web-missing-browser-3516.test.ts",+ "tests/unit/guardrails-api-3496.test.ts",+ "tests/unit/memory-embedding-remote.test.ts",+ "tests/unit/memory-embedding-transformers.test.ts",+ "tests/unit/model-cooldowns-route-auth.test.ts",+ "tests/unit/model-cooldowns-route.test.ts",+ "tests/unit/model-lockout-decay.test.ts",+ "tests/unit/oauth-providers-config.test.ts",+ "tests/unit/oauth-redirect-uri-mismatch.test.ts",+ "tests/unit/observability-fase04.test.ts",+ "tests/unit/observability-payloads.test.ts",+ "tests/unit/plan3-p0.test.ts",+ "tests/unit/plugin-sandbox-permissions.test.ts",+ "tests/unit/plugins-route-error-sanitization.test.ts",+ "tests/unit/provider-error-rules.test.ts",+ "tests/unit/provider-health-autopilot.test.ts",+ "tests/unit/provider-health-matrix.test.ts",+ "tests/unit/provider-request-failure-pipeline.test.ts",+ "tests/unit/public-client-ids-3493.test.ts",+ "tests/unit/publicCreds.test.ts",+ "tests/unit/qoder-oauth-config.test.ts",+ "tests/unit/quota-groups-route.test.ts",+ "tests/unit/quota-key-models-route.test.ts",+ "tests/unit/quota-policy-generalization.test.ts",+ "tests/unit/quota-pool-log-route.test.ts",+ "tests/unit/quota-streaming-consumption-usd.test.ts",+ "tests/unit/rate-limit-enhanced.test.ts",+ "tests/unit/rate-limit-manager.test.ts",+ "tests/unit/responses-handler.test.ts",+ "tests/unit/route-explainability.test.ts",+ "tests/unit/route-guard-plugins-local-only.test.ts",+ "tests/unit/route-guard-private-lan.test.ts",+ "tests/unit/route-guard-provider-login-local-only.test.ts",+ "tests/unit/router-strategies.test.ts",+ "tests/unit/service-combo-metrics.test.ts",+ "tests/unit/services-branch-hardening.test.ts",+ "tests/unit/services/combo-metrics-memory.test.ts",+ "tests/unit/settings/authz-bypass.test.ts",+ "tests/unit/skip-provider-breaker-consumer-2743.test.ts",+ "tests/unit/sse-auth.test.ts",+ "tests/unit/strict-random-deck.test.ts",+ "tests/unit/system-role-extraction.test.ts",+ "tests/unit/t23-t24-fallback-resilience.test.ts",+ "tests/unit/tag-routing.test.ts",+ "tests/unit/thundering-herd.test.ts",+ "tests/unit/token-refresh-race-comprehensive.test.ts",+ "tests/unit/token-refresh-service.test.ts",+ "tests/unit/tools-filter-anthropic-format.test.ts",+ "tests/unit/usage-service-hardening.test.ts",+ "tests/unit/validate-response-quality.test.ts"+ ],+ "nodeArgs": [+ "--import",+ "tsx",+ "--import",+ "./open-sse/utils/setupPolyfill.ts",+ "--test-reporter=tap",+ "-r",+ "{{hookFile}}",+ "{{testFile}}"+ ]},"mutate": ["open-sse/handlers/chatCore.ts",@@ -33,15 +191,25 @@"open-sse/utils/publicCreds.ts","src/shared/utils/circuitBreaker.ts"],+ "_ignorePatterns_comment": [+ "ignorePatterns = files NOT copied into the Stryker sandbox. It does NOT scope",+ "what gets mutated (that is the `mutate` array above). The test files MUST be",+ "copied so the tap-runner can find covering tests, so DO NOT ignore tests/ here.",+ "We only exclude heavy, mutation-irrelevant trees to keep sandbox creation fast:",+ "build output, coverage, the huge docs/i18n translation tree, and other worktrees."+ ],"ignorePatterns": [- "node_modules",".next","dist",+ "dist-electron",+ ".build","coverage",- "tests",- "**/*.test.ts",- "**/*.spec.ts",- "**/__tests__/**"+ "playwright-report",+ "test-results",+ "reports",+ "docs/i18n",+ ".worktrees",+ ".stryker-tmp"],"reporters": ["progress", "html", "json"],"htmlReporter": {@@ -53,7 +221,7 @@"coverageAnalysis": "perTest","timeoutMS": 60000,"timeoutFactor": 2.5,- "concurrency": 2,+ "concurrency": 1,"disableTypeChecks": true,"checkers": [],"thresholds": {@@ -62,5 +230,19 @@"break": null},"tempDirName": ".stryker-tmp",- "cleanTempDir": true+ "cleanTempDir": true,+ "_tapTestFiles_comment": [+ "tap.testFiles is the explicit set of node:test files that cover the 8 mutated",+ "modules (union of files importing any of them), MINUS a few timing/heap/streaming-",+ "sensitive integration tests that can flake under Stryker concurrent runners and",+ "would break the required all-green baseline dry-run (e.g. body-timeout-integration,",+ "heap-pressure, sse-heartbeat-integration, *-stream-readiness, chatcore-memory-pressure).",+ "It is enumerated (not a broad glob) so the Stryker dry-run stays tractable for the",+ "nightly budget — a glob over the full ~1300-file unit suite would make the per-test",+ "dry-run take hours. coverageAnalysis:perTest then narrows which files run per mutant.",+ "Regenerate the base union after adding/renaming covering tests, then re-prune flaky ones:",+ " grep -rlE \"circuitBreaker|publicCreds|accountFallback|routeGuard|services/auth|chatCore|services/combo|utils/error|public-client|account-fallback|route-guard|circuit-breaker\" tests/unit --include=\"*.test.ts\" | sort -u"+ ],+ "dryRunTimeoutMinutes": 30,+ "_concurrency_comment": "concurrency=1: the covering node:test files share SQLite/module state; running multiple files concurrently in the Stryker sandbox causes cross-file state races that fail the all-green baseline dry-run. Single-runner trades speed for a deterministic baseline (acceptable for a nightly)."}diff --git a/tests/unit/active-request-stream-chunks-lifecycle.test.ts b/tests/unit/active-request-stream-chunks-lifecycle.test.tsindex 0ef36b4027..b77c398160 100644--- a/tests/unit/active-request-stream-chunks-lifecycle.test.ts+++ b/tests/unit/active-request-stream-chunks-lifecycle.test.ts@@ -4,9 +4,7 @@ import fs from "node:fs";import os from "node:os";import path from "node:path";-const TEST_DATA_DIR = fs.mkdtempSync(- path.join(os.tmpdir(), "omniroute-active-stream-lifecycle-")-);+const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-active-stream-lifecycle-"));process.env.DATA_DIR = TEST_DATA_DIR;const core = await import("../../src/lib/db/core.ts");@@ -123,14 +121,11 @@ function mergeDetailData(data: Record<string, unknown>): Record<string, unknown> {const dataHasPipeline =- data?.pipelinePayloads &&- Object.keys(data.pipelinePayloads || {}).length > 0;+ data?.pipelinePayloads && Object.keys(data.pipelinePayloads || {}).length > 0;return {...prev,...data,- pipelinePayloads: dataHasPipeline- ? data.pipelinePayloads- : prev?.pipelinePayloads,+ pipelinePayloads: dataHasPipeline ? data.pipelinePayloads : prev?.pipelinePayloads,};}@@ -144,17 +139,11 @@ test("streamChunks survive the full lifecycle: in-flight → completed → persiconst connectionId = "conn-lifecycle-1";// ── Phase 1: Track a pending request ──- const requestId = usageHistory.trackPendingRequest(- model,- provider,- connectionId,- true,- {- clientRequest: { messages: [{ role: "user", content: "hello" }] },- providerRequest: { model: "gpt-4" },- clientEndpoint: "/v1/chat/completions",- }- );+ const requestId = usageHistory.trackPendingRequest(model, provider, connectionId, true, {+ clientRequest: { messages: [{ role: "user", content: "hello" }] },+ providerRequest: { model: "gpt-4" },+ clientEndpoint: "/v1/chat/completions",+ });assert.ok(requestId, "trackPendingRequest should return a request ID");assert.ok(@@ -185,10 +174,7 @@ test("streamChunks survive the full lifecycle: in-flight → completed → persiapiResponse1!.pipelinePayloads as Record<string, unknown>);assert.ok(text1, "streamChunksText should be non-null with debugEnabled");- assert.ok(- text1!.includes("message_start"),- "streamChunksText should contain the chunk content"- );+ assert.ok(text1!.includes("message_start"), "streamChunksText should contain the chunk content");// Verify frontend state mergeconst initialDetail = mergeDetailData(null, apiResponse1 as unknown as Record<string, unknown>);@@ -308,10 +294,7 @@ test("streamChunks survive the full lifecycle: in-flight → completed → persi// Verify DB has the entryconst dbEntry = await callLogs.getCallLogById(requestId);assert.ok(dbEntry, "should find persisted call log by the same ID");- assert.ok(- dbEntry.pipelinePayloads,- "persisted entry should have pipelinePayloads"- );+ assert.ok(dbEntry.pipelinePayloads, "persisted entry should have pipelinePayloads");// The pipelinePayloads in the DB may have been compacted/truncated.// streamChunks may or may not be there depending on captureStreamChunks,@@ -390,11 +373,7 @@ test("pooling effect state merge preserves streamChunks across updates", () => {const mergedChunks = (detailData!.pipelinePayloads as Record<string, unknown>).streamChunks as Record<string, string[]>;assert.equal(mergedChunks.provider.length, 2, "merged should have 2 chunks");- assert.equal(- mergedChunks.provider[1],- 'data: {"b":2}\n\n',- "merged should include new chunk"- );+ assert.equal(mergedChunks.provider[1], 'data: {"b":2}\n\n', "merged should include new chunk");// Simulate: polling response loses pipelinePayloads (null)// This should NOT overwrite the existing streamChunks@@ -476,15 +455,15 @@ test("pendingById references are live: push mutates the shared arrays visible to// Verify via simulated API responseconst apiResp = buildApiResponseFromPending(requestId);- const apiChunks = (apiResp!.pipelinePayloads as Record<string, unknown>)- .streamChunks as Record<string, string[]>;+ const apiChunks = (apiResp!.pipelinePayloads as Record<string, unknown>).streamChunks as Record<+ string,+ string[]+ >;assert.equal(apiChunks.provider.length, 1, "API should see the live mutation");});test("no connectionId in request logger does not break anything", async () => {- const { createRequestLogger } = await import(- "../../open-sse/utils/requestLogger.ts"- );+ const { createRequestLogger } = await import("../../open-sse/utils/requestLogger.ts");usageHistory.clearPendingRequests();usageHistory.trackPendingRequest("gpt-4", "openai", "conn-noop-1", true);@@ -527,9 +506,7 @@ test("createRequestLogger and trackPendingRequest with matching model propagate// The fix: chatCore.ts now passes `model` (not `effectiveModel`) to// createRequestLogger, so the modelKey matches what trackPendingRequest uses.- const { createRequestLogger } = await import(- "../../open-sse/utils/requestLogger.ts"- );+ const { createRequestLogger } = await import("../../open-sse/utils/requestLogger.ts");usageHistory.clearPendingRequests();@@ -537,10 +514,9 @@ test("createRequestLogger and trackPendingRequest with matching model propagateconst provider = "openai";const connectionId = "conn-match-1";- const requestId = usageHistory.trackPendingRequest(- model, provider, connectionId, true,- { clientRequest: { messages: [] } }- );+ const requestId = usageHistory.trackPendingRequest(model, provider, connectionId, true, {+ clientRequest: { messages: [] },+ });// Use matching model (the fix)const logger = await createRequestLogger("openai", "openai", model, {@@ -564,11 +540,72 @@ test("createRequestLogger and trackPendingRequest with matching model propagateconst apiResp = buildApiResponseFromPending(requestId!);assert.ok(apiResp);- const apiChunks = (apiResp!.pipelinePayloads as Record<string, unknown>).streamChunks as Record<string, string[]>;+ const apiChunks = (apiResp!.pipelinePayloads as Record<string, unknown>).streamChunks as Record<+ string,+ string[]+ >;assert.equal(apiChunks?.provider[0], 'data: {"chunk":"hello"}');});-test("streamChunks in completedDetails survives 5-second TTL window", async () => {+test("finalizePendingRequestById completes the exact stream when same model requests overlap", () => {+ usageHistory.clearPendingRequests();++ const model = "gpt-4";+ const provider = "openai";+ const connectionId = "conn-overlap-1";++ const firstId = usageHistory.trackPendingRequest(model, provider, connectionId, true, {+ clientRequest: { messages: [{ role: "user", content: "first" }] },+ });+ const secondId = usageHistory.trackPendingRequest(model, provider, connectionId, true, {+ clientRequest: { messages: [{ role: "user", content: "second" }] },+ });++ const completed = usageHistory.finalizePendingRequestById(firstId, {+ providerResponse: { id: "first-response" },+ clientResponse: { id: "first-response" },+ });++ assert.equal(completed, true);+ assert.ok(usageHistory.getCompletedDetails().has(firstId));+ assert.equal(usageHistory.getCompletedDetails().has(secondId), false);+ assert.equal(usageHistory.getPendingById().has(firstId), false);+ assert.equal(usageHistory.getPendingById().has(secondId), true);++ const pending = usageHistory.getPendingRequests();+ const details = pending.details[connectionId]?.[`${model} (${provider})`] ?? [];+ assert.equal(details.length, 1);+ assert.equal(details[0].id, secondId);+ assert.equal(pending.byModel[`${model} (${provider})`], 1);+ assert.equal(pending.byAccount[connectionId]?.[`${model} (${provider})`], 1);+});++test("completedDetails cache evicts oldest entries when bounded", () => {+ usageHistory.clearPendingRequests();++ const model = "gpt-4";+ const provider = "openai";+ const connectionId = "conn-completed-bound";+ const ids: string[] = [];++ for (let i = 0; i < 260; i++) {+ const id = usageHistory.trackPendingRequest(model, provider, connectionId, true);+ ids.push(id!);+ const completed = usageHistory.finalizePendingRequestById(id, {+ clientResponse: { choices: [{ message: { content: `done ${i}` } }] },+ });+ assert.equal(completed, true);+ }++ assert.ok(+ usageHistory.getCompletedDetails().size <= 256,+ "completedDetails should remain bounded"+ );+ assert.equal(usageHistory.getCompletedDetails().has(ids[0]), false);+ assert.equal(usageHistory.getCompletedDetails().has(ids[ids.length - 1]), true);+});++test("streamChunks in completedDetails survives beyond the logs polling window", async () => {usageHistory.clearPendingRequests();const model = "gpt-4";@@ -605,10 +642,9 @@ test("streamChunks in completedDetails survives 5-second TTL window", async () ="streamChunks should be in completedDetails");- // The completedDetails TTL is 5000ms. We verify by saving to DB first, then- // waiting for the TTL to expire, then verifying the data is gone from- // completedDetails but still accessible from the DB (via getCallLogById).- // Save to DB+ // Save to DB as the normal durable path, but keep the completedDetails cache+ // long enough that a slow Logs-page poll does not see the row disappear+ // between pending removal and DB/detail refresh.await callLogs.saveCallLog({id: requestId,method: "POST",@@ -640,18 +676,17 @@ test("streamChunks in completedDetails survives 5-second TTL window", async () =const dbEntry1 = await callLogs.getCallLogById(requestId);assert.ok(dbEntry1, "DB should have the entry after saveCallLog");- // Wait for TTL to expire+ // This used to expire after 5 seconds. Keep it visible beyond that window so+ // a slow client poll can still resolve the completed row/details.await new Promise((r) => setTimeout(r, 5100));- // completedDetails should be clearedassert.ok(- !usageHistory.getCompletedDetails().has(requestId),- "completedDetails should have been cleared after TTL"+ usageHistory.getCompletedDetails().has(requestId),+ "completedDetails should still be available after a 5-second polling gap");- // But DB should still have itconst dbEntry2 = await callLogs.getCallLogById(requestId);- assert.ok(dbEntry2, "DB should still have the entry after TTL expiry");+ assert.ok(dbEntry2, "DB should still have the entry after the polling gap");assert.equal((dbEntry2 as Record<string, unknown>).id,requestId,diff --git a/tests/unit/build/check-codeql-ratchet.test.ts b/tests/unit/build/check-codeql-ratchet.test.tsindex 57389d7f24..38a7583708 100644--- a/tests/unit/build/check-codeql-ratchet.test.ts+++ b/tests/unit/build/check-codeql-ratchet.test.ts@@ -8,22 +8,30 @@import test from "node:test";import assert from "node:assert/strict";// @ts-expect-error — .mjs helper has no type declarations; runtime shape is known.-import { parseCodeQLAlerts } from "../../../scripts/check/check-codeql-ratchet.mjs";+import {+ parseCodeQLAlerts,+ evaluateCodeqlRatchet,+} from "../../../scripts/check/check-codeql-ratchet.mjs";++type RatchetVerdict = { regressed: boolean; improved: boolean };+const evaluate = evaluateCodeqlRatchet as (current: number, baseline: number) => RatchetVerdict;// ---------------------------------------------------------------------------// Fixtures — synthetic GitHub code-scanning/alerts API responses// ---------------------------------------------------------------------------/** Helper to build a minimal alert object. */-function makeAlert(overrides: {- number?: number;- state?: "open" | "dismissed" | "fixed";- tool?: string;- ruleId?: string;- severity?: string;- securitySeverity?: string;- dismissedReason?: string | null;-} = {}) {+function makeAlert(+ overrides: {+ number?: number;+ state?: "open" | "dismissed" | "fixed";+ tool?: string;+ ruleId?: string;+ severity?: string;+ securitySeverity?: string;+ dismissedReason?: string | null;+ } = {}+) {return {number: overrides.number ?? 1,state: overrides.state ?? "open",@@ -92,17 +100,13 @@ test("parseCodeQLAlerts: array vazio retorna alertCount=0", () => {// ---------------------------------------------------------------------------test("parseCodeQLAlerts: alerta dismissed NÃO conta (Hard Rule #14)", () => {- const alerts = [- makeAlert({ state: "dismissed", dismissedReason: "false positive" }),- ];+ const alerts = [makeAlert({ state: "dismissed", dismissedReason: "false positive" })];const result = parseCodeQLAlerts(alerts);assert.equal(result.alertCount, 0, "dismissed alert must not be counted");});test("parseCodeQLAlerts: alerta dismissed com razão 'used in tests' NÃO conta", () => {- const alerts = [- makeAlert({ state: "dismissed", dismissedReason: "used in tests" }),- ];+ const alerts = [makeAlert({ state: "dismissed", dismissedReason: "used in tests" })];const result = parseCodeQLAlerts(alerts);assert.equal(result.alertCount, 0);});@@ -122,9 +126,7 @@ test("parseCodeQLAlerts: alerta dismissed independente da razão NÃO conta", ()// ---------------------------------------------------------------------------test("parseCodeQLAlerts: alerta fixed NÃO conta", () => {- const alerts = [- makeAlert({ state: "fixed" as "open" | "dismissed" | "fixed" }),- ];+ const alerts = [makeAlert({ state: "fixed" as "open" | "dismissed" | "fixed" })];const result = parseCodeQLAlerts(alerts);assert.equal(result.alertCount, 0, "fixed alerts are not open, must not count");});@@ -276,9 +278,50 @@ test("parseCodeQLAlerts: alerta sem rule retorna byRule com 'unknown'", () => {test("parseCodeQLAlerts: dismissed com mesmo ruleId que open — dismissed não aparece em byRule", () => {const alerts = [makeAlert({ number: 1, state: "open", ruleId: "js/sql-injection" }),- makeAlert({ number: 2, state: "dismissed", ruleId: "js/sql-injection", dismissedReason: "false positive" }),+ makeAlert({+ number: 2,+ state: "dismissed",+ ruleId: "js/sql-injection",+ dismissedReason: "false positive",+ }),];const result = parseCodeQLAlerts(alerts);assert.equal(result.alertCount, 1);assert.equal(result.byRule["js/sql-injection"], 1, "only the open alert should appear in byRule");});++// ---------------------------------------------------------------------------+// evaluateCodeqlRatchet — ratchet direction:down (Task 7.3 promote to blocking)+// Mirror of evaluateDeadCode: regression when measured > baseline; the baseline+// is 0 (clean), so ANY open CodeQL alert is a regression that blocks.+// ---------------------------------------------------------------------------++test("evaluateCodeqlRatchet: equal to baseline passes (0 vs 0 — clean)", () => {+ const r = evaluate(0, 0);+ assert.equal(r.regressed, false);+ assert.equal(r.improved, false);+});++test("evaluateCodeqlRatchet: one more alert than baseline 0 is a regression", () => {+ const r = evaluate(1, 0);+ assert.equal(r.regressed, true, "a single new open CodeQL alert must block");+ assert.equal(r.improved, false);+});++test("evaluateCodeqlRatchet: fewer alerts than a non-zero baseline is an improvement", () => {+ const r = evaluate(2, 5);+ assert.equal(r.regressed, false);+ assert.equal(r.improved, true);+});++test("evaluateCodeqlRatchet: zero alerts against a non-zero baseline is a maximum improvement", () => {+ const r = evaluate(0, 5);+ assert.equal(r.regressed, false);+ assert.equal(r.improved, true);+});++test("evaluateCodeqlRatchet: strict integer comparison — any increase regresses", () => {+ assert.equal(evaluate(6, 5).regressed, true);+ assert.equal(evaluate(5, 5).regressed, false);+ assert.equal(evaluate(4, 5).regressed, false);+});diff --git a/tests/unit/build/check-openapi-breaking.test.ts b/tests/unit/build/check-openapi-breaking.test.tsnew file mode 100644index 0000000000..b7b8db34cb--- /dev/null+++ b/tests/unit/build/check-openapi-breaking.test.ts@@ -0,0 +1,174 @@+// tests/unit/build/check-openapi-breaking.test.ts+// TDD unit tests for scripts/check/check-openapi-breaking.mjs — Fase 8 B.4 oasdiff.+//+// Strategy:+// • parseOasdiffBreaking() — pure parser, tested with synthetic oasdiff JSON+// (the REAL shape emitted by `oasdiff breaking --format json`, verified at 1.19.1).+// • binary-absent SKIP — spawn the gate with a PATH stripped of oasdiff and assert+// it prints `openapiBreaking=SKIP reason=binary-absent` and exits 0 (advisory).+import test from "node:test";+import assert from "node:assert/strict";+import { spawnSync } from "node:child_process";+import path from "node:path";+import { fileURLToPath } from "node:url";+// @ts-expect-error — .mjs helper has no type declarations; runtime shape is known.+import { parseOasdiffBreaking } from "../../../scripts/check/check-openapi-breaking.mjs";++const __dirname = path.dirname(fileURLToPath(import.meta.url));+const REPO_ROOT = path.resolve(__dirname, "../../..");+const GATE = path.join(REPO_ROOT, "scripts/check/check-openapi-breaking.mjs");++// ---------------------------------------------------------------------------+// Fixtures — REAL shape of `oasdiff breaking --format json` (oasdiff 1.19.1).+// e.g. removing a path emits:+// {"id":"api-path-removed-without-deprecation","text":"api path removed...",+// "level":3,"operation":"GET","path":"/api/bar","section":"paths",...}+// ---------------------------------------------------------------------------++function makeBreaking(+ overrides: {+ id?: string;+ text?: string;+ level?: number;+ operation?: string;+ path?: string;+ } = {}+) {+ return {+ id: overrides.id ?? "api-path-removed-without-deprecation",+ text: overrides.text ?? "api path removed without deprecation",+ level: overrides.level ?? 3,+ operation: overrides.operation ?? "GET",+ path: overrides.path ?? "/api/foo",+ section: "paths",+ baseSource: { file: "/tmp/base.yaml", line: 12, column: 5 },+ fingerprint: "33e8aeb41d4a",+ };+}++// ---------------------------------------------------------------------------+// parseOasdiffBreaking — empty / invalid input+// ---------------------------------------------------------------------------++test("parseOasdiffBreaking: null retorna count=0", () => {+ const r = parseOasdiffBreaking(null);+ assert.equal(r.count, 0);+ assert.deepEqual(r.byId, {});+ assert.deepEqual(r.byPath, {});+ assert.deepEqual(r.items, []);+});++test("parseOasdiffBreaking: undefined retorna count=0", () => {+ const r = parseOasdiffBreaking(undefined as unknown as null);+ assert.equal(r.count, 0);+});++test("parseOasdiffBreaking: array vazio (sem breaking change) retorna count=0", () => {+ const r = parseOasdiffBreaking([]);+ assert.equal(r.count, 0);+ assert.deepEqual(r.byId, {});+ assert.deepEqual(r.byPath, {});+});++test("parseOasdiffBreaking: objeto (não-array) retorna count=0", () => {+ const r = parseOasdiffBreaking({ id: "x" } as unknown as null);+ assert.equal(r.count, 0);+});++test("parseOasdiffBreaking: string retorna count=0", () => {+ const r = parseOasdiffBreaking("breaking" as unknown as null);+ assert.equal(r.count, 0);+});++test("parseOasdiffBreaking: número retorna count=0", () => {+ const r = parseOasdiffBreaking(42 as unknown as null);+ assert.equal(r.count, 0);+});++// ---------------------------------------------------------------------------+// parseOasdiffBreaking — counting+// ---------------------------------------------------------------------------++test("parseOasdiffBreaking: 1 breaking change retorna count=1", () => {+ const r = parseOasdiffBreaking([makeBreaking()]);+ assert.equal(r.count, 1);+ assert.equal(r.items.length, 1);+});++test("parseOasdiffBreaking: 3 breaking changes retorna count=3", () => {+ const r = parseOasdiffBreaking([+ makeBreaking({ id: "api-path-removed-without-deprecation", path: "/api/a" }),+ makeBreaking({ id: "request-parameter-became-required", path: "/api/b" }),+ makeBreaking({ id: "response-property-removed", path: "/api/c" }),+ ]);+ assert.equal(r.count, 3);+});++test("parseOasdiffBreaking: ignora entradas null/não-objeto no array", () => {+ const r = parseOasdiffBreaking([makeBreaking(), null, 5, makeBreaking({ path: "/api/x" })]);+ assert.equal(r.count, 2);+});++// ---------------------------------------------------------------------------+// parseOasdiffBreaking — grouping+// ---------------------------------------------------------------------------++test("parseOasdiffBreaking: agrupa por id em byId", () => {+ const r = parseOasdiffBreaking([+ makeBreaking({ id: "api-path-removed-without-deprecation", path: "/api/a" }),+ makeBreaking({ id: "response-property-removed", path: "/api/b" }),+ makeBreaking({ id: "api-path-removed-without-deprecation", path: "/api/c" }),+ ]);+ assert.equal(r.byId["api-path-removed-without-deprecation"], 2);+ assert.equal(r.byId["response-property-removed"], 1);+});++test("parseOasdiffBreaking: agrupa por path em byPath", () => {+ const r = parseOasdiffBreaking([+ makeBreaking({ path: "/api/chat", operation: "POST" }),+ makeBreaking({ path: "/api/chat", operation: "GET" }),+ makeBreaking({ path: "/api/models" }),+ ]);+ assert.equal(r.byPath["/api/chat"], 2);+ assert.equal(r.byPath["/api/models"], 1);+});++test("parseOasdiffBreaking: id ausente usa 'unknown'", () => {+ const r = parseOasdiffBreaking([{ path: "/api/x", text: "weird" }]);+ assert.equal(r.count, 1);+ assert.equal(r.byId["unknown"], 1);+});++test("parseOasdiffBreaking: path ausente usa 'unknown'", () => {+ const r = parseOasdiffBreaking([{ id: "some-rule", text: "weird" }]);+ assert.equal(r.count, 1);+ assert.equal(r.byPath["unknown"], 1);+});++// ---------------------------------------------------------------------------+// Integration — binary-absent SKIP (advisory, exit 0)+//+// Run the gate with a PATH that does NOT contain oasdiff. `findOasdiff()` then+// returns null and the gate must SKIP gracefully with exit 0. We point HOME to a+// temp dir too so a user-local ~/.local/bin/oasdiff cannot leak into the lookup.+// ---------------------------------------------------------------------------++test("gate: SKIP graceful (exit 0) quando oasdiff ausente do PATH", () => {+ const res = spawnSync(process.execPath, [GATE, "--quiet"], {+ cwd: REPO_ROOT,+ encoding: "utf8",+ timeout: 30_000,+ env: {+ // Minimal PATH with only the dir holding the node binary — no oasdiff.+ PATH: path.dirname(process.execPath),+ HOME: "/nonexistent-home-for-oasdiff-test",+ BASE_REF: "origin/release/v3.8.26",+ },+ });+ assert.equal(res.status, 0, `expected exit 0, got ${res.status}; stderr: ${res.stderr}`);+ assert.match(+ res.stdout,+ /openapiBreaking=SKIP reason=binary-absent/,+ `expected binary-absent SKIP, got stdout: ${res.stdout}`+ );+});diff --git a/tests/unit/build/check-tracked-artifacts.test.ts b/tests/unit/build/check-tracked-artifacts.test.tsindex f3edfc83fd..99d8c05960 100644--- a/tests/unit/build/check-tracked-artifacts.test.ts+++ b/tests/unit/build/check-tracked-artifacts.test.ts@@ -30,6 +30,11 @@ test("checkTrackedArtifacts: quality-metrics.json is flagged", () => {assert.equal(result.length, 1);});+test("checkTrackedArtifacts: config/quality/quality-metrics.json is flagged", () => {+ const result = checkTrackedArtifacts(["config/quality/quality-metrics.json"]);+ assert.equal(result.length, 1);+});+test("checkTrackedArtifacts: symlink mode (120000) is flagged", () => {const result = checkTrackedArtifacts([], ["node_modules"]);assert.equal(result.length, 1);diff --git a/tests/unit/build/opencode-plugin-esm-only.test.ts b/tests/unit/build/opencode-plugin-esm-only.test.tsnew file mode 100644index 0000000000..030a7b5262--- /dev/null+++ b/tests/unit/build/opencode-plugin-esm-only.test.ts@@ -0,0 +1,65 @@+import test from "node:test";+import assert from "node:assert/strict";+import { readFileSync } from "node:fs";+import { fileURLToPath } from "node:url";++// Regression guard for #3883: the @omniroute/opencode-plugin must ship an+// ESM-only bundle. OpenCode's Bun-based plugin loader resolves the package+// `main`/`exports` and applies CJS-to-ESM interop on a dual CJS bundle, which+// turns `mod.default` into the whole exports namespace, fails V1 plugin+// detection, and makes the loader throw "Plugin export is not a function".+// Shipping ESM-only (with a `./runtime` subpath) keeps `mod.default` the V1+// plugin object so the loader registers it. Do NOT re-introduce a CJS bundle.++const PKG_URL = new URL("../../../@omniroute/opencode-plugin/package.json", import.meta.url);+const TSUP_URL = new URL("../../../@omniroute/opencode-plugin/tsup.config.ts", import.meta.url);++function readJson(url: URL): Record<string, unknown> {+ return JSON.parse(readFileSync(fileURLToPath(url), "utf8"));+}++test("opencode-plugin package.json ships ESM-only (no CJS bundle)", () => {+ const pkg = readJson(PKG_URL);++ // main must point at the ESM build, never the .cjs bundle.+ assert.equal(pkg.main, "./dist/index.js", "main must be the ESM build");+ assert.equal(+ typeof pkg.main === "string" && pkg.main.endsWith(".cjs"),+ false,+ "main must not be a .cjs bundle"+ );+ // The legacy dual-bundle `module` field should be gone.+ assert.equal("module" in pkg, false, "the dual-bundle `module` field must be removed");++ const exports = pkg.exports as Record<string, unknown> | undefined;+ assert.ok(exports && typeof exports === "object", "exports map must exist");++ const root = exports["."] as Record<string, unknown>;+ assert.ok(root && typeof root === "object", 'exports["."] must exist');+ assert.equal(root.import, "./dist/index.js", 'exports["."].import must be the ESM build');+ // A `require` condition would re-introduce the CJS path the loader chokes on.+ assert.equal("require" in root, false, 'exports["."] must not declare a `require` condition');++ // The `./runtime` subpath used by the OpenCode loader must resolve to ESM.+ const runtime = exports["./runtime"] as Record<string, unknown>;+ assert.ok(runtime && typeof runtime === "object", 'exports["./runtime"] must exist');+ assert.equal(runtime.import, "./dist/index.js", 'exports["./runtime"].import must be ESM');+});++test("opencode-plugin tsup config builds ESM-only with cjsInterop disabled", () => {+ const tsup = readFileSync(fileURLToPath(TSUP_URL), "utf8");++ const formatMatch = tsup.match(/format:\s*\[([^\]]*)\]/);+ assert.ok(formatMatch, "tsup config must declare a format array");+ const formats = formatMatch[1]+ .split(",")+ .map((s) => s.trim().replace(/['"]/g, ""))+ .filter(Boolean);+ assert.deepEqual(formats, ["esm"], "tsup must build esm only (no cjs)");++ assert.equal(+ /cjsInterop:\s*true/.test(tsup),+ false,+ "cjsInterop must not be true for an ESM-only build"+ );+});diff --git a/tests/unit/chat-openai-compat-providers.test.ts b/tests/unit/chat-openai-compat-providers.test.tsindex 72ca9e31d7..0e31b5183a 100644--- a/tests/unit/chat-openai-compat-providers.test.ts+++ b/tests/unit/chat-openai-compat-providers.test.ts@@ -40,6 +40,7 @@ const CHAT_OPENAI_COMPAT_PROVIDER_IDS = ["predibase","bytez","reka",+ "byteplus",];test("chat-openai-compat providers are registered across provider metadata, registry and local catalog", () => {diff --git a/tests/unit/check-deps.test.ts b/tests/unit/check-deps.test.tsindex 864493efcc..6adaf44c48 100644--- a/tests/unit/check-deps.test.ts+++ b/tests/unit/check-deps.test.ts@@ -18,17 +18,13 @@ test("no unapproved deps when all are allowlisted", () => {});test("flags a dependency not on the allowlist (potential slopsquat)", () => {- assert.deepEqual(- findUnapprovedDeps(["react", "reactt-router"], new Set(["react"])),- ["reactt-router"]- );+ assert.deepEqual(findUnapprovedDeps(["react", "reactt-router"], new Set(["react"])), [+ "reactt-router",+ ]);});test("flags multiple new deps, preserves order, de-dupes", () => {- assert.deepEqual(- findUnapprovedDeps(["a", "b", "a", "c"], new Set(["a"])),- ["b", "c"]- );+ assert.deepEqual(findUnapprovedDeps(["a", "b", "a", "c"], new Set(["a"])), ["b", "c"]);});// --- 6A.8: automatic workspace discovery ---@@ -64,7 +60,7 @@ test("6A.8: discoverManifests does NOT include node_modules, .next, or deep refe});test("6A.8: all workspace package deps are in the allowlist (gate exits 0 with expanded scope)", () => {- const allowlistPath = path.join(repoRoot, "dependency-allowlist.json");+ const allowlistPath = path.join(repoRoot, "config/quality/dependency-allowlist.json");const allowlist = new Set(JSON.parse(fs.readFileSync(allowlistPath, "utf8")).allowed || []);const manifests = discoverManifests(repoRoot);const allDeps: string[] = [];@@ -80,7 +76,11 @@ test("6A.8: all workspace package deps are in the allowlist (gate exits 0 with e);}const unapproved = findUnapprovedDeps(allDeps, allowlist);- assert.deepEqual(unapproved, [], `expected all deps to be approved, got: ${unapproved.join(", ")}`);+ assert.deepEqual(+ unapproved,+ [],+ `expected all deps to be approved, got: ${unapproved.join(", ")}`+ );});// --- 6A.8: stale-allowlist enforcement ---@@ -102,10 +102,9 @@ test("6A.8 stale: a dep removed from all manifests is detected as stale in allowtest("7.8 evaluateDepAge: package older than 72h is OK", () => {const now = Date.now();const createdMs = now - 73 * 60 * 60 * 1000; // 73 hours ago- const { ok, ageHours } = (evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number })(- createdMs,- now- );+ const { ok, ageHours } = (+ evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number }+ )(createdMs, now);assert.ok(ok, "package older than 72h should be ok");assert.ok(ageHours >= 73, "ageHours should reflect elapsed time");});@@ -113,20 +112,18 @@ test("7.8 evaluateDepAge: package older than 72h is OK", () => {test("7.8 evaluateDepAge: package exactly at 72h boundary is OK (boundary inclusive)", () => {const now = Date.now();const createdMs = now - 72 * 60 * 60 * 1000; // exactly 72 hours ago- const { ok } = (evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number })(- createdMs,- now- );+ const { ok } = (+ evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number }+ )(createdMs, now);assert.ok(ok, "package at exactly 72h should be ok (inclusive boundary)");});test("7.8 evaluateDepAge: package published 1h ago is NOT OK", () => {const now = Date.now();const createdMs = now - 1 * 60 * 60 * 1000; // 1 hour ago- const { ok, ageHours } = (evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number })(- createdMs,- now- );+ const { ok, ageHours } = (+ evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number }+ )(createdMs, now);assert.ok(!ok, "package published 1h ago should NOT be ok");assert.ok(ageHours < 72, "ageHours should reflect < 72h");});@@ -135,28 +132,23 @@ test("7.8 evaluateDepAge: respects custom minAgeHours", () => {const now = Date.now();const createdMs = now - 10 * 60 * 60 * 1000; // 10 hours ago// With 24h minimum, 10h-old package should fail- const { ok: failWith24 } = (evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number })(- createdMs,- now,- 24- );+ const { ok: failWith24 } = (+ evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number }+ )(createdMs, now, 24);assert.ok(!failWith24, "10h-old package should fail with 24h minimum");// With 6h minimum, 10h-old package should pass- const { ok: passWith6 } = (evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number })(- createdMs,- now,- 6- );+ const { ok: passWith6 } = (+ evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number }+ )(createdMs, now, 6);assert.ok(passWith6, "10h-old package should pass with 6h minimum");});test("7.8 evaluateDepAge: future timestamp (time.created in future) is NOT OK", () => {const now = Date.now();const createdMs = now + 1000; // 1s in future (clock skew edge case)- const { ok, ageHours } = (evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number })(- createdMs,- now- );+ const { ok, ageHours } = (+ evaluateDepAge as (a: number, b: number, c?: number) => { ok: boolean; ageHours: number }+ )(createdMs, now);assert.ok(!ok, "future timestamp should not be ok");assert.ok(ageHours < 0, "ageHours should be negative for future timestamp");});@@ -169,11 +161,17 @@ test("7.8 evaluateDepAge: future timestamp (time.created in future) is NOT OK",// - any real npm package like "react" is found and old → does NOT appear in any listtest("7.8 auditNewDepsRegistry: empty dep list returns all-empty results", () => {- const result = (auditNewDepsRegistry as (deps: string[], minAge?: number, now?: number) => {- notFound: string[];- tooNew: Array<{ name: string; ageHours: number }>;- offline: string[];- })([], 72, Date.now());+ const result = (+ auditNewDepsRegistry as (+ deps: string[],+ minAge?: number,+ now?: number+ ) => {+ notFound: string[];+ tooNew: Array<{ name: string; ageHours: number }>;+ offline: string[];+ }+ )([], 72, Date.now());assert.deepEqual(result.notFound, []);assert.deepEqual(result.tooNew, []);assert.deepEqual(result.offline, []);diff --git a/tests/unit/check-docs-counts-sync.test.ts b/tests/unit/check-docs-counts-sync.test.tsnew file mode 100644index 0000000000..3c7256f6aa--- /dev/null+++ b/tests/unit/check-docs-counts-sync.test.ts@@ -0,0 +1,100 @@+import { test } from "node:test";+import assert from "node:assert";+import { execFileSync } from "node:child_process";+import path from "node:path";+import { fileURLToPath } from "node:url";+import {+ parseProviderTotal,+ tallyDrift,+ readProviderTotal,+ countLocales,+} from "../../scripts/check/check-docs-counts-sync.mjs";++// Explicit types for the .mjs exports — keep the test at 0 no-explicit-any warnings.+const parse = parseProviderTotal as (text: string) => number;+const tally = tallyDrift as (+ checks: {+ label: string;+ actual: number;+ docKey: string;+ strict: boolean;+ files: string[];+ }[],+ getContent: (file: string) => string | null+) => { strict: number; soft: number; lines: string[] };+const readTotal = readProviderTotal as () => number;+const locales = countLocales as () => number;++const here = path.dirname(fileURLToPath(import.meta.url));+const GATE = path.resolve(here, "../../scripts/check/check-docs-counts-sync.mjs");++// --- parseProviderTotal (pure) -------------------------------------------------------++test("parses the canonical provider total from the auto-generated catalog text", () => {+ assert.equal(parse("Total providers: **226**. See category breakdown below."), 226);+});++test("returns 0 when no total marker is present", () => {+ assert.equal(parse("# Provider Reference\n\nNo total here."), 0);+ assert.equal(parse(""), 0);+});++// --- tallyDrift (pure) ---------------------------------------------------------------++const strictCheck = {+ label: "Provider count",+ actual: 226,+ docKey: "providers",+ strict: true,+ files: ["README.md", "AGENTS.md"],+};++test("no drift when every file mentions the real count", () => {+ const { strict, soft } = tally([strictCheck], () => "we have 226 providers");+ assert.equal(strict, 0);+ assert.equal(soft, 0);+});++test("STRICT drift is counted when a file omits the real count", () => {+ const { strict, soft } = tally([strictCheck], (f) =>+ f === "README.md" ? "we have 226 providers" : "we have 177 providers"+ );+ assert.equal(strict, 1, "AGENTS.md (177) should register one strict drift");+ assert.equal(soft, 0);+});++test("SOFT drift does not count as strict", () => {+ const softCheck = { ...strictCheck, strict: false };+ const { strict, soft } = tally([softCheck], () => "no number here");+ assert.equal(strict, 0);+ assert.equal(soft, 2, "both files miss → two soft drifts");+});++test("a check with actual=0 is skipped (source count undetermined)", () => {+ const zero = { ...strictCheck, actual: 0 };+ const { strict, soft } = tally([zero], () => null);+ assert.equal(strict, 0);+ assert.equal(soft, 0);+});++test("a missing file (null content) registers drift, not a crash", () => {+ const { strict } = tally([strictCheck], () => null);+ assert.equal(strict, 2);+});++// --- live source readers (smoke) -----------------------------------------------------++test("readProviderTotal reads a real, positive total from the catalog", () => {+ assert.ok(readTotal() > 100, "provider catalog total should be > 100");+});++test("countLocales reads a real, positive locale count from config/i18n.json", () => {+ assert.ok(locales() >= 40, "i18n config should define at least 40 locales");+});++// --- live gate smoke -----------------------------------------------------------------++test("the gate exits 0 against the current (synced) repo state", () => {+ // Throws if exit code is non-zero; current docs are synced so this must pass.+ assert.doesNotThrow(() => execFileSync("node", [GATE], { encoding: "utf8", stdio: "pipe" }));+});diff --git a/tests/unit/check-known-symbols.test.ts b/tests/unit/check-known-symbols.test.tsindex 7ae1de2652..7053e39f15 100644--- a/tests/unit/check-known-symbols.test.ts+++ b/tests/unit/check-known-symbols.test.ts@@ -20,6 +20,13 @@ import {diffCloudAgents,type ExecutorLike,} from "../../scripts/check/check-known-symbols.ts";+import { reportStaleEntries } from "../../scripts/check/lib/allowlist.mjs";+import { ROUTING_STRATEGY_VALUES } from "../../src/shared/constants/routingStrategies.ts";+import fs from "node:fs";+import path from "node:path";+import { fileURLToPath } from "node:url";++const REPO_ROOT = path.resolve(fileURLToPath(import.meta.url), "../../..");// ───────────────────────────────────────────────────────────────────────────// (2) COMBO STRATEGIES — extractHandledStrategies + diffComboStrategies@@ -174,9 +181,57 @@ test("findNewTranslatorPairs returns [] when live is a subset of frozen", () =>// Allowlist / snapshot sanity (documented frozen sets stay well-formed)// ───────────────────────────────────────────────────────────────────────────-test("IMPLICIT_DEFAULT_STRATEGIES documents `priority` with a justification", () => {- assert.ok(Object.prototype.hasOwnProperty.call(IMPLICIT_DEFAULT_STRATEGIES, "priority"));- assert.ok(IMPLICIT_DEFAULT_STRATEGIES.priority.length > 20);+test("IMPLICIT_DEFAULT_STRATEGIES: every documented key carries a non-trivial justification", () => {+ // The map may be empty (all canonical strategies are referenced in combo.ts), but any+ // entry that DOES exist must explain why the strategy has no explicit dispatch branch.+ for (const [key, justification] of Object.entries(IMPLICIT_DEFAULT_STRATEGIES)) {+ assert.ok(typeof justification === "string" && justification.length > 20, `weak/missing justification for "${key}"`);+ }+});++// --- stale-allowlist enforcement (6A.3) ---++test("stale-enforcement: an IMPLICIT_DEFAULT_STRATEGIES key now referenced in dispatch is reported as stale", () => {+ // "priority" gained a `strategy === "priority"` reference in combo.ts, so it is now in+ // the handled set and no longer in canonicalNotHandled — an implicit-default for it would+ // suppress nothing → stale.+ const liveImplicitNeeded: string[] = []; // canonicalNotHandled WITHOUT the allowlist+ const stale = (reportStaleEntries as (a: string[], l: string[], g: string) => string[])(+ ["priority"],+ liveImplicitNeeded,+ "known-symbols:combo"+ );+ assert.deepEqual(stale, ["priority"]);+});++test("stale-enforcement: an IMPLICIT_DEFAULT_STRATEGIES key still uncovered by dispatch is NOT stale", () => {+ // A canonical strategy with no `strategy === "..."` reference IS still suppressed by the+ // implicit-default, so the entry is live (must stay).+ const liveImplicitNeeded = ["priority"]; // priority would be canonicalNotHandled without it+ const stale = (reportStaleEntries as (a: string[], l: string[], g: string) => string[])(+ ["priority"],+ liveImplicitNeeded,+ "known-symbols:combo"+ );+ assert.deepEqual(stale, []);+});++test("stale-enforcement: live repo IMPLICIT_DEFAULT_STRATEGIES has no stale entries", () => {+ // Every key must still be a canonical strategy that lacks a `strategy === "..."` reference+ // in combo.ts; otherwise the suppression is dead and must be removed.+ const comboSource = fs.readFileSync(path.join(REPO_ROOT, "open-sse/services/combo.ts"), "utf8");+ const handled = extractHandledStrategies(comboSource);+ const liveImplicitNeeded = diffComboStrategies(+ ROUTING_STRATEGY_VALUES as readonly string[],+ handled,+ {}+ ).canonicalNotHandled;+ const stale = (reportStaleEntries as (a: string[], l: string[], g: string) => string[])(+ Object.keys(IMPLICIT_DEFAULT_STRATEGIES),+ liveImplicitNeeded,+ "known-symbols:combo"+ );+ assert.deepEqual(stale, [], `IMPLICIT_DEFAULT_STRATEGIES has stale entries: ${stale.join(", ")}`);});test("KNOWN_TRANSLATOR_PAIRS is a non-empty, well-formed, deduped from:to snapshot", () => {diff --git a/tests/unit/claude-code-compatible-helpers.test.ts b/tests/unit/claude-code-compatible-helpers.test.tsindex 18c45e5781..13d00fc482 100644--- a/tests/unit/claude-code-compatible-helpers.test.ts+++ b/tests/unit/claude-code-compatible-helpers.test.ts@@ -6,6 +6,7 @@ const {CLAUDE_CODE_COMPATIBLE_DEFAULT_MODELS_PATH,CLAUDE_CODE_COMPATIBLE_DEFAULT_MAX_TOKENS,CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA,+ CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA,CLAUDE_CODE_COMPATIBLE_STAINLESS_TIMEOUT_SECONDS,isClaudeCodeCompatibleProvider,stripAnthropicMessagesSuffix,@@ -14,6 +15,7 @@ const {joinClaudeCodeCompatibleUrl,buildClaudeCodeCompatibleHeaders,buildClaudeCodeCompatibleValidationPayload,+ resolveClaudeCodeCompatibleAnthropicBeta,resolveClaudeCodeCompatibleSessionId,} = await import("../../open-sse/services/claudeCodeCompatible.ts");@@ -61,6 +63,10 @@ test("Claude Code compatible beta set matches the stable API-key Claude CLI profassert.ok(CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA.includes("claude-code-20250219"));assert.ok(CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA.includes("interleaved-thinking-2025-05-14"));assert.ok(CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA.includes("effort-2025-11-24"));+ assert.equal(+ CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA.includes(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA),+ false+ );assert.equal(CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA.includes("oauth-2025-04-20"), false);assert.equal(CLAUDE_CODE_COMPATIBLE_ANTHROPIC_BETA.includes("context-management-2025-06-27"),@@ -72,6 +78,33 @@ test("Claude Code compatible beta set matches the stable API-key Claude CLI prof);});+test("Claude Code compatible redacted thinking beta is explicit opt-in", () => {+ assert.equal(+ resolveClaudeCodeCompatibleAnthropicBeta({}).includes(+ CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA+ ),+ false+ );+ assert.equal(+ resolveClaudeCodeCompatibleAnthropicBeta({ redactThinking: true }).includes(+ CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA+ ),+ true+ );+ assert.equal(+ buildClaudeCodeCompatibleHeaders("sk-demo", true)["anthropic-beta"].includes(+ CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA+ ),+ false+ );+ assert.equal(+ buildClaudeCodeCompatibleHeaders("sk-demo", true, undefined, {+ redactThinking: true,+ })["anthropic-beta"].includes(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA),+ true+ );+});+test("resolveClaudeCodeCompatibleSessionId prefers explicit session headers and generates a fallback id", () => {const headers = new Headers({"x-session-id": "legacy-session",diff --git a/tests/unit/combo-auto-candidate-expansion.test.ts b/tests/unit/combo-auto-candidate-expansion.test.tsindex 61d51200f2..0d54d63048 100644--- a/tests/unit/combo-auto-candidate-expansion.test.ts+++ b/tests/unit/combo-auto-candidate-expansion.test.ts@@ -92,6 +92,29 @@ test("expandAutoComboCandidatePool is a no-op when an explicit candidatePool exiassert.equal(result[0].modelStr, "openai/gpt-4o");});+test("expandAutoComboCandidatePool falls through to active connections when candidatePool is an empty array", async () => {+ await providersDb.createProviderConnection({+ provider: "openai",+ authType: "apikey",+ name: "OpenAI",+ apiKey: "sk-test-openai",+ defaultModel: "gpt-4o-mini",+ });++ const expanded = await combo.expandAutoComboCandidatePool([], {+ config: { auto: { candidatePool: [] } },+ });++ // An empty candidatePool should NOT trigger early return — the function+ // should fall through and expand from active connections instead.+ assert.ok(+ expanded.length > 0,+ "expected expansion from active connections despite empty candidatePool"+ );+ const openaiTargets = expanded.filter((t) => t.provider === "openai");+ assert.ok(openaiTargets.length > 0, "expected openai targets to be expanded");+});+test("expandAutoComboCandidatePool does not duplicate an already-present modelStr", async () => {await providersDb.createProviderConnection({provider: "openai",diff --git a/tests/unit/combo-strategy-fallbacks.test.ts b/tests/unit/combo-strategy-fallbacks.test.tsindex f6e38ed34c..f8ab628faa 100644--- a/tests/unit/combo-strategy-fallbacks.test.ts+++ b/tests/unit/combo-strategy-fallbacks.test.ts@@ -18,7 +18,8 @@ const settingsDb = await import("../../src/lib/db/settings.ts");const { resetAllComboMetrics } = await import("../../open-sse/services/comboMetrics.ts");const { resetAllCircuitBreakers, getCircuitBreaker } =await import("../../src/shared/utils/circuitBreaker.ts");-const { resetAll: resetAllSemaphores } = await import("../../open-sse/services/rateLimitSemaphore.ts");+const { resetAll: resetAllSemaphores } =+ await import("../../open-sse/services/rateLimitSemaphore.ts");const { _resetAllDecks } = await import("../../src/shared/utils/shuffleDeck.ts");const { clearSessions } = await import("../../open-sse/services/sessionManager.ts");@@ -290,6 +291,74 @@ test("strict-random falls back to the remaining target when the deck pick fails"assert.notEqual(calls[0], calls[1]);});+test("round-robin uses existing stickyRoundRobinLimit for combo target batching", async () => {+ const calls: string[] = [];+ const combo = {+ name: "rr-sticky-combo-batches",+ strategy: "round-robin",+ models: ["openai/a", "claude/b", "gemini/c"],+ config: { maxRetries: 0, retryDelayMs: 0, fallbackDelayMs: 0 },+ };++ for (let i = 0; i < 10; i += 1) {+ const result = await handleComboChat({+ body: {},+ combo,+ handleSingleModel: async (_body: any, modelStr: string) => {+ calls.push(modelStr);+ return okResponse();+ },+ isModelAvailable: async () => true,+ log: createLog(),+ settings: { stickyRoundRobinLimit: 3 },+ allCombos: null,+ });+ assert.equal(result.ok, true);+ }++ assert.deepEqual(calls, [+ "openai/a",+ "openai/a",+ "openai/a",+ "claude/b",+ "claude/b",+ "claude/b",+ "gemini/c",+ "gemini/c",+ "gemini/c",+ "openai/a",+ ]);+});++test("round-robin sticky batching fallback success becomes sticky target", async () => {+ const calls: string[] = [];+ const combo = {+ name: "rr-sticky-fallback-success",+ strategy: "round-robin",+ models: ["openai/a", "claude/b", "gemini/c"],+ config: { maxRetries: 0, retryDelayMs: 0, fallbackDelayMs: 0 },+ };++ for (let i = 0; i < 4; i += 1) {+ const result = await handleComboChat({+ body: {},+ combo,+ handleSingleModel: async (_body: any, modelStr: string) => {+ calls.push(modelStr);+ if (modelStr === "openai/a") return errorResponse(503, "a is down");+ return okResponse();+ },+ isModelAvailable: async () => true,+ log: createLog(),+ settings: { stickyRoundRobinLimit: 2 },+ allCombos: null,+ });+ assert.equal(result.ok, true);+ }++ assert.deepEqual(calls, ["openai/a", "claude/b", "claude/b", "gemini/c", "gemini/c"]);+});+test("strict-random survives a stale deck entry after a target is removed", async () => {const comboTwoTargets = {name: "strict-random-stale",diff --git a/tests/unit/compression/strategySelector-cache-aware.test.ts b/tests/unit/compression/strategySelector-cache-aware.test.tsnew file mode 100644index 0000000000..c7d1963282--- /dev/null+++ b/tests/unit/compression/strategySelector-cache-aware.test.ts@@ -0,0 +1,58 @@+/**+ * Tests for #3890: the cache-aware `skipSystemPrompt` flag was computed by+ * getCacheAwareStrategy() but dropped by selectCompressionStrategy() (which can only+ * return a mode string). resolveCacheAwareConfig() applies it: in a caching context the+ * system prompt must stay uncompressed (it is part of the cacheable prefix) even when the+ * operator disabled preserveSystemPrompt.+ */++import { describe, it } from "node:test";+import assert from "node:assert/strict";+import { resolveCacheAwareConfig } from "../../../open-sse/services/compression/strategySelector.ts";+import type { CompressionConfig } from "../../../open-sse/services/compression/types.ts";++function cfg(overrides: Partial<CompressionConfig> = {}): CompressionConfig {+ return {+ enabled: true,+ defaultMode: "standard",+ autoTriggerTokens: 0,+ cacheMinutes: 5,+ preserveSystemPrompt: true,+ comboOverrides: {},+ ...overrides,+ } as CompressionConfig;+}++describe("resolveCacheAwareConfig (#3890)", () => {+ it("forces preserveSystemPrompt on for a caching request that disabled it", () => {+ const out = resolveCacheAwareConfig(+ cfg({ preserveSystemPrompt: false }),+ { messages: [{ role: "system", content: "x", cache_control: { type: "ephemeral" } }] },+ { provider: "anthropic", targetFormat: "claude" }+ );+ assert.equal(out.preserveSystemPrompt, true);+ });++ it("leaves a non-caching request untouched (preserveSystemPrompt stays false)", () => {+ const out = resolveCacheAwareConfig(+ cfg({ preserveSystemPrompt: false }),+ { messages: [{ role: "system", content: "x" }] },+ { provider: "openai" }+ );+ assert.equal(out.preserveSystemPrompt, false);+ });++ it("returns the same config object when there is no body", () => {+ const base = cfg({ preserveSystemPrompt: false });+ assert.equal(resolveCacheAwareConfig(base), base);+ });++ it("does not change a config that already preserves the system prompt", () => {+ const out = resolveCacheAwareConfig(+ cfg({ preserveSystemPrompt: true }),+ { messages: [{ role: "system", content: "x", cache_control: { type: "ephemeral" } }] },+ { provider: "anthropic", targetFormat: "claude" }+ );+ assert.equal(out.preserveSystemPrompt, true);+ });+});diff --git a/tests/unit/executor-default-base.test.ts b/tests/unit/executor-default-base.test.tsindex 1cbe3e0e86..95657cf61e 100644--- a/tests/unit/executor-default-base.test.ts+++ b/tests/unit/executor-default-base.test.ts@@ -14,6 +14,7 @@ import { PROVIDERS } from "../../open-sse/config/constants.ts";import {CLAUDE_CODE_COMPATIBLE_ANTHROPIC_VERSION,CLAUDE_CODE_COMPATIBLE_DEFAULT_CHAT_PATH,+ CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA,CONTEXT_1M_BETA_HEADER,} from "../../open-sse/services/claudeCodeCompatible.ts";@@ -103,10 +104,7 @@ test("DefaultExecutor.buildUrl uses full chat endpoints for hosted OpenAI-compatbazaarlink.buildUrl("auto:free", true),"https://bazaarlink.ai/api/v1/chat/completions");- assert.equal(- crof.buildUrl("gpt-4.1", true),- "https://crof.ai/v1/chat/completions"- );+ assert.equal(crof.buildUrl("gpt-4.1", true), "https://crof.ai/v1/chat/completions");});test("DefaultExecutor.buildUrl handles openai-compatible and anthropic-compatible providers", () => {@@ -570,7 +568,7 @@ test("DefaultExecutor.execute uses CC-compatible connection defaults to append 1apiKey: "cc-key",providerSpecificData: {ccSessionId: "session-1",- requestDefaults: { context1m: true },+ requestDefaults: { context1m: true, redactThinking: true },},},extendedContext: false,@@ -598,7 +596,15 @@ test("DefaultExecutor.execute uses CC-compatible connection defaults to append 1}assert.equal(calls[0].headers["anthropic-beta"].includes(CONTEXT_1M_BETA_HEADER), false);+ assert.equal(+ calls[0].headers["anthropic-beta"].includes(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA),+ false+ );assert.equal(calls[1].headers["anthropic-beta"].includes(CONTEXT_1M_BETA_HEADER), true);+ assert.equal(+ calls[1].headers["anthropic-beta"].includes(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA),+ true+ );assert.equal(calls[2].headers["anthropic-beta"], undefined);});@@ -742,6 +748,44 @@ test("DefaultExecutor.transformRequest respects disableStreamOptions for OpenAIassert.deepEqual((chatResultEnabled as any).stream_options, { include_usage: true });});+test("DefaultExecutor.transformRequest injects OpenRouter connection preset", () => {+ const executor = new DefaultExecutor("openrouter");+ const body = { model: "openai/gpt-4", messages: [{ role: "user", content: "hi" }] };++ const result = executor.transformRequest("openai/gpt-4", body, true, {+ providerSpecificData: { preset: " email-copywriter " },+ });++ assert.equal((result as any).preset, "email-copywriter");+ assert.deepEqual((result as any).stream_options, { include_usage: true });+ assert.equal((body as any).preset, undefined);++ const explicit = executor.transformRequest(+ "openai/gpt-4",+ { ...body, preset: "client-preset" },+ true,+ { providerSpecificData: { preset: "connection-preset" } }+ );++ assert.equal((explicit as any).preset, "client-preset");++ const explicitNull = executor.transformRequest("openai/gpt-4", { ...body, preset: null }, true, {+ providerSpecificData: { preset: "connection-preset" },+ });+ assert.equal((explicitNull as any).preset, null);++ const explicitEmpty = executor.transformRequest("openai/gpt-4", { ...body, preset: "" }, true, {+ providerSpecificData: { preset: "connection-preset" },+ });+ assert.equal((explicitEmpty as any).preset, "");++ const blank = executor.transformRequest("openai/gpt-4", body, true, {+ providerSpecificData: { preset: " " },+ });++ assert.equal((blank as any).preset, undefined);+});+test("DefaultExecutor.transformRequest strips stream_options from Anthropic-compatible targets", () => {const anthropicCompat = new DefaultExecutor("anthropic-compatible-test");const anthropicCcCompat = new DefaultExecutor("anthropic-compatible-cc-test");diff --git a/tests/unit/memory-cache-safe-injection.test.ts b/tests/unit/memory-cache-safe-injection.test.tsnew file mode 100644index 0000000000..c86e39df08--- /dev/null+++ b/tests/unit/memory-cache-safe-injection.test.ts@@ -0,0 +1,105 @@+/**+ * Tests for #3890: prompt-cache misses when memory injection is enabled.+ *+ * When the client uses prompt caching (cache_control breakpoints), the previous behavior+ * prepended the (per-query, varying) memory message at index 0 — shifting the entire+ * cacheable prefix and forcing a cache miss on every turn. With `cacheSafe`, memory is+ * inserted just before the last user message so the cacheable prefix stays byte-stable.+ */++import { describe, it } from "node:test";+import assert from "node:assert/strict";+import { injectMemory } from "../../src/lib/memory/injection.ts";+import type { ChatRequest } from "../../src/lib/memory/injection.ts";+import type { Memory } from "../../src/lib/memory/types.ts";++function mem(content: string): Memory {+ return {+ id: `mem-${content}`,+ content,+ type: "factual" as any,+ apiKeyId: "k",+ createdAt: "2026-01-01T00:00:00.000Z",+ updatedAt: "2026-01-01T00:00:00.000Z",+ importance: 0.5,+ };+}++function multiTurn(): ChatRequest {+ return {+ model: "anthropic/claude-sonnet-4-6",+ messages: [+ { role: "system", content: "SYSTEM PROMPT", cache_control: { type: "ephemeral" } } as any,+ { role: "user", content: "turn 1 question" },+ { role: "assistant", content: "turn 1 answer" },+ { role: "user", content: "turn 2 question" },+ ],+ };+}++describe("injectMemory cache-safe positioning (#3890)", () => {+ it("default (cacheSafe off) prepends memory at index 0 — unchanged legacy behavior", () => {+ const out = injectMemory(multiTurn(), [mem("dark mode")], "anthropic");+ assert.equal(out.messages[0].role, "system");+ assert.ok(out.messages[0].content.includes("Memory context"));+ assert.equal(out.messages[1].content, "SYSTEM PROMPT");+ });++ it("cacheSafe inserts memory just before the last user message, preserving the prefix", () => {+ const req = multiTurn();+ const prefixBefore = JSON.stringify(req.messages.slice(0, 3)); // sys, u1, a1+ const out = injectMemory(req, [mem("dark mode")], "anthropic", { cacheSafe: true });++ // The cacheable prefix (system + prior turns up to the last assistant) is byte-identical.+ assert.equal(JSON.stringify(out.messages.slice(0, 3)), prefixBefore);+ // Memory is injected right before the last user message...+ assert.equal(out.messages[3].role, "system");+ assert.ok(out.messages[3].content.includes("Memory context"));+ // ...and the last user message is preserved at the tail.+ assert.equal(out.messages[4].content, "turn 2 question");+ assert.equal(out.messages.length, 5);+ // Memory must NOT be at index 0 (that is what broke caching).+ assert.notEqual(out.messages[0].content, out.messages[3].content);+ assert.equal(out.messages[0].content, "SYSTEM PROMPT");+ });++ it("cacheSafe keeps the cacheable prefix identical across two turns despite different memories", () => {+ // Turn 1: [sys, u1]; Turn 2: [sys, u1, a1, u2]. Different memories retrieved per query.+ // Same conversation, observed on two consecutive turns.+ const turn1: ChatRequest = {+ model: "anthropic/claude-sonnet-4-6",+ messages: [+ { role: "system", content: "SYSTEM PROMPT", cache_control: { type: "ephemeral" } } as any,+ { role: "user", content: "turn 1 question" },+ ],+ };+ const turn2 = multiTurn();++ const out1 = injectMemory(turn1, [mem("A")], "anthropic", { cacheSafe: true });+ const out2 = injectMemory(turn2, [mem("B")], "anthropic", { cacheSafe: true });++ // The cache-breakpoint-bearing system message stays at the head, byte-identical, in+ // both turns (and is NOT displaced by the per-query memory) — so the prompt cache+ // created on turn 1 still matches on turn 2. (Memory is inserted before the last user+ // turn: [SYS, MEM_A, u1] and [SYS, u1, a1, MEM_B, u2] respectively.)+ assert.deepEqual(out1.messages[0], out2.messages[0]);+ assert.equal(out1.messages[0].content, "SYSTEM PROMPT");+ assert.equal((out1.messages[0] as any).cache_control?.type, "ephemeral");+ // In turn 2 the earlier turns up to the last assistant are preserved before memory.+ assert.equal(out2.messages[1].content, "turn 1 question");+ assert.equal(out2.messages[2].content, "turn 1 answer");+ assert.ok(out2.messages[3].content.includes("Memory context"));+ assert.equal(out2.messages[4].content, "turn 2 question");+ });++ it("cacheSafe falls back to leading injection when there is no user message", () => {+ const req: ChatRequest = {+ model: "anthropic/claude-sonnet-4-6",+ messages: [{ role: "system", content: "SYS" }],+ };+ const out = injectMemory(req, [mem("x")], "anthropic", { cacheSafe: true });+ assert.equal(out.messages[0].role, "system");+ assert.ok(out.messages[0].content.includes("Memory context"));+ assert.equal(out.messages[1].content, "SYS");+ });+});diff --git a/tests/unit/perplexity-web.test.ts b/tests/unit/perplexity-web.test.tsindex 58e4787262..a77af4c42f 100644--- a/tests/unit/perplexity-web.test.ts+++ b/tests/unit/perplexity-web.test.ts@@ -767,7 +767,9 @@ test("Request: posts to correct Perplexity SSE endpoint", async () => {assert.equal(capturedUrl, "https://www.perplexity.ai/rest/sse/perplexity_ask");assert.equal(capturedHeaders["Origin"], "https://www.perplexity.ai");- assert.equal(capturedHeaders["X-App-ApiVersion"], "client-1.11.0");+ assert.equal(capturedHeaders["x-perplexity-request-endpoint"], "https://www.perplexity.ai/rest/sse/perplexity_ask");+ assert.equal(capturedHeaders["x-perplexity-request-reason"], "ask-query-state-provider");+ assert.ok(capturedHeaders["x-request-id"], "x-request-id header should be set");assert.equal(capturedHeaders["Accept"], "text/event-stream");} finally {globalThis.fetch = original;diff --git a/tests/unit/provider-models-config.test.ts b/tests/unit/provider-models-config.test.tsindex 403d32e6cf..d95b50c1ac 100644--- a/tests/unit/provider-models-config.test.ts+++ b/tests/unit/provider-models-config.test.ts@@ -53,6 +53,25 @@ test("provider models helpers resolve provider IDs through aliases", () => {assert.deepEqual(getModelsByProviderId("provider-that-does-not-exist"), []);});+test("getProviderModels returns models for both the alias and the raw provider id", () => {+ // Pick a provider whose alias differs from its id (e.g. "github" → "gh").+ const aliased = Object.entries(PROVIDER_ID_TO_ALIAS).find(([id, a]) => id !== a) as+ | [string, string]+ | undefined;+ if (!aliased) return; // no aliased providers → trivially satisfied++ const [rawId, alias] = aliased;+ const byAlias = getProviderModels(alias);+ const byRawId = getProviderModels(rawId);++ assert.ok(byAlias.length > 0, `expected models under alias "${alias}"`);+ assert.deepEqual(+ byRawId,+ byAlias,+ `getProviderModels("${rawId}") should return the same models as getProviderModels("${alias}")`+ );+});+test("Reka registry exposes preset models", () => {const rekaModels = getModelsByProviderId("reka");const ids = rekaModels.map((model) => model.id);diff --git a/tests/unit/provider-page-helpers-3501.test.ts b/tests/unit/provider-page-helpers-3501.test.tsindex 81eef3648d..b9e6354d96 100644--- a/tests/unit/provider-page-helpers-3501.test.ts+++ b/tests/unit/provider-page-helpers-3501.test.ts@@ -202,9 +202,10 @@ test("getCodexRequestDefaults returns reasoningEffort (transitive import guard)"assert.equal(typeof result.reasoningEffort, "string");});-test("getClaudeCodeCompatibleRequestDefaults returns context1m boolean", () => {+test("getClaudeCodeCompatibleRequestDefaults returns CC-compatible booleans", () => {const result = getClaudeCodeCompatibleRequestDefaults(null);assert.equal(typeof result.context1m, "boolean");+ assert.equal(typeof result.redactThinking, "boolean");});test("compatProtocolLabelKey maps protocol strings to i18n keys", () => {@@ -216,10 +217,7 @@ test("compatProtocolLabelKey maps protocol strings to i18n keys", () => {test("extractCommandCodeCredentialInput extracts from JSON/URL/raw (transitive import guard)", () => {assert.equal(extractCommandCodeCredentialInput(" "), "");assert.equal(extractCommandCodeCredentialInput("rawtoken"), "rawtoken");- assert.equal(- extractCommandCodeCredentialInput(JSON.stringify({ apiKey: "abc123" })),- "abc123"- );+ assert.equal(extractCommandCodeCredentialInput(JSON.stringify({ apiKey: "abc123" })), "abc123");});test("normalizeAndValidateHttpBaseUrl validates http/https URLs", () => {diff --git a/tests/unit/provider-request-failure-pipeline.test.ts b/tests/unit/provider-request-failure-pipeline.test.tsindex d58b8ed15d..3d7df17efa 100644--- a/tests/unit/provider-request-failure-pipeline.test.ts+++ b/tests/unit/provider-request-failure-pipeline.test.ts@@ -10,6 +10,7 @@ process.env.DATA_DIR = TEST_DATA_DIR;const core = await import("../../src/lib/db/core.ts");const settingsDb = await import("../../src/lib/db/settings.ts");+const { invalidateDbCache } = await import("../../src/lib/db/readCache.ts");const { invalidateCacheControlSettingsCache } =await import("../../src/lib/cacheControlSettings.ts");const { clearCache } = await import("../../src/lib/semanticCache.ts");@@ -17,14 +18,12 @@ const { clearIdempotency } = await import("../../src/lib/idempotencyLayer.ts");const { getPendingRequests, clearPendingRequests } =await import("../../src/lib/usage/usageHistory.ts");const { clearInflight } = await import("../../open-sse/services/requestDedup.ts");-const {- resetAll: resetAccountSemaphores,-} = await import("../../open-sse/services/accountSemaphore.ts");+const { resetAll: resetAccountSemaphores } =+ await import("../../open-sse/services/accountSemaphore.ts");const { clearModelLock } = await import("../../open-sse/services/accountFallback.ts");const { getCallLogs, getCallLogById } = await import("../../src/lib/usage/callLogs.ts");const { handleChatCore } = await import("../../open-sse/handlers/chatCore.ts");-const { resetPayloadRulesConfigForTests } =- await import("../../open-sse/services/payloadRules.ts");+const { resetPayloadRulesConfigForTests } = await import("../../open-sse/services/payloadRules.ts");const originalFetch = globalThis.fetch;@@ -61,11 +60,22 @@ async function resetStorage() {clearInflight();clearModelLock();core.resetDbInstance();+ // A full reset must also drop the settings read-cache. Otherwise the cached+ // value (e.g. call_log_pipeline_enabled=true seeded earlier) survives the DB+ // wipe and silently masks the fact that the fresh DB has the default. In CI+ // under load this cache is evicted at unpredictable times, so tests that rely+ // on the stale cache flake. Make the reset honest and deterministic here.+ invalidateDbCache("settings");fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true });fs.mkdirSync(TEST_DATA_DIR, { recursive: true });}-test.before(async () => {+// Re-seed per test, NOT once: every `afterEach` runs resetStorage(), which wipes+// the DB and drops the settings cache. A run-once `before` only guaranteed the+// flag for the first test; later tests depended on a stale cache surviving the+// wipe, which flakes under CI load. beforeEach re-establishes it deterministically.+test.beforeEach(async () => {+ await resetStorage();await settingsDb.updateSettings({ call_log_pipeline_enabled: true });});@@ -117,22 +127,23 @@ test("network failure persisted call log includes providerRequest in pipeline paconst detail = await waitFor(getLatestCallLog);assert.ok(detail, "expected a call log to be persisted");- assert.ok(detail.pipelinePayloads, "expected pipeline payloads when call_log_pipeline_enabled is true");+ assert.ok(+ detail.pipelinePayloads,+ "expected pipeline payloads when call_log_pipeline_enabled is true"+ );assert.ok(detail.pipelinePayloads.providerRequest,"providerRequest must be present in pipeline payloads even on network failure");const providerReqBody =- detail.pipelinePayloads.providerRequest.body ??- detail.pipelinePayloads.providerRequest;+ detail.pipelinePayloads.providerRequest.body ?? detail.pipelinePayloads.providerRequest;assert.equal(providerReqBody.model,"gpt-4o-mini","providerRequest should contain the translated model");const messages =- providerReqBody.messages ??- (Array.isArray(providerReqBody) ? providerReqBody : null);+ providerReqBody.messages ?? (Array.isArray(providerReqBody) ? providerReqBody : null);if (messages) {assert.equal(messages[0]?.content, "hello");}@@ -141,10 +152,7 @@ test("network failure persisted call log includes providerRequest in pipeline panull,"providerResponse should be null/absent on network failure (no response received)");- assert.ok(- detail.pipelinePayloads.error,- "pipeline payloads should include the error details"- );+ assert.ok(detail.pipelinePayloads.error, "pipeline payloads should include the error details");});test("network timeout persisted call log includes providerRequest in pipeline payloads", async () => {@@ -181,10 +189,7 @@ test("network timeout persisted call log includes providerRequest in pipeline paawait waitForAsyncSideEffects();assert.equal(result.success, false);- assert.ok(- result.status === 504,- `expected 504 timeout, got ${result.status}`- );+ assert.ok(result.status === 504, `expected 504 timeout, got ${result.status}`);const detail = await waitFor(getLatestCallLog);assert.ok(detail, "expected a call log to be persisted");@@ -195,12 +200,8 @@ test("network timeout persisted call log includes providerRequest in pipeline pa"providerRequest must be present in pipeline payloads on timeout");const providerReqBody =- detail.pipelinePayloads?.providerRequest?.body ??- detail.pipelinePayloads?.providerRequest;- assert.equal(- providerReqBody?.model,- "gpt-4o-mini"- );+ detail.pipelinePayloads?.providerRequest?.body ?? detail.pipelinePayloads?.providerRequest;+ assert.equal(providerReqBody?.model, "gpt-4o-mini");} finally {if (originalGetTimeoutMs) executor.getTimeoutMs = originalGetTimeoutMs;}@@ -311,10 +312,7 @@ test("successful response includes both providerRequest and providerResponse inassert.ok(detail, "expected a call log to be persisted");assert.ok(detail.pipelinePayloads, "expected pipeline payloads");- assert.ok(- detail.pipelinePayloads.providerRequest,- "providerRequest must be present on success"- );+ assert.ok(detail.pipelinePayloads.providerRequest, "providerRequest must be present on success");assert.ok(detail.pipelinePayloads.providerResponse,"providerResponse must be present on success"diff --git a/tests/unit/provider-specific-data-schema.test.ts b/tests/unit/provider-specific-data-schema.test.tsindex e8dbfa64e1..6df8c155d8 100644--- a/tests/unit/provider-specific-data-schema.test.ts+++ b/tests/unit/provider-specific-data-schema.test.ts@@ -42,7 +42,7 @@ test("provider schemas reject non-boolean openaiStoreEnabled values", () => {assert.equal(updated.success, false);});-test("provider schemas accept boolean requestDefaults.context1m for CC-compatible providers", () => {+test("provider schemas accept boolean CC-compatible request defaults", () => {const created = createProviderSchema.safeParse({provider: "anthropic-compatible-cc-demo",apiKey: "token",@@ -50,6 +50,7 @@ test("provider schemas accept boolean requestDefaults.context1m for CC-compatiblproviderSpecificData: {requestDefaults: {context1m: true,+ redactThinking: true,},},});@@ -57,6 +58,7 @@ test("provider schemas accept boolean requestDefaults.context1m for CC-compatiblproviderSpecificData: {requestDefaults: {context1m: false,+ redactThinking: false,},},});@@ -65,7 +67,7 @@ test("provider schemas accept boolean requestDefaults.context1m for CC-compatiblassert.equal(updated.success, true);});-test("provider schemas reject non-boolean requestDefaults.context1m values", () => {+test("provider schemas reject non-boolean CC-compatible request defaults", () => {const created = createProviderSchema.safeParse({provider: "anthropic-compatible-cc-demo",apiKey: "token",@@ -73,6 +75,7 @@ test("provider schemas reject non-boolean requestDefaults.context1m values", ()providerSpecificData: {requestDefaults: {context1m: "yes",+ redactThinking: "yes",},},});@@ -80,6 +83,7 @@ test("provider schemas reject non-boolean requestDefaults.context1m values", ()providerSpecificData: {requestDefaults: {context1m: 1,+ redactThinking: 1,},},});@@ -127,3 +131,47 @@ test("provider schemas reject unknown Codex service tiers", () => {assert.equal(created.success, false);assert.equal(updated.success, false);});++test("provider schemas accept OpenRouter preset in providerSpecificData", () => {+ const created = createProviderSchema.safeParse({+ provider: "openrouter",+ apiKey: "token",+ name: "OpenRouter",+ providerSpecificData: {+ preset: "email-copywriter",+ },+ });+ const updated = updateProviderConnectionSchema.safeParse({+ providerSpecificData: {+ preset: "code-reviewer",+ },+ });+ const padded = updateProviderConnectionSchema.safeParse({+ providerSpecificData: {+ preset: `${" ".repeat(120)}prefer${" ".repeat(120)}`,+ },+ });++ assert.equal(created.success, true);+ assert.equal(updated.success, true);+ assert.equal(padded.success, true);+});++test("provider schemas reject oversized OpenRouter preset values", () => {+ const created = createProviderSchema.safeParse({+ provider: "openrouter",+ apiKey: "token",+ name: "OpenRouter",+ providerSpecificData: {+ preset: "x".repeat(201),+ },+ });+ const updated = updateProviderConnectionSchema.safeParse({+ providerSpecificData: {+ preset: 123,+ },+ });++ assert.equal(created.success, false);+ assert.equal(updated.success, false);+});diff --git a/tests/unit/provider-validation-specialty.test.ts b/tests/unit/provider-validation-specialty.test.tsindex f4503cb8ab..af8255ba02 100644--- a/tests/unit/provider-validation-specialty.test.ts+++ b/tests/unit/provider-validation-specialty.test.ts@@ -1780,7 +1780,7 @@ test("specialty validator accepts Nous Research credentials on chat completions"const headers = init.headers as Record<string, string>;const body = JSON.parse(String(init.body));assert.equal(headers.Authorization, "Bearer nous-key");- assert.equal(body.model, "nousresearch/hermes-4-70b");+ assert.equal(body.model, "Hermes-4-70B");return new Response(JSON.stringify({id: "chatcmpl-nous",@@ -1802,6 +1802,33 @@ test("specialty validator accepts Nous Research credentials on chat completions"assert.equal(nous.method, "nous_chat_completions");});+test("BytePlus key validation reaches the Ark endpoint instead of 'not supported' (#3877)", async () => {+ // #3877: byteplus was in APIKEY_PROVIDERS but never registered in the routing+ // registry, so validation returned {unsupported:true} → UI showed "invalid" for any+ // key. With the registry entry, a valid ark-... key probes the Ark /models endpoint+ // with Bearer auth and validates.+ let probedModelsUrl: string | null = null;+ globalThis.fetch = async (url, init = {}) => {+ const target = String(url);+ if (target === "https://ark.ap-southeast.bytepluses.com/api/v3/models") {+ probedModelsUrl = target;+ const headers = toPlainHeaders(init.headers);+ assert.equal(headers.Authorization, "Bearer ark-test-key");+ return new Response(JSON.stringify({ data: [{ id: "kimi-k2-thinking" }] }), { status: 200 });+ }+ throw new Error(`unexpected fetch: ${target}`);+ };++ const result = await validateProviderApiKey({+ provider: "byteplus",+ apiKey: "ark-test-key",+ });++ assert.equal(result.unsupported, undefined, "byteplus must not be 'validation not supported'");+ assert.equal(result.valid, true);+ assert.equal(probedModelsUrl, "https://ark.ap-southeast.bytepluses.com/api/v3/models");+});+test("specialty validator rejects invalid Nous Research credentials", async () => {globalThis.fetch = async (url, init = {}) => {const target = String(url);@@ -1823,6 +1850,34 @@ test("specialty validator rejects invalid Nous Research credentials", async () =assert.equal(nous.error, "Invalid API key");});+test("specialty validator accepts Nous Research key when probe model is rejected (400)", async () => {+ // #3881: a valid key whose probe model is rejected (model-not-found / bad request)+ // must still validate — the 4xx proves auth was accepted, only the request shape+ // was wrong. Mirrors the longcat/nvidia validators.+ globalThis.fetch = async (url, init = {}) => {+ const target = String(url);++ if (target === "https://inference-api.nousresearch.com/v1/chat/completions") {+ const headers = init.headers as Record<string, string>;+ assert.equal(headers.Authorization, "Bearer nous-key");+ return new Response(+ JSON.stringify({ error: { message: "model not found", type: "invalid_request_error" } }),+ { status: 400 }+ );+ }++ throw new Error(`unexpected fetch: ${target}`);+ };++ const nous = await validateProviderApiKey({+ provider: "nous-research",+ apiKey: "nous-key",+ });++ assert.equal(nous.valid, true);+ assert.equal(nous.method, "nous_chat_completions");+});+test("specialty validator rejects invalid Poe credentials", async () => {globalThis.fetch = async (url, init = {}) => {const target = String(url);diff --git a/tests/unit/proxy-fetch.test.ts b/tests/unit/proxy-fetch.test.tsindex 85b6290da6..cc9f1a3b84 100644--- a/tests/unit/proxy-fetch.test.ts+++ b/tests/unit/proxy-fetch.test.ts@@ -4,6 +4,7 @@ import http from "node:http";import proxyFetch, {runWithProxyContext,+ runWithProxyContextOrDirect,runWithTlsTracking,isTlsFingerprintActive,} from "../../open-sse/utils/proxyFetch.ts";@@ -165,3 +166,40 @@ test("runWithProxyContext accepts reachable HTTP proxy endpoints and returns cal});});++test("runWithProxyContext throws PROXY_UNREACHABLE for an unreachable proxy by default", async () => {+ // 127.0.0.1:9 (discard) refuses connections — the proxy is unreachable.+ await assert.rejects(+ runWithProxyContext({ type: "http", host: "127.0.0.1", port: "9" }, async () => "unreachable"),+ /Proxy unreachable/+ );+});++test("runWithProxyContext degrades to a direct connection when directFallbackOnUnreachable is set", async () => {+ let ran = false;+ const result = await runWithProxyContext(+ { type: "http", host: "127.0.0.1", port: "9" },+ async () => {+ ran = true;+ return "direct-ok";+ },+ { directFallbackOnUnreachable: true }+ );++ assert.equal(ran, true, "callback must still run via a direct connection");+ assert.equal(result, "direct-ok");+});++test("runWithProxyContextOrDirect runs the callback directly when the proxy is unreachable", async () => {+ let ran = false;+ const result = await runWithProxyContextOrDirect(+ { type: "http", host: "127.0.0.1", port: "9" },+ async () => {+ ran = true;+ return "ok";+ }+ );++ assert.equal(ran, true);+ assert.equal(result, "ok");+});diff --git a/tests/unit/request-defaults-store-session.test.ts b/tests/unit/request-defaults-store-session.test.tsindex 1aa04506aa..19f9b1925d 100644--- a/tests/unit/request-defaults-store-session.test.ts+++ b/tests/unit/request-defaults-store-session.test.ts@@ -43,26 +43,30 @@ test("ensureOpenAIStoreSessionFallback injects session_id only when no stable caassert.equal(withExplicitSession.session_id, "existing-session");});-test("normalizeProviderSpecificData keeps only boolean CC-compatible 1M request defaults", () => {+test("normalizeProviderSpecificData keeps only boolean CC-compatible request defaults", () => {const normalized = normalizeProviderSpecificData("anthropic-compatible-cc-demo", {baseUrl: "https://proxy.example.com/v1/messages?beta=true",requestDefaults: {context1m: true,+ redactThinking: true,customFlag: "keep-me",},});assert.deepEqual(getClaudeCodeCompatibleRequestDefaults(normalized), {context1m: true,+ redactThinking: true,});assert.deepEqual(normalized?.requestDefaults, {context1m: true,+ redactThinking: true,customFlag: "keep-me",});const stripped = normalizeProviderSpecificData("anthropic-compatible-cc-demo", {requestDefaults: {context1m: "yes",+ redactThinking: "yes",customFlag: "keep-me",},});@@ -70,3 +74,37 @@ test("normalizeProviderSpecificData keeps only boolean CC-compatible 1M requestcustomFlag: "keep-me",});});++test("normalizeProviderSpecificData trims OpenRouter preset and clears empty values", () => {+ const normalized = normalizeProviderSpecificData("openrouter", {+ preset: " email-copywriter ",+ tag: "primary",+ });++ assert.equal(normalized?.preset, "email-copywriter");+ assert.equal(normalized?.tag, "primary");++ const stripped = normalizeProviderSpecificData("openrouter", {+ preset: " ",+ tag: "primary",+ });++ assert.equal(stripped?.preset, undefined);+ assert.equal(stripped?.tag, "primary");++ const oversized = normalizeProviderSpecificData("openrouter", {+ preset: "x".repeat(201),+ tag: "primary",+ });++ assert.equal(oversized?.preset, undefined);+ assert.equal(oversized?.tag, "primary");++ const ignored = normalizeProviderSpecificData("openai", {+ preset: "email-copywriter",+ tag: "primary",+ });++ assert.equal(ignored?.preset, undefined);+ assert.equal(ignored?.tag, "primary");+});diff --git a/tests/unit/request-logger-endpoints.test.ts b/tests/unit/request-logger-endpoints.test.tsindex bca056fea9..e504523591 100644--- a/tests/unit/request-logger-endpoints.test.ts+++ b/tests/unit/request-logger-endpoints.test.ts@@ -87,6 +87,40 @@ test("updatePendingRequestStreamChunks stores stream chunks in the detail", () =assert.equal(detail.streamChunks.provider[0], 'data: {"a":1}');});+test("updatePendingRequest keeps pending detail API view in sync", () => {+ usageHistory.clearPendingRequests();+ const requestId = usageHistory.trackPendingRequest(+ "claude-sonnet-4-6",+ "cc-test",+ "conn-1",+ true,+ {+ clientRequest: { model: "cc-test/claude-sonnet-4-6", reasoning_effort: "xhigh" },+ providerRequest: { model: "claude-sonnet-4-6", reasoning_effort: "xhigh" },+ }+ );+ assert.ok(requestId, "trackPendingRequest should return an id");++ usageHistory.updatePendingRequest("claude-sonnet-4-6", "cc-test", "conn-1", {+ providerRequest: { model: "claude-sonnet-4-6", reasoning_effort: "high" },+ stage: "provider_response_started",+ });++ const modelKey = "claude-sonnet-4-6 (cc-test)";+ const detailFromQueue = usageHistory.getPendingRequests().details["conn-1"]?.[modelKey]?.[0];+ const detailFromId = usageHistory.getPendingById().get(requestId);++ assert.equal(detailFromId, detailFromQueue);+ assert.deepEqual(detailFromId?.providerRequest, {+ model: "claude-sonnet-4-6",+ reasoning_effort: "high",+ });+ assert.deepEqual(detailFromId?.clientRequest, {+ model: "cc-test/claude-sonnet-4-6",+ reasoning_effort: "xhigh",+ });+});+test("updatePendingRequestStreamChunks stores empty streamChunks object (not null)", () => {usageHistory.clearPendingRequests();usageHistory.trackPendingRequest("gpt-4", "openai", "conn-1", true);@@ -168,6 +202,75 @@ test("GET /api/usage/call-logs/[id] route exists and uses auth", () => {assert.ok(content.includes("getCallLogById"), "should import getCallLogById");});+test("GET /api/usage/call-logs includes completed in-memory fallback rows", async () => {+ const { buildCallLogListRows } = await import("../../src/app/api/usage/call-logs/route.ts");+ usageHistory.clearPendingRequests();++ const requestId = usageHistory.trackPendingRequest("gpt-4", "openai", "completed-conn-1", true, {+ clientEndpoint: "/v1/chat/completions",+ });+ assert.ok(requestId);++ const completed = usageHistory.finalizePendingRequestById(requestId, {+ clientResponse: { choices: [{ message: { content: "done" } }] },+ });+ assert.equal(completed, true);++ const completedDetail = usageHistory.getCompletedDetails().get(requestId);+ assert.ok(completedDetail);+ const rows = buildCallLogListRows({+ logs: [],+ connections: [{ id: "completed-conn-1", displayName: "Completed Account" }],+ pendingDetails: usageHistory.getPendingById().values(),+ completedDetails: usageHistory.getCompletedDetails().values(),+ now: completedDetail!.startedAt + 60_000,+ });++ assert.equal(rows.length, 1);+ assert.equal(rows[0].id, requestId);+ assert.equal(rows[0].detailState, "in-memory");+ assert.equal(rows[0].completed, true);+ assert.equal(rows[0].account, "Completed Account");+ assert.equal(rows[0].duration, completedDetail!.durationMs);+});++test("GET /api/usage/call-logs rows are globally timestamp ordered", async () => {+ const { buildCallLogListRows } = await import("../../src/app/api/usage/call-logs/route.ts");+ const rows = buildCallLogListRows({+ logs: [+ {+ id: "persisted-newest",+ timestamp: new Date(3000).toISOString(),+ active: false,+ },+ {+ id: "persisted-oldest",+ timestamp: new Date(1000).toISOString(),+ active: false,+ },+ ],+ connections: [],+ pendingDetails: [],+ completedDetails: [+ {+ id: "completed-middle",+ model: "gpt-4",+ provider: "openai",+ connectionId: "conn",+ startedAt: 2000,+ completedAt: 2500,+ durationMs: 500,+ },+ ],+ now: 4000,+ });++ assert.deepEqual(+ rows.map((row) => row.id),+ ["persisted-newest", "completed-middle", "persisted-oldest"]+ );+});+test("getCallLogById returns null for unknown id", async () => {const log = await callLogs.getCallLogById("nonexistent-id-12345");assert.equal(log, null);@@ -382,6 +485,49 @@ test("createRequestLogger with connectionId/model/provider populates streamChunkassert.deepEqual(detail.streamChunks.client, []);});+test("createRequestLogger requestId binds streamChunks to the exact pending request", async () => {+ const { createRequestLogger } = await import("../../open-sse/utils/requestLogger.ts");+ usageHistory.clearPendingRequests();++ const firstId = usageHistory.trackPendingRequest("gpt-4", "openai", "test-conn-a", true);+ const secondId = usageHistory.trackPendingRequest("gpt-4", "openai", "test-conn-b", true);++ const logger = await createRequestLogger("openai", "openai", "gpt-4", {+ enabled: true,+ captureStreamChunks: true,+ requestId: secondId,+ });++ logger.appendProviderChunk('data: {"content":"second"}');++ const first = usageHistory.getPendingById().get(firstId);+ const second = usageHistory.getPendingById().get(secondId);++ assert.equal(first?.streamChunks, undefined);+ assert.equal(second?.streamChunks?.provider[0], 'data: {"content":"second"}');+});++test("createRequestLogger fallback match does not cross connectionId boundaries", async () => {+ const { createRequestLogger } = await import("../../open-sse/utils/requestLogger.ts");+ usageHistory.clearPendingRequests();++ usageHistory.trackPendingRequest("gpt-4", "openai", "test-conn-a", true);+ const secondId = usageHistory.trackPendingRequest("gpt-4", "openai", "test-conn-b", true);++ const logger = await createRequestLogger("openai", "openai", "gpt-4", {+ enabled: true,+ captureStreamChunks: true,+ connectionId: "test-conn-b",+ model: "gpt-4",+ provider: "openai",+ });++ logger.appendProviderChunk('data: {"content":"conn-b"}');++ const second = usageHistory.getPendingById().get(secondId);+ assert.equal(second?.streamChunks?.provider[0], 'data: {"content":"conn-b"}');+});+test("createRequestLogger without connectionId does not populate streamChunks", async () => {const { createRequestLogger } = await import("../../open-sse/utils/requestLogger.ts");usageHistory.clearPendingRequests();diff --git a/tests/unit/responses-chat-assistant-role-first-chunk.test.ts b/tests/unit/responses-chat-assistant-role-first-chunk.test.tsnew file mode 100644index 0000000000..de243d6c2d--- /dev/null+++ b/tests/unit/responses-chat-assistant-role-first-chunk.test.ts@@ -0,0 +1,70 @@+import test from "node:test";+import assert from "node:assert/strict";++const { openaiResponsesToOpenAIResponse } =+ await import("../../open-sse/translator/response/openai-responses.ts");++/**+ * Regression: Responses → Chat Completions streaming must announce the assistant+ * role on the FIRST emitted delta.+ *+ * OpenAI Chat Completions streams put `role: "assistant"` on the first chunk's+ * delta. The Responses API has no role-announcement event, so the translator must+ * synthesize it. Strict streaming clients — notably @langchain/openai's+ * `_convertDeltaToMessageChunk` (used by n8n's AI Agent) — key off the first+ * chunk's role to build an AIMessageChunk. Without it, streamed tool_call deltas+ * are dropped and the agent receives an empty response.+ */++test("Responses->Chat: first tool_call chunk announces role=assistant", () => {+ const state: Record<string, unknown> = {};++ const first = openaiResponsesToOpenAIResponse(+ {+ type: "response.output_item.added",+ item: {+ type: "function_call",+ call_id: "call_abc",+ name: "get_weather",+ arguments: "",+ },+ },+ state+ );++ assert.ok(first, "should emit a chunk for output_item.added");+ assert.equal(+ first.choices[0].delta.role,+ "assistant",+ "first emitted delta must carry role=assistant"+ );+ assert.equal(first.choices[0].delta.tool_calls[0].function.name, "get_weather");++ // Subsequent argument deltas must NOT repeat the role announcement.+ const next = openaiResponsesToOpenAIResponse(+ { type: "response.function_call_arguments.delta", delta: '{"x":1}' },+ state+ );+ assert.ok(next, "should emit a chunk for arguments.delta");+ assert.equal(next.choices[0].delta.role, undefined, "only the first delta announces the role");+});++test("Responses->Chat: first text chunk announces role=assistant", () => {+ const state: Record<string, unknown> = {};++ const first = openaiResponsesToOpenAIResponse(+ { type: "response.output_text.delta", delta: "Olá" },+ state+ );++ assert.ok(first, "should emit a chunk for output_text.delta");+ assert.equal(first.choices[0].delta.role, "assistant");+ assert.equal(first.choices[0].delta.content, "Olá");++ const next = openaiResponsesToOpenAIResponse(+ { type: "response.output_text.delta", delta: " mundo" },+ state+ );+ assert.equal(next.choices[0].delta.role, undefined);+ assert.equal(next.choices[0].delta.content, " mundo");+});diff --git a/tests/unit/stream-handler.test.ts b/tests/unit/stream-handler.test.tsindex c0b323a9ab..a64423425e 100644--- a/tests/unit/stream-handler.test.ts+++ b/tests/unit/stream-handler.test.ts@@ -399,6 +399,44 @@ test("pipeWithDisconnect clears pending requests when the upstream stream errorsassert.equal(pending.details[connectionId], undefined);});+test("pipeWithDisconnect lets controller onError own pending cleanup", async () => {+ clearPendingRequests();+ const provider = "openai";+ const model = "gpt-stream-error-owned";+ const connectionId = "conn-stream-error-owned";+ const modelKey = `${model} (${provider})`;+ let errorEvent = null;++ trackPendingRequest(model, provider, connectionId, true);++ const source = new ReadableStream({+ start(controller) {+ controller.error(Object.assign(new Error("terminated"), { statusCode: 502 }));+ },+ });+ const stream = pipeWithDisconnect(+ new Response(source),+ new TransformStream(),+ createStreamController({+ provider,+ model,+ connectionId,+ onError(event) {+ errorEvent = event;+ return true;+ },+ })+ );++ const text = await readStreamText(stream);+ const pending = getPendingRequests();++ assert.match(text, /"message":"terminated"/);+ assert.equal(errorEvent?.statusCode, 502);+ assert.equal(pending.byModel[modelKey], 1);+ assert.equal(pending.byAccount[connectionId][modelKey], 1);+});+test("pipeWithDisconnect does not double-clear transform errors already accounted for", async () => {clearPendingRequests();const provider = "openai";diff --git a/tests/unit/stream-utils.test.ts b/tests/unit/stream-utils.test.tsindex bc6c7405e6..6159cdc12f 100644--- a/tests/unit/stream-utils.test.ts+++ b/tests/unit/stream-utils.test.ts@@ -65,6 +65,78 @@ function parseJsonDataPayloads(text) {.map((data) => JSON.parse(data));}+function parseSillyTavernCustomOpenAIStream(text) {+ const events = [];+ let reasoning = "";+ let content = "";++ for (const payload of parseJsonDataPayloads(text)) {+ const choices = Array.isArray(payload.choices) ? payload.choices : [];+ const reasoningDelta =+ choices.find((choice) => choice?.delta?.reasoning_content)?.delta?.reasoning_content ??+ choices.find((choice) => choice?.delta?.reasoning)?.delta?.reasoning ??+ "";+ const contentDelta =+ choices[0]?.delta?.content ?? choices[0]?.message?.content ?? choices[0]?.text ?? "";++ reasoning += reasoningDelta;+ content += contentDelta;+ events.push({ reasoningDelta, contentDelta, reasoning, content });+ }++ return { reasoning, content, events };+}++test("createSSEStream leaves successful pending requests for onComplete finalization", async () => {+ const usageHistory = await import("../../src/lib/usage/usageHistory.ts");+ usageHistory.clearPendingRequests();++ const model = "gpt-4";+ const provider = "openai";+ const connectionId = "stream-on-complete-finalize";+ const requestId = usageHistory.trackPendingRequest(model, provider, connectionId, true);++ let finalizedInOnComplete = false;+ await readTransformed(+ [+ `data: ${JSON.stringify({+ id: "chatcmpl_pending_finalize",+ object: "chat.completion.chunk",+ created: 1,+ model,+ choices: [{ index: 0, delta: { content: "hello" }, finish_reason: null }],+ })}\n\n`,+ `data: ${JSON.stringify({+ id: "chatcmpl_pending_finalize",+ object: "chat.completion.chunk",+ created: 1,+ model,+ choices: [{ index: 0, delta: {}, finish_reason: "stop" }],+ usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },+ })}\n\n`,+ ],+ {+ mode: "passthrough",+ sourceFormat: FORMATS.OPENAI,+ provider,+ model,+ connectionId,+ body: { messages: [{ role: "user", content: "hello" }] },+ onComplete(payload) {+ finalizedInOnComplete = usageHistory.finalizePendingRequestById(requestId, {+ providerResponse: payload.providerPayload,+ clientResponse: payload.clientPayload,+ });+ },+ }+ );++ assert.equal(finalizedInOnComplete, true);+ assert.ok(usageHistory.getCompletedDetails().has(requestId));+ assert.equal(usageHistory.getPendingById().has(requestId), false);+ usageHistory.clearPendingRequests();+});+test.after(() => {core.resetDbInstance();if (fs.existsSync(TEST_DATA_DIR)) {@@ -726,8 +798,9 @@ test("createSSEStream translate mode converts Claude SSE into OpenAI chunks andassert.match(text, /\[DONE\]/);assert.equal(onCompletePayload.status, 200);assert.equal(onCompletePayload.responseBody.choices[0].message.content, "Hello Claude");+ assert.equal(onCompletePayload.responseBody.usage.prompt_tokens, 3);assert.equal(onCompletePayload.responseBody.usage.completion_tokens, 4);- assert.equal(onCompletePayload.responseBody.usage.total_tokens, 4);+ assert.equal(onCompletePayload.responseBody.usage.total_tokens, 7);});test("createSSEStream translate mode preserves Claude text_delta thinking tags as content", async () => {@@ -1378,6 +1451,53 @@ test("createSSEStream passthrough splits mixed reasoning and content deltas andassert.ok(onCompletePayload.responseBody.usage.total_tokens > 0);});+test("createSSEStream passthrough output is consumable by SillyTavern-style reasoning parser", async () => {+ const text = await readTransformed(+ [+ `data: ${JSON.stringify({+ id: "chatcmpl_reasoning_st",+ object: "chat.completion.chunk",+ created: 1,+ model: "gpt-4.1-mini",+ choices: [+ {+ index: 0,+ delta: {+ reasoning_content: "First think",+ content: "Then answer",+ },+ },+ ],+ })}\n\n`,+ `data: ${JSON.stringify({+ id: "chatcmpl_reasoning_st",+ object: "chat.completion.chunk",+ created: 1,+ model: "gpt-4.1-mini",+ choices: [{ index: 0, delta: {}, finish_reason: "stop" }],+ })}\n\n`,+ ],+ {+ mode: "passthrough",+ sourceFormat: FORMATS.OPENAI,+ provider: "openai-compatible",+ model: "gpt-4.1-mini",+ body: {+ messages: [{ role: "user", content: "hello world" }],+ },+ }+ );++ const parsed = parseSillyTavernCustomOpenAIStream(text);+ const reasoningEventIndex = parsed.events.findIndex((event) => event.reasoningDelta);+ const contentEventIndex = parsed.events.findIndex((event) => event.contentDelta);++ assert.equal(parsed.reasoning, "First think");+ assert.equal(parsed.content, "Then answer");+ assert.ok(reasoningEventIndex >= 0);+ assert.ok(contentEventIndex > reasoningEventIndex);+});+test("createSSEStream passthrough writes complete SSE events per converted chunk", async () => {const convertedChunks = [];await readTransformed(@@ -1688,8 +1808,9 @@ test("createSSETransformStreamWithLogger flushes a trailing Claude usage event wassert.match(text, /Buffered tail/);assert.match(text, /\[DONE\]/);assert.equal(onCompletePayload.responseBody.choices[0].message.content, "Buffered tail");+ assert.equal(onCompletePayload.responseBody.usage.prompt_tokens, 3);assert.equal(onCompletePayload.responseBody.usage.completion_tokens, 5);- assert.equal(onCompletePayload.responseBody.usage.total_tokens, 5);+ assert.equal(onCompletePayload.responseBody.usage.total_tokens, 8);});test("buildStreamSummaryFromEvents compacts Responses API deltas into a synthetic response", () => {diff --git a/tests/unit/sync-wiki.test.ts b/tests/unit/sync-wiki.test.tsnew file mode 100644index 0000000000..33e35cfe8c--- /dev/null+++ b/tests/unit/sync-wiki.test.ts@@ -0,0 +1,71 @@+// Unit tests for the pure helpers in scripts/docs/sync-wiki.mjs (the GitHub wiki sync).+import { test } from "node:test";+import assert from "node:assert/strict";++import {+ normKey,+ toWikiName,+ toWikiContent,+ syncHomeCounts,+ parseWikiPage,+ WIKI_BANNER,+ NEW_PAGE_EXCLUDE,+} from "../../scripts/docs/sync-wiki.mjs";++test("normKey: case/separator-insensitive fuzzy key (matches docs basename to curated wiki name)", () => {+ // The wiki names are hand-curated and not deterministic — normKey is what lets us+ // match e.g. FLY_IO_DEPLOYMENT_GUIDE.md to the existing "Fly-io-Deployment-Guide" page.+ assert.equal(normKey("FLY_IO_DEPLOYMENT_GUIDE.md"), normKey("Fly-io-Deployment-Guide"));+ assert.equal(normKey("API_REFERENCE"), normKey("API-Reference"));+ assert.equal(normKey("A2A-SERVER.md"), "a2aserver");+});++test("toWikiName: acronym-aware Title-Case-dashed name for NEW pages", () => {+ assert.equal(toWikiName("SUPPLY_CHAIN.md"), "Supply-Chain");+ assert.equal(toWikiName("API_REFERENCE"), "API-Reference");+ assert.equal(toWikiName("QUOTA_SHARE"), "Quota-Share");+ assert.equal(toWikiName("ACP"), "ACP");+});++test("toWikiContent: strips YAML frontmatter and prepends the language banner", () => {+ const doc = '---\ntitle: "X"\nversion: 3.8.2\n---\n\n# Heading\n\nBody text.\n';+ const out = toWikiContent(doc);+ assert.ok(out.startsWith(WIKI_BANNER), "must start with the wiki language banner");+ assert.ok(!out.includes("version: 3.8.2"), "frontmatter must be removed");+ assert.ok(out.includes("# Heading"), "content body must be preserved");+ assert.ok(out.endsWith("Body text.\n"), "trailing newline normalized");+});++test("toWikiContent: a document without frontmatter is kept intact (plus banner)", () => {+ const doc = "# No Frontmatter\n\nHello.\n";+ const out = toWikiContent(doc);+ assert.equal(out, WIKI_BANNER + "# No Frontmatter\n\nHello.\n");+});++test("syncHomeCounts: rewrites the cover-page provider/strategy counts", () => {+ const home = "Connect every AI tool to 177 providers.\n**177 AI Providers** · **14 Routing Strategies**\n";+ const out = syncHomeCounts(home, { providers: 226, strategies: 15, mcpTools: null, locales: 42 });+ assert.ok(out.includes("226 providers"));+ assert.ok(out.includes("**226 AI Providers**"));+ assert.ok(out.includes("**15 Routing Strategies**"));+ assert.ok(!out.includes("177"));+});++test("syncHomeCounts: leaves text untouched when a count is null (best-effort MCP)", () => {+ const home = "| **MCP Server** | 87 tools |\n";+ const out = syncHomeCounts(home, { providers: null, strategies: null, mcpTools: null, locales: null });+ assert.equal(out, home);+});++test("parseWikiPage: splits the locale prefix (U+2010) from the page name", () => {+ assert.deepEqual(parseWikiPage("Architecture"), { locale: null, name: "Architecture" });+ // U+2010 HYPHEN separator used by the localized mirrors (e.g. "pt-BR‐Architecture").+ assert.deepEqual(parseWikiPage("pt-BR‐Architecture"), { locale: "pt-BR", name: "Architecture" });+ assert.deepEqual(parseWikiPage("phi‐API-Reference"), { locale: "phi", name: "API-Reference" });+});++test("NEW_PAGE_EXCLUDE: internal reports/plans never become public wiki pages", () => {+ assert.ok(NEW_PAGE_EXCLUDE.has("DOCUMENTATION_AUDIT_REPORT"));+ assert.ok(NEW_PAGE_EXCLUDE.has("README"));+ assert.ok(!NEW_PAGE_EXCLUDE.has("SUPPLY_CHAIN"));+});diff --git a/tests/unit/vertex-media.test.ts b/tests/unit/vertex-media.test.tsnew file mode 100644index 0000000000..b6b8e4196e--- /dev/null+++ b/tests/unit/vertex-media.test.ts@@ -0,0 +1,171 @@+import test from "node:test";+import assert from "node:assert/strict";+import { Buffer } from "node:buffer";++import {+ pcmToWav,+ vertexGenerateSpeech,+ vertexTranscribe,+ vertexGenerateMusic,+ vertexGenerateVideo,+} from "../../open-sse/executors/vertexMedia.ts";++// Service Account credential with a pre-set accessToken so resolveVertexAuth never+// performs a real OAuth token exchange (getAccessToken is skipped when accessToken is present).+function saCredentials(region = "us-central1") {+ return {+ apiKey: JSON.stringify({ project_id: "proj-test", client_email: "[email protected]", private_key: "x" }),+ accessToken: "test-bearer-token",+ providerSpecificData: { region },+ };+}++function expressCredentials() {+ return { apiKey: "express-key-abc", accessToken: null, providerSpecificData: {} };+}++interface FetchCall {+ url: string;+ init: any;+}++function installFetch(responders: Array<(call: FetchCall) => unknown>) {+ const calls: FetchCall[] = [];+ let i = 0;+ (globalThis as any).fetch = async (url: string, init: any) => {+ const call = { url: String(url), init };+ calls.push(call);+ const payload = responders[Math.min(i, responders.length - 1)](call);+ i += 1;+ return {+ ok: true,+ status: 200,+ json: async () => payload,+ text: async () => JSON.stringify(payload),+ };+ };+ return calls;+}++test("pcmToWav writes a valid RIFF/WAVE header with correct sizes", () => {+ const pcm = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);+ const wav = pcmToWav(pcm, 24000);+ assert.equal(wav.subarray(0, 4).toString("ascii"), "RIFF");+ assert.equal(wav.subarray(8, 12).toString("ascii"), "WAVE");+ assert.equal(wav.readUInt32LE(4), 36 + pcm.length); // RIFF chunk size+ assert.equal(wav.readUInt32LE(24), 24000); // sample rate+ assert.equal(wav.readUInt32LE(40), pcm.length); // data chunk size+ assert.equal(wav.length, 44 + pcm.length);+});++test("vertexGenerateSpeech posts generateContent with AUDIO modality and returns WAV", async () => {+ const pcmB64 = Buffer.from([10, 20, 30, 40]).toString("base64");+ const calls = installFetch([+ () => ({+ candidates: [+ { content: { parts: [{ inlineData: { data: pcmB64, mimeType: "audio/L16;codec=pcm;rate=24000" } }] } },+ ],+ }),+ ]);++ const { audio, contentType } = await vertexGenerateSpeech(saCredentials("europe-west4"), {+ model: "gemini-2.5-flash-preview-tts",+ input: "Hello world",+ voice: "Puck",+ });++ assert.equal(contentType, "audio/wav");+ assert.equal(audio.subarray(0, 4).toString("ascii"), "RIFF");+ assert.equal(+ calls[0].url,+ "https://europe-west4-aiplatform.googleapis.com/v1/projects/proj-test/locations/europe-west4/publishers/google/models/gemini-2.5-flash-preview-tts:generateContent"+ );+ const body = JSON.parse(calls[0].init.body);+ assert.deepEqual(body.generationConfig.responseModalities, ["AUDIO"]);+ assert.equal(body.generationConfig.speechConfig.voiceConfig.prebuiltVoiceConfig.voiceName, "Puck");+ assert.equal(calls[0].init.headers.Authorization, "Bearer test-bearer-token");+});++test("vertexGenerateSpeech defaults the voice to Kore", async () => {+ const pcmB64 = Buffer.from([1, 2]).toString("base64");+ const calls = installFetch([+ () => ({ candidates: [{ content: { parts: [{ inlineData: { data: pcmB64, mimeType: "audio/L16;rate=16000" } }] } }] }),+ ]);+ await vertexGenerateSpeech(saCredentials(), { model: "gemini-2.5-flash-preview-tts", input: "hi" });+ const body = JSON.parse(calls[0].init.body);+ assert.equal(body.generationConfig.speechConfig.voiceConfig.prebuiltVoiceConfig.voiceName, "Kore");+});++test("vertexTranscribe posts audio inlineData and returns the joined text", async () => {+ const calls = installFetch([+ () => ({ candidates: [{ content: { parts: [{ text: "the quick brown fox" }] } }] }),+ ]);+ const text = await vertexTranscribe(saCredentials(), {+ model: "gemini-2.5-flash",+ audioBase64: "QUJD",+ mimeType: "audio/mpeg",+ prompt: "Transcribe please",+ });+ assert.equal(text, "the quick brown fox");+ const body = JSON.parse(calls[0].init.body);+ const parts = body.contents[0].parts;+ assert.equal(parts[0].text, "Transcribe please");+ assert.equal(parts[1].inlineData.mimeType, "audio/mpeg");+ assert.equal(parts[1].inlineData.data, "QUJD");+ assert.ok(calls[0].url.endsWith("/gemini-2.5-flash:generateContent"));+});++test("vertexGenerateMusic posts predict to lyria and returns base64 WAV", async () => {+ const calls = installFetch([() => ({ predictions: [{ bytesBase64Encoded: "TY9MUA==" }] })]);+ const { base64, format } = await vertexGenerateMusic(saCredentials(), {+ model: "lyria-002",+ prompt: "relaxing sax",+ });+ assert.equal(base64, "TY9MUA==");+ assert.equal(format, "wav");+ assert.ok(calls[0].url.endsWith("/lyria-002:predict"));+ const body = JSON.parse(calls[0].init.body);+ assert.equal(body.instances[0].prompt, "relaxing sax");+});++test("vertexGenerateVideo submits predictLongRunning then polls fetchPredictOperation", async () => {+ const calls = installFetch([+ () => ({ name: "projects/proj-test/.../operations/op-1" }), // submit+ () => ({ name: "projects/proj-test/.../operations/op-1" }), // poll #1 (not done)+ () => ({+ done: true,+ response: { videos: [{ bytesBase64Encoded: "TVA0VklERU8=" }] },+ }), // poll #2 (done)+ ]);++ const result = await vertexGenerateVideo(saCredentials(), {+ model: "veo-3.0-fast-generate-001",+ prompt: "a cat playing piano",+ aspectRatio: "16:9",+ durationSeconds: 4,+ pollIntervalMs: 1,+ maxWaitMs: 5000,+ });++ assert.equal(result.base64, "TVA0VklERU8=");+ assert.equal(result.format, "mp4");+ assert.ok(calls[0].url.endsWith("/veo-3.0-fast-generate-001:predictLongRunning"));+ assert.ok(calls[1].url.endsWith("/veo-3.0-fast-generate-001:fetchPredictOperation"));+ const submitBody = JSON.parse(calls[0].init.body);+ assert.equal(submitBody.parameters.aspectRatio, "16:9");+ assert.equal(submitBody.parameters.durationSeconds, 4);+ assert.equal(submitBody.instances[0].prompt, "a cat playing piano");+});++test("Express API key uses the project-less publisher endpoint with ?key=", async () => {+ const pcmB64 = Buffer.from([1]).toString("base64");+ const calls = installFetch([+ () => ({ candidates: [{ content: { parts: [{ inlineData: { data: pcmB64, mimeType: "audio/L16;rate=24000" } }] } }] }),+ ]);+ await vertexGenerateSpeech(expressCredentials(), { model: "gemini-2.5-flash-preview-tts", input: "hi" });+ assert.equal(+ calls[0].url,+ "https://aiplatform.googleapis.com/v1/publishers/google/models/gemini-2.5-flash-preview-tts:generateContent?key=express-key-abc"+ );+ assert.equal(calls[0].init.headers.Authorization, undefined);+});diff --git a/tests/unit/vertex-oauth-scopes.test.ts b/tests/unit/vertex-oauth-scopes.test.tsnew file mode 100644index 0000000000..2446fa4409--- /dev/null+++ b/tests/unit/vertex-oauth-scopes.test.ts@@ -0,0 +1,31 @@+import test from "node:test";+import assert from "node:assert/strict";++// #3922 — the Vertex SA access token must carry BOTH cloud-platform (chat/image+// execution on aiplatform.googleapis.com) AND generative-language.retriever+// (live model discovery on generativelanguage.googleapis.com). Dropping the+// second scope makes discovery return 403 ACCESS_TOKEN_SCOPE_INSUFFICIENT and+// silently fall back to the static ~10-model registry list. This guards both.+const { VERTEX_OAUTH_SCOPES } = await import("../../open-sse/executors/vertex.ts");++test("Vertex OAuth scopes include cloud-platform (execution)", () => {+ assert.ok(+ VERTEX_OAUTH_SCOPES.includes("https://www.googleapis.com/auth/cloud-platform"),+ "cloud-platform scope is required for Vertex AI execution"+ );+});++test("Vertex OAuth scopes include generative-language.retriever (discovery)", () => {+ assert.ok(+ VERTEX_OAUTH_SCOPES.includes("https://www.googleapis.com/auth/generative-language.retriever"),+ "generative-language.retriever scope is required for live model discovery"+ );+});++test("Vertex OAuth scopes serialize as a space-delimited string for the JWT", () => {+ const serialized = VERTEX_OAUTH_SCOPES.join(" ");+ assert.equal(+ serialized,+ "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/generative-language.retriever"+ );+});diff --git a/tests/unit/zai-validator.test.ts b/tests/unit/zai-validator.test.tsnew file mode 100644index 0000000000..131fc9bcbf--- /dev/null+++ b/tests/unit/zai-validator.test.ts@@ -0,0 +1,226 @@+import test from "node:test";+import assert from "node:assert/strict";+import http from "node:http";++// #3905 — Z.AI (glm) provider validation must use directHttpsRequest (native HTTPS,+// bypass the undici pool) for the same reason NVIDIA uses it in #3226: api.z.ai+// silently drops idle keep-alive sockets without TCP RST after 502 responses,+// causing undici to reuse dead sockets and hang for up to headersTimeout (600 s).+//+// Test design (same approach as nvidia-nim-validator.test.ts):+// - Import at FILE LOAD so proxyFetch captures the unpatched globalThis.fetch.+// - Redirect the validator at a local HTTP server via providerSpecificData.baseUrl.+// The safeOutboundFetch guard is "none" for validation calls, so 127.0.0.1 is+// reachable. directHttpsRequest accepts plain HTTP URLs in test environments.+// - Assert that (a) the correct auth header is used, (b) 401/403 → "Invalid API key",+// (c) any other status → valid (including 502 which is z.ai's queue timeout, not auth).+const { validateProviderApiKey } = await import("../../src/lib/providers/validation.ts");++async function withMockServer(+ handler: (req: http.IncomingMessage, res: http.ServerResponse) => void,+ fn: (baseUrl: string) => Promise<void>+): Promise<void> {+ const server = http.createServer(handler);+ await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve));+ const address = server.address();+ const port = typeof address === "object" && address ? address.port : 0;+ // Omit the path — the validator appends ?beta=true itself via the baseUrl override.+ const baseUrl = `http://127.0.0.1:${port}`;+ try {+ await fn(baseUrl);+ } finally {+ await new Promise<void>((resolve) => server.close(() => resolve()));+ }+}++test("zai validator returns Invalid API key on 401", async () => {+ await withMockServer(+ (_req, res) => {+ res.writeHead(401, { "content-type": "application/json" });+ res.end(JSON.stringify({ error: { message: "token expired or incorrect", type: "401" } }));+ },+ async (baseUrl) => {+ const result = await validateProviderApiKey({+ provider: "zai",+ apiKey: "bad-key",+ providerSpecificData: { baseUrl },+ });+ assert.equal(result.valid, false);+ assert.equal(result.error, "Invalid API key");+ }+ );+});++test("zai validator returns Invalid API key on 403", async () => {+ await withMockServer(+ (_req, res) => {+ res.writeHead(403, { "content-type": "application/json" });+ res.end(JSON.stringify({ error: { message: "forbidden" } }));+ },+ async (baseUrl) => {+ const result = await validateProviderApiKey({+ provider: "zai",+ apiKey: "bad-key",+ providerSpecificData: { baseUrl },+ });+ assert.equal(result.valid, false);+ assert.equal(result.error, "Invalid API key");+ }+ );+});++test("zai validator accepts a successful 200 probe", async () => {+ await withMockServer(+ (_req, res) => {+ res.writeHead(200, { "content-type": "application/json" });+ res.end(JSON.stringify({ content: [{ text: "x" }] }));+ },+ async (baseUrl) => {+ const result = await validateProviderApiKey({+ provider: "zai",+ apiKey: "valid-key",+ providerSpecificData: { baseUrl },+ });+ assert.equal(result.valid, true);+ assert.equal(result.error, null);+ }+ );+});++test("zai validator treats 502 as valid (z.ai queue timeout is not an auth error)", async () => {+ await withMockServer(+ (_req, res) => {+ res.writeHead(502, { "content-type": "application/json" });+ res.end(JSON.stringify({ error: { message: "job timed out after 120s" } }));+ },+ async (baseUrl) => {+ const result = await validateProviderApiKey({+ provider: "zai",+ apiKey: "valid-key",+ providerSpecificData: { baseUrl },+ });+ assert.equal(result.valid, true);+ }+ );+});++test("zai validator returns error on 404 (wrong endpoint)", async () => {+ await withMockServer(+ (_req, res) => {+ res.writeHead(404, { "content-type": "application/json" });+ res.end(JSON.stringify({ error: "not found" }));+ },+ async (baseUrl) => {+ const result = await validateProviderApiKey({+ provider: "zai",+ apiKey: "any-key",+ providerSpecificData: { baseUrl },+ });+ assert.equal(result.valid, false);+ assert.equal(result.error, "Provider validation endpoint not supported");+ }+ );+});++test("zai validator returns error on 5xx other than 502 (provider down)", async () => {+ await withMockServer(+ (_req, res) => {+ res.writeHead(503, { "content-type": "application/json" });+ res.end(JSON.stringify({ error: "service unavailable" }));+ },+ async (baseUrl) => {+ const result = await validateProviderApiKey({+ provider: "zai",+ apiKey: "any-key",+ providerSpecificData: { baseUrl },+ });+ assert.equal(result.valid, false);+ assert.equal(result.error, "Provider unavailable (503)");+ }+ );+});++test("zai validator sends x-api-key header (Anthropic wire format, not Bearer)", async () => {+ let capturedHeaders: http.IncomingHttpHeaders = {};+ let capturedMethod = "";+ let capturedBody = "";++ await withMockServer(+ (req, res) => {+ capturedHeaders = req.headers;+ capturedMethod = req.method ?? "";+ let body = "";+ req.on("data", (chunk) => {+ body += String(chunk);+ });+ req.on("end", () => {+ capturedBody = body;+ res.writeHead(200, { "content-type": "application/json" });+ res.end(JSON.stringify({}));+ });+ },+ async (baseUrl) => {+ await validateProviderApiKey({+ provider: "zai",+ apiKey: "test-zai-key-123",+ providerSpecificData: { baseUrl },+ });+ }+ );++ assert.equal(capturedMethod, "POST");+ assert.equal(+ capturedHeaders["x-api-key"],+ "test-zai-key-123",+ "must use x-api-key, not Authorization: Bearer"+ );+ assert.ok(+ !capturedHeaders["authorization"],+ `must not send Authorization header, got: ${capturedHeaders["authorization"]}`+ );+ assert.equal(capturedHeaders["anthropic-version"], "2023-06-01");+ assert.equal(capturedHeaders["content-type"], "application/json");++ const body = JSON.parse(capturedBody);+ assert.equal(body.model, "glm-5.1");+ assert.equal(body.max_tokens, 1);+ assert.deepEqual(body.messages, [{ role: "user", content: "test" }]);+});++test("zai validator uses directHttpsRequest (does not proxy through undici pool)", async () => {+ // The key invariant: directHttpsRequest calls safeOutboundFetch with+ // bypassProxyPatch:true, which uses the original (pre-patch) native fetch.+ // This means patching globalThis.fetch AFTER module load must NOT intercept it.+ // If the validator were using validationWrite (undici), globalThis.fetch would+ // still be the patched version at call time and we would see our mock called.+ let mockCalled = false;+ const originalFetch = globalThis.fetch;+ globalThis.fetch = async (...args: Parameters<typeof fetch>) => {+ mockCalled = true;+ return originalFetch(...args);+ };++ try {+ await withMockServer(+ (_req, res) => {+ res.writeHead(200, { "content-type": "application/json" });+ res.end("{}");+ },+ async (baseUrl) => {+ await validateProviderApiKey({+ provider: "zai",+ apiKey: "key",+ providerSpecificData: { baseUrl },+ });+ }+ );+ } finally {+ globalThis.fetch = originalFetch;+ }++ assert.equal(+ mockCalled,+ false,+ "zai validator must use bypassProxyPatch path, not the patched globalThis.fetch"+ );+});