diff --git a/internal/translator/codex/openai/chat-completions/codex_openai_request.go b/internal/translator/codex/openai/chat-completions/codex_openai_request.go index 7d24d60e..6cc701e7 100644 --- a/internal/translator/codex/openai/chat-completions/codex_openai_request.go +++ b/internal/translator/codex/openai/chat-completions/codex_openai_request.go @@ -65,9 +65,6 @@ func ConvertOpenAIRequestToCodex(modelName string, inputRawJSON []byte, stream b // Model out, _ = sjson.SetBytes(out, "model", modelName) - if v := gjson.GetBytes(rawJSON, "prompt_cache_retention"); v.Exists() { - out, _ = sjson.SetBytes(out, "prompt_cache_retention", v.Value()) - } // Build tool name shortening map from original tools (if any) originalToolNameMap := map[string]string{} diff --git a/internal/translator/codex/openai/chat-completions/codex_openai_request_test.go b/internal/translator/codex/openai/chat-completions/codex_openai_request_test.go index 1202980f..84c8dad2 100644 --- a/internal/translator/codex/openai/chat-completions/codex_openai_request_test.go +++ b/internal/translator/codex/openai/chat-completions/codex_openai_request_test.go @@ -633,19 +633,3 @@ func TestToolsDefinitionTranslated(t *testing.T) { t.Errorf("tool 'search' not found in output tools: %s", gjson.Get(result, "tools").Raw) } } - -func TestPromptCacheRetentionPreserved(t *testing.T) { - input := []byte(`{ - "model": "gpt-4o", - "prompt_cache_retention": "persistent", - "messages": [ - {"role": "user", "content": "Hello"} - ] - }`) - - out := ConvertOpenAIRequestToCodex("gpt-4o", input, true) - - if got := gjson.GetBytes(out, "prompt_cache_retention").String(); got != "persistent" { - t.Fatalf("prompt_cache_retention = %q, want %q", got, "persistent") - } -}