[Bug]: CLIProxyAPI hub source accepts the panel URL (/management.html) and then shows only "The hub answered with HTTP 404."

Abierto Apto para principiantes
#28,835 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@sidhartha1s ya está trabajando en esto.

Desde el 3/11/2026.

  • #30234 de @sidhartha1s — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
Medio día
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

Empieza en apps/server/src/usage/cliproxyApi.ts en CliproxyApi.management, donde la URL de la solicitud se construye a partir de config.url con una barra final, por lo que una ruta como /management.html se conserva. Revisa AddUsageLimitSourceDialog.tsx, que solo valida que el campo no esté vacío. Elige una de las correcciones que lista el issue: normalizar la URL al origen, validarla o incluir la URL solicitada en el error 404. Está terminado cuando una URL del panel se resuelve a la raíz del hub o produce un mensaje claro, y las pruebas de uso existentes siguen pasando.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Summary

Settings → Add a CLIProxyAPI hub accepts the URL of the hub's management panel page (https://hub.example.com/management.html). That is the address a user has open in the browser, so it is the natural thing to paste. The usage reader then builds https://hub.example.com/management.html/v0/management/auth-files, the hub answers 404, and the Limits warning only says:

<environment> · hub.example.com: The hub answered with HTTP 404.

Nothing points at the Hub URL field. The management key is correct, and the same key works once the URL is changed to the bare origin.

Steps to reproduce
  1. Run a CLIProxyAPI hub with remote management enabled. Its panel is served at https://hub.example.com/management.html.
  2. In T3 Code, open Settings → Add a CLIProxyAPI hub.
  3. Enter https://hub.example.com/management.html as Hub URL and a valid management key. Save.
  4. Open Usage → Limits, or wait for the next refresh.
Expected behavior

One of these:

  • T3 normalizes a known panel path such as /management.html to the hub root before saving or requesting.
  • Or saving validates the URL with a probe and explains that Hub URL must be the hub root, not the panel page.
  • Or the 404 warning names the URL it requested, or suggests checking that Hub URL is the hub root.
Actual behavior

cliproxyApi.ts resolves v0/management/${path} against config.url with a trailing slash added (apps/server/src/usage/cliproxyApi.ts, CliproxyApi.management). A URL with a path keeps that path:

new URL("v0/management/auth-files", "https://hub.example.com/management.html/")
→ https://hub.example.com/management.html/v0/management/auth-files   (404)

The same key against https://hub.example.com/v0/management/auth-files returns 200. The warning shows only the status code, so the cause is invisible from the UI. The Add hub dialog (AddUsageLimitSourceDialog.tsx) only checks that the field is non-empty.

Impact

Minor bug or occasional failure

Version or commit

T3 Code 0.1.7-nightly.20261101. The same code is on main @ 976a23161d.

Environment

Linux server environment, CLIProxyAPI v8 hub behind an HTTPS reverse proxy.

Logs or stack traces
UsageLimitSourceError: The hub answered with HTTP 404.
    at CliproxyApi.management
    at CliproxyApi.authFiles
    at CliproxyApi.readAccounts
    at UsageLimitSources.readSource
Workaround

Edit the source so Hub URL is the bare origin (https://hub.example.com).

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
13 h 48 min
PR fusionados (30 d)
208

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.