From 353275d155b0e7efe7d77ce16c5b42e9f33e556f Mon Sep 17 00:00:00 2001 From: Koosha Paridehpour Date: Fri, 27 Feb 2026 00:09:32 -0700 Subject: [PATCH 1/4] fix(ci): restore base branch build and required-check mapping Align Codex SDK auth package types and sync required check names with current workflows. Co-authored-by: Codex --- .github/required-checks.txt | 17 +++-------------- .github/workflows/pr-path-guard.yml | 1 + .github/workflows/pr-test-build.yml | 1 + sdk/auth/codex.go | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/required-checks.txt b/.github/required-checks.txt index c9cbf6eab7..31c0885749 100644 --- a/.github/required-checks.txt +++ b/.github/required-checks.txt @@ -1,16 +1,5 @@ # workflow_file|job_name -pr-test-build.yml|go-ci -pr-test-build.yml|quality-ci -pr-test-build.yml|quality-staged-check -pr-test-build.yml|fmt-check -pr-test-build.yml|golangci-lint -pr-test-build.yml|route-lifecycle -pr-test-build.yml|provider-smoke-matrix -pr-test-build.yml|provider-smoke-matrix-cheapest -pr-test-build.yml|test-smoke -pr-test-build.yml|pre-release-config-compat-smoke -pr-test-build.yml|distributed-critical-paths -pr-test-build.yml|changelog-scope-classifier -pr-test-build.yml|docs-build -pr-test-build.yml|ci-summary +pr-test-build.yml|build pr-path-guard.yml|ensure-no-translator-changes +required-check-names-guard.yml|verify-required-check-names +codeql.yml|Analyze (Go) diff --git a/.github/workflows/pr-path-guard.yml b/.github/workflows/pr-path-guard.yml index 4fe3d93881..4a99fc4acd 100644 --- a/.github/workflows/pr-path-guard.yml +++ b/.github/workflows/pr-path-guard.yml @@ -9,6 +9,7 @@ on: jobs: ensure-no-translator-changes: + name: ensure-no-translator-changes runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pr-test-build.yml b/.github/workflows/pr-test-build.yml index 477ff0498e..2fe1994b84 100644 --- a/.github/workflows/pr-test-build.yml +++ b/.github/workflows/pr-test-build.yml @@ -8,6 +8,7 @@ permissions: jobs: build: + name: build runs-on: ubuntu-latest steps: - name: Checkout diff --git a/sdk/auth/codex.go b/sdk/auth/codex.go index 83bb49667e..cdf99182fa 100644 --- a/sdk/auth/codex.go +++ b/sdk/auth/codex.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/router-for-me/CLIProxyAPI/v6/pkg/llmproxy/auth/codex" + "github.com/router-for-me/CLIProxyAPI/v6/internal/auth/codex" "github.com/router-for-me/CLIProxyAPI/v6/pkg/llmproxy/browser" // legacy client removed "github.com/router-for-me/CLIProxyAPI/v6/internal/config" From ba0928520c360ccadd24e206ba94c8a98656477c Mon Sep 17 00:00:00 2001 From: Koosha Paridehpour Date: Fri, 27 Feb 2026 00:23:48 -0700 Subject: [PATCH 2/4] fix(config): align responses compact toggle on internal config Expose ResponsesCompactEnabled and IsResponsesCompactEnabled() on internal config for executor compatibility. Co-authored-by: Codex --- internal/config/config.go | 4 ++++ internal/config/responses_compact_toggle.go | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 internal/config/responses_compact_toggle.go diff --git a/internal/config/config.go b/internal/config/config.go index e2a09ef720..421d473db5 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -89,6 +89,10 @@ type Config struct { // Nil means enabled (default behavior). ResponsesWebsocketEnabled *bool `yaml:"responses-websocket-enabled,omitempty" json:"responses-websocket-enabled,omitempty"` + // ResponsesCompactEnabled gates the /v1/responses/compact route rollout. + // Nil means enabled (default behavior). + ResponsesCompactEnabled *bool `yaml:"responses-compact-enabled,omitempty" json:"responses-compact-enabled,omitempty"` + // GeminiKey defines Gemini API key configurations with optional routing overrides. GeminiKey []GeminiKey `yaml:"gemini-api-key" json:"gemini-api-key"` diff --git a/internal/config/responses_compact_toggle.go b/internal/config/responses_compact_toggle.go new file mode 100644 index 0000000000..8295da8b2c --- /dev/null +++ b/internal/config/responses_compact_toggle.go @@ -0,0 +1,11 @@ +package config + +// IsResponsesCompactEnabled reports whether /v1/responses/compact is enabled. +// Default is true when config or toggle is unset. +func (c *Config) IsResponsesCompactEnabled() bool { + if c == nil || c.ResponsesCompactEnabled == nil { + return true + } + return *c.ResponsesCompactEnabled +} + From aae5e45ed35ed270d66a52e619678fbb154e8312 Mon Sep 17 00:00:00 2001 From: Koosha Paridehpour Date: Fri, 27 Feb 2026 00:25:59 -0700 Subject: [PATCH 3/4] fix(sdk/api): expose post-auth hook server option Export WithPostAuthHook from sdk/api to match cliproxy builder usage on this base branch. Co-authored-by: Codex --- sdk/api/options.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/api/options.go b/sdk/api/options.go index 5149fb51b0..1880635884 100644 --- a/sdk/api/options.go +++ b/sdk/api/options.go @@ -9,6 +9,7 @@ import ( "github.com/gin-gonic/gin" internalapi "github.com/router-for-me/CLIProxyAPI/v6/internal/api" + "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/auth" "github.com/router-for-me/CLIProxyAPI/v6/sdk/api/handlers" "github.com/router-for-me/CLIProxyAPI/v6/internal/config" "github.com/router-for-me/CLIProxyAPI/v6/internal/logging" @@ -44,3 +45,8 @@ func WithKeepAliveEndpoint(timeout time.Duration, onTimeout func()) ServerOption func WithRequestLoggerFactory(factory func(*config.Config, string) logging.RequestLogger) ServerOption { return internalapi.WithRequestLoggerFactory(factory) } + +// WithPostAuthHook registers a hook to be called after auth record creation. +func WithPostAuthHook(hook auth.PostAuthHook) ServerOption { + return internalapi.WithPostAuthHook(hook) +} From 59885869b4b20be2100c855a726d9586f7c993e0 Mon Sep 17 00:00:00 2001 From: Koosha Paridehpour Date: Fri, 27 Feb 2026 00:27:57 -0700 Subject: [PATCH 4/4] fix(pkg/api): export post-auth hook alias Expose WithPostAuthHook in pkg/llmproxy/api alias surface used by cliproxy builder. Co-authored-by: Codex --- pkg/llmproxy/api/aliases.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/llmproxy/api/aliases.go b/pkg/llmproxy/api/aliases.go index 7ba458d7d6..da854afa84 100644 --- a/pkg/llmproxy/api/aliases.go +++ b/pkg/llmproxy/api/aliases.go @@ -14,6 +14,7 @@ var ( WithEngineConfigurator = api.WithEngineConfigurator WithLocalManagementPassword = api.WithLocalManagementPassword WithKeepAliveEndpoint = api.WithKeepAliveEndpoint + WithPostAuthHook = api.WithPostAuthHook WithRequestLoggerFactory = api.WithRequestLoggerFactory NewServer = api.NewServer )