2581 Commits

Author SHA1 Message Date
Luis Pater
de0394917a feat(models): expand supported reasoning levels for Codex
- Added new reasoning levels: `none`, `minimal`, and `unsupported` to Codex model configurations.
- Introduced metadata sanitization and normalization for reasoning levels in API response.
- Extended unit tests to cover reasoning levels validation and metadata sanitation logic.
2026-05-20 03:21:46 +08:00
Luis Pater
ea25949479 feat(models): add Gemini 3.5 Flash models to registry
- Registered new models: `gemini-3-flash-agent` and `gemini-3.5-flash-low` with detailed specifications.
- Includes support for dynamic thinking levels and extended context capabilities.
2026-05-20 02:17:49 +08:00
Luis Pater
99fa530967 test: remove unused Redis protocol tests and helpers
- Removed obsolete Redis protocol test cases and helper functions that were no longer relevant due to recent architecture changes.
- Streamlined remaining test files to align with updated Redis handling and connection management logic.
v7.1.17
2026-05-19 23:12:57 +08:00
Luis Pater
b9589e8ed6 Merge pull request #3482 from 9ycrooked/patch-1
Add Codex Switch tool to README
2026-05-19 22:59:28 +08:00
yavon007
0de0ad0d36 Add reasoning effort to usage events 2026-05-19 22:10:48 +08:00
Xinyao Xu
5ef7693933 Update README.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-05-19 22:05:52 +08:00
Xinyao Xu
7f68fa2414 Add Codex Switch tool to README
Added a new section for Codex Switch tool with details.
2026-05-19 18:00:28 +08:00
Luis Pater
bb5ac40a67 feat(client): add timeout handling for Redis operations and subscription failover
- Introduced `homeRedisOperationTimeout` and `homeSubscriptionReceiveTimeout` constants for configurable timeouts.
- Enhanced Redis connection options with operation timeout settings and failover mechanisms.
- Implemented subscription failover logic on heartbeat timeouts to improve resilience.
- Updated message handling to support additional Redis event types, including Pong and Subscription.
v7.1.16
2026-05-19 16:44:42 +08:00
hkfires
7efc1629ba feat(docker): add cluster-specific docker-compose configuration for CLIProxyAPI 2026-05-19 16:24:34 +08:00
Luis Pater
67f22514ed style(docs): improve sponsor section clarity in README files
- Updated text formatting with bold emphasis for consistent branding.
- Refined wording for VisionCoder's promotion details in Chinese, Japanese, and English README.
2026-05-19 16:11:48 +08:00
sususu98
ad868308c0 fix codex context length stream errors 2026-05-19 16:05:40 +08:00
Luis Pater
bbe30f53b5 feat(server): enhance Home certificate handling with CA fingerprint verification
- Added support for `ClusterID`, `CAFingerprint`, and `EnrollmentSecret` in Home JWT claims.
- Implemented CA fingerprint normalization and verification for PEM and file-based certificates.
- Improved certificate request validation and error handling.
- Updated server-side logic to include `EnrollmentSecret` in certificate requests.
v7.1.15
2026-05-19 10:25:57 +08:00
Luis Pater
feebe6c7f2 feat(api): add OpenAI compatibility for image models
- Introduced OpenAI-compatible image model support in the API, enabling integration through image generation and editing endpoints.
- Added registry type for OpenAIImageModelType to classify and validate compatibility.
- Implemented request handling for OpenAI-compatible image models, including JSON and multipart formats.
- Enhanced executor methods to support OpenAI-compatible image streaming and non-streaming requests.
- Included tests to validate model registration, streaming behavior, and multipart payload formatting.
2026-05-19 10:13:26 +08:00
sususu98
b67eb6f25d Merge pull request #3470 from sususu98/fix/antigravity-gemini-thought-signatures
Fix Antigravity Gemini thought signatures
2026-05-19 09:48:25 +08:00
sususu98
644823529f Merge pull request #3469 from sususu98/fix/gemini-max-output-token-cap
Cap Gemini max output tokens
2026-05-19 09:48:08 +08:00
Luis Pater
bac006e72b feat(thinking): add xAI provider support with reasoning.effort implementation
- Implemented `xAI` provider for thinking configurations with support for reasoning.effort levels.
- Registered `xAI` in available providers and updated relevant APIs for compatibility.
- Added unit tests for `xAI` provider functionality, including fallback logic for unsupported levels.
- Integrated `xAI` with executor handling and ensured conformance with OpenAI-compatible standards.
v7.1.14
2026-05-19 03:09:53 +08:00
Luis Pater
ad98c9549a feat(runtime): track upstream response headers in logging and usage reporting
- Added APIs to store, retrieve, and clone upstream response headers in context for detailed logging.
- Updated `RecordAPIResponseMetadata`, `RecordAPIWebsocketHandshake`, and related methods to capture response headers.
- Extended `UsageReporter` to include response headers in published usage records.
- Enhanced payload tests to validate response headers' integrity and persistence.
- Refactored `usage.Record` to support optional `ResponseHeaders` field.
v7.1.13
2026-05-19 01:29:23 +08:00
Luis Pater
77ba15f71b feat(server): add mTLS certificate bootstrap via JWT for Home connections
- Introduced `-home-jwt` flag and `HOME_JWT` environment variable to provide JWT for mTLS certificate generation.
- Added new APIs to handle certificate requests, validate JWT claims, and manage local certificate files.
- Updated Home TLS configuration to support client certificates, keys, and dynamic server name resolution.
v7.1.12
2026-05-19 00:53:40 +08:00
sususu98
32a0d69b17 Fix Antigravity Gemini thought signatures 2026-05-18 19:01:51 +08:00
sususu98
1583cb4ef0 Cap Gemini max output tokens 2026-05-18 18:41:45 +08:00
Luis Pater
cc0cb057b3 Merge pull request #3468 from sususu98/fix/claude-codex-call-id-length
Fix Claude-Codex long tool call IDs
2026-05-18 18:04:55 +08:00
Luis Pater
2710f56ae1 Merge pull request #3450 from sususu98/fix/http-connect-proxy-dialer
fix(proxy): support HTTP CONNECT dialer
2026-05-18 18:03:41 +08:00
sususu98
8bc2eff58a fix: shorten claude codex tool call ids 2026-05-18 17:49:42 +08:00
sususu98
ec79951e7f fix(proxy): support HTTP CONNECT dialer 2026-05-18 12:20:41 +08:00
Luis Pater
24602055a8 Merge pull request #2926 from slicenferqin/fix-tool-use-name-loss-and-duplicates
fix(openai→claude): suppress empty/duplicate tool_use content_block_start
2026-05-18 12:11:41 +08:00
Luis Pater
4ad6ffefb7 Merge pull request #3438 from madwiki/fix/strip-claude-code-attribution
fix: strip Claude Code attribution from non-Anthropic translations
2026-05-18 11:25:38 +08:00
slicenfer
1c2153a2cb fix(openai-claude): stabilize streaming tool_use blocks 2026-05-18 11:25:33 +08:00
Luis Pater
64d233fe93 Merge pull request #3448 from LongDinhh/feat/home-env-vars
feat(server): add HOME_ADDR and HOME_PASSWORD env var fallback
2026-05-18 11:20:18 +08:00
Luis Pater
66c5d60b3d refactor(api): remove newTestServerWithOptions and spoofed IP rejection test
- Simplified test server initialization by removing `newTestServerWithOptions`.
- Deleted `TestManagementLocalPasswordRejectsSpoofedForwardedFor` as spoofed IP handling is no longer applicable.
- Removed trusted proxy configuration from Gin engine setup.
v7.1.11
2026-05-18 11:01:10 +08:00
Long Dinh
5f039654f0 refactor: move home env vars after godotenv and use lookupEnv helper
Address review feedback: move HOME_ADDR/HOME_PASSWORD lookup after
godotenv.Load() so .env files work, and use the lookupEnv helper
for case-insensitive key support consistent with PGSTORE_* etc.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 08:52:57 +07:00
Long Dinh
ed0ac68324 feat(server): add HOME_ADDR and HOME_PASSWORD env var fallback for home flags
Allow configuring the home control plane connection via environment
variables HOME_ADDR and HOME_PASSWORD as an alternative to the --home
and --home-password command-line flags. This enables Docker Swarm stack
deployments without needing docker service update --args.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 03:11:19 +07:00
Luis Pater
605adaa3c2 feat(api): add support for local management password validation and spoofed IP rejection
- Introduced `newTestServerWithOptions` to customize server initialization in tests.
- Added `TestManagementLocalPasswordRejectsSpoofedForwardedFor` to validate security against spoofed `X-Forwarded-For` headers.
- Enabled default WebSocket authentication (`ws-auth`) in `config.example.yaml`.
- Disabled trusted proxy headers in Gin engine with appropriate logging to enhance security.
v7.1.10
2026-05-18 01:23:35 +08:00
Luis Pater
9ef99aa766 refactor(runtime): rename FormProtocol to FromProtocol across payload handling logic
- Updated variable, function, and struct names from `FormProtocol` to `FromProtocol` for clarity.
- Adjusted related payload matching and normalization logic.
- Updated tests and examples to align with the new naming convention.
v7.1.9
2026-05-17 23:39:07 +08:00
Luis Pater
2007a89594 feat(runtime): enhance payload rule resolution with dynamic path support
- Introduced `resolvePayloadRulePaths` function to dynamically resolve rule paths supporting array queries and complex logic.
- Updated payload processing logic (`apply defaults`, `overrides`, `filters`) to handle resolved paths for better flexibility.
- Added helper functions for path parsing, query matching, and logical resolution to improve modularity and reusability.
- Introduced payload condition match logic, including `match`, `not-match`, `exist`, and `not-exist` rules in `PayloadConfig`.
- Enhanced `payloadModelRulesMatch` function to support conditional checks at various levels.
- Added helper methods for evaluating JSON path conditions and values.
- Updated tests to validate new conditional rules against different payload scenarios.
v7.1.8
2026-05-17 23:06:43 +08:00
Luis Pater
26d13af28f feat(runtime): enhance payload rule resolution with dynamic path support
- Introduced `resolvePayloadRulePaths` function to dynamically resolve rule paths supporting array queries and complex logic.
- Updated payload processing logic (`apply defaults`, `overrides`, `filters`) to handle resolved paths for better flexibility.
- Added helper functions for path parsing, query matching, and logical resolution to improve modularity and reusability.
v7.1.7
2026-05-17 16:42:35 +08:00
Luis Pater
be841b88ee log(registry): replace panic with warning on embedded model parse failure 2026-05-17 15:10:48 +08:00
Luis Pater
4b13f9c255 Merge pull request #3439 from ben-vargas/fix-grok-tool-params
fix(xai): default missing function tool parameters
v7.1.6
2026-05-17 15:04:28 +08:00
Luis Pater
74cb53dee1 feat(xai): support namespace tools and enhance tool normalization logic
- Added `namespace` tool type support, enabling nested tools to be normalized and moved to the top level.
- Refactored tool normalization logic into `normalizeXAITool` for reusability and clarity.
- Updated `xai_executor` test cases to validate namespace tool handling and nested tool normalization.
2026-05-17 15:02:36 +08:00
Ben Vargas
2607888a97 fix(xai): default missing function tool parameters 2026-05-16 17:57:40 -06:00
Luis Pater
8b3670b8dd feat(xai): support namespace tools and enhance tool normalization logic
- Added `namespace` tool type support, enabling nested tools to be normalized and moved to the top level.
- Refactored tool normalization logic into `normalizeXAITool` for reusability and clarity.
- Updated `xai_executor` test cases to validate namespace tool handling and nested tool normalization.
v7.1.5
2026-05-17 05:22:57 +08:00
Luis Pater
96754f5a33 refactor(api): move Codex client model handling to registry package
- Relocated Codex client model JSON and related logic from `openai` package to `registry` for better modularity.
- Updated references to use `registry.GetCodexClientModelsJSON()` in loading logic.
- Extended test cases to cover additional field removals (`upgrade`, `availability_nux`).
v7.1.4
2026-05-17 05:11:41 +08:00
Luis Pater
ddd10539ad feat(xai): normalize xAI input reasoning items and enhance test cases
- Added `normalizeXAIInputReasoningItems` to clean up `input` reasoning items, removing null `content` and `encrypted_content` fields.
- Updated `xai_executor` test cases to validate input normalization and reasoning item handling.
v7.1.3
2026-05-17 04:51:17 +08:00
Luis Pater
088ab33df8 feat(api): add Codex client models support for OpenAI API
- Introduced Codex client models framework in `openai` package.
- Added JSON-based model definitions (`codex_client_models.json`) for Codex, including metadata, reasoning levels, and configuration options.
- Implemented handlers to load, clone, and build Codex client models with support for visibility overrides and metadata application.
- Enabled sorting and prioritization of models based on configuration or runtime criteria.
- Added utility functions for managing and validating model attributes.
2026-05-17 04:48:34 +08:00
Mad Wiki
d606faa99c fix: strip Claude Code attribution from non-Anthropic translations 2026-05-17 04:21:53 +08:00
Luis Pater
53d1fd6c5c feat(api, xai): add xAI Grok video model support with API integration
- Introduced new xAI `grok-imagine-video` model for video generation with configurable options (e.g., duration, size, resolution).
- Implemented video-specific API endpoints (`/v1/videos`, `/v1/videos/generations`, `/v1/videos/edits`, `/v1/videos/extensions`), including request validation and model handling.
- Enhanced model registry with `xaiBuiltinVideoModelID` and metadata for video capabilities.
- Added unit tests to validate video model support, request structures, and API response handling.
- Extended `XAIExecutor` to integrate video generation and retrieval via runtime requests.
v7.1.2
2026-05-17 02:53:50 +08:00
Luis Pater
2ff9e33e26 feat(api, xai): integrate xAI Grok image models and extend API endpoints for image support
- Added new xAI Grok image models (`grok-imagine-image`, `grok-imagine-image-quality`) with high-fidelity and aspect ratio configurations.
- Extended `isSupportedImagesModel` logic to validate xAI models.
- Implemented API request builders for image generation/editing with customizable options (e.g., resolution, aspect ratio, response format).
- Enhanced `/v1/images` endpoints to handle xAI model capabilities, including response normalization and model-specific handlers.
- Updated unit tests to validate xAI model validation, request structure, and API integration.
v7.1.1
2026-05-17 01:30:23 +08:00
Luis Pater
e4c957078c feat(auth): add OAuth2 support for xAI with PKCE and token persistence
- Implemented xAI OAuth2 integration with PKCE (Proof Key for Code Exchange) support.
- Added logic for token exchange, refresh, and persistent storage in JSON format.
- Created `xai` package with helpers for OAuth discovery, API token handling, and URL building.
- Introduced `XAIExecutor` for integrating xAI credentials into runtime HTTP requests.
- Added unit tests to validate OAuth flow, token persistence, and endpoint validation.
v7.1.0
2026-05-17 01:02:35 +08:00
Luis Pater
cd0cea393c refactor(server): consolidate home_flag logic into main.go for better maintainability and simplicity v7.0.12 2026-05-16 22:48:10 +08:00
Luis Pater
c66fa37665 feat(home): add cluster nodes payload parsing and Redis channel handling
- Added `parseClusterNodesPayload` for streamlined cluster node parsing.
- Introduced `handleSubscriptionPayload` to handle Redis channel payloads, including updates for the new `cluster` channel.
- Updated subscription logic to process and apply cluster node updates seamlessly.
v7.0.11
2026-05-16 22:10:38 +08:00
Luis Pater
f4c6c41f0b Merge pull request #3430 from router-for-me/home
Implement Redis integration with TLS support and cluster discovery option
v7.0.10
2026-05-16 20:44:20 +08:00