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
-
Merge PR #1626 into codex/pr-1626
Unverified signatureb3b7752 -
chore(executor): remove unused Openai-Beta header from Codex executor
Unverified signature3a99d1b
-
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
-
chore(runtime, registry): update Codex client version and GPT-5.3 model creation date
Unverified signaturefc1c6a4
-
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(codex): remove codex instructions injection support
hkfiresddd1d2e
-
fix(codex): avoid empty prompt_cache_key
Shady KhalifaUnverified signaturebfa1c59 -
fix(openai): drop stream for responses/compact
Shady KhalifaUnverified signature7e33f2b
-
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
-
feat(codex): enhance input transformation and remove unused `safety_identifier` field
Unverified signature- Added logic to transform `inputResults` into structured JSON for improved processing. - Removed redundant `safety_identifier` field in executor payload to streamline requests.3fdad70 -
fix(codex): ensure instructions field exists
hkfires6b06d4c
-
fix(executor): properly handle thinking application errors
hkfirese934726 -
refactor: improve thinking logic
hkfiresee9e572
-
Fixed: #897
Unverified signaturerefactor(executor): remove `prompt_cache_retention` from request payloadsdfeb949
-
fix(codex): only override instructions in responses for OpenCode UA
hkfires57ba52d -
feat(codex): add OpenCode instructions based on user agent
hkfires8d0f9ca
-
feat(executor): add HttpRequest support across executors for better http request handling
Unverified signaturea64baa3
-
fix(server): resolve memory leaks causing OOM in k8s deployment
hemanta212 +1: Amp- usage/logger_plugin: cap modelStats.Details at 1000 entries per model - cache/signature_cache: add background cleanup for expired sessions (10 min) - management/handler: add background cleanup for stale IP rate-limit entries (1 hr) - executor/cache_helpers: add mutex protection and TTL cleanup for codexCacheMap (15 min) - executor/codex_executor: use thread-safe cache accessors Add reproduction tests demonstrating leak behavior before/after fixes. Amp-Thread-ID: https://ampcode.com/threads/T-019ba0fc-1d7b-7338-8e1d-ca0520412777 Co-authored-by: Amp <amp@ampcode.com>120635e
-
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
-
refactor(executor): resolve upstream model at conductor level before execution
hkfiresc37b7ba -
fix(executor): use upstream model for thinking config and payload translation
hkfires7559da4
-
feat(cliproxy): implement model aliasing and hashing for Codex configurations, enhance request routing logic, and normalize Codex model entries
Unverified signaturefe1d7f4
-
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
-
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): unify reasoning effort metadata overrides
hkfiresda8b2ff -
fix(runtime): validate reasoning effort levels
hkfiresf4e99ba -
feat(runtime): add thinking config normalization
hkfirese9260fd
-
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(registry): add GPT-5.1 Codex Max model definitions and support**
Unverified signature- Introduced `gpt-5.1-codex-max` variants to model definitions (`low`, `medium`, `high`, `xhigh`). - Updated executor logic to map effort levels for Codex Max models. - Added `lastCodexMaxPrompt` processing for `gpt-5.1-codex-max` prompts. - Defined instructions for `gpt-5.1-codex-max` in a new file: `codex_instructions/gpt-5.1-codex-max_prompt.md`.4c64e93
-
**fix(runtime): simplify scanner buffer allocation in executor implementations**
Unverified signature09adea3
-
**refactor(runtime): centralize reasoning effort logic for GPT models**
Unverified signatureExtract reasoning effort mapping into a reusable function `setReasoningEffortByAlias` to reduce redundancy and improve maintainability. Introduce support for the "gpt-5.1-none" variant in the registry and runtime executor.f021ecc -
fix(runtime): remove gpt-5.1 minimal effort variant
Ben VargasStop advertising and mapping the unsupported gpt-5.1-minimal variant in the model registry and Codex executor, and align bare gpt-5.1 requests to use medium reasoning effort like Codex CLI while preserving minimal for gpt-5.9f16349 -
**feat(runtime): extend executor support for GPT-5.1 Codex and variants**
Unverified signatureExpand executor logic to handle GPT-5.1 Codex family and its variants, including reasoning effort configurations for minimal, low, medium, and high levels. Ensure proper mapping of models to payload parameters.6f72c62
-
**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 -
Fixed: #246
Unverified signaturefeat(runtime): add support for GPT-5.1 models and variants Introduce GPT-5.1 model family, including minimal, low, medium, high, Codex, and Codex Mini variants. Update tokenization and reasoning effort handling to accommodate new models in executor and registry.e9f75c8
-
feat(config): support HTTP headers across providers
hkfirese6bdaef -
fix(executor): remove default reasoning effort for `gpt-5-codex-mini`
Unverified signature1a4e305 -
fix(executor): update model name from `codex-mini-latest` to `gpt-5-codex-mini`
Unverified signaturebc1fee5 -
add default medium reasoning case for gpt-5-codex-mini
jeffnash +1: CopilotUnverified signatureCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>27c3a42 -
add default medium reasoning case for gpt-5-codex-mini
jeffnash +1: CopilotUnverified signatureCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>6e95244 -
feat(registry): add GPT-5 Codex Mini model variants
Jeff NashAdds three new Codex Mini model variants (mini, mini-medium, mini-high) that map to codex-mini-latest. Codex Mini supports medium and high reasoning effort levels only (no low/minimal). Base model defaults to medium reasoning effort.89a14f4