mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-05-22 19:09:19 +08:00
fix(codex): normalize null instructions for compact requests
This commit is contained in:
@@ -220,7 +220,8 @@ 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")
|
||||
if !gjson.GetBytes(body, "instructions").Exists() {
|
||||
instructions := gjson.GetBytes(body, "instructions")
|
||||
if !instructions.Exists() || instructions.Type == gjson.Null {
|
||||
body, _ = sjson.SetBytes(body, "instructions", "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user