From 51fd58d74fe2b8706f3f424a8ab9daafc9ade16a Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Tue, 31 Mar 2026 12:16:57 +0800 Subject: [PATCH] fix(codex): use normalizeCodexInstructions to set default instructions --- internal/runtime/executor/codex_executor.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/runtime/executor/codex_executor.go b/internal/runtime/executor/codex_executor.go index 989a6b93..9eafb6be 100644 --- a/internal/runtime/executor/codex_executor.go +++ b/internal/runtime/executor/codex_executor.go @@ -219,10 +219,7 @@ func (e *CodexExecutor) executeCompact(ctx context.Context, auth *cliproxyauth.A body = applyPayloadConfigWithRoot(e.cfg, baseModel, to.String(), "", body, originalTranslated, requestedModel) body, _ = sjson.SetBytes(body, "model", baseModel) body, _ = sjson.DeleteBytes(body, "stream") - instructions := gjson.GetBytes(body, "instructions") - if !instructions.Exists() || instructions.Type == gjson.Null { - body, _ = sjson.SetBytes(body, "instructions", "") - } + body = normalizeCodexInstructions(body) url := strings.TrimSuffix(baseURL, "/") + "/responses/compact" httpReq, err := e.cacheHelper(ctx, from, url, req, body)