wip; make compact request async submit + poll to avoid timeouts

This commit is contained in:
Sayan Sisodiya
2026-02-09 17:52:03 -08:00
parent c9271cdff2
commit 95b16816f5
6 changed files with 452 additions and 23 deletions

View File

@@ -28,6 +28,11 @@ The public interface of this crate is intentionally small and uniform:
- `instructions: &str` fully-resolved compaction instructions.
- Output: `Vec<ResponseItem>`.
- `CompactClient::compact_input(&CompactionInput, extra_headers)` wraps the JSON encoding and retry/telemetry wiring.
- Async operation mode:
- `CompactClient::submit_compact_operation(body, extra_headers)` returns `operation_id` from `responses/compact/operations`.
- `CompactClient::poll_compact_operation(operation_id, extra_headers)` returns either:
- `CompactOperationPollResult::Pending { poll_after_ms }`, or
- `CompactOperationPollResult::Completed(Vec<ResponseItem>)`.
- **Memory trace summarize endpoint**
- Input: `MemoryTraceSummarizeInput` (re-exported as `codex_api::MemoryTraceSummarizeInput`):