Commit History
-
refactor codex websocket request normalization
shinmentakezo07197972f -
feat(codex): default agent mode for non-stream prompts
shinmentakezo07d7eba7c -
feat(codex): add planner-reviewer agent mode
shinmentakezo07bb8f6a6 -
refactor(stream): harden forwarding and hook composition
shinmentakezo07 +1: Claude Opus 4.6Refactor stream forwarding to centralize option resolution and terminal completion handling, preventing closed error channels from spinning while preserving terminal-error precedence. Add reusable pipeline hook composition/round-tripper adapters and improve Codex provider compatibility by forwarding Codex hint headers and normalizing the reasoning_effort alias. - extracts stream forwarder helpers for keep-alive setup, terminal error draining, and finish behavior - adds regression tests for terminal error precedence/cancel behavior and hook composition utilities - forwards Codex hint headers and maps reasoning_effort to reasoning.effort for request normalization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>76d784c -
feat(codex): add Redis-backed prompt cache fallback
shinmentakezo07 +1: Claude Opus 4.6Add optional Redis-backed storage for Codex prompt cache IDs so cache keys stay stable across replicas while preserving the existing in-memory path when Redis is unset or unavailable. Wire codex prompt-cache config through YAML and environment overrides, apply the shared cache helper in both HTTP and WebSocket executors, and add tests for config defaults/sanitization, Redis TTL behavior, retention semantics, and explicit prompt_cache_key precedence. - honors explicit prompt_cache_key before retention-based disable logic - preserves short configured/request TTL values (for example 7s) instead of forcing a 1m minimum - uses GET/SETNX/GET winner flow for distributed cache ID creation with local fallback on Redis errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0e6d51f -
refactor codex request normalization and stream event parsing
shinmentakezo0790d1585 -
ein
shinmentakezo07d61c097
-
fix(executor): remove unused import and vertex variable
shinmentakezo07 +1: Claude Opus 4.6Drop an unused fmt import in BaseExecutor and ignore an unused projectID value in Gemini Vertex provider credentials path to satisfy Go compiler checks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cab3daa -
fix(executor): restore retryAfter and count-token payload deletes
shinmentakezo07 +1: Claude Opus 4.6Add retryAfter support back to shared statusErr for auth backoff handling and replace missing deleteJSONField calls with direct sjson deletes in antigravity count-token flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>323ebc6 -
fix(executor): restore shared statusErr type
shinmentakezo07 +1: Claude Opus 4.6Reintroduce the package-level statusErr implementation used across refactored executors so status-bearing failures compile and propagate correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a9ddcf4 -
fix(executor): restore usageDetail alias for provider parse usage
shinmentakezo07 +1: Claude Opus 4.6Reintroduce the package-level usageDetail alias used by ProviderConfig and provider ParseUsage implementations so executor package builds after the refactor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1125e8d -
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: add cache-user-id toggle for Claude cloaking
matchchDefault to generating a fresh random user_id per request instead of reusing cached IDs. Add cache-user-id config option to opt in to the previous caching behavior. - Add CacheUserID field to CloakConfig - Extract user_id cache logic to dedicated file - Generate fresh user_id by default, cache only when enabled - Add tests for both paths94bf56c
-
fix: ensure connection-scoped headers are filtered in upstream requests
Unverified signature- Added `connectionScopedHeaders` utility to respect "Connection" header directives. - Updated `FilterUpstreamHeaders` to remove connection-scoped headers dynamically. - Refactored and tested upstream header filtering with additional validations. - Adjusted upstream header handling during retries to replace headers safely.0e32196
-
Merge PR #1626 into codex/pr-1626
Unverified signatureb3b7752 -
Merge pull request #1628 from thebtf/fix/masquerading-headers
Unverified signaturefix: update Claude masquerading headers and configurable defaultsdce94b3 -
Merge pull request #1625 from thebtf/feat/tool-prefix-config
Unverified signaturefeat: add per-auth tool_prefix_disabled option521d529 -
Merge branch 'pr-1624' into dev
Unverified signature# Conflicts: # internal/runtime/executor/claude_executor.go # internal/runtime/executor/claude_executor_test.gof55e04e -
Merge pull request #1608 from thebtf/fix/tool-reference-proxy-prefix-mainline
Unverified signaturefix: add proxy_ prefix handling for tool_reference content blocks6380e4a -
chore(executor): remove unused Openai-Beta header from Codex executor
Unverified signature3a99d1b -
feat(logging, executor): add request logging tests and WebSocket-based Codex executor
Unverified signature- Introduced unit tests for request logging middleware to enhance coverage. - Added WebSocket-based Codex executor to support Responses API upgrade. - Updated middleware logic to selectively capture request bodies for memory efficiency. - Enhanced Codex configuration handling with new WebSocket attributes.6434782
-
fix: update Claude masquerading headers and make them configurable
Kirill TuranskiyUpdate hardcoded X-Stainless-* and User-Agent defaults to match Claude Code 2.1.44 / @anthropic-ai/sdk 0.74.0 (verified via diagnostic proxy capture 2026-02-17). Changes: - X-Stainless-Os/Arch: dynamic via runtime.GOOS/GOARCH - X-Stainless-Package-Version: 0.55.1 → 0.74.0 - X-Stainless-Timeout: 60 → 600 - User-Agent: claude-cli/1.0.83 (external, cli) → claude-cli/2.1.44 (external, sdk-cli) Add claude-header-defaults config section so values can be updated without recompilation when Claude Code releases new versions.dc57d0c -
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: add per-auth tool_prefix_disabled option
Kirill TuranskiyAllow disabling the proxy_ tool name prefix on a per-account basis. Users who route their own Anthropic account through CPA can set "tool_prefix_disabled": true in their OAuth auth JSON to send tool names unchanged to Anthropic. Default behavior is fully preserved — prefix is applied unless explicitly disabled. Changes: - Add ToolPrefixDisabled() accessor to Auth (reads metadata key "tool_prefix_disabled" or "tool-prefix-disabled") - Gate all 6 prefix apply/strip points with the new flag - Add unit tests for the accessor54ee78e -
fix: skip proxy_ prefix for built-in tools in message history
Kirill TuranskiyThe proxy_ prefix logic correctly skips built-in tools (those with a non-empty "type" field) in tools[] definitions but does not skip them in messages[].content[] tool_use blocks or tool_choice. This causes web_search in conversation history to become proxy_web_search, which Anthropic does not recognize. Fix: collect built-in tool names from tools[] into a set and also maintain a hardcoded fallback set (web_search, code_execution, text_editor, computer) for cases where the built-in tool appears in history but not in the current request's tools[] array. Skip prefixing in messages and tool_choice when name matches a built-in.b7875c5
-
fix: skip built-in tools in tool_reference prefix + refactor to switch
Kirill Turanskiy- Collect built-in tool names (those with a "type" field like web_search, code_execution) and skip prefixing tool_reference blocks that reference them, preventing name mismatch. - Refactor if-else if chains to switch statements in all three prefix functions for idiomatic Go style.6547de8 -
fix: handle tool_reference nested inside tool_result.content[]
Kirill Turanskiytool_reference blocks can appear nested inside tool_result.content[] arrays, not just at the top level of messages[].content[]. The prefix logic now iterates into tool_result blocks with array content to find and prefix/strip nested tool_reference.tool_name fields.275c7bf -
fix: add proxy_ prefix handling for tool_reference content blocks (#1)
Kirill Turanskiy +1: Kirill TuranskiyapplyClaudeToolPrefix, stripClaudeToolPrefixFromResponse, and stripClaudeToolPrefixFromStreamLine now handle "tool_reference" blocks (field "tool_name") in addition to "tool_use" blocks (field "name"). Without this fix, tool_reference blocks in conversation history retain their original unprefixed names while tool definitions carry the proxy_ prefix, causing Anthropic API 400 errors: "Tool reference 'X' not found in available tools." Co-authored-by: Kirill Turanskiy <kt@novamedia.ru>5d1d154 -
chore(runtime): update Qwen executor user agent and headers for compatibility with new runtime standards
Unverified signature36f4ee2
-
refactor(all): replace manual pointer assignments with `new` to enhance code readability and maintainability
Unverified signature2359a6f
-
chore(runtime, registry): update Codex client version and GPT-5.3 model creation date
Unverified signaturefc1c6a4
-
fix(schema): remove Gemini-incompatible tool metadata fields
Sanitize tool schemas by stripping prefill, enumTitles, $id, and patternProperties to prevent Gemini INVALID_ARGUMENT 400 errors, and add unit and executor-level tests to lock in the behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4df886a
-
feat(executor): add session ID and HMAC-SHA256 signature generation for iFlow API requests
hkfires7763242
-
Merge pull request #1467 from dusty-du/fix/kimi-toolcall-reasoning-content
Unverified signatureFix Kimi tool-call payload normalization for reasoning_contentb368fc6 -
fix(kimi): reduce redundant payload cloning and simplify translation calls
Unverified signatured085ae1
-
fix(kimi): update base URL and integrate ClaudeExecutor fallback
Unverified signature- Updated `KimiAPIBaseURL` to remove versioning from the root path. - Integrated `ClaudeExecutor` fallback in `KimiExecutor` methods for compatibility with Claude requests. - Simplified token counting by delegating to `ClaudeExecutor`.05c6a8f -
Fix Kimi tool-call reasoning_content normalization
testbb5fa10 -
feat: add Kimi authentication support and streamline device ID handling
Unverified signature- Introduced `RequestKimiToken` API for Kimi authentication flow. - Integrated device ID management throughout Kimi-related components. - Enhanced header management for Kimi API requests with device ID context.fc3bbab -
Add Kimi (Moonshot AI) provider support
test +1: Claude Opus 4.6- OAuth2 device authorization grant flow (RFC 8628) for authentication - Streaming and non-streaming chat completions via OpenAI-compatible API - Models: kimi-k2, kimi-k2-thinking, kimi-k2.5 - CLI `--kimi-login` command for device flow auth - Token management with automatic refresh - Thinking/reasoning effort support for thinking-enabled models Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>61bff8c
-
refactor(executor): centralize Codex client version and user agent constants
Unverified signature- Introduced `codexClientVersion` and `codexUserAgent` constants for better maintainability. - Updated `EnsureHeader` calls to use the new constants.232693e -
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 -
refactor(util, executor): optimize payload handling and schema processing
Unverified signature- 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.45239da
-
fix(executor): handle "global" location in AI platform URL generation
Unverified signatureff935d8
-
refactor(codex): remove codex instructions injection support
hkfiresddd1d2e
-
feat(config): add payload filter rules to remove JSON paths
Unverified signatureIntroduce `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`.58d1bb7 -
Fixed: #1372 #1366
Unverified signaturefix(caching): ensure unique cache_control injection using count validation3495cd6
-
Merge pull request #1248 from shekohex/feat/responses-compact
Unverified signaturefeat(openai): add responses/compact supportd7805f3 -
fix(caching): ensure prompt-caching beta is always appended and add multi-turn cache control tests
Unverified signature2e16951
-
feat(caching): implement Claude prompt caching with multi-turn support
Martin Schneeweiss +1: Claude Opus 4.5- 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>0f32d2c