Add Codex Chat-to-Responses bridge

- Add Codex provider API format selection and model mapping for Chat-only upstreams.
- Convert Codex Responses requests to Chat Completions and rebuild Chat responses as Responses output.
- Preserve reasoning_content across non-streaming, streaming, tool calls, and previous_response_id follow-ups.
- Add a bounded Codex Chat history cache for restoring tool calls before tool outputs.
- Cover Chat bridge, compact routing, streaming, and history recovery with focused tests.
This commit is contained in:
Jason
2026-05-19 19:06:00 +08:00
parent 5315fa284b
commit 74acf1e387
16 changed files with 1796 additions and 163 deletions
+1
View File
@@ -223,6 +223,7 @@ impl RequestContext {
state.status.clone(),
state.current_providers.clone(),
state.gemini_shadow.clone(),
state.codex_chat_history.clone(),
state.failover_manager.clone(),
state.app_handle.clone(),
self.current_provider_id.clone(),