@fudrouter/fsrouter 0.6.110 → 0.6.112

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.
@@ -123,10 +123,10 @@ export async function POST_handler(req, res) {
123
123
  return res.status(404).json({ error: "OpenAI Compatible node not found" });
124
124
  }
125
125
  const modelsUrl = `${node.baseUrl?.replace(/\/$/, "")}/models`;
126
- const res = await fetch(modelsUrl, {
126
+ const probeRes = await fetch(modelsUrl, {
127
127
  headers: { "Authorization": `Bearer ${apiKey}` },
128
128
  });
129
- isValid = res.ok;
129
+ isValid = probeRes.ok;
130
130
  return res.json({
131
131
  valid: isValid,
132
132
  error: isValid ? null : "Invalid API key",
@@ -172,14 +172,14 @@ export async function POST_handler(req, res) {
172
172
  normalizedBase = normalizedBase.slice(0, -9); // remove /messages
173
173
  }
174
174
  const modelsUrl = `${normalizedBase}/models`;
175
- const res = await fetch(modelsUrl, {
175
+ const probeRes = await fetch(modelsUrl, {
176
176
  headers: {
177
177
  "x-api-key": apiKey,
178
178
  "anthropic-version": "2023-06-01",
179
179
  "Authorization": `Bearer ${apiKey}`
180
180
  },
181
181
  });
182
- isValid = res.ok;
182
+ isValid = probeRes.ok;
183
183
  return res.json({
184
184
  valid: isValid,
185
185
  error: isValid ? null : "Invalid API key",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fudrouter/fsrouter",
3
- "version": "0.6.110",
3
+ "version": "0.6.112",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "9Router v2 — Express Backend (API, SSE, DB, Auth, MITM)",
package/public/index.html CHANGED
@@ -10,10 +10,10 @@
10
10
  <link rel="preconnect" href="https://fonts.googleapis.com" />
11
11
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
12
12
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
13
- <script type="module" crossorigin src="/assets/index.BO_pNnMt.js?v=108"></script>
14
- <link rel="modulepreload" crossorigin href="/assets/router.Cjj1--8t.js?v=108">
15
- <link rel="modulepreload" crossorigin href="/assets/zustand.akaTi5uX.js?v=108">
16
- <link rel="stylesheet" crossorigin href="/assets/index.C--zNQ3O.css?v=108">
13
+ <script type="module" crossorigin src="/assets/index.BO_pNnMt.js?v=111"></script>
14
+ <link rel="modulepreload" crossorigin href="/assets/router.Cjj1--8t.js?v=111">
15
+ <link rel="modulepreload" crossorigin href="/assets/zustand.akaTi5uX.js?v=111">
16
+ <link rel="stylesheet" crossorigin href="/assets/index.C--zNQ3O.css?v=111">
17
17
  </head>
18
18
  <body>
19
19
  <div id="root"></div>