fix: Crof multi-turn tool calls + auto-trim long conversations
Root cause: Codex sends function_call items with id=None, causing tool_call_id mismatch between tool calls and tool results. Proxy now resolves IDs by call_id + positional fallback. Auto-trim: conversations exceeding 30 items are trimmed automatically, keeping system messages, original user query, and most recent items. This prevents context overflow on providers with smaller context windows (Crof mimo-v2.5-pro stops responding at ~40 items). - Fix None tool IDs in oa_input_to_messages with positional matching - Auto-trim input to 30 items max (keeps head + tail) - Add request/response logging to ~/.cache/codex-proxy/requests.log - Proxy stderr visible in launcher terminal for debugging - v2.1.2
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@@ -2,12 +2,15 @@
|
||||
|
||||
## v2.1.2 (2026-05-19)
|
||||
|
||||
- **Fixed Crof.ai and other providers stopping after first tool call (root cause)**
|
||||
- Proxy now stores responses and resolves `previous_response_id` for multi-turn conversations
|
||||
- Codex Desktop uses `previous_response_id` to chain turns — proxy reconstructs full conversation context
|
||||
- Without this fix, the proxy sent only the new `function_call_output` to upstream without the original user message or assistant tool call, causing the upstream model to return incomplete responses
|
||||
- **Fixed Crof.ai and providers stopping after first tool call (root cause: None tool IDs)**
|
||||
- Codex sends `function_call` items with `id=None` — proxy now matches tool results to calls by call_id + positional fallback
|
||||
- Fixed orphan message output item when response is only tool calls (no text content)
|
||||
- Response store capped at 50 entries (LRU eviction)
|
||||
- **Auto-trims long conversations (>30 items)** to prevent context overflow on providers like Crof
|
||||
- Keeps system/developer messages, original user query, and most recent items
|
||||
- Drops oldest tool call/outputs from the middle when conversation grows too long
|
||||
- Prevents `status=incomplete` errors on providers with smaller context windows
|
||||
- Added request/response logging to `~/.cache/codex-proxy/requests.log` for debugging
|
||||
- Proxy stderr no longer discarded by launcher (visible in terminal for debugging)
|
||||
|
||||
## v2.1.1 (2026-05-19)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user