- #1712: Strip existing billing headers before injecting to fix prompt cache misses
- #1719: Strip output_config.format for non-Anthropic Claude endpoints
- #1707: Set terminal error state on quality validation failure (false ALL_ACCOUNTS_INACTIVE)
- #1706: Wrap proxy_assignments queries in try-catch for missing table on Electron
- #1704: Fix Windows file URL path resolution in migration runner with cwd fallback
GLM/ZhipuAI rejects system role messages with 422 'Input should be
user or assistant'. When memory injection adds a system-role message,
GLM combo targets fail because the system message survives into the
upstream request.
Fix:
- injection.ts: add glm, glmt, glm-cn, zai, qianfan to
PROVIDERS_WITHOUT_SYSTEM_MESSAGE so memory is injected as user role
- roleNormalizer.ts: add exact 'glm' model match to
MODELS_WITHOUT_SYSTEM_ROLE for Pollinations and bare model ids
Test: 22 new unit tests covering all GLM variants + regression checks
for openai/anthropic providers.
Closes#1701
The previous 90% default treated Codex accounts as unavailable while they
still had ~10% quota remaining. A 99% threshold reserves only a minimal
safety margin near true exhaustion while preserving usable quota.
- Export DEFAULT_QUOTA_THRESHOLD_PERCENT=99 from quotaCache.ts
- Replace CODEX_QUOTA_THRESHOLD_PERCENT in auth.ts with shared constant
- Update quota policy tests to match new default
Co-authored-by: dhaern <manker_lol@hotmail.com>
CodeQL js/prototype-polluting-assignment tracks Object.assign on
dynamically-keyed objects as a potential pollution vector, even when
runtime guards (isSafeKey) are in place. Replace with spread assignment
which creates a new value — CodeQL does not flag this pattern.
Addresses remaining alerts #167 and #168.
- Replace polynomial regex /\/+$/ with loop-based stripTrailingSlashes()
across 8 enterprise provider configs (azure-openai, azureAi, bedrock,
datarobot, oci, sap, watsonx, audioSpeech) — fixes js/polynomial-redos
- Add prototype-pollution denylist guard in usageHistory.ts to reject
__proto__/constructor/prototype as model keys — fixes
js/prototype-polluting-assignment (#167, #168)
- Suppress 3 false-positive js/insufficient-password-hash alerts in
chatgpt-web.ts and builtins.ts where SHA-256 is used for cache-key
derivation, not password storage (#176, #177, #178)
- Add stripTrailingSlashes unit tests with ReDoS regression check
Update the deterministic fallback API key to use hyphens instead of
underscores so generated keys match the expected format.
Also set API_KEY_SECRET in unit tests that exercise API key creation to
ensure consistent resolver behavior under test.
- Treat status 499 as terminal non-retryable error in both priority and
round-robin combo loops — no fallback to other models when client is gone
- Propagate AbortSignal from request into handleComboChat so the combo
loop can detect client disconnects before starting new model attempts
- Make retry/fallback delays abort-aware via signal.addEventListener
- Add 5 unit tests covering 499 early-exit, signal.aborted pre-check,
multi-model abort, 502 contrast behavior, and abort-during-wait
Centralize remote image downloads behind a shared helper that
validates outbound URLs, enforces redirect and size limits, and
applies request timeouts before bytes are read.
Wire the helper into image generation and vision bridge flows so
remote image inputs and result URLs follow the same fetch policy and
block redirects to private hosts. Update key management routes to use
structured logging and document the WebSocket bridge secret in the
example environment file.
When a provider returns 429 with quota_exhausted reason, set cooldown until
tomorrow 00:00 instead of exponential backoff. Includes isDailyQuotaExhausted()
detection in chat handler and unit tests.
Co-authored-by: clousky2020 <clousky2020@users.noreply.github.com>
After reconcileRenumberedMigrations() rewrites a legacy row (e.g. 028→029),
verify the old version slot is clear. A residual row at the old version
would cause getAppliedVersions() to skip the new migration file at that
version number (028_create_files_and_batches.sql).
Also adds 'batches' table to PHYSICAL_SCHEMA_SENTINELS for physical
schema recovery on upgrade paths.
Prevent upstream 400 failures when clients omit prior
reasoning_content in multi-turn tool-calling conversations.
Capture reasoning_content from streaming and non-streaming assistant
responses, persist it in a memory-plus-SQLite cache keyed by
tool_call_id, and re-inject it on later requests when available.
Add the reasoning cache migration, service layer, authenticated API
endpoints, dashboard tab, and unit coverage to support inspection,
cleanup, and crash recovery.
- Use jsonc-parser to update only provider.omniroute in opencode.json,
preserving MCP servers, comments, and other provider entries
- Add /api/cli-tools/keys endpoint returning raw keys for CLI tools UI
(session-auth protected via requireCliToolsAuth)
- Fix OpenCode guide step 3 to use ICU-style {baseUrl} placeholder
instead of broken {{baseUrl}} across all 40+ locales
- Restore valid OpenCode light/dark SVG logos (were broken HTML downloads)
- Add customCliTab translation key to en.json
- Add modelLabels support for human-readable model names in config
- Fix 9 additional locale files (bn, fa, gu, in, mr, sw, ta, te, ur)
that were added after the original PR and still had double-braces
Co-authored-by: JasonLandbridge <JasonLandbridge@users.noreply.github.com>
Add Bengali, Persian, Gujarati, Indonesian alt, Marathi,
Swahili, Tamil, Telugu, and Urdu message bundles to the app's
locale configuration.
Extend RTL locale support for Persian and Urdu and update project
docs to reflect the broader 40+ language availability.
Two root causes fixed:
1. Schema: cliModelConfigSchema.apiKey was z.string().optional() but
the frontend sends null when cloudEnabled is true. Zod rejects null
for optional strings → validation 400 with structured error object.
Fix: z.string().nullable().optional()
2. Frontend: All 25 tool card error handlers used data.error directly
as React children. When data.error is an object ({message, details}),
React crashes with Error #31 (Objects are not valid as React child).
Fix: extract data.error.message when data.error is an object.
Replace Title Case placeholder values (e.g. 'Eval Controls Title',
'Suite Builder Case Name Label') with proper English text across all
31 locale files. These placeholder keys were auto-generated from
camelCase key names but never populated with meaningful values.
Add limitExhausted, learnedFromHeaders, remainingOfLimit, throttleStatus,
and lastHeaderUpdate keys to all 31 locale files. These keys are used by
the health dashboard rate limit status section and were causing
MISSING_MESSAGE errors in production.
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.