Compare commits

..

2 Commits
1.1.0 ... 1.1.1

Author SHA1 Message Date
5d045f97a8 chore: bump version to 1.1.1
Includes WebUI fix e48baa1 (missing HTTP method on fetch calls with
body) which was committed after the 1.1.0 installers were built.
2026-08-26 15:53:54 +08:00
e48baa1bb3 fix(webui): missing HTTP method on fetch calls with body
6 call sites used the fetch default GET while sending a request body,
which browsers reject outright ('Request with GET/HEAD method cannot
have body'). Affected flows: create key, save source, save auto rules,
upload adapter, update key model scope, and /api/chat streaming.

All now send the method their backend handlers require (POST or PUT)
with an explicit Content-Type.
2026-08-26 00:34:57 +08:00
3 changed files with 15 additions and 4 deletions

View File

@ -1,12 +1,12 @@
{
"name": "modelrouter-gui",
"version": "1.0.0",
"version": "1.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "modelrouter-gui",
"version": "1.0.0",
"version": "1.1.1",
"license": "Proprietary",
"devDependencies": {
"electron": "^33.0.0",
@ -4045,4 +4045,4 @@
}
}
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "modelrouter-gui",
"version": "1.1.0",
"version": "1.1.1",
"description": "ModelRouter Desktop — embedded ModelRouter core with tray",
"author": "ModelRouter",
"main": "main.js",

View File

@ -2268,6 +2268,7 @@
firstChunk = Date.now();
try {
const resp = await fetch("/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model,
@ -2516,6 +2517,8 @@
btn.disabled = true;
try {
await api("/api/sources", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
toast(t("toastSaved"));
@ -3114,6 +3117,8 @@
}),
);
await api("/api/auto", {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ rules }),
});
}
@ -3372,6 +3377,8 @@
if (!name || !code) return toast(t("toastNeedAll"));
try {
await api("/api/adapters", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name, code }),
});
toast(t("toastUploaded"));
@ -3584,6 +3591,8 @@
}
async function putScope(key, scopes) {
await api("/api/keys/" + encodeURIComponent(key), {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ models: scopes }),
});
}
@ -3905,6 +3914,8 @@
let j;
try {
j = await api("/api/keys", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name,
role: $("#kc-role").value,