Commit Graph

2914 Commits

Author SHA1 Message Date
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
TooYoungTooSimp
611d65eacc Improve reasoning content handling in response logic
Enhance reasoning content retrieval by falling back to 'reasoning' if 'reasoning_content' is absent or empty.
In some selfhosted openai-like server serving deepseek, the response.delta may contains reasoning rather than reasoning_content. So the client like codex does not recognize the thinking process.
2026-07-01 10:28:36 +08:00
Luis Pater
00114bec1b Merge pull request #4052 from sususu98/fix/responses-ws-to-sse-4048
fix(responses): full transcript replay on WS-to-SSE Codex paths
v7.2.47
2026-06-29 18:59:24 +08:00
sususu98
8f686345b9 fix(responses): full transcript replay on WS-to-SSE Codex paths
For downstream websocket with CPA-mediated HTTP/SSE upstream (non-passthrough),
always merge the full conversation transcript instead of sending incremental
previous_response_id turns. Release pinned websocket auths after timeout and
gateway failures, and after WS bootstrap failover pin the successful SSE
credential so the next turn keeps merged context instead of retrying a
suspended websocket auth.

Fixes #4048
2026-06-29 18:47:55 +08:00
Luis Pater
95b7cd4233 Merge pull request #4051 from sususu98/codex/fix-force-mapped-antigravity-sse-rewriter
fix(auth): repair force-mapped Responses SSE framing for WS forwarder
2026-06-29 18:46:28 +08:00
sususu98
150e7f0dc5 fix(auth): repair force-mapped Responses SSE framing for WS forwarder
Force-mapping rewrites streaming OpenAI Responses SSE through StreamRewriter before the /v1/responses websocket forwarder. Antigravity/Gemini and Codex emit frames without reliable trailing newlines, so buffered chunks glued as ...}event:..., ...}data:..., or event:/data: without separators. The rewriter dropped pending tails and downstream WS synthesized 408 without response.completed even when upstream returned HTTP 200.

- safeReplaceGlued for }event: and }data: when data JSON is complete\n- Finish flush with glue normalization and line-wise fallback\n- Newline between pending event: and next data: line (Codex scanner lines)\n- Regression tests: Antigravity sim, Codex data lines, force-map WS forward
2026-06-29 18:11:44 +08:00
Luis Pater
a26d38450e Merge pull request #4043 from sususu98/fix/responses-gemini-reasoning-signature-upstream-dev
fix(translator): OpenAI Responses reasoning signatures for Gemini
v7.2.46
2026-06-29 15:58:40 +08:00
Luis Pater
8c8009c148 Merge pull request #4042 from router-for-me/plugin
feat(tests): refactor snapshot handling in model registration tests for improved clarity and consistency
2026-06-29 15:54:45 +08:00
sususu98
ca7478a1f4 fix(antigravity): align CLI User-Agent with agy 1.0.13 short form (#4045)
Use the aidev_client parenthetical suffix for default Antigravity UA and
route loadCodeAssist through the short UA. Keep onboardUser on the long UA
with google-api-nodejs-client.
2026-06-29 15:37:10 +08:00
sususu98
3648bc155e fix(translator): align reasoning merge with Responses visible text rules
Recognize model-visible output_text even when message.role is user, accept
assistant string content, and preserve raw merged text without trimming.
Always merge the adjacent visible item into native Gemini reasoning turns so
trailing output is not dropped by prefill stripping.
2026-06-29 13:56:57 +08:00
sususu98
4b51f85c4c fix(translator): map OpenAI Responses reasoning to Gemini two-part signatures
Build Gemini-native model contents for reasoning items when the routed model
uses the Gemini signature provider: thought summary on a thought part and the
replay signature on the adjacent visible part. Merge following assistant
visible text when it is not trailing prefill, and keep reasoning history when
stripping trailing model-authored prefill.

Extend Responses translator tests for signature compatibility and Antigravity
wrapper coverage; clarify stale replay signature expectations in executor tests.
2026-06-29 13:40:09 +08:00
hkfires
c48516c5d6 feat(tests): refactor snapshot handling in model registration tests for improved clarity and consistency 2026-06-29 11:54:26 +08:00
Chén Mù
dc43747cac Merge pull request #4039 from router-for-me/plugin
feat(pluginstore): add API URL to ReleaseAsset and update asset download logic
2026-06-29 09:47:45 +08:00
hkfires
caf70529e1 feat(pluginstore): refactor installation tests to improve asset download logic and error handling 2026-06-29 09:43:40 +08:00
hkfires
8970873156 feat(auth): streamline GitHub token handling and enhance download asset logic 2026-06-29 09:37:13 +08:00
hkfires
3ea7f18979 feat(pluginstore): add API URL to ReleaseAsset and update asset download logic 2026-06-29 08:59:50 +08:00
Chén Mù
c22795af80 Merge pull request #4038 from router-for-me/plugins
feat(auth): refactor authentication handling for plugins and add tests
v7.2.45
2026-06-29 06:45:21 +08:00
hkfires
00c0b4d74a feat(auth): refactor authentication handling for plugins and add tests 2026-06-29 06:41:04 +08:00
Luis Pater
f106c4167b Merge pull request #4036 from router-for-me/plugins
feat(plugins): enhance plugin deletion test and config handling
2026-06-28 22:59:07 +08:00
hkfires
60eae92bcd feat(plugins): enhance plugin deletion test and config handling 2026-06-28 22:14:36 +08:00
Luis Pater
884fc3ce94 Merge pull request #4035 from router-for-me/plugin
feat(pluginstore): introduce support for direct install type and version management
v7.2.44
2026-06-28 21:34:57 +08:00
hkfires
1f16e87e1a feat(pluginstore): introduce support for direct install type and version management
- Added Manifest struct to encapsulate plugin metadata and installation details.
- Implemented ManifestFromRelease and ManifestFromPlugin functions for creating manifests from releases and plugins.
- Enhanced Plugin struct to include Versions and InstallPlan for direct installations.
- Introduced validation for direct install type, ensuring artifacts are correctly specified.
- Updated registry validation to support new schema version and direct install requirements.
- Added tests for parsing and validating direct install plugins, ensuring correct artifact handling.
2026-06-28 21:19:34 +08:00
Luis Pater
21d8164c56 feat(handlers): add disable-cooling support in OpenAI compatibility configuration
- Introduced `disable-cooling` field in OpenAI compatibility configurations.
- Updated `PatchOpenAICompat` to handle `disable-cooling` updates.
- Refined response structure in compatibility handlers to include `disable-cooling`.
- Added unit test to validate `disable-cooling` propagation in API responses.

Closes: #4023
2026-06-28 17:54:49 +08:00
Luis Pater
b05a27e4d7 docs(README): add CyberPay to partners section with multilingual updates
- Introduced CyberPay details to `README.md`, `README_JA.md`, and `README_CN.md`.
- Added a new image asset `cyberpay.jpg`.
v7.2.43
2026-06-28 03:15:17 +08:00
Luis Pater
2fa4dabe93 feat(executor): improve downstream response ID rewrite and add test for repeated response scenarios 2026-06-26 16:34:02 +08:00
Luis Pater
4c0c60292d Merge pull request #4009 from router-for-me/plugin
feat(pluginhost): enhance plugin version management and logging for hot reload
v7.2.42
2026-06-26 12:28:15 +08:00
hkfires
6a59d645b5 feat(pluginhost): enhance plugin version management and logging for hot reload 2026-06-26 12:05:07 +08:00