fix(executor): add logging and prompt cache key handling for OpenAI responses

This commit is contained in:
Luis Pater
2025-11-07 22:40:45 +08:00
parent 32c964d310
commit c8f20a66a8

View File

@@ -508,6 +508,11 @@ func (e *CodexExecutor) cacheHelper(ctx context.Context, from sdktranslator.Form
codexCacheMap[key] = cache
}
}
} else if from == "openai-response" {
promptCacheKey := gjson.GetBytes(req.Payload, "prompt_cache_key")
if promptCacheKey.Exists() {
cache.ID = promptCacheKey.String()
}
}
rawJSON, _ = sjson.SetBytes(rawJSON, "prompt_cache_key", cache.ID)