- Override plist to v4.0.0 which passes mandatory mimeType to DOMParser
- Add USERPROFILE sanitization on Windows to avoid EPERM on junction points
- Add NPM_CONFIG_LEGACY_PEER_DEPS to Electron workflow install step
Update release notes and project documentation to reflect the
current 160+ provider catalog, 29-tool MCP server footprint, and
newly shipped v3.7.0 features and fixes.
This keeps public-facing docs, architecture references, and agent
guidance aligned with the actual release contents and supported
capabilities.
CI sets INITIAL_PASSWORD and JWT_SECRET env vars, which makes
isAuthRequired() return true even with a fresh temp DB. The tests
call route handlers directly without session cookies, so auth must
be fully disabled by clearing all auth-related env vars.
- guide-settings-route.test.ts: control XDG_CONFIG_HOME so OpenCode config
path resolves to the test dummy dir (CI runners have XDG set)
- proxy-registry-flow.test.ts: disable DASHBOARD_PASSWORD to prevent 401 on
direct route handler calls (CI postinstall auto-generates it)
- _chatPipelineHarness.ts: clear DASHBOARD_PASSWORD for all integration tests
using the shared chat pipeline harness
Replace placeholder builtin skill responses with real file, HTTP, and
code-execution flows constrained to per-key workspaces, size limits, and
sanitized request headers.
Harden the Docker sandbox with dropped capabilities, tmpfs-backed
workdirs, configurable runtime limits, and clearer failure behavior for
disabled browser automation.
Also consolidate legacy dashboard usage navigation into logs, remove
stale sidebar and SSE backup artifacts, and expand tests to lock in the
new runtime and routing contracts.
The parseToml function was stripping all value quotes uniformly, turning
every value into a JS string. When toToml re-serialized, unquoted
integers like 2 were wrapped in quotes becoming "2" — a TOML string.
This broke Codex CLI which expects u32 for tui.model_availability_nux:
Error loading config.toml: invalid type: string "2", expected u32
Now parseToml detects booleans (true/false), integers, and floats,
preserving their native JS types. formatTomlValue already handles
number/boolean types correctly, so round-tripping no longer corrupts
third-party config sections.
Prevent repeated provider-limit refresh requests by guarding the bulk
refresh flow with a ref-backed lock instead of a stale callback
dependency.
Also avoid tying eval data loading to translation updates and replace the
fetch failure path with a static error so the effect runs predictably.
Refresh English cost dashboard copy to provide clearer labels and empty
state messaging.
Pass the entered sudo password through endpoint enable and disable
requests so macOS and Linux installs can start or stop Tailscale
without retrying unauthenticated commands.
Also detect and cache the active tailscaled socket before issuing CLI
calls, preferring the system daemon socket when available so status and
funnel operations target the running service correctly.
Populate newly introduced dashboard and provider UI message keys in all
locale bundles to prevent missing translation lookups after the v3.7.0
changes.
Also fix quota reset handling so expired limits are only marked stale
when usage is still pending, adjust combo form dark-mode backgrounds,
and expand the prepublish hash rewrite to handle nested package paths.
Several merges (primarily #1602 by @JasonLandbridge) added new i18n keys
with English values to all locale files instead of translated text.
This commit auto-translates all remaining untranslated pt-BR.json keys
using Google Translate, with manual fixups for technical terms (Proxy,
Fallback, Streaming, Playground, Skills, etc).
commit ff0a718e65
Author: Jean Brito <jean.f.brito@gmail.com>
Date: Sat Apr 25 16:45:23 2026 -0300
feat(providers): add CrofAI as a built-in API-key provider
CrofAI (https://crof.ai) ships an OpenAI-compatible /v1 endpoint with
Bearer auth and a /v1/models discovery route. It hosts a curated set of
hosted open models (DeepSeek V3.2/V4 Pro, Kimi K2.5/K2.6, GLM 4.7/5.x,
Gemma 4, MiniMax M2.5, Qwen3.5/3.6) that today users can only attach
through the generic "Add OpenAI Compatible" flow — losing branding,
defaults, prefix routing, and showing up under "API Key Compatible
Providers" instead of the curated "API Key Providers" section.
This change wires CrofAI as a first-class built-in, mirroring how Kimi
is registered (OpenAI format + bearer auth + seed model list).
Files touched (kept tight):
- src/shared/constants/providers.ts
Add `crof` to APIKEY_PROVIDERS with id/alias/name/icon/color/textIcon/website.
- src/shared/constants/config.ts
Register PROVIDER_ENDPOINTS.crof = "https://crof.ai/v1/chat/completions".
- open-sse/config/providerRegistry.ts
Add a `crof` REGISTRY entry: format "openai", executor "default",
authType "apikey", authHeader "bearer", and a seed model list pulled
from a live GET https://crof.ai/v1/models on 2026-04-25 (DeepSeek,
Kimi, GLM, Gemma, MiniMax, Qwen variants). Runtime /models discovery
keeps the live catalog up to date.
- src/shared/components/ProviderIcon.tsx
Map `crof -> "crof"` in PROVIDER_ICON_MAP. Not added to PNG_PROVIDERS
so the UI falls back to the textIcon ("CR") until a logo asset ships
at public/providers/crof.png.
- tests/unit/crof-provider.test.ts (new)
Pins the registration shape (provider identity, base URL, registry
entry, seed model families). Required by the repo's PR Test Policy.
Verified end-to-end against a locally rebuilt image:
- CrofAI appears under "API Key Providers" alongside GLM Coding/Minimax.
- The connection-add dialog opens with title "Add CrofAI API Key".
- POST /api/providers/validate returns "Valid" against /v1/models.
- POST /api/providers persists a connection (testStatus=active).
- POST /v1/chat/completions { model: "crof/kimi-k2.5", ... } returns 200
with a real Kimi K2.5 response — full proxy path resolves through the
new registry entry.
- npm run test:unit passes locally including tests/unit/crof-provider.test.ts.
Notes for the maintainer:
- No logo file is included; happy to follow up with a PNG for
public/providers/crof.png. Until then the UI uses the "CR" textIcon.
- Pricing (src/shared/constants/pricing.ts) is intentionally not
hardcoded — CrofAI exposes per-model pricing via /v1/models response,
and runtime sync is preferable to stale baked-in numbers. Happy to add
a stub block if requested.
- Anthropic-compatible endpoint (https://anthropic.nahcrof.com/v1/messages)
is not wired in this PR. Users can still add it via "Add Anthropic
Compatible" if needed.
# Conflicts:
# src/shared/components/ProviderIcon.tsx
Require management authentication across combo, settings, skill,
webhook, provider auth, restart, and shutdown management routes to
prevent unauthenticated access to privileged operations.
Tighten the OpenAPI try endpoint to only proxy same-origin OmniRoute API
paths and strip hop-by-hop or forwarded headers before dispatching.
Add unit coverage for the new auth guards and proxy validation rules.
- Added requireManagementAuth to /api/logs/export
- Added requireManagementAuth to /api/logs/console
- Added requireManagementAuth to /api/compliance/audit-log
- Increased minimum password length from 4 to 8 in reset-password CLI
Reported by user testing in Open WebUI: across three turns
user "test 1" -> "1"
user "test 2" -> "12" (should be "2")
user "test 3. reply only with 3" -> "1123" (should be "3")
The model was literally APPENDING prior assistant outputs into the new
generation instead of producing a fresh response. Root cause: when
sending each prior turn as a separate `assistant`-role entry in
`/backend-api/f/conversation`'s `messages` array, ChatGPT's web API
("action: next") treats those as in-progress messages the model can
continue rather than as completed turns. So the new generation extends
the most recent assistant message.
Fix: don't replay prior turns as separate messages. Instead fold the
full history into the system message as plain text and send only the
current user query as a single new turn. Verified end-to-end:
Turn 1 -> "1"
Turn 2 -> "2"
Turn 3 -> "3"
user "favorite color is teal" / assistant "Got it" / user "what color?"
-> "Teal" (memory still preserved through the system-message channel)
Streaming + multi-turn -> correct, real-time chunks
Updated two unit tests that previously asserted history items showed up
as separate `user`/`assistant` messages in the request — they now check
for the single-user-message + history-in-system-message shape.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Round of fixes addressing the gemini-code-assist and chatgpt-codex review
comments on the initial PR.
## High priority
- **PoW solver no longer blocks the event loop** (gemini #1, #2). The 100k
prekey solver and 500k proof-of-work solver were synchronous SHA3-512
loops that pinned a CPU core for tens to hundreds of milliseconds per
request. Both are now async and `await`-yield to the event loop every
1000 iterations via setImmediate, so concurrent requests and I/O still
get scheduled. Wall time is approximately the same; what changes is
fairness, not throughput.
- **Real upstream streaming for stream=true requests** (codex #6). The
conv call now passes `stream: true` through to the TLS client when the
caller asked for streaming. The TLS client uses tls-client-node's
streamOutputPath primitive to write the response body to a temp file
as it arrives, and we tail that file as a ReadableStream so clients
see chunks in real time instead of getting one buffered burst at the
end. Also peeks the first 256 bytes — if the response starts with
`{` it's almost certainly a JSON error envelope, so we wait for the
full body and surface as a non-streaming error response.
## Medium priority
- **Per-cookie device id** (gemini #3). Replaced the single
process-wide DEVICE_ID with a per-cookie SHA-256-derived UUID that's
stable across requests for one connection but unique per cookie. This
matches how the browser's persistent oai-did cookie behaves and
avoids cross-account fingerprint sharing. Cache is bounded to 200
entries with FIFO eviction.
- **Removed dead conv-cache code** (gemini #4). The convCache /
convLookup / convStore trio (~70 LOC) was unused — conversationId is
hard-pinned to null because Temporary Chat conversation_ids 404 on
reuse. Deleted entirely; the comment explains why we don't persist.
- **No more console.log in the conv 4xx path** (gemini #5). Replaced
with log?.warn so it respects the application's logging
configuration.
- **Bound the warmup cache** (codex #7). The (cookie, accessToken) ->
timestamp map was unbounded; long-running multi-user deployments
with rotating tokens would grow it forever. Now capped at 200
entries with FIFO eviction (Map iteration order = insertion order).
- **Honor abort signals in TLS fetch** (codex #8). tlsFetchChatGpt now
checks options.signal before issuing the upstream call, after the
call returns, and the streaming body listens for abort to stop
tailing the temp file. tls-client-node's koffi binding can't cancel
an in-flight request mid-call, but we no longer process / re-emit a
response that the caller has already given up on.
## Tests
All 27 chatgpt-web tests still pass; updated several to find calls by
URL via findIndex rather than hardcoded indices, since the warmup
sequence (/me, /conversations, /models) and two-stage Sentinel
(prepare + chat-requirements) shifted positional offsets.
Manually verified end-to-end:
- Non-streaming completions
- Streaming completions (real-time chunks; SSE [DONE] terminator)
- Multi-turn with full history each turn (memory preserved correctly)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a new chatgpt-web provider that routes through chatgpt.com's internal
backend-api using a Plus/Pro subscription session cookie, enabling access
to GPT-5.x models without an OpenAI API key.
Heavier than perplexity-web/grok-web because chatgpt.com layers more bot
protection — this PR builds out the full pipeline needed to look like a
real browser session.
## New executor: open-sse/executors/chatgpt-web.ts
Auth/request pipeline (per chat completion):
1. exchangeSession() GET /api/auth/session cookie -> JWT (cached ~5min)
2. fetchDpl() GET / scrape data-build + script src
3. runSessionWarmup() GET /backend-api/me, /conversations, /models
4. POST /sentinel/chat-requirements/prepare -> prepare_token
5. POST /sentinel/chat-requirements -> chat-requirements-token + PoW seed/diff
6. solveProofOfWork() SHA3-512 loop -> "gAAAAAB..." sentinel proof token
7. POST /backend-api/f/conversation with all sentinel headers
8. parse SSE stream -> OpenAI chat.completion[.chunk] format
Notable details:
- 18-element prekey config matching chat2api/openai-sentinel (browser fingerprint
values, U+2212 MINUS SIGN in `webdriver−false`). Thin shapes get escalated to
mandatory Turnstile.
- Two-stage Sentinel handshake (/prepare + /chat-requirements) — sending only
the prepare result returns a 403 "Unusual activity" response.
- `turnstile.required: true` from Sentinel is treated as advisory; the conv
endpoint accepts requests without a Turnstile token as long as PoW + chat-
requirements-token are valid. Optional bring-your-own Turnstile via
`providerSpecificData.turnstileToken` for accounts that hard-require it.
- SSE parser tracks message_id and resets the accumulator on a new turn —
chatgpt.com echoes prior assistant messages (with status finished_successfully)
before sending the new turn.
- entity["...","value", ...] internal markup stripped from output (browser
renders these client-side).
- Conversation-continuity cache disabled by default: we send
history_and_training_disabled: true (Temporary Chat mode) and those
conversation_ids expire too fast to reuse — re-using returned 404. Each
request now sends conversation_id: null and replays full history, matching
what Open WebUI and OpenAI-API-style clients send anyway.
## TLS impersonation: open-sse/services/chatgptTlsClient.ts
ChatGPT's Cloudflare config pins cf_clearance to JA3/JA4 TLS fingerprint +
HTTP/2 SETTINGS frame. Plain Node Undici fetch always returns
cf-mitigated: challenge regardless of cookies. The wrapper module loads
`tls-client-node` (Firefox 148 fingerprint) in native runtime mode (.so via
koffi) — managed mode spawns a sidecar that conflicts with OmniRoute's
global fetch proxy patch.
- Lazy singleton TLSClient with process exit hooks
- Streaming-capable (file tail) and non-streaming modes
- Test injection point: __setTlsFetchOverrideForTesting() lets unit tests mock
the client without touching globalThis.fetch
## Provider wiring
- open-sse/executors/index.ts — register ChatGptWebExecutor with cgpt-web alias
- open-sse/config/providerRegistry.ts — registry entry, format=openai,
authHeader=cookie, model gpt-5.3-instant
- src/shared/constants/providers.ts — WEB_COOKIE_PROVIDERS UI metadata
(icon, color, authHint)
- src/lib/providers/validation.ts — validateChatGptWebProvider hits
/api/auth/session via the TLS client, detects cf-mitigated/HTML responses
and returns a clear "paste full Cookie line" hint instead of a generic
"Invalid"
- next.config.mjs — mark tls-client-node, koffi, tough-cookie as external
packages (Turbopack can't bundle the native .so)
## Cookie format
Validator and executor accept any of:
- bare value: "eyJhbGc..."
- unchunked cookie line: "__Secure-next-auth.session-token=eyJ..."
- chunked cookie line: "__Secure-next-auth.session-token.0=...; __Secure-next-auth.session-token.1=..."
- full DevTools Cookie header line: "Cookie: __Secure-next-auth.session-token.0=...; cf_clearance=...; ..."
NextAuth chunks the JWE when it exceeds 4KB; chunked cookies pass through
verbatim (NextAuth reassembles server-side). Recommend pasting the full
DevTools Cookie line so cf_clearance, __cf_bm, _cfuvid, _puid travel along —
without cf_clearance, Cloudflare blocks the request before NextAuth sees it.
## Tests
tests/unit/chatgpt-web.test.ts — 27 tests, all passing:
- Registration + alias resolution
- Token exchange (cookie -> Bearer flow)
- Token cache TTL
- Refreshed cookie surfaced via onCredentialsRefreshed callback
- Sentinel call ordering (session -> prepare -> chat-requirements -> conv)
- Sentinel chat-requirements-token forwarded on conv request
- PoW token has gAAAAAB prefix
- Turnstile.required: true does NOT block conv (passes through)
- Non-streaming chat.completion JSON
- Streaming SSE chunks ending with [DONE]
- Cumulative-parts diffing yields non-overlapping deltas
- Errors: 401 session, 403 sentinel, 429 conv rate-limit
- Empty messages -> 400 without any fetch
- Missing apiKey -> 401 without any fetch
- Cookie format: bare value, unchunked, chunked, "Cookie: ..." DevTools line
- Conversation continuity: each call starts a fresh conversation
- Browser-like headers on conv POST (UA, Origin, Sec-Fetch-Site, Accept)
- Payload shape (action, model=gpt-5-3, history_and_training_disabled)
- Provider registry contains chatgpt-web with gpt-5.3-instant model
Verification: typecheck:core clean, lint clean (no new warnings),
end-to-end manually verified across single-turn, multi-turn (memory
preserved), streaming, and Open WebUI-style sequential growing-history
flows.
## References
- bogdanfinn/tls-client (Go) — TLS impersonation upstream
- fatihkabakk/tls-client-node — Node bindings
- lanqian528/chat2api — Sentinel/PoW/prekey reference impl (Python)
- leetanshaj/openai-sentinel — Prekey config + SHA3-512 solver
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Register AgentRouter across the provider registry, pricing, docs, and
dashboard metadata so it appears as a first-class OpenAI-compatible
passthrough option.
Add a dedicated `/api/models/test` endpoint and provider-page controls
for on-demand single-model diagnostics, including latency feedback and
success/error status, to help verify mappings without triggering broader
connection tests or rate limits.
Align header casing expectations in provider validation tests with the
current registry contract.