diff --git a/README.md b/README.md index 6260c59..ceaaf32 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ DEEPSEEK_API_KEY / DEEPSEEK_BASE_URL / DEEPSEEK_DEFAULT_MODEL MINIMAX_API_KEY / MINIMAX_BASE_URL / MINIMAX_MODEL QWEN_API_KEY or DASHSCOPE_API_KEY / QWEN_BASE_URL / QWEN_MODEL OPENROUTER_API_KEY / OPENROUTER_BASE_URL / OPENROUTER_MODEL +REQUESTY_API_KEY / REQUESTY_BASE_URL / REQUESTY_DEFAULT_MODEL KIMI_API_KEY / KIMI_BASE_URL / KIMI_MODEL GEMINI_API_KEY / GEMINI_BASE_URL / GEMINI_MODEL IFLOW_API_KEY / IFLOW_BASE_URL / IFLOW_MODEL @@ -257,7 +258,7 @@ OpenAI-compatible runtime adapter: - CodexBridge can expose non-OpenAI providers through a local Responses adapter while Codex app-server still talks to a Responses-shaped endpoint. - The adapter now handles `/responses/compact`, Chat Completions conversion, stream error mapping, CLIProxyAPI top-level stream error chunks, stream read failure framing, configured transient upstream retry, usage fallback including Gemini-family `usageMetadata`, provider/model thinking policy, CLIProxyAPI-style payload compatibility (`default`, `default-raw`/`defaultRaw`, `override`, `override-raw`/`overrideRaw`, `filter`, `root`, protocol/model matching), multimodal input capability flags, and model capability metadata. -- DeepSeek, MiniMax, Qwen, OpenRouter, Kimi, Gemini, and iFlow are loaded as `providerKind: openai-compatible`; they differ by env vars and capability presets only, not separate provider plugin classes. +- DeepSeek, MiniMax, Qwen, OpenRouter, Requesty, Kimi, Gemini, and iFlow are loaded as `providerKind: openai-compatible`; they differ by env vars and capability presets only, not separate provider plugin classes. - The model capability catalog follows the same direction as CLIProxyAPI: model quirks are represented as data (`thinking`, `payload`, tool support, multimodal support, token caps), while the executor stays generic. - Current built-in catalog covers the CLIProxyAPI model families used by Codex-style routing: Codex, DeepSeek, MiniMax, Qwen, iFlow, Kimi, OpenRouter, Gemini/AI Studio/Vertex, Claude, and Antigravity. `*_MODEL_CATALOG_PATH` can also point at a CLIProxyAPI `models.json`-shaped catalog object; CodexBridge flattens it and merges model token/thinking metadata into runtime capabilities. Native auth/header systems from CLIProxyAPI are not copied into this adapter; use provider env vars or the custom `CODEX_COMPAT_*` profile for deployment-specific credentials. - Auth pools, proxy rotation, and custom provider header management remain deployment-layer concerns and are intentionally separate from the generic OpenAI-compatible adapter. @@ -290,7 +291,7 @@ CODEX_COMPAT_PROVIDER_ID=custom CODEX_COMPAT_API_KEY=... CODEX_COMPAT_BASE_URL=https://provider.example/v1 CODEX_COMPAT_DEFAULT_MODEL=example-model -CODEX_COMPAT_CAPABILITIES=default # or deepseek/minimax/qwen/kimi/gemini/iflow/openrouter +CODEX_COMPAT_CAPABILITIES=default # or deepseek/minimax/qwen/kimi/gemini/iflow/openrouter/requesty CODEX_COMPAT_REQUEST_RETRY=2 ``` @@ -564,7 +565,7 @@ That file is the stable place to adjust: - `WEIXIN_ACCOUNT_ID` - `CODEX_DEFAULT_PROVIDER_PROFILE_ID` -- optional OpenAI-compatible provider keys such as `DEEPSEEK_*`, `MINIMAX_*`, `QWEN_*`, `OPENROUTER_*`, or `CODEX_COMPAT_*` +- optional OpenAI-compatible provider keys such as `DEEPSEEK_*`, `MINIMAX_*`, `QWEN_*`, `OPENROUTER_*`, `REQUESTY_*`, or `CODEX_COMPAT_*` - `CODEXBRIDGE_DEBUG_WEIXIN` ### Windows Scheduled Task diff --git a/packages/codex-provider-relay/docs/LIVE_SMOKE_RECIPES.md b/packages/codex-provider-relay/docs/LIVE_SMOKE_RECIPES.md index 7cd5614..df8f172 100644 --- a/packages/codex-provider-relay/docs/LIVE_SMOKE_RECIPES.md +++ b/packages/codex-provider-relay/docs/LIVE_SMOKE_RECIPES.md @@ -19,6 +19,14 @@ export EMBEDDINGS_API_ENDPOINT=https://openrouter.ai/api/v1/embeddings export EMBEDDINGS_MODEL=qwen/qwen3-embedding-8b ``` +Requesty is an OpenAI-compatible gateway and can be smoke-tested the same way (`provider/model` naming): + +```bash +export REQUESTY_API_KEY=... +export REQUESTY_BASE_URL=https://router.requesty.ai/v1 +export REQUESTY_DEFAULT_MODEL=openai/gpt-4o-mini +``` + The embedding endpoint/model are defaults only. Any OpenAI-compatible embeddings API can be used. ## Smoke 1: Mixed Runtime diff --git a/packages/codex-provider-relay/docs/RECIPES.md b/packages/codex-provider-relay/docs/RECIPES.md index 959c2f1..43a91b1 100644 --- a/packages/codex-provider-relay/docs/RECIPES.md +++ b/packages/codex-provider-relay/docs/RECIPES.md @@ -19,6 +19,21 @@ const runtime = new CodexProviderRuntime({ }); ``` +## Mixed Requesty Runtime + +Requesty is an OpenAI-compatible LLM gateway. Wire it exactly like OpenRouter, swapping the base URL, provider label, and API key env var. Models use `provider/model` naming (for example `openai/gpt-4o-mini`). + +```ts +const runtime = new CodexProviderRuntime({ + apiKey: process.env.REQUESTY_API_KEY!, + upstreamBaseUrl: "https://router.requesty.ai/v1", + defaultModel: "openai/gpt-4o-mini", + providerLabel: "requesty", + profileMode: "mixed", + toolStrategy: "codex-local-first", +}); +``` + ## Relay-Emulated Hosted Tools Relay-emulated tools must be declared and registered. @@ -71,6 +86,16 @@ CODEX_PROVIDER_RELAY_TRACE=stderr-json codex-provider-server ``` +The same shape works for the `requesty` preset (base `https://router.requesty.ai/v1`): + +```bash +CODEX_PROVIDER_RELAY_CAPABILITY_PRESET=requesty +CODEX_PROVIDER_RELAY_API_KEY=... +CODEX_PROVIDER_RELAY_MODEL=openai/gpt-4o-mini +CODEX_PROVIDER_RELAY_TRACE=stderr-json +codex-provider-server +``` + Legacy `CODEX_GATEWAY_*` variables remain supported for compatibility. ## Release Validation diff --git a/packages/codex-provider-relay/src/capabilities/capability_presets.ts b/packages/codex-provider-relay/src/capabilities/capability_presets.ts index 572b2eb..c52d8e6 100644 --- a/packages/codex-provider-relay/src/capabilities/capability_presets.ts +++ b/packages/codex-provider-relay/src/capabilities/capability_presets.ts @@ -19,6 +19,7 @@ export type OpenAICompatibleCapabilityPresetId = | 'minimax' | 'qwen' | 'openrouter' + | 'requesty' | 'iflow' | 'kimi' | 'antigravity' @@ -151,6 +152,15 @@ const PRESETS: Record