- Move wreq-js and tls-client-node to optionalDependencies
- Lazy-load wreq-js WS proxy with graceful 503 when unavailable
- Auto-detect Android platform for headless mode (no browser open)
- Set GYP_DEFINES for better-sqlite3 build on Android/ARM
- Extended build timeout to 600s for ARM compilation
- Skip wreq-js binary fix on Android (unsupported platform)
- Platform warnings for unsupported features (WS proxy, TLS, Electron, MITM)
Co-authored-by: t-way666 <t-way666@users.noreply.github.com>
- Force skills: "" and params.stream: true in Command Code wrapper
- Align validation probe payload with upstream-required shape
- Default validation model to deepseek/deepseek-v4-flash
Co-authored-by: ddarkr <ddarkr@users.noreply.github.com>
Remove tracked .playwright-mcp/ generated artifacts (CSP error logs,
accessibility tree snapshots) and add the directory to .gitignore.
Co-authored-by: backryun <backryun@users.noreply.github.com>
Remove every reference to the competing open-source project from docs,
comparisons, i18n mirrors, comments, and source files so the branch
history does not expose competitive intelligence.
The Debug sidebar section (Translator, Playground, Search Tools) was
hidden on new installs because debugMode was not in the settings
defaults object. This made data?.debugMode === true evaluate to false,
while the toggle in System & Storage appeared active — an inconsistency.
Changes:
- Add debugMode: true to getSettings() defaults in settings.ts
- Align SystemStorageTab useState initial value to true
- Update CHANGELOG with fix entry
- management.ts: replace === with timingSafeEqual for CLI token comparison
- machineToken.ts: salt upgraded to omniroute-cli-auth-v1; OMNIROUTE_CLI_SALT env
var honoured for rotation; full 64-char SHA-256 hex token
- tray.ps1: accept .png via GDI+ Bitmap->Icon handle; Windows tray works without .ico
- tray.ts: getIconPath() tries icon.ico then icon.png on Windows
- compression/types.ts: DEFAULT_CAVEMAN_CONFIG.preservePatterns filled with
six defaults (fenced code, inline code, URLs, paths, error lines, stack traces)
- CLAUDE.md: Hard Rule #15 — spawn-capable routes must use isLocalOnlyPath()
- .env.example + docs/reference/ENVIRONMENT.md: document OMNIROUTE_CLI_SALT
- docs/security/CLI_TOKEN.md: new (was referenced in changelog but missing)
- docs/security/ROUTE_GUARD_TIERS.md: new (was referenced in changelog but missing)
- tests/unit/lib/machineToken.test.ts: updated for 64-char token; added
OMNIROUTE_CLI_SALT env-var rotation test
- Add az locale to config/i18n.json (source of truth, 42 locales total)
- Create src/i18n/messages/az.json (UI strings from en.json base)
- Create docs/i18n/az/ directory with full documentation set
- Add 🇦🇿 Azərbaycan dili to README.md language bar
- Add az entry to docs/i18n/README.md index (40 doc languages)
- Add az to generate-multilang.mjs LOCALE_SPECS (Google TL: az)
- Add az to i18n_autotranslate.py lang_map
- Update CHANGELOG.md with feat(i18n) entry
Update changelog entries to include associated PR numbers and thank-you
attributions for recent features, improving release documentation
accuracy and contributor recognition.
Adds bin/cli/runtime/sqliteRuntime.mjs that resolves better-sqlite3 from:
(1) bundled optionalDependency, (2) ~/.omniroute/runtime/ install,
(3) lazy npm install into runtime dir, (4) node:sqlite stdlib (Node >=22.5),
(5) bundled sql.js WASM. Each native binary is validated against expected
platform magic bytes (ELF/Mach-O/PE) before load.
Adds bin/cli/runtime/magicBytes.mjs with validateBinaryMagic() helper
(9 tests). Adds bin/cli/runtime/index.mjs as warmUpRuntimes() orchestrator.
Adds scripts/postinstall.mjs warm-up hook (non-fatal, skipped in CI).
Integrates it as the last step of scripts/build/postinstall.mjs.
Extends src/lib/db/core.ts with ensureDbInitialized() (async, idempotent)
and getDriverInfo() so the startup orchestrator can await the resolver
before any DB access, enabling graceful degradation without crashing the
process on missing better-sqlite3.
Solves Windows EBUSY error on 'npm install -g omniroute@latest' while the
previous version is still running, and works in environments without C++
build tools or with unreachable npm registry.
Documents OMNIROUTE_SKIP_POSTINSTALL in .env.example and ENVIRONMENT.md.
Ref: 9router/cli/hooks/sqliteRuntime.js (pattern origin).
Exports SHARED_BOUNDARIES constant (ported from 9router cavemanPrompts.js)
that instructs the model to write normally for security warnings,
irreversible confirmations, and multi-step sequences, then resume terse
style. Appended to all 6 languages x 3 intensity levels. Polished full/ultra
English prompts with article-drop and short-synonym guidance.
Fixes alreadyApplied check order so SHARED_BOUNDARIES keywords in the
injected system prompt don't trigger a false-positive bypass on re-injection.
Tier 1 — LOCAL_ONLY: /api/mcp/ and /api/cli-tools/runtime/ are
restricted to loopback regardless of auth (prevents CVE-class exposure
of process-spawning endpoints via tunnels or LAN access).
Tier 2 — ALWAYS_PROTECTED: /api/shutdown and /api/settings/database
always require auth, even when requireLogin=false.
Tier 3 — MANAGEMENT: existing behaviour (auth bypassed when
requireLogin=false). IPv6 loopback [::1] correctly parsed.
Generates a deterministic HMAC-SHA256(key=rawMachineId, msg=salt) token
in src/lib/machineToken.ts. The management authz policy now accepts this
token via x-omniroute-cli-token when Host is loopback, letting the local
CLI process call management APIs without requiring a user login session.
`omniroute config token` prints the token for manual use.
When users configured `visionBridgeModel: "gemini/gemini-2.0-flash"` (or
any non-Anthropic prefix like `openrouter/...`, `google/...`), every
request failed with `Vision API error 401: You didn't provide an API
key` from OpenAI. The helper hardcoded `https://api.openai.com/v1` as
the base URL and `OPENAI_API_KEY` as the auth header for any model
that wasn't `anthropic/*`, so users without an OpenAI key (or who
wanted to use Gemini/OpenRouter/OmniRoute self-loop) had no path that
worked.
This change adds two env vars:
- VISION_BRIDGE_BASE_URL — alternate OpenAI-compatible base URL.
Priority: VISION_BRIDGE_BASE_URL → legacy OpenAI URL env →
api.openai.com (default).
- VISION_BRIDGE_API_KEY — alternate API key for that endpoint.
Priority: explicit caller arg → VISION_BRIDGE_API_KEY →
per-provider env (Anthropic/Google/OpenAI) → OpenAI fallback.
Anthropic models (anthropic/*) keep their dedicated `x-api-key` path
with the Anthropic env key unchanged — the override only affects the
OpenAI-compat branch, since the wire format differs.
Operators now have stable paths to:
- Route through OmniRoute itself (any registered model works):
VISION_BRIDGE_BASE_URL=http://localhost:20128/v1
VISION_BRIDGE_API_KEY=sk-<omniroute-key>
- Use Google's Gemini OpenAI-compat endpoint directly:
VISION_BRIDGE_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai
- Use OpenRouter directly:
VISION_BRIDGE_BASE_URL=https://openrouter.ai/api/v1
Reported by @kapustacool-lgtm. Documented in `.env.example` and
`docs/reference/ENVIRONMENT.md`. 11 unit tests cover env precedence
and the Anthropic-bypass guarantee.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cross-platform system tray for `omniroute --tray`: Windows uses a
PowerShell NotifyIcon script (zero native binary, AV-safe); macOS/Linux
use systray2 lazy-installed at runtime into ~/.omniroute/runtime/.
Includes per-platform autostart (LaunchAgent / .desktop / registry) and
`omniroute config tray <enable|disable>` CLI command.
DISPLAY added to env-sync allowlist as an OS/X11 variable, not an
OmniRoute config variable.
Adds /skills/omniroute*/SKILL.md following the Anthropic skill manifest
spec (frontmatter name/description + self-contained body): chat, image,
tts, stt, embeddings, web-search, web-fetch, mcp, a2a + entry point.
External agents (Claude Desktop, ChatGPT, Cursor, Cline) can fetch one
raw GitHub URL to learn how to call OmniRoute — zero-friction onboarding.
OmniRoute-specific differentiators (mcp + a2a skills) extend the 9router
pattern with 2 extra manifests not present in the reference.
Adds structural lint test (tests/unit/docs/skillManifestsLint.test.ts)
enforcing frontmatter, env-var references, and trigger-phrase quality.
Adds "AI Agent Skills" section to README.md root.
Ref: 9router/skills/ pattern (adapted).
Adds compression engine that collapses repeated sibling lines (≥30 items
with same indent + role prefix) into head + summary + tail, preserves
[ref=eXX] anchors required by Playwright/computer-use MCPs, and
hard-truncates oversized text with a navigation hint footer.
Reduces token usage 60-80% on browser snapshots/accessibility trees from
external MCP servers (playwright-mcp, chrome-mcp). Configurable via
settings.compression.mcpAccessibility namespace.
Changes:
- open-sse/services/compression/engines/mcpAccessibility/: new engine
(constants.ts, collapseRepeated.ts, index.ts with smartFilterText)
- open-sse/services/compression/types.ts: re-exports McpAccessibilityConfig
- src/lib/db/compression.ts: getMcpAccessibilityConfig/setMcpAccessibilityConfig
- src/lib/db/migrations/056_mcp_accessibility_compression.sql: default settings
- open-sse/mcp-server/server.ts: apply filter to all tool result text blocks
- tests/unit/compression/mcpAccessibility.test.ts: 4 unit tests
- tests/unit/mcp/serverSmartFilter.test.ts: 4 integration tests (DB getter/setter)
Ref: 9router/src/lib/mcp/stdioSseBridge.js:14-90 (algorithm origin).
The 1.0.0 release of the package was broken end-to-end:
1. index.js re-exported from "./index.ts" — Node can't import .ts at runtime,
so any consumer who `npm install`ed the package got ERR_UNKNOWN_FILE_EXTENSION.
2. The emitted provider shape did not match the OpenCode schema
(https://opencode.ai/config.json). It used a custom `{id, name, npm, options, auth}`
instead of the schema's `{npm: "@ai-sdk/openai-compatible", name, options, models}`.
3. README told users to pass `baseURL: "http://localhost:20128/v1"` but the code
appended `/v1` again — every request would 404 at `/v1/v1/...`.
4. No build step, no LICENSE file, no repository/author/engines fields, no tests.
This rewrite:
- Moves source under `src/`, adds a tsup build emitting CJS + ESM + .d.ts.
- `createOmniRouteProvider` now returns a schema-valid entry with
`npm: "@ai-sdk/openai-compatible"` + `models: Record<string, { name }>`.
- Adds `buildOmniRouteOpenCodeConfig` for full-document scaffolding.
- `normalizeBaseURL` deduplicates trailing `/` and `/v1`, accepts both forms,
and rejects malformed URLs and empty inputs.
- 13 unit tests covering URL normalisation, input validation, default model
catalog, custom models + labels, dedup/trim behaviour, and JSON round-trip.
- Adds LICENSE, full package.json (repository, engines, scripts, exports),
.gitignore, .npmignore, tsconfig.json, and a comprehensive README.
- Resets version to 0.1.0 to signal the pre-1.0 reset (1.0.0 was never on npm).
Documentation:
- New `docs/frameworks/OPENCODE.md` covering both integration paths (CLI vs npm),
URL normalisation, auth modes, troubleshooting, and runtime flow.
- README.md links the package and points to the new doc.
- CHANGELOG entry under Unreleased > Changed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Five issues raised in the v3.8.0 release review, all release-blocking:
P1 — open-sse/services/tokenRefresh.ts
Read Windsurf Firebase API key from WINDSURF_CONFIG.firebaseApiKey
(resolvePublicCred wrapper) instead of process.env directly. Without
this, the literal removal from .env.example silently broke browser-flow
Windsurf/Devin token refresh.
P1 — open-sse/translator/request/openai-to-kiro.ts
Mark synthetic "(empty)" turns injected for assistant-first chats as
non-enumerable __synthetic and skip them when deriving conversationId
via uuidv5. Prevents unrelated chats from colliding on the same upstream
Kiro/AWS Builder ID context.
P2 — open-sse/utils/publicCreds.ts
Harden decodePublicCred against raw credential overrides outside
RAW_VALUE_PATTERN: strict-base64 alphabet check + printable-plain check
on the decoded result. Buffer.from(v, "base64") is lenient and was
silently mangling unrecognized raw values.
P2 — src/sse/services/auth.ts
Gate the x-api-key fallback on the anthropic-version header. Without
this scoping, local-mode requests with placeholder x-api-key from
non-Anthropic clients were rejected as Invalid API key even with
REQUIRE_API_KEY=false.
P2 — src/app/api/providers/[id]/test/route.ts
Move Qoder OAuth+PAT disambiguation BEFORE the CLI-runtime early-return
that was making the new message branch unreachable for the target
scenario from #2247.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prevent raw exception messages from leaking stack frames or absolute
paths in the console logs and token health endpoints.
Also harden the i18n mirror move script by replacing shell-based git
commands with execFileSync and a safer fallback for untracked files.
Add regression coverage for clearing provider-scoped synced available models without affecting other providers.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ensure provider-level delete all removes synced available model lists so imported models do not reappear after clearing managed models.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Prevent synced imported and fallback provider models from showing row-level delete actions, while keeping custom/manual and alias-only deletion behavior intact.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CodeQL js/stack-trace-exposure does not recognize sanitizers reached
through a custom helper indirection — flagging callsites like
open-sse/utils/error.ts::errorResponse and
open-sse/executors/cursor.ts::buildErrorResponse even though both route
through sanitizeErrorMessage().
Record the dismissal precedent (alerts #224 and #231, May 2026):
- Add a "Known CodeQL limitation" section in
docs/security/ERROR_SANITIZATION.md documenting how to handle future
occurrences (verify callchain → verify test coverage → dismiss with
reference, do NOT duplicate the pattern inline).
- Extend CLAUDE.md Hard Rule #14 with the precedent so the next
engineer doesn't try to "fix" the false positive by weakening the
shared sanitizer.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes#2213
Conflict resolution: kept both images field (HEAD) and origin field (PR),
kept toolsAttached return value (HEAD) while incorporating all 8mbe
improvements (schema normalization, synthetic user guard, orphaned tool
results, alternating role enforcement). All 16 tests pass.
Blackbox's `/api/chat` now rejects requests whose `validated` field
doesn't match the frontend `tk` token (exported from app.blackbox.ai's
Next.js bundle), returning HTTP 403 even when the session cookie is
valid and the subscription is active. The previous executor sent a
random UUID, which works only until Blackbox enforces the check.
This change:
- Adds `resolveBlackboxValidatedToken()` that returns
`BLACKBOX_WEB_VALIDATED_TOKEN` when set, otherwise falls back to the
legacy random UUID (no regression for users who already work).
- Detects 403 responses whose body indicates a token-specific failure
("invalid validated token", "validation token", etc.) and replaces
the generic "cookie expired" message with explicit guidance to set
BLACKBOX_WEB_VALIDATED_TOKEN. The cookie-expired path is preserved
for non-token 401/403.
- Documents the env var in `.env.example` and
`docs/reference/ENVIRONMENT.md` (env-doc-sync check passes).
Deliberately NOT included: runtime scraping of Blackbox's Next.js
chunks to auto-extract `tk`. That coupling to their bundle hash would
silently break on every frontend deploy — the env override is the
stable path for operators who have already resolved the token.
Reported by @kazimshah39 with detailed root-cause analysis.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Custom OpenAI-/Anthropic-compatible providers ship with synthetic IDs
like "openai-compatible-chat-<uuid>". ApiManagerPageClient was grouping
models by raw `model.owned_by`, so the user saw the full synthetic id
in the model picker.
Wrap `model.owned_by` with the existing centralized
`getProviderDisplayName` helper (already used by Endpoint, Health, and
Combos pages). The helper detects the dynamic-compatible pattern and
renders it as "Compatible (openai)" / "Compatible (anthropic)" — a
small but meaningful improvement that takes the dashboard one step
closer to issue #260's "no raw IDs in the UI" goal.
Showing the user-entered node name ("Poe") instead of the generic
"Compatible (openai)" label remains a follow-up (requires fetching
/api/provider-nodes here and matching by id/prefix); tracked separately.
Reported by @pulyankote with a complete surface-by-surface table.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>