- #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
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
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.
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.
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.
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.
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).
Compile MITM utilities as NodeNext ESM for prepublish builds, copy the
CommonJS MITM server into standalone artifacts, and resolve MITM data
paths without relying on Next.js aliases at runtime.
Replace shell-interpolated setup and elevated command flows with
argument-based spawn and execFile helpers for database setup, DNS edits,
certificate install flows, and Tailscale sudo execution. Also tighten
the Electron production CSP, update provider icon loading to use direct
@lobehub/icons imports with local fallbacks, and pin dependency
configuration to avoid unused peer installs and known audit findings.
Register AWS Polly as an audio provider with SigV4 request signing,
speech engine discovery, and API-key validation for managed provider
flows.
Add Lemonade as a self-hosted OpenAI-compatible provider, expand
static model discovery to audio registries, and support Azure OpenAI
deployment discovery from resource endpoints.
Sanitize sensitive provider-specific AWS fields in API responses and
update related tests and release notes.
* fix(claude): preserve tool_result adjacency in native and CC-compatible paths
* feat(providers): add Petals and Nous Research provider support
Register Nous Research as an OpenAI-compatible gateway with remote
model discovery and validation against chat completions.
Add Petals provider metadata, default config, validation, and a
specialized executor that maps OpenAI-style requests to the public
generate endpoint. Also allow optional API keys and configurable base
URLs for Petals in the dashboard and provider schemas.
Expand provider model and catalog tests to cover both integrations.
* fix(resilience): sync queue updates and clear stale discovery caches
Await runtime request queue updates so limiter settings and auto-enabled
API key protections are recomputed when resilience settings change.
Preserve cancelled batch state for in-flight work by marking input files
processed without generating output artifacts, and replace cached synced
models with an empty set when remote discovery returns no models so the
providers route falls back to the local catalog instead of stale cache.
---------
Co-authored-by: congvc <congvc-dev@gmail.com>
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Register Empower and Poe as managed OpenAI-compatible providers with
static metadata, example models, and remote model catalog support.
Add Poe-specific credential validation against its balance endpoint and
tighten Zed credential imports by skipping unsupported entries and
deduplicating provider-token pairs before saving.
Add Runway as a managed API key provider with a static video model
catalog, dashboard metadata, and provider model route support.
Implement Runway-specific URL normalization, auth headers, credential
validation, and video generation handling for both text-to-video and
image-to-video flows, including task polling and output normalization.
Extend unit coverage for Runway validation, managed catalog exposure,
registry discovery, and end-to-end video handler behavior.
Expand the provider catalog with GitLab Duo PAT and OAuth support,
NLP Cloud, and new OpenAI-compatible gateways including Azure AI
Foundry, Bedrock, DataRobot, watsonx, OCI, SAP, Modal, Reka,
Clarifai, and Chutes.
Add specialized GitLab and NLP Cloud executors, provider-specific
URL normalization and validation flows, managed catalog/model
discovery updates, and dashboard metadata for the new providers.
Extend search support with You.com, including request building,
response normalization, validation coverage, and route/schema
registration.
Add Amazon Q as a Kiro-compatible OAuth provider across execution,
token refresh, usage reporting, dashboard connection flows, and model
catalog exposure.
Add Voyage AI embedding and rerank catalogs plus Jina AI rerank support,
including local model catalog handling, API key validation, provider
metadata, and rerank error reporting updates.
Refresh built-in GitHub Copilot and Kiro model registries to match the
current supported lineup and extend test coverage for the new provider
paths.
Treat LM Studio, vLLM, Llamafile, Triton, Docker Model Runner,
XInference, and oobabooga as managed local providers with default
base URLs and passthrough model discovery.
Avoid sending empty bearer headers during validation, model discovery,
and execution so self-hosted endpoints work without API keys while
still honoring custom base URLs and localized dashboard hints.
Introduce a custom CLI tools card that generates OpenAI-compatible
env vars and JSON config, and add a cost overview tab with pricing
source visibility.
Add persisted custom eval suites with authenticated CRUD routes and
validation, plus new translator stream transformation tooling and
richer live monitor routing details.
Improve localization coverage across dashboard flows and add unit
tests for custom CLI config, pricing sources, eval suites, and
stream transformation.
Store eval executions with target metadata, expose aggregated scorecard
and recent run history endpoints, and return dashboard-ready eval data
including target options and API key metadata.
Also require management auth for eval read endpoints and preserve
per-case latency, errors, and output snippets so historical results are
more reliable and easier to inspect.
Unify audit access under the logs experience and add richer active
request visibility with sanitized client and provider payload previews.
Expose provider warnings from upstream responses in compliance audit
logs, surface learned rate-limit header data in health monitoring, and
add MCP cache stats and cache flush tools with test coverage.
Also add local provider catalog support for SD WebUI and ComfyUI,
include video generation in endpoint docs and UI, add eval run storage
migrations, and refresh docs and translations to match the expanded
feature set.
- DB 마이그레이션 028: provider_connections.max_concurrent 컬럼 추가
- AccountSemaphore: 계정별 FIFO 세마포어 (acquire/release/timeout/block)
- chatCore.ts: 요청 파이프라인에 선제적 cap enforcement 통합
- providers.ts: maxConround-trip round-trip 저장/조회, cleanNulls() 보정
- API: provider limits route에서 maxConcurrent GET/PUT 지원
- UI: provider 연결 상세 페이지 account native cap 입력 필드 + hint
- UI: ResilienceTab combo concurrency 라벨 구분 (combo vs account)
- i18n: en/ko 번역 키 추가
- schemas.ts: maxConcurrent 음수 검증 + null 허용
- 테스트: semaphore 6개, DB round-trip + validation 6개
Reject invalid API keys even when authentication is optional and add
OPTIONS handlers for batch and file routes to support CORS preflights.
Also recover orphaned batches stuck in finalizing after restarts,
include finalizing in pending batch queries, preserve multipart upload
content handling, and fetch remote vision images as data URIs for
Anthropic requests.