Commit Graph

2940 Commits

Author SHA1 Message Date
Luis Pater
cfa90f9fbf Merge pull request #4175 from router-for-me/image 2026-07-10 12:05:45 +08:00
hkfires
f9162d391c feat(executor): add image generation function tool checks and corresponding tests 2026-07-10 11:59:29 +08:00
Luis Pater
26d45fd46a feat(models): add model header overrides from configuration
- 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.
v7.2.58
2026-07-10 05:30:12 +08:00
Luis Pater
5f8899b795 chore(models): remove GPT-5.6 Sol from model registry 2026-07-10 04:05:57 +08:00
Luis Pater
15f3037161 feat(models): restrict Codex input modalities to text and image
- 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.
v7.2.57
2026-07-10 03:21:01 +08:00
Luis Pater
ef0a4a5643 feat(middleware): support logging for Codex response websockets
- Updated request logging middleware to include `/backend-api/codex/responses` as a valid websocket path.
- Enhanced unit tests to cover new websocket path scenarios.
2026-07-10 02:38:53 +08:00
Luis Pater
b4c594050e chore(models): update default client version and user agent, revise GPT-5.5 configurations
- 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.
v7.2.56
2026-07-10 01:54:37 +08:00
Luis Pater
f21beb05b5 feat(models): register additional GPT-5.6 models (Sol, Terra, Luna) to model registry
- Added detailed configurations for new models, including context length, reasoning levels, and supported parameters.
v7.2.55
2026-07-10 01:01:11 +08:00
Luis Pater
445de6c055 feat(models): add GPT-5.6 models (Sol, Terra, Luna) to registry with enhanced capabilities
- 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`.
2026-07-10 00:59:41 +08:00
Luis Pater
db4f1ceff4 feat(validation): enhance cross-family level clamping with model type mismatch handling
- 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.
2026-07-10 00:12:18 +08:00
Luis Pater
ee71dc52b7 feat(auth/models): implement Claude model ID prefix handling and plugin auth disabled state support
- 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.
2026-07-09 22:39:59 +08:00
Luis Pater
1204101ff2 feat(models): update zero_allowed thinking config to false in model registry 2026-07-09 15:19:23 +08:00
Supra4E8C
bc279c6130 feat(sponsorship): add Qiniu Cloud AI sponsorship details and logo to README files 2026-07-09 12:43:30 +08:00
Supra4E8C
53ebde0393 feat(sponsorship): add Fenno.ai sponsorship details and logo to README files 2026-07-09 12:38:33 +08:00
Luis Pater
d899c96239 feat(translator): map OpenAI max_tokens to Gemini's maxOutputTokens
- 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
2026-07-09 04:17:28 +08:00
Luis Pater
bea9567051 feat(translator): add cache control handling for responses and messages
- 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
2026-07-09 04:02:51 +08:00
Luis Pater
3fd189262d feat(executor): integrate model registry for reasoning effort support in XAI
- 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
v7.2.54
2026-07-09 03:37:11 +08:00
Luis Pater
c612108645 feat(models): adjust thinking levels by removing "none" and "xhigh" options 2026-07-09 03:11:20 +08:00
Luis Pater
ec3aba23fa feat(auth): enable automatic credential refresh on unauthorized errors
- 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
2026-07-09 03:08:02 +08:00
Luis Pater
186c87ba6d feat(models): add xhigh targeting option to confidence level settings 2026-07-09 02:03:58 +08:00
Luis Pater
7c47edb141 feat(models): add Grok 4.5 to model registry with extended capabilities and context
- Registered Grok 4.5 with advanced agentic software and workflow task handling.
- Increased context length and max completion tokens for enhanced performance.
2026-07-09 01:49:56 +08:00
sususu98
4f2e19042c Update Antigravity hub user agent (#4142) v7.2.53 2026-07-08 16:47:37 +08:00
Luis Pater
cdccc72dfe fix(translator): resolve pending codex tool calls on terminal response 2026-07-08 05:25:34 +08:00
Luis Pater
505c59d8c9 fix(auth): prevent credential overwrites for team-scoped plans with account hashing
- 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
2026-07-08 04:50:56 +08:00
Luis Pater
14b139661d refactor(translator): simplify response logic and enhance thinking compatibility handling
- 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
v7.2.52
2026-07-08 04:37:16 +08:00
Luis Pater
dea4787970 refactor(executor): centralize OpenAI stream usage handling with StreamUsageBuffer
- 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
2026-07-08 04:01:22 +08:00
Luis Pater
4f157fbdff fix(executor): map message_too_big WebSocket errors to structured API responses
- 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
2026-07-08 03:07:55 +08:00
Luis Pater
078ed1787b feat(openai): add support for input/output modalities in Codex client models
- 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
2026-07-08 00:21:03 +08:00
Luis Pater
dc77bf4db3 feat(translator): enhance Claude tool response handling with structured content parsing
- 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
2026-07-07 15:38:35 +08:00
Luis Pater
ab6ed392f2 test(executor): add unit test to validate complete SSE event passthrough in Claude executor
- Verified proper chunking and streaming of SSE events in `ExecuteStream`.
- Refactored executor to ensure complete SSE event delivery without partial fragments.

Closes: #4121
2026-07-07 15:23:02 +08:00
Luis Pater
3aa42a6f7d fix(auth): handle invalid_grant errors with retry suspension logic
- 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
2026-07-07 12:19:35 +08:00
Luis Pater
8b9c4da245 feat(interactions): add support for Google Interactions
- 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.
v7.2.51
2026-07-07 02:39:13 +08:00
Supra4E8C
4a2a3b29a8 Merge pull request #4117 from router-for-me/quota-backoff-guard
Quota backoff guard
2026-07-06 16:18:37 +08:00
Supra4E8C
0d23f79151 fix(auth): keep jittered cooldown waits within max-retry-interval
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.
2026-07-06 00:16:08 +08:00
Supra4E8C
270869dd20 fix(auth): escalate quota backoff once per cooldown window and jitter cooldown waits
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.
2026-07-06 00:05:51 +08:00
Chén Mù
3ef74dce8f Merge pull request #4109 from router-for-me/websocket
feat(config): default enable WebsocketAuth in LoadConfigOptional and ParseConfigBytes
2026-07-04 10:58:56 +08:00
Chén Mù
22bb89a433 Merge pull request #4107 from router-for-me/safemode
fix: allow management access in example API key safe mode
2026-07-04 10:58:21 +08:00
hkfires
4909493297 feat(config): default enable WebsocketAuth in LoadConfigOptional and ParseConfigBytes
Fixes #4015
2026-07-04 10:50:11 +08:00
hkfires
df08038941 fix: allow management access in example API key safe mode
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
2026-07-04 08:49:59 +08:00
Luis Pater
5afc0f1d5e fix(translator): remove temperature parameter handling in Claude request transformations
Closes: #4071
v7.2.50
2026-07-04 00:36:58 +08:00
Supra4E8C
9e9c244250 Merge pull request #4095 from router-for-me/readme-add
Readme add
2026-07-03 11:57:58 +08:00
Luis Pater
f8334be827 docs(README): update VisionCoder URLs in all language versions 2026-07-02 22:36:12 +08:00
Supra4E8C
ac21758eee feat(docs): add Code0 sponsorship information to README files in English, Chinese, and Japanese 2026-07-02 16:56:20 +08:00
Supra4E8C
87c091e267 fix(docs): correct formatting and wording for Claude API sponsorship in README files 2026-07-02 16:43:54 +08:00
Supra4E8C
00787ef99e fix(docs): correct link formatting for Claude API sponsorship in README 2026-07-02 16:40:55 +08:00
Supra4E8C
c1b952daea feat(docs): add Claude API sponsorship information to README files 2026-07-02 16:37:15 +08:00
Chén Mù
cde9336b92 Merge pull request #4080 from router-for-me/plugin
feat(plugin): add methods for auth provider handling and plugin metadata retrieval
v7.2.49
2026-07-02 09:36:49 +08:00
hkfires
e1302645c2 feat(plugin): add methods for auth provider handling and plugin metadata retrieval 2026-07-02 09:35:04 +08:00
Luis Pater
e681910cbf Merge pull request #4069 from TooYoungTooSimp/patch-1
Improve reasoning content handling in response logic
2026-07-01 19:21:34 +08:00
Wolfgang Schoenberger
956ce7cf78 fix(registry): add Claude Sonnet 5 model metadata v7.2.48 2026-06-30 20:06:40 -07:00