Add Chat Completions routing for Codex providers

- Add a Codex API format selector and routing badge for Chat Completions providers.
- Convert Codex Responses requests to upstream Chat Completions when routing is required.
- Convert Chat Completions JSON and SSE responses back to Responses format.
- Keep generated Codex wire_api values on Responses for Codex compatibility.
- Add i18n labels, provider metadata handling, and focused conversion tests.
This commit is contained in:
Jason
2026-05-19 10:23:48 +08:00
parent 61e68d754c
commit 1c82b8a3fa
19 changed files with 2230 additions and 35 deletions
+3
View File
@@ -2,6 +2,7 @@
* Codex 预设供应商配置模板
*/
import { ProviderCategory } from "../types";
import type { CodexApiFormat } from "../types";
import type { PresetTheme } from "./claudeProviderPresets";
export interface CodexProviderPreset {
@@ -24,6 +25,8 @@ export interface CodexProviderPreset {
// 图标配置
icon?: string; // 图标名称
iconColor?: string; // 图标颜色
// Codex API 格式
apiFormat?: CodexApiFormat;
}
/**