Commit Graph

2587 Commits

Author SHA1 Message Date
Luis Pater
05b972479a feat(executor): refine session and conversation header handling for Codex
- Updated session handling to replace `Session_id` and `Conversation_id` headers with new logic ensuring consistent use of `Cache.ID` and prompt keys.
- Restored `Session_id` as a priority extraction source for `ExtractSessionID`.
- Added tests to validate case-sensitive and case-insensitive headers, canonical account header usage, and session key preservation.
- Removed legacy support for deprecated `Conversation_id` header to clean up API.
v7.1.37
2026-06-01 11:27:10 +08:00
Luis Pater
fb4f39d300 test(models, executor): add XAI video model test and fix Codex User-Agent assertions v7.1.36 2026-06-01 02:59:31 +08:00
Luis Pater
ac1360f479 feat(models): add support for grok-imagine-video-1.5-preview model
- Introduced `grok-imagine-video-1.5-preview` as a new XAI video model.
- Updated handlers, registry, and validation logic to include support for the new model.
- Enhanced test coverage to validate integration and functionality of the preview model.
2026-06-01 02:56:15 +08:00
Luis Pater
bbcdaab79d feat(executor): enhance Codex identity obfuscation with turn and window metadata handling
- Modified `applyCodexIdentityConfuse*` functions to include `turn_id` and `window_id` in metadata transformations.
- Updated test cases to validate the inclusion and restoration of these fields.
- Removed deprecated `Conversation_id` header support and related logic for cleaner implementation.
v7.1.35
2026-06-01 00:50:46 +08:00
Luis Pater
0f24cafbdd feat(executor): implement identity obfuscation for Codex requests and responses
- Added `applyCodexIdentityConfuse*` functions for remapping request and response payloads and headers to enhance security.
- Updated WebSocket and HTTP logic to handle identity state transformations seamlessly.
- Introduced unit tests to verify remapping and restoration of identity-related fields.
v7.1.34
2026-05-31 23:31:35 +08:00
Luis Pater
33983b6f3e refactor(executor): consolidate Codex request translation logic
- Introduced `translateCodexRequestPair` to simplify and reuse translation logic for handling original and modified payloads.
- Updated relevant methods to use the new function.
- Added unit tests to cover payload reuse and differentiation scenarios.
v7.1.33
2026-05-31 14:38:54 +08:00
Luis Pater
3a54fb7fcf Merge branch 'dev', commit 'refs/pull/3621/head' of github.com:router-for-me/CLIProxyAPI into dev
# Conflicts:
#	internal/translator/gemini/openai/responses/gemini_openai-responses_request_test.go
v7.1.32
2026-05-30 20:57:14 +08:00
Luis Pater
430e679e2a fix(auth): strip "generate" from payload during WebSocket HTTP fallback
- Added `sanitizeDownstreamWebsocketFallbackRequest` to clean `generate` from payload for HTTP fallback requests.
- Implemented tests to validate payload handling logic in WebSocket-to-HTTP transitions.

Closes: #3556
2026-05-30 05:14:05 +08:00
Luis Pater
55901f0bda Merge pull request #3620 from iBenzene/fix/responses-input-id-dedupe
fix(openai): dedupe response websocket input item IDs
v7.1.31
2026-05-30 03:27:36 +08:00
zzmc
776a9c0049 fix(translator/gemini): support developer role in OpenAI Responses requests 2026-05-29 09:24:48 -07:00
Luis Pater
fc0615b171 test(oauth): ensure missing auth directories are created and callback payloads are validated
Closes: #3619
2026-05-29 23:04:35 +08:00
Luis Pater
96b6f7e217 Merge pull request #3612 from router-for-me/log
feat(logging): add request_id handling in HomeAppLogForwarder and tests
v7.1.30
2026-05-29 22:10:12 +08:00
Luis Pater
034d2b6bf8 Merge pull request #3615 from sususu98/codex/signature-intercept-on-pr
feat: intercept incompatible signature replay
2026-05-29 22:09:10 +08:00
iBenzene
e9dafc7093 fix(openai): dedupe response websocket input item IDs 2026-05-29 17:06:48 +08:00
sususu98
aee7a5fbc5 feat: intercept incompatible signature replay 2026-05-29 15:22:57 +08:00
sususu98
86cb9c150b feat(signature): upgrade provider signature checks 2026-05-29 12:24:18 +08:00
Luis Pater
7d9980e8fa fix(logging): log errors during file-backed source cleanup v7.1.29 2026-05-29 11:24:58 +08:00
hkfires
d2c5f279f6 feat(logging): add request_id handling in HomeAppLogForwarder and tests 2026-05-29 10:58:19 +08:00
Luis Pater
4ade13a374 Merge pull request #3605 from router-for-me/log
feat(logging): add HomeAppLogForwarder for application log forwarding
2026-05-29 08:38:40 +08:00
hkfires
c4ee063b95 feat(logging): add HomeAppLogForwarder for application log forwarding 2026-05-29 08:12:52 +08:00
Luis Pater
f28258de22 Merge pull request #3595 from Progress-infinitely/fix/anthropic-tool-name-reverse-map
fix(amp): restore response tool casing from request
2026-05-29 02:17:27 +08:00
Luis Pater
df0176a188 feat(models): add Claude Opus 4.8 model to registry 2026-05-29 01:22:46 +08:00
Luis Pater
c65275fd32 Merge pull request #3591 from sususu98/feat/signature-check-extraction
refactor: extract signature validation
v7.1.28
2026-05-28 22:17:52 +08:00
Luis Pater
71c185f614 feat(usage): add service tier tracking and defaults in usage reporting
- Introduced `service_tier` metadata key to capture client-requested service tiers.
- Updated usage records, context propagation, and plugins to include service tier data.
- Added default handling logic for cases where `service_tier` is absent.
- Implemented tests for `service_tier` extraction, defaults, and updates across components.
v7.1.27
2026-05-28 22:15:54 +08:00
Luis Pater
65e760aa1a feat(usage): include cache tokens in total token calculation and add tests
- Updated `TotalTokens` calculation to account for `CacheReadTokens` and `CacheCreationTokens`.
- Added tests to validate accurate token aggregation and fallback behavior for `CachedTokens`.
v7.1.26
2026-05-28 21:34:54 +08:00
Progress-infinitely
01a7cc4a45 fix(amp): restore response tool casing from request 2026-05-28 18:03:15 +08:00
sususu98
b3d6d5d71a refactor: extract signature validation 2026-05-28 15:47:47 +08:00
Luis Pater
2bcc76220c feat(logging): improve file-backed source cleanup and directory recreation logic
- Added `assertFileBodySourceCleaned` helper to streamline cleanup validations in tests.
- Introduced handling to recreate missing directories during file source operations.
- Enhanced tests to verify behavior after manual directory removal, ensuring robustness.
- Fixed edge cases in log file merging when parts are missing.
v7.1.25
2026-05-28 10:42:24 +08:00
Luis Pater
d9c01a638d chore(models): remove deprecated GPT-5.x models from codex-free catalog 2026-05-28 09:41:51 +08:00
Luis Pater
94c1b25146 feat(executor): add TTFT tracking and reporting for enhanced performance metrics
- Introduced Time-To-First-Token (TTFT) measurement and reporting across major executors.
- Added TTFT calculation to `UsageReporter`, including support for HTTP clients and WebSocket communication.
- Updated tests to validate TTFT tracking in streamed and non-streamed scenarios.
- Ensured integration with `usage` plugin and augmented usage records with TTFT data.
v7.1.24
2026-05-28 02:59:24 +08:00
Luis Pater
11f0f906bd feat(logging): add SetTranslatedReasoningEffort to track reasoning levels in usage reporting
- Introduced `SetTranslatedReasoningEffort` method in `UsageReporter` to capture and log reasoning efforts from translated payloads.
- Updated executors to incorporate the new reporting functionality for handling reasoning efforts across various providers.
- Enhanced logging for thinking level extraction with new helper function `ExtractTranslatedReasoningEffort`.
2026-05-28 02:19:45 +08:00
Luis Pater
4b681031bf feat(translator): add reasoning signature handling and tests for Claude-OpenAI conversions
- Introduced support for processing `encrypted_content` reasoning signatures in request and response translations.
- Updated `ConvertOpenAIResponsesRequestToClaude` and `ConvertClaudeResponseToOpenAIResponses` to handle reasoning signatures and summaries.
- Added tests to validate signature preservation and correct reasoning content transformation in both streaming and non-streaming scenarios.
- Refactored processing logic to ensure reasoning content flushing before user messages.
2026-05-27 02:10:58 +08:00
Luis Pater
2cbb8c7b5c fix(translator): correct JSON path for item summary in response event
- Updated `response.output_item.done` to use `item.summary.0.text` instead of `item.summary.text`.
2026-05-27 01:28:04 +08:00
Luis Pater
de280d993d feat(websockets): refine incremental repair logic for tool call responses
- Updated WebSocket response repair tests to validate incremental preservation of response calls and outputs.
- Added new test cases for custom tool responses ensuring accurate handling of output cache and call cache.
- Refactored `repairResponsesWebsocketToolCallsWithCaches` to handle orphan outputs more consistently.
- Adjusted input filtering logic for clearer incremental repair behavior.

Closes: #3569
2026-05-27 01:01:57 +08:00
Luis Pater
e399edd3cc feat(images): add support for configurable GPT Image 2 base model and improved SSE handling
- Introduced `GPTImage2BaseModel` configuration for hosted image generation tools with validation for "gpt-" prefix.
- Added logic to dynamically resolve and apply the base model in Codex executor workflows.
- Enhanced server-sent events (SSE) implementation with keep-alive tickers and error events for stream reliability.
- Updated configuration file examples and internal documentation.
v7.1.23
2026-05-27 00:47:02 +08:00
sususu98
b5959c313d Merge pull request #3554 from sususu98/fix/gemini-cli-request-schema-cleanup
fix: clean Gemini CLI request schemas
2026-05-26 16:37:15 +08:00
sususu98
4a85b6b97e fix: log gemini cli schema cleanup errors 2026-05-26 10:52:53 +08:00
sususu98
70a8cf026f fix: clean gemini cli request schemas 2026-05-26 10:39:37 +08:00
Luis Pater
167edfec6c feat(auth): add support for websockets in auth file parsing and patching
- Introduced parsing logic to handle `websockets` field in auth files.
- Extended `PatchAuthFileFields` to update `websockets` and arbitrary nested metadata fields.
- Added tests to validate `websockets` parsing, updating, and persistence.
v7.1.22
2026-05-26 00:49:36 +08:00
Luis Pater
a0bb1f3a2b feat(logging): add file-backed sources for request logging
- Introduced `FileBodySource` to support large request log sections stored in temp files.
- Added file-backed support for WebSocket timeline and API WebSocket timeline logging.
- Updated `LogRequest` and middleware to integrate optional file-backed sources.
- Implemented clean-up mechanisms to manage temporary log files after processing.
v7.1.21
2026-05-25 21:55:16 +08:00
Luis Pater
412d3442fa feat(logging): add RequestID support in home request logging
- Included `RequestID` field in `homeRequestLogPayload` for better log categorization.
- Updated `forwardRequestLogToHome` and related components to handle `RequestID`.
- Added new test cases to validate `RequestID` propagation in streaming requests.
2026-05-25 20:44:32 +08:00
Luis Pater
efa200ec48 feat(cli): add fetch_codex_models command for dynamic Codex model fetching
- Introduced `fetch_codex_models` CLI command to fetch and save Codex model catalogs in JSON format.
- Supports configuration via flags or `config.yaml` for flexible setup.
- Enhanced `fetch_antigravity_models` with `config.yaml` support and improved auth directory resolution logic.
2026-05-25 11:32:49 +08:00
Luis Pater
50d19e204f docs(readme): add APIKEY.FUN sponsorship details to README files
- Acknowledged APIKEY.FUN as a sponsor with details on their services and exclusive project-specific benefits.
- Updated Japanese (README_JA.md), Chinese (README_CN.md), and English (README.md) documentation.
- Added new sponsorship image (`assets/apikey.png`).
2026-05-24 05:19:43 +08:00
Luis Pater
aaec9194d5 feat(models): add Grok Build 0.1 to registry
- Registered `grok-build-0.1` model with enhanced context length and agentic engineering support.
- Supports dynamic thinking levels for improved software workflows.
v7.1.20
2026-05-23 22:49:36 +08:00
Luis Pater
33f4904b25 fix(translator): handle system role as developer in Claude request conversion
- Updated `ConvertClaudeRequestToGemini` logic to treat `system` role as `developer`.
- Added unit test case to validate the behavior.

Closes: #3510
2026-05-22 12:04:27 +08:00
Luis Pater
cecd39317d Merge pull request #3498 from router-for-me/test
fix(auth): update import paths to v7 for registry and executor
2026-05-21 10:50:58 +08:00
hkfires
3c62a9a9b0 fix(auth): update import paths to v7 for registry and executor 2026-05-21 10:00:22 +08:00
Luis Pater
21fad9dbb4 Merge pull request #3477 from router-for-me/cluster
Add cluster-specific docker-compose configuration for CLIProxyAPI
v7.1.19
2026-05-21 03:00:50 +08:00
Luis Pater
48a1c88115 Merge pull request #3476 from sususu98/fix/codex-context-length-stream-errors-dev
fix codex context length stream errors
2026-05-21 02:53:54 +08:00
Luis Pater
8b9ecffc2f Merge pull request #3382 from sususu98/dev
fix: scope antigravity credits fallback gate
2026-05-21 02:52:49 +08:00