@jacobbd/relay-ai 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -453,7 +453,9 @@ Patches `~/.codex/config.toml` with backup; **Ctrl+C** in the relay-ai terminal
453
453
 
454
454
  See **[docs/CODEX.md](docs/CODEX.md)** for CLI vs app differences, file ownership, and troubleshooting.
455
455
 
456
- > **Known limitation — MCP tools (Context7, chrome-devtools, etc.) don't work with non-native models.** Codex wraps local `[mcp_servers.*]` tools in a proprietary, undocumented format that only Codex's own ChatGPT backend can dispatch. When routed through relay-ai (or *any* non-native model provider this also affects Ollama, OpenRouter, LiteLLM, LM Studio identically), the model can see and call the tools, but Codex's own dispatcher rejects every call with `unsupported call: ...`. This is a confirmed, currently open upstream bug ([openai/codex#20652](https://github.com/openai/codex/issues/20652)) there is no workaround on relay-ai's side. MCP tools work normally with Codex's native OpenAI/ChatGPT models. See the [MCP troubleshooting row in docs/CODEX.md](docs/CODEX.md#troubleshooting) for details.
456
+ > **MCP tools (Context7, chrome-devtools, the built-in browser, etc.) now work with non-native models.** Codex wraps local `[mcp_servers.*]` tools — and the built-in browser, which is itself exposed as an MCP tool — in a proprietary, undocumented format that only Codex's own ChatGPT backend used to be able to dispatch. relay-ai now translates this format on both the request and response side (splitting the model's flattened tool-call name back into Codex's expected `{namespace, name}` shape), so MCP tools and the browser work through any provider relay-ai routes to, not just Codex's native OpenAI/ChatGPT models.
457
+ >
458
+ > **Known limitation — image generation (`image_gen`) doesn't work with non-image-capable models.** Unlike MCP tools, which Codex executes locally, `image_gen` calls out to an OpenAI image backend (`POST /v1/images/generations`). relay-ai's proxy doesn't implement that endpoint, and even if it did, most registry models (DeepSeek, Grok, Gemini text models, etc.) can't generate images at all — the call fails with a 404. There is no workaround short of relay-ai adding a dedicated image-generation route to a genuinely image-capable provider, which isn't currently planned. Image generation works normally with Codex's native OpenAI/ChatGPT models.
457
459
 
458
460
  **Reasoning effort:** Capable models show Codex's native reasoning picker (low/medium/high, etc.). relay-ai maps your choice to each provider's SDK options and preserves existing `model_reasoning_effort` in Codex config. Claude Code `/effort` and the `relay-ai server` gateway use the same mapping — see the [reasoning section in docs/CODEX.md](docs/CODEX.md#reasoning-effort).
459
461
 
@@ -11,7 +11,7 @@ import { join } from "path";
11
11
  // package.json
12
12
  var package_default = {
13
13
  name: "@jacobbd/relay-ai",
14
- version: "0.4.4",
14
+ version: "0.4.6",
15
15
  publishConfig: {
16
16
  access: "public"
17
17
  },
@@ -1235,7 +1235,7 @@ function thinkingProviderOptions(npm) {
1235
1235
  // src/codex/app-profile.ts
1236
1236
  var CODEX_APP_PROVIDER_ID = "relay-ai-launch-codex-app";
1237
1237
  var PREVIEW_PROXY_PORT = 54321;
1238
- var CODEX_APP_AUTO_COMPACT_RATIO = 0.55;
1238
+ var CODEX_APP_AUTO_COMPACT_RATIO = 0.9;
1239
1239
  function codexAppModelSlug(rawModelId) {
1240
1240
  return rawModelId.startsWith("models/") ? rawModelId.slice("models/".length) : rawModelId;
1241
1241
  }
@@ -3830,6 +3830,7 @@ var FILE_MODE4 = 384;
3830
3830
  var CLAUDE_DEBUG_LOG = "claude-debug.log";
3831
3831
  var PROXY_DEBUG_LOG = "proxy-debug.log";
3832
3832
  var CODEX_PROXY_DEBUG_LOG = "codex-proxy-debug.log";
3833
+ var CODEX_BODY_DUMP_LOG = "codex-body-dump.jsonl";
3833
3834
  var GEMINI_PROXY_DEBUG_LOG = "gemini-proxy-debug.log";
3834
3835
  var PROVIDER_DEBUG_LOG = "provider-debug.log";
3835
3836
  var UI_DEBUG_LOG = "ui-debug.log";
@@ -3856,6 +3857,23 @@ function getProxyDebugLogPath() {
3856
3857
  function getCodexProxyDebugLogPath() {
3857
3858
  return join8(ensureLogsDir(), CODEX_PROXY_DEBUG_LOG);
3858
3859
  }
3860
+ function getCodexBodyDumpLogPath() {
3861
+ return join8(ensureLogsDir(), CODEX_BODY_DUMP_LOG);
3862
+ }
3863
+ function resetCodexBodyDumpLog() {
3864
+ resetTraceLog(getCodexBodyDumpLogPath());
3865
+ }
3866
+ function appendCodexBodyDump(entry) {
3867
+ ensureLogsDir();
3868
+ const path = getCodexBodyDumpLogPath();
3869
+ const redacted = redactTraceLine(JSON.stringify(entry));
3870
+ try {
3871
+ writeFileSync4(path, `${redacted}
3872
+ `, { flag: "a", mode: FILE_MODE4 });
3873
+ chmodSync4(path, FILE_MODE4);
3874
+ } catch {
3875
+ }
3876
+ }
3859
3877
  function getGeminiProxyDebugLogPath() {
3860
3878
  return join8(ensureLogsDir(), GEMINI_PROXY_DEBUG_LOG);
3861
3879
  }
@@ -10454,6 +10472,8 @@ export {
10454
10472
  prepareClaudeTraceLog,
10455
10473
  getProxyDebugLogPath,
10456
10474
  getCodexProxyDebugLogPath,
10475
+ resetCodexBodyDumpLog,
10476
+ appendCodexBodyDump,
10457
10477
  getGeminiProxyDebugLogPath,
10458
10478
  getUiDebugLogPath,
10459
10479
  makeTraceLogger,
@@ -10532,4 +10552,4 @@ export {
10532
10552
  quitClaudeAppGracefully,
10533
10553
  launchOrRestartClaudeApp
10534
10554
  };
10535
- //# sourceMappingURL=chunk-XCB2K4GI.js.map
10555
+ //# sourceMappingURL=chunk-YM6G7BHE.js.map