@jacobbd/relay-ai 0.3.0 → 0.3.1
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/CHANGELOG.md +10 -0
- package/dist/cli.js +20 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.1] - 2026-06-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Codex App: background GPT model requests no longer crash your session** — The Codex desktop app has an internal agent subsystem that sends background requests using hardcoded model IDs (`gpt-5.4`, `gpt-5.4-mini`, `gpt-5.5`), even when you've configured a completely different model like GLM or DeepSeek. These requests were hitting the relay-ai proxy and getting 404 errors, which interrupted your chat session and showed up as confusing error states in the UI. The proxy now silently routes those background requests to your configured starting model instead. Your session keeps running. (Fixes [#8](https://github.com/jacob-bd/relay-ai/issues/8))
|
|
8
|
+
|
|
9
|
+
- **Codex App: `GET /v1/responses` polling no longer returns 404** — Codex polls this endpoint in the background for session state. The proxy only handled `POST /v1/responses` before, so every poll got a 404. Now it returns an empty list, which is all Codex actually needs.
|
|
10
|
+
|
|
11
|
+
- **`--trace` output was a false negative** — `relay-ai codex-app --trace` would print `(no errors found in debug log)` even when the proxy had been silently dropping dozens of model-not-found failures the whole session. Trace output now surfaces `resolveModel failed` and `resolveModel fallback` lines so you can actually see what's happening.
|
|
12
|
+
|
|
3
13
|
## [0.3.0] - 2026-06-21
|
|
4
14
|
|
|
5
15
|
*Happy Father's Day!* 👨👦
|
package/dist/cli.js
CHANGED
|
@@ -35,7 +35,7 @@ import { join } from "path";
|
|
|
35
35
|
// package.json
|
|
36
36
|
var package_default = {
|
|
37
37
|
name: "@jacobbd/relay-ai",
|
|
38
|
-
version: "0.3.
|
|
38
|
+
version: "0.3.1",
|
|
39
39
|
publishConfig: {
|
|
40
40
|
access: "public"
|
|
41
41
|
},
|
|
@@ -3640,7 +3640,7 @@ function printTraceLog(debugLogPath) {
|
|
|
3640
3640
|
const raw = readFileSync6(debugLogPath, "utf8");
|
|
3641
3641
|
const log19 = redactTraceLog(raw);
|
|
3642
3642
|
const errorLines = log19.split("\n").filter(
|
|
3643
|
-
(l) => l.includes("error") || l.includes("Error") || l.includes('"type":"error"') || l.includes("status")
|
|
3643
|
+
(l) => l.includes("error") || l.includes("Error") || l.includes('"type":"error"') || l.includes("status") || l.includes("resolveModel failed") || l.includes("resolveModel fallback")
|
|
3644
3644
|
);
|
|
3645
3645
|
console.log("\n" + pc2.bold(pc2.cyan("\u2500\u2500 Debug trace \u2500\u2500")));
|
|
3646
3646
|
if (errorLines.length > 0) {
|
|
@@ -10007,13 +10007,22 @@ async function startCodexProxy(routes, options = {}) {
|
|
|
10007
10007
|
return;
|
|
10008
10008
|
}
|
|
10009
10009
|
const modelId = String(body.model ?? "");
|
|
10010
|
-
|
|
10010
|
+
let resolved = resolveModel(routes, models, modelId);
|
|
10011
10011
|
if (!resolved) {
|
|
10012
|
-
|
|
10013
|
-
|
|
10012
|
+
const fallbackRoute = routes[0];
|
|
10013
|
+
const fallbackLm = fallbackRoute ? models.get(fallbackRoute.modelId) : void 0;
|
|
10014
|
+
if (fallbackRoute && fallbackLm) {
|
|
10015
|
+
if (debug) {
|
|
10016
|
+
log19(`resolveModel fallback: requested="${modelId}" \u2192 ${fallbackRoute.modelId}`);
|
|
10017
|
+
}
|
|
10018
|
+
resolved = { route: fallbackRoute, languageModel: fallbackLm };
|
|
10019
|
+
} else {
|
|
10020
|
+
if (debug) {
|
|
10021
|
+
log19(`resolveModel failed: requested="${modelId}" known=[${routes.map((r) => r.modelId).join(", ")}]`);
|
|
10022
|
+
}
|
|
10023
|
+
sendJson(res, 404, { error: { message: `Unknown model: ${modelId}`, type: "invalid_request_error" } });
|
|
10024
|
+
return;
|
|
10014
10025
|
}
|
|
10015
|
-
sendJson(res, 404, { error: { message: `Unknown model: ${modelId}`, type: "invalid_request_error" } });
|
|
10016
|
-
return;
|
|
10017
10026
|
}
|
|
10018
10027
|
const { route, languageModel } = resolved;
|
|
10019
10028
|
try {
|
|
@@ -10065,6 +10074,10 @@ async function startCodexProxy(routes, options = {}) {
|
|
|
10065
10074
|
}
|
|
10066
10075
|
return;
|
|
10067
10076
|
}
|
|
10077
|
+
if (req.method === "GET" && url === "/v1/responses") {
|
|
10078
|
+
sendJson(res, 200, { object: "list", data: [] });
|
|
10079
|
+
return;
|
|
10080
|
+
}
|
|
10068
10081
|
sendJson(res, 404, { error: { message: "Not found", type: "invalid_request_error" } });
|
|
10069
10082
|
});
|
|
10070
10083
|
server.on("error", reject2);
|