Changes (v6.7.49 - v6.7.53):
- feat(registry): add Claude 4.6 (Opus) model
- feat(registry): add GPT 5.3 Codex model
- fix(registry): correct Claude Opus 4.6 model metadata
- fix: enable extended thinking support for Claude Haiku 4.5
- refactor(executor): centralize Codex client version and user agent
- refactor(translator, executor): remove redundant bytes.Clone calls
- refactor(util): optimize JSON schema processing
Upstream: https://github.com/router-for-me/CLIProxyAPI/releases/tag/v6.7.53
- Replaced all instances of `bytes.Clone` with direct references to enhance efficiency.
- Simplified payload handling across executors and translators by eliminating unnecessary data duplication.
Changes:
- feat(registry): add Kimi-K2.5 model to static data
- refactor(util, executor): optimize payload handling and schema processing
- fix(thinking): support user-defined includeThoughts setting (camelCase/snake_case)
- fix(thinking): ensure includeThoughts is false for ModeNone
- fix(gemini): support snake_case thinking config fields from Python SDK
- feat(gemini-cli): support image content in Claude request conversion
- fix(test): upstream fixed the builtin tools test we also fixed
Upstream: https://github.com/router-for-me/CLIProxyAPI/releases/tag/v6.7.48
- Replaced repetitive string operations with a centralized `escapeGJSONPathKey` function.
- Streamlined handling of JSON schema cleaning for Gemini and Antigravity requests.
- Improved payload management by transitioning from byte slices to strings for processing.
- Removed unnecessary cloning of byte slices in several places.
This merge brings in upstream changes from CLIProxyAPI v6.7.42 while
preserving ProxyPilot-specific customizations:
- Updated API server and executor modules
- New OAuth model alias functionality
- Enhanced thinking provider for iflow
- Updated model definitions and registry
- Improved docker build scripts
Conflicts were resolved by keeping ProxyPilot branding and merging
upstream improvements for translator and runtime components.
Split the 3,891 line kiro_executor.go into focused modules:
- kiro_executor.go (966 lines): Main executor, public interface
- kiro_auth.go (462 lines): Authentication/credential logic
- kiro_request.go (422 lines): Request transformation and retry logic
- kiro_response.go (1,765 lines): Response handling/streaming
Fix: Corrected isRetryableError to use errors.As for EventStreamError
type assertion instead of errors.Is on string constants.
Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
Cherry-picked from upstream 6d8609e4
Allows configuring rules to remove specific JSON paths from request/response payloads.
Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
Cherry-picked from upstream 7ff3936e
Adds multi-turn cache control tests.
Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
Introduce `Filter` rules in the payload configuration to remove specified JSON paths from the payload. Update related helper functions and add examples to `config.example.yaml`.
- Add ensureCacheControl() to auto-inject cache breakpoints
- Cache tools (last tool), system (last element), and messages (2nd-to-last user turn)
- Add prompt-caching-2024-07-31 beta header
- Return original payload on sjson error to prevent corruption
- Include verification test for caching logic
Enables up to 90% cost reduction on cached tokens.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add migration logic for converting oauth-model-mappings to oauth-model-alias
with comprehensive test coverage.
Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
Cherry-picked changes from CLIProxyAPI:
- fix(gemini): force type to string for enum fields (fixes Antigravity Gemini API error)
- feat(auth): add request_retry and disable_cooling per-auth overrides
- feat(auth): add skip persistence context key for file watcher events
Manually added RequestRetryOverride/DisableCoolingOverride methods to
types.go to preserve ProxyPilot's conductor.go compatibility while
gaining new functionality.
Implement `request_retry` and `disable_cooling` metadata overrides for authentication management. Update retry and cooling logic accordingly across `Manager`, Antigravity executor, and file synthesizer. Add tests to validate new behaviors.
- Antigravity retry logic with improved error handling and capacity management
- Added request_id to error logs for better debugging
- Export OAuth constants from auth packages (antigravity, claude, codex, gemini)
- Added Antigravity AuthService in internal/auth/antigravity
- Updated Claude executor test expectations for system message handling
- Skip built-in tools in OAuth tool prefix
- Preserve displayName and description in Gemini models list
- Added Embed stubs for ProviderExecutor interface compliance
- Updated all executors with context cancellation handling
- Added payload rules using requested model
- Filter out Top_P when Temperature is set on Claude
- Remove empty system messages in translators
- Handle quota cooldown in retry logic
- Include requested model in executor metadata
- Normalize plan type filenames to lowercase
- Added Embed stubs for ProviderExecutor interface compliance
- Added payloadRequestedModel helper function
Previously GeminiModels handler unconditionally overwrote displayName
and description with the model name, losing the original values defined
in model definitions (e.g., 'Gemini 3 Pro Preview').
Now only set these fields as fallback when they are missing or empty.
Major changes from upstream v6.7.16:
- Remove sessionID from signature caching API entirely
- CacheSignature(modelName, text, sig) instead of 4 params
- GetCachedSignature(modelName, text) instead of 3 params
- HasValidSignature(modelName, sig) instead of 1 param
- Add Gemini fallback: returns "skip_thought_signature_validator" on cache miss
- Add sliding expiration (TTL refresh on cache access)
- Add GetModelGroup() for grouping cache keys by model family
- Simplify antigravity executor by removing project switch logic
- Fix OpenAI Responses request handler to skip empty assistant text
- Fix OpenAI Responses request to validate full JSON before parsing
Local fixes for compatibility:
- Add Embed stub method to AntigravityExecutor for interface compliance
- Update test to clear cache for isolation (ThinkingBlockWithoutSignature)
- Update Gemini test to expect thinking blocks to be annotated not removed
- Fix gjson.Valid check before treating tool output as raw JSON
Features ported from upstream:
- feat(claude): add native request cloaking support
- feat(translator): add candidate count (n param) support for Gemini
- fix(translator): consolidate multiple system messages into single message (#1064)
- feat(codex): add config toggle for codex instructions injection
- feat(auth): add hashed account ID to credential filenames for team plans
- feat(config): add support for raw JSON payload rules (default-raw, override-raw)
- feat(codex): add OpenCode instructions based on user agent
Also includes minor whitespace cleanup and code organization.
The checkSystemInstructions was being called on every request but the
cloaking/system prompt handling is now done elsewhere. This removes
redundant processing.
Cherry-picked from CLIProxyAPI: 7831cba9
Add support for Imagen 3.0 and 4.0 image generation models in Vertex AI:
- Add 5 Imagen model definitions (4.0, 4.0-ultra, 4.0-fast, 3.0, 3.0-fast)
- Implement :predict action routing for Imagen models
- Convert Imagen request/response format to match Gemini structure
- Transform prompts to Imagen's instances/parameters format
- Convert base64 image responses to Gemini-compatible inline data
Cherry-picked from CLIProxyAPI: 8734d4cb
Add InfoByProvider map to ModelRegistration to store provider-specific
ModelInfo, enabling different capabilities for the same model across
providers (e.g., direct API vs OpenRouter).
Changes:
- Add InfoByProvider field to ModelRegistration struct
- Update GetModelInfo to accept provider parameter for provider-specific lookup
- Update LookupModelInfo to accept variadic provider parameter
- Add LookupStaticModelInfo for fallback to static model definitions
- Update ApplyThinking to pass providerKey for registry lookups
- Update all GetModelInfo callers to use new signature
- Remove ensureMaxTokensForThinking test (function moved to thinking package)
Ported from CLIProxyAPI e641fde2
Move ensureMaxTokensForThinking logic from claude_executor to
thinking/provider/claude/apply.go. This centralizes Claude-specific
thinking budget constraints in the thinking package.
Cherry-picked from c421d653.