From 846f74df3077a8f627096b853e127598716c3501 Mon Sep 17 00:00:00 2001 From: mehfuz Date: Sat, 14 Nov 2026 00:34:38 -0800 Subject: [PATCH] Call the gpushed API at gpushed-api.smartloop.ai api.smartloop.ai/v1/gpushed never reached the gpushed Worker: api.smartloop.ai is a Supabase custom domain, so the Worker route on it never ran and the GPU Boxes page got a 404 ("Could not load your GPU box details"). The API now has its own host. GPUSHED_URL overrides it for local development. --- README.md | 2 +- next.config.mjs | 3 ++- src/app/constants.js | 5 +++-- src/app/gpushed/gpushed-section.tsx | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9f62608..25565c0 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ talks to the Smartloop API (`api.smartloop.ai`) from the browser. | Overview | `/dashboard` | Getting started, token usage and estimated savings | | Models | `/models` | The model catalogue and published benchmark scores | | Cloud models | `/cloud-models/usage`, `/cloud-models/history` | Credit usage and call history for cloud models | -| GPU boxes | `/gpushed` | [gpushed](https://gpushed.smartloop.ai) balance, top-ups, the current box, daily spend and GPU prices (from `api.smartloop.ai/v1/gpushed`) | +| GPU boxes | `/gpushed` | [gpushed](https://gpushed.smartloop.ai) balance, top-ups, the current box, daily spend and GPU prices (from `gpushed-api.smartloop.ai`) | | Settings | `/settings/tokens`, `/settings/websearch`, `/settings/billing` | Access tokens, web search, plan, credits and invoices | | Plans and payment | `/plans`, `/pricing`, `/upgrade`, `/payment/*` | Upgrade and Stripe Checkout return pages | | Account | `/profile` | Name, email and password | diff --git a/next.config.mjs b/next.config.mjs index 3194eb1..3ff3015 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -7,7 +7,8 @@ const nextConfig = { }, env: { allow_hash_login: process.env.ALLOW_HASH_LOGIN === 'true'? "1": "0", - base_url: process.env.SLP_BASE_URL + base_url: process.env.SLP_BASE_URL, + gpushed_url: process.env.GPUSHED_URL } }; diff --git a/src/app/constants.js b/src/app/constants.js index c0f4c98..25650bd 100644 --- a/src/app/constants.js +++ b/src/app/constants.js @@ -3,8 +3,9 @@ const BASE_URL = process.env.base_url || "https://api.smartloop.ai"; export const API_ENDPOINT = `${BASE_URL}/v1`; export const WS_ENDPOINT = `${BASE_URL}/ws`; -// gpushed (GPU boxes) is served under the same host, by its own Worker. -export const GPUSHED_ENDPOINT = `${BASE_URL}/v1/gpushed`; +// gpushed (GPU boxes) has its own host: api.smartloop.ai is a Supabase custom +// domain, so a Worker route on it never runs. Same smartloop session token. +export const GPUSHED_ENDPOINT = process.env.gpushed_url || "https://gpushed-api.smartloop.ai"; // Plan names, prices and feature copy live on the marketing site, not in this // app. Keeping a second copy here meant hand-syncing every price change (and diff --git a/src/app/gpushed/gpushed-section.tsx b/src/app/gpushed/gpushed-section.tsx index 6fa29ae..c638f50 100644 --- a/src/app/gpushed/gpushed-section.tsx +++ b/src/app/gpushed/gpushed-section.tsx @@ -7,7 +7,7 @@ * gpushed (https://gpushed.smartloop.ai) gives each smartloop account a * personal NVIDIA GPU machine, created and managed from a Mac with the * `gpushed` CLI and paid from a prepaid balance. Its API lives at - * api.smartloop.ai/v1/gpushed and accepts the same session token as the rest + * gpushed-api.smartloop.ai and accepts the same session token as the rest * of the app, so this page reads it directly: * * GET /me balance and the current box