fix(codex): forward sequential cutoff reasoning summaries

This commit is contained in:
shoucandanghehe
2026-08-09 18:01:28 +08:00
parent 2e6b1d83f6
commit 5314b29da9
2 changed files with 54 additions and 0 deletions

View File

@@ -58,7 +58,11 @@ func (e *CodexExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.Au
body, _ = sjson.DeleteBytes(body, "generate")
body, _ = sjson.DeleteBytes(body, "prompt_cache_retention")
body, _ = sjson.DeleteBytes(body, "safety_identifier")
reasoningSummaryDelivery := gjson.GetBytes(body, "stream_options.reasoning_summary_delivery")
body, _ = sjson.DeleteBytes(body, "stream_options")
if reasoningSummaryDelivery.Exists() {
body, _ = sjson.SetBytes(body, "stream_options.reasoning_summary_delivery", reasoningSummaryDelivery.Value())
}
body = helps.SetStringIfDifferent(body, "model", baseModel)
body = normalizeCodexInstructions(body)
if e.cfg == nil || e.cfg.DisableImageGeneration == config.DisableImageGenerationOff {