- Introduced `override_header` in model configurations to support runtime customization of upstream request headers.
- Added `applyModelHeaderOverrides` utility to enforce header overrides for relevant executor and websocket paths.
- Updated model registry and `models.json` with enhanced configurations for header customizations.
- Implemented and extended test cases to validate header override behavior for various models and scenarios.
- Updated Codex client to validate and restrict input modalities to "text" and "image" only.
- Added deduplication logic for input modalities in `codex_client_models.go`.
- Introduced test cases to verify behavior with mixed and invalid modalities.
- Updated request logging middleware to include `/backend-api/codex/responses` as a valid websocket path.
- Enhanced unit tests to cover new websocket path scenarios.
- Bumped the `defaultClientVersion` and `defaultCodexUserAgent` to `0.144.0`.
- Replaced GPT-5.6 Sol with GPT-5.5 in model registry, adjusting metadata including context window length and reasoning levels.
- Updated `usage_helpers` to include `cache_write_tokens` logic for input token details.
- Registered new GPT-5.6 models (Sol, Terra, Luna) with detailed configurations, including increased context length and advanced reasoning levels.
- Updated client model configurations and metadata for GPT-5.6 Sol in `codex_client_models.json`.
- Added `modelFamilyMismatch` check to improve validation for provider families reusing Claude-compatible formats (e.g., Kimi models).
- Adjusted `allowClampUnsupported` logic to account for mismatched model families.
- Updated `strictBudget` validation to exclude mismatched model types.
- Added test cases to verify clamping behavior for Kimi models serving Claude-compatible requests.
- Added `EnsureClaudeModelIDPrefix` and `ResolveClaudeModelIDPrefix` utilities for standardizing and decoding Claude model IDs.
- Updated handling of `claude-fable-5-dd-<reversed>` model IDs for request routing and response formatting.
- Incorporated logic to enforce disabled states for plugin virtual auths and their expanded children.
- Refactored code for applying and persisting disabled state metadata in plugin multi-auth scenarios.
- Implemented and extended unit tests to validate expected behavior.
- Added logic to convert OpenAI `max_tokens` and `max_completion_tokens` to `generationConfig.maxOutputTokens`.
- Implemented unit tests to validate proper mapping behavior, including precedence of `max_tokens` over `max_completion_tokens`.
Closes: #4108
- Introduced `AttachCacheControl` and `AttachMessageCacheControl` utilities for consistent cache control injection in content parts and messages.
- Updated Claude translator modules to preserve and apply cache control metadata for responses, messages, tools, and parts.
- Added unit tests to validate proper cache control behavior across multiple scenarios.
Closes: #4146
- Replaced hardcoded model allowlist with dynamic model registry metadata lookup.
- Enhanced `xaiSupportsReasoningEffort` to utilize metadata for reasoning capability validation.
- Updated `sanitizeXAIResponsesBody` to log reasoning effort stripping for unsupported models.
- Added unit tests to verify registry-based reasoning effort handling across models, including Grok 4.5.
Closes: #4147
- Added `tryRefreshAfterUnauthorized` to refresh OAuth credentials on 401 errors during requests.
- Implemented `refreshLocks` to prevent concurrent refreshes for the same auth ID.
- Updated auth/state handling to reset unauthorized model states and resume operations after a successful refresh.
- Enhanced refresh logic with error handling, synchronization, and state updates.
Closes: #4087
- Registered Grok 4.5 with advanced agentic software and workflow task handling.
- Increased context length and max completion tokens for enhanced performance.
- Updated `CredentialFileName` to include trimmed `hashAccountID` for team-scoped plans.
- Added `isTeamScopedPlan` helper to handle plan-specific logic.
- Ensured filenames are unique across emails for multiple teams.
Closes: #4075
- Consolidated thinking content block handling for improved clarity and efficiency.
- Unified `generationConfig` handling, including normalization of `thinkingConfig` settings.
- Added `applyOpenAIThinkingCompatibilityToAntigravity` for consistent reasoning and thought configuration compatibility.
Closes: #4067
- Introduced `StreamUsageBuffer` to encapsulate stream usage observation and publishing logic.
- Updated OpenAI-compatible executors and helpers to use `StreamUsageBuffer` for consistent stream usage tracking.
- Added unit tests to validate `StreamUsageBuffer` behavior, ensuring proper handling of usage details.
Closes: #4053
- Added `mapCodexWebsocketReadError` to handle `CloseMessageTooBig` errors with proper status and error code mapping.
- Updated error propagation and logging in Codex WebSocket executor.
- Introduced corresponding unit test to verify `message_too_big` error mapping in streamed responses.
Closes: #4017
- Added handling of input/output modalities metadata for Codex and compatibility clients.
- Updated model registry and configurations to support "text" and "image" modalities.
- Introduced new tests to validate input/output modalities registration and processing.
Closes: #3976
- Added `applyResponsesToolResultContent` to process and structure tool response content.
- Introduced conversion logic for text, image, and file parts in tool responses.
- Updated tests to validate correct handling of data URL images in tool response outputs.
Closes: #4116
- Verified proper chunking and streaming of SSE events in `ExecuteStream`.
- Refactored executor to ensure complete SSE event delivery without partial fragments.
Closes: #4121
- Added fallback and suspension handling for `invalid_grant` errors in auth conductor.
- Introduced helper methods to detect `invalid_grant` error patterns.
- Updated tests to validate `invalid_grant` fallback and suspension scenarios in execution and stream flows.
Closes: #4120
- Introduced API handlers and executor logic for Google Interactions
- Added request and response transformations for OpenAI and Claude Interactions.
- Integrated Gemini API with Interactions support.
- Updated tests to validate Interactions request parsing and error handling.
- Refactored translator logic for Interactions data flows.
shouldRetryAfterError approves a retry using the pre-jitter wait, so the jitter added in waitForCooldown could push the actual sleep up to 2s past the configured max-retry-interval ceiling. Clamp the jitter range to the remaining headroom below maxWait so the documented maximum stays a hard bound; waits at the ceiling simply sleep unjittered.
Previously every 429 incremented the backoff level unconditionally, so N concurrent in-flight failures from a single quota event inflated the level by N at once (12+ failures jump straight to the 30 minute plateau even when the upstream limit clears in seconds). Failures that land while a previous quota window is still open now reuse that window instead of escalating, so the ladder advances at most once per window. Provider supplied retry hints still take effect unchanged.
waitForCooldown also slept until the exact recovery deadline, waking every waiting request in lockstep against the single recovered credential and re-escalating it in one burst. Cooldown waits now carry a small random jitter (up to wait/4, capped at 2s) to spread the wakeups.
Start the normal server when template api-keys are detected, but keep proxy API endpoints disabled until the keys are updated.
Show the warning page on / and /management.html, add a button to open the management panel via /management.html?safe-mode=configure, and remove the old warning-only server path.
Fixes#4063