Unified · Split
| @@ -218,6 +218,9 @@ func (e *CodexExecutor) executeCompact(ctx context.Context, auth *cliproxyauth.A · 217 unmodified lines | |||
| 218 | body = applyPayloadConfigWithRoot(e.cfg, baseModel, to.String(), "", body, originalTranslated, requestedModel) | 218 | body = applyPayloadConfigWithRoot(e.cfg, baseModel, to.String(), "", body, originalTranslated, requestedModel) |
| 219 | body, _ = sjson.SetBytes(body, "model", baseModel) | 219 | body, _ = sjson.SetBytes(body, "model", baseModel) |
| 220 | body, _ = sjson.DeleteBytes(body, "stream") | 220 | body, _ = sjson.DeleteBytes(body, "stream") |
| 221 | if !gjson.GetBytes(body, "instructions").Exists() { | ||
| 222 | body, _ = sjson.SetBytes(body, "instructions", "") | ||
| 223 | } | ||
| 221 | 224 | ||
| 222 | url := strings.TrimSuffix(baseURL, "/") + "/responses/compact" | 225 | url := strings.TrimSuffix(baseURL, "/") + "/responses/compact" |
| 223 | httpReq, err := e.cacheHelper(ctx, from, url, req, body) | 226 | httpReq, err := e.cacheHelper(ctx, from, url, req, body) |