@anjieyang/uncommon-route 0.1.0 → 0.1.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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/index.js +7 -2
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
import { spawn, execSync } from "node:child_process";
|
|
17
17
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18
18
|
|
|
19
|
-
const VERSION = "0.1.
|
|
19
|
+
const VERSION = "0.1.1";
|
|
20
20
|
const DEFAULT_PORT = 8403;
|
|
21
|
-
const DEFAULT_UPSTREAM = "
|
|
21
|
+
const DEFAULT_UPSTREAM = "";
|
|
22
22
|
const HEALTH_TIMEOUT_MS = 15_000;
|
|
23
23
|
const HEALTH_POLL_MS = 500;
|
|
24
24
|
const PY_PACKAGE = "uncommon-route";
|
|
@@ -207,6 +207,11 @@ const plugin = {
|
|
|
207
207
|
const upstream = cfg.upstream || process.env.UNCOMMON_ROUTE_UPSTREAM || DEFAULT_UPSTREAM;
|
|
208
208
|
const baseUrl = `http://127.0.0.1:${port}/v1`;
|
|
209
209
|
|
|
210
|
+
if (!upstream) {
|
|
211
|
+
api.logger.warn("UncommonRoute: No upstream configured. Set UNCOMMON_ROUTE_UPSTREAM or configure 'upstream' in plugin config.");
|
|
212
|
+
api.logger.warn(" Example: UNCOMMON_ROUTE_UPSTREAM=https://openrouter.ai/api/v1 UNCOMMON_ROUTE_API_KEY=sk-or-...");
|
|
213
|
+
}
|
|
214
|
+
|
|
210
215
|
// 1. Register provider immediately (sync, models available right away)
|
|
211
216
|
api.registerProvider({
|
|
212
217
|
id: "uncommon-route",
|