fix: preserve Plus providers during upstream sync#85
Merged
Conversation
…ff support - Added `zstd` decoding support in request logging, including helper functions to process `Content-Encoding` headers. - Enhanced config diff logic to compare payload-specific rules and track changes in payload configurations. - Added tests to validate `zstd` decoding and payload diff behavior.
Implement Redis integration with TLS support and cluster discovery option
- 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.
…tter maintainability and simplicity
- 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.
…nts 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.
- 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.
- 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.
- 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.
- 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`).
- 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.
- 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.
fix(xai): default missing function tool parameters
- 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 `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.
…load 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.
…poofed 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.
…me 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>
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>
…tion 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.
feat(server): add HOME_ADDR and HOME_PASSWORD env var fallback
fix: strip Claude Code attribution from non-Anthropic translations
…-duplicates fix(openai→claude): suppress empty/duplicate tool_use content_block_start
fix(proxy): support HTTP CONNECT dialer
Fix Claude-Codex long tool call IDs
…ions - 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.
…eporting - 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.
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
router-for-me/CLIProxyAPIthroughv7.1.13.ccs-fork-upstream.envto the synced upstream tag/commitValidation
go build ./...go test ./... -count=1 -timeout 10mFixes #76
Refs #83