* fix(kiro): support organization IDC OAuth with regional endpoints and refresh
* fix(kiro): refresh IDC tokens with stored region
---------
Co-authored-by: ngocdb <ngocdb@ngocdb.local>
* fix(antigravity): normalize Gemini bridge payloads
Clamp Claude bridge output tokens, use Gemini-valid system roles and tool names, and serialize antigravity requests from a cloned body so Cloud Code payload shaping stays valid.
* fix(cli): stop fallback after unsafe known paths
Preserve known-path security checks by stopping command discovery when a configured CLI path is suspicious or non-executable, instead of falling through to PATH discovery.
* test(memory): make query result assertion deterministic
Avoid relying on database result ordering when checking filtered memory keys so the unit suite remains stable across runs.
* fix(review): preserve safe cloning and CLI reasons
Handle non-cloneable antigravity request bodies without throwing and preserve specific CLI known-path failure reasons instead of masking them as not_found.
* fix: resolve build issues for v3.7.5 and apply memory/translation fixes
1. antigravityHeaders.ts: restore ANTIGRAVITY_LOAD_CODE_ASSIST_* exports for oauth.ts compatibility
2. next.config.mjs: add @ngrok/ngrok to serverExternalPackages and webpack externals to handle native .node modules
3. Memory system: UPSERT logic to prevent duplicate entries with same apiKeyId + key
4. Chinese translations: complete CLI tools and memory dashboard localizations
5. Test fixes: unique keys for pagination tests to comply with unique constraint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address Gemini Code Assist review feedback
1. store.ts: add expires_at to UPDATE statement in UPSERT logic
- Previously, expires_at was not being persisted to database on update
- This caused state mismatch between returned Memory object and actual DB row
2. package-lock.json: revert react-markdown registry to official npmjs.org
- Mirror-specific registry URL (npmmirror.com) should not be in lockfile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- #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
Add 'Invalid signature in thinking block' to COMBO_BAD_REQUEST_FALLBACK_PATTERNS
so combo routing falls through to the next target instead of returning 400 directly.
This error occurs when extended thinking signatures expire between turns,
which is a model-specific issue that won't be fixed by retrying the same provider.
Closes#1696
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>
The stream readiness gate from PR #1693 validates SSE body content.
The test harness checked only `headers.accept` (lowercase) but executors
set `Accept` (capital A), causing the harness to return JSON instead of
SSE for streaming requests. Fixed by checking both header casings.
- 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.
The JSDoc comment in cors.ts explains why Access-Control-Allow-Origin
is intentionally excluded from CORS_HEADERS. The test regex was
matching the comment text, causing a false failure.
- api-keys: remove flaky console.log assertion (route now uses Pino
structured logger via console.error, not console.log)
- chat-pipeline: update REQUIRE_API_KEY test to reflect authz pipeline
enforcement moved to route layer (handleChat no longer checks it)
- chat-pipeline: accept both 'Invalid'/'Incorrect' API key error formats
- CodexExecutor: isCodexResponsesWebSocketRequired now defaults to HTTP
unless codexTransport='websocket' is set in providerSpecificData
- CodexExecutor: store defaults to false unless openaiStoreEnabled=true
- CodexExecutor: WS unavailable now falls back to HTTP via super.execute()
instead of returning 503 (dead code path after guard refactor)
- Meta AI: X-FB-Friendly-Name updated from useAbraSendMessageMutation
to useEctoSendMessageSubscription
- Proxy middleware: tests now verify authz/pipeline.ts (refactored from proxy.ts)
- Chat pipeline: accept both 'Invalid'/'Incorrect' API key error messages
- Qwen retry: selective setTimeout mock to avoid tripping body read timeout
- 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
Integrated into release/v3.7.2 — implements conversation continuity for muse-spark-web executor with SHA-256 prefix hashing, TTL cache, and eviction-on-error