Commit History
-
refactor(executor): split providers and preserve legacy entrypoints
shinmentakezo07 +1: Claude Opus 4.6Extract provider-specific logic into refactored executors with a shared base flow, keep legacy executor files as thin compatibility wrappers, and apply static safety fixes to reduce duplication and avoid symbol/nil-path regressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3e5ab39
-
feat: passthrough upstream response headers to clients
Kirill TuranskiyCPA previously stripped ALL response headers from upstream AI provider APIs, preventing clients from seeing rate-limit info, request IDs, server-timing and other useful headers. Changes: - Add Headers field to Response and StreamResult structs - Add FilterUpstreamHeaders helper (hop-by-hop + security denylist) - Add WriteUpstreamHeaders helper (respects CPA-set headers) - ExecuteWithAuthManager/ExecuteCountWithAuthManager now return headers - ExecuteStreamWithAuthManager returns headers from initial connection - All 11 provider executors populate Response.Headers - All handler call sites write filtered upstream headers before response Filtered headers (not forwarded): - RFC 7230 hop-by-hop: Connection, Transfer-Encoding, Keep-Alive, etc. - Security: Set-Cookie - CPA-managed: Content-Length, Content-Encoding409fbf7
-
feat(executor): add session ID and HMAC-SHA256 signature generation for iFlow API requests
hkfires7763242
-
refactor(translator, executor): remove redundant `bytes.Clone` calls for improved performance
Unverified signature- Replaced all instances of `bytes.Clone` with direct references to enhance efficiency. - Simplified payload handling across executors and translators by eliminating unnecessary data duplication.1b0fbba -
refactor(executor): optimize payload cloning and streamline SDK translator usage
Unverified signature- Replaced unnecessary `bytes.Clone` calls for `opts.OriginalRequest` throughout executors. - Introduced intermediate variable `originalPayloadSource` to simplify payload processing. - Ensured better clarity and structure in request translation logic.c702df8
-
feat(openai): add responses/compact support
Shady KhalifaUnverified signature8f7449a
-
feat(executor): add request_id to error logs
hkfiresExtract error.message from JSON error responses when summarizing error bodies for debug logs2511652
-
feat(executor): apply payload rules using requested model
hkfires69a5340
-
feat(registry): support provider-specific model info lookup
hkfires4771da8
-
refactor(thinking): pass source and target formats to ApplyThinking for cross-format validation
hkfiresUpdate ApplyThinking signature to accept fromFormat and toFormat parameters instead of a single provider string. This enables: - Proper level-to-budget conversion when source is level-based (openai/codex) and target is budget-based (gemini/claude) - Strict budget range validation when source and target formats match - Level clamping to nearest supported level for cross-format requests - Format alias resolution in SDK translator registry for codex/openai-response Also adds ErrBudgetOutOfRange error code and improves iflow config extraction to fall back to openai format when iflow-specific config is not present.4072514
-
fix(executor): properly handle thinking application errors
hkfirese934726 -
refactor: improve thinking logic
hkfiresee9e572
-
feat(executor): add HttpRequest support across executors for better http request handling
Unverified signaturea64baa3
-
feat(executor): enhance payload translation with original request context
Unverified signatureRefactored `applyPayloadConfig` to `applyPayloadConfigWithRoot`, adding support for default rule validation against the original payload when available. Updated all executors to use `applyPayloadConfigWithRoot` and incorporate an optional original request payload for translations.ae057e3 -
fix(iflow): remove thinking field from request body in thinking config handler
hkfires0fe2ad3 -
refactor(iflow): simplify thinking config handling for GLM and MiniMax models
hkfirese1b952f
-
refactor(executor): resolve upstream model at conductor level before execution
hkfiresc37b7ba -
fix(executor): use upstream model for thinking config and payload translation
hkfires7559da4
-
feat(iflow): add model-specific thinking configs for GLM-4.7 and MiniMax-M2.1
leaph- GLM-4.7: Uses extra_body={"thinking": {"type": "enabled"}, "clear_thinking": false} - MiniMax-M2.1: Uses reasoning_split=true for OpenAI-style reasoning separation - Added preserveReasoningContentInMessages() to support re-injection of reasoning content in assistant message history for multi-turn conversations - Added ThinkingSupport to MiniMax-M2.1 model definition9abfbc9
-
feat(iflow): add thinking support for iFlow models
hkfiresfcd2649
-
refactor(thinking): export thinking helpers
hkfiresExpose thinking/effort normalization helpers from the executor package so conversion tests use production code and stay aligned with runtime validation behavior.ca524b4
-
fix(executor): add `allowCompat` support for reasoning effort normalization
Unverified signatureIntroduced `allowCompat` parameter to improve compatibility handling for reasoning effort in payloads across OpenAI and similar models.fcacb47 -
fix(codex): raise default reasoning effort to medium
hkfires9a37efa
-
Merge pull request #481 from sususu98/fix/increase-buffer-size
Unverified signaturefix: increase buffer size for stream scanners to 50MB across multiple executorsa2d15c3 -
fix(runtime): validate thinking config in iflow and qwen
hkfiresc562607 -
fix(runtime): unify reasoning effort metadata overrides
hkfiresda8b2ff
-
feat(util): implement dynamic thinking suffix normalization and refactor budget resolution logic
Unverified signature- Added support for parsing and normalizing dynamic thinking model suffixes. - Centralized budget resolution across executors and payload helpers. - Retired legacy Gemini-specific thinking handlers in favor of unified logic. - Updated executors to use metadata-based thinking configuration. - Added `ResolveOriginalModel` utility for resolving normalized upstream models using request metadata. - Updated executors (Gemini, Codex, iFlow, OpenAI, Qwen) to incorporate upstream model resolution and substitute model values in payloads and request URLs. - Ensured fallbacks handle cases with missing or malformed metadata to derive models robustly. - Refactored upstream model resolution to dynamically incorporate metadata for selecting and normalizing models. - Improved handling of thinking configurations and model overrides in executors. - Removed hardcoded thinking model entries and migrated logic to metadata-based resolution. - Updated payload mutations to always include the resolved model.db58889 -
fix(executor): increase buffer size for stream scanners to 50MB across multiple executors
sususu864db07
-
**feat(auth): add AuthIndex for diagnostics and ensure usage recording**
Unverified signaturedd0bddb
-
feat(auth): add iFlow cookie-based authentication support
hkfires95bc2af -
**fix(runtime): simplify scanner buffer allocation in executor implementations**
Unverified signature09adea3
-
**feat(runtime): add payload configuration support for executors**
Unverified signatureIntroduce `PayloadConfig` in the configuration to define default and override rules for modifying payload parameters. Implement `applyPayloadConfig` and `applyPayloadConfigWithRoot` to apply these rules across various executors, ensuring consistent parameter handling for different models and protocols. Update all relevant executors to utilize this functionality.a917f9b
-
refactor(executor): summarize API error bodies of html in debug logs
hkfires62f6af9
-
Fixed: #140 #133 #80
Unverified signaturefeat(translator): add token counting functionality for Gemini, Claude, and CLI - Introduced `TokenCount` handling across various Codex translators (Gemini, Claude, CLI) with respective implementations. - Added utility methods for token counting and formatting responses. - Integrated `tiktoken-go/tokenizer` library for tokenization. - Updated CodexExecutor with token counting logic to support multiple models including GPT-5 variants. - Refined go.mod and go.sum to include new dependencies. feat(runtime): add token counting functionality across executors - Implemented token counting in OpenAICompatExecutor, QwenExecutor, and IFlowExecutor. - Added utilities for token counting and response formatting using `tiktoken-go/tokenizer`. - Integrated token counting into translators for Gemini, Claude, and Gemini CLI. - Enhanced multiple model support, including GPT-5 variants, for token counting. docs: update environment variable instructions for multi-model support - Added details for sett…9a36c01
-
Refactor executor error handling and usage reporting
Unverified signature- Updated the Execute methods in various executors (GeminiCLIExecutor, GeminiExecutor, IFlowExecutor, OpenAICompatExecutor, QwenExecutor) to return a response and error as named return values for improved clarity. - Enhanced error handling by deferring failure tracking in usage reporters, ensuring that failures are reported correctly. - Improved response body handling by ensuring proper closure and error logging for HTTP responses across all executors. - Added failure tracking and reporting in the usage reporter to capture unsuccessful requests. - Updated the usage logging structure to include a 'Failed' field for better tracking of request outcomes. - Adjusted the logic in the RequestStatistics and Record methods to accommodate the new failure tracking mechanism.b9ad503
-
feat(iflow): add masked token logs; increase refresh lead to 24h
hkfiresb5f0288
-
Enhance logging for API requests and responses across executors
Unverified signature- Added detailed logging of upstream request metadata including URL, method, headers, and body for Codex, Gemini, IFlow, OpenAI Compat, and Qwen executors. - Implemented error logging for API response failures to capture errors during HTTP requests. - Introduced structured logging for authentication details (AuthID, AuthLabel, AuthType, AuthValue) to improve traceability. - Updated response logging to include status codes and headers for better debugging. - Ensured that all executors consistently log API interactions to facilitate monitoring and troubleshooting.5b50851
-
feat(registry/runtime): add Gemini 2.5 model and increase buffer sizes
Unverified signature- Added new "Gemini 2.5 Flash Image Preview" model definition, with enhanced image generation capabilities. - Increased scanner buffer size to 20,971,520 bytes across executors and translators to handle larger payloads.40079ee -
feat(iflow): Add User-Agent header to API requests
hkfiresb62efaa -
feat: Add support for iFlow provider
hkfires1089302