navada-edge-cli 2.4.0 → 2.4.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/lib/agent.js +5 -5
- package/package.json +1 -1
package/lib/agent.js
CHANGED
|
@@ -97,11 +97,11 @@ const localTools = {
|
|
|
97
97
|
// ---------------------------------------------------------------------------
|
|
98
98
|
// Free tier — proxied through NAVADA Edge Dashboard (key stays on ASUS)
|
|
99
99
|
// ---------------------------------------------------------------------------
|
|
100
|
-
// Dashboard proxy endpoints — tries Cloudflare tunnel first
|
|
101
|
-
//
|
|
100
|
+
// Dashboard proxy endpoints — tries Cloudflare tunnel first (works for everyone),
|
|
101
|
+
// then falls back to direct Tailscale IP (faster but only works on VPN)
|
|
102
102
|
const FREE_TIER_ENDPOINTS = [
|
|
103
|
-
'
|
|
104
|
-
'
|
|
103
|
+
'https://api.navada-edge-server.uk/api/v1/chat', // Cloudflare tunnel (public, works for all)
|
|
104
|
+
'http://100.88.118.128:7900/api/v1/chat', // Direct Tailscale (VPN users only)
|
|
105
105
|
];
|
|
106
106
|
|
|
107
107
|
async function callFreeTier(messages) {
|
|
@@ -111,7 +111,7 @@ async function callFreeTier(messages) {
|
|
|
111
111
|
const r = await navada.request(endpoint, {
|
|
112
112
|
method: 'POST',
|
|
113
113
|
body: { messages },
|
|
114
|
-
timeout: 30000,
|
|
114
|
+
timeout: endpoint.includes('navada-edge-server.uk') ? 30000 : 5000,
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
if (r.status === 429) {
|
package/package.json
CHANGED