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

オープン 初心者向け
#28,835 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
半日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

apps/server/src/usage/cliproxyApi.ts の CliproxyApi.management から始めてください。ここでは、リクエスト URL が末尾にスラッシュを付けた config.url から組み立てられるため、/management.html のようなパスがそのまま残ります。AddUsageLimitSourceDialog.tsx を確認してください。このファイルは、フィールドが空でないことだけを検証しています。issue に挙げられている修正案のうち一つを選んでください。URL をオリジンに正規化する、URL を検証する、または 404 エラーに要求された URL を含める、のいずれかです。パネルの URL がハブのルートに解決されるか、分かりやすいメッセージを出すようになり、既存の usage テストが引き続き通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
13時間 49分
マージ済み PR(30日)
179

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。