fix: add previous_response_id support for multi-turn tool calls (Crof fix)

Codex Desktop uses previous_response_id to chain conversation turns.
Without storing and resolving these, the proxy sent only the new
function_call_output to upstream providers, missing the original user
message and assistant tool call. This caused Crof.ai (and any provider
using tool calls) to stop after the first response.

- Add in-memory response store (50 entry LRU) keyed by response ID
- resolve_previous_response() reconstructs full input chain on multi-turn
- Fix orphan message output item when response has only tool calls
- Applies to all backends: openai-compat, anthropic, command-code
- v2.1.2
This commit is contained in:
admin
2026-05-19 20:38:39 +04:00
Unverified
parent 389866a2c6
commit cb6381afe4
6 changed files with 93 additions and 9 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## 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 orphan message output item when response is only tool calls (no text content)
- Response store capped at 50 entries (LRU eviction)
## v2.1.1 (2026-05-19)
- Added Command Code backend to translation proxy (proprietary `/alpha/generate` API)