Skip to content

[PR] fix: register PUT /__bili/external-summary/credential so Web UI "Save Key" works (#3443) - #3445

Closed
ranxianglei wants to merge 2 commits into
masterfrom
2026-10-17_summary-credential-route
Closed

ranxianglei wants to merge 2 commits into
masterfrom
2026-10-17_summary-credential-route

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Closes #3443

What

The Web UI "Save Key" button sends PUT /__bili/external-summary/credential, which was never registered on the router → permanent 404 (no such management endpoint). External-summary credentials could only be saved by hand-writing <config>.summary-credentials.json.

Root cause (git forensics)

Affects master and every release since (including the reporter's 0.1.197).

Changes

  1. src/server/admin.ts — register PUT /__bili/external-summary/credential in handleAdminRoute next to the config routes; inherits the same loopback + trusted-origin gates as the sibling admin paths (the gates sit above the registration).
  2. tests/web-routing.test.ts — regression test through the REAL proxy/router (startServer, port 0): malformed body → 400; save → 200 {ok, configured:true} with no key echo and the private store file written; GET /__bili/config reflects secret:<name> status; delete (key: null) → configured:false. Verified red without change 1 (404) and green with it.
  3. src/server.ts — drop the dead web-handler import left by the admin-route extraction (all nine symbols unused; same refactor-debris family). Separate labeled commit.

Behavior change (old → new)

  • PUT /__bili/external-summary/credential: permanently 404 → working endpoint. Security posture UNCHANGED: loopback-source + trusted-origin gated exactly like every other /__bili/* admin path.
  • No other behavior changes. No config-surface change. No kernel change.

Verification

  • npm run typecheck clean.
  • Targeted suites: tests/web-routing.test.ts 9/9 (incl. the new test), tests/external-summary-settings.test.ts 43/43. Full-suite verdict = remote CI on this head.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-17_summary-credential-route (aef3fa2)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4057-pr.3445.771633c

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr3445.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

陈旧票清理(第三批动作①):目标 issue #3443 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。

@ranxianglei ranxianglei changed the title fix: register PUT /__bili/external-summary/credential so Web UI "Save Key" works (#3443) [PR] fix: register PUT /__bili/external-summary/credential so Web UI "Save Key" works (#3443) Oct 24, 2026
@k-ying

k-ying commented Nov 13, 2026

Copy link
Copy Markdown

Requesting a reopen: the fix is still needed on 0.1.213 (commit 133f3525c) — PUT /__bili/external-summary/credential still returns 404 {"message":"no such management endpoint"}, and the Web UI still sends that request. Repro and a hand-written-credentials workaround are in #3443.

This PR was closed because #3443 had been closed for stale-ticket cleanup, not because the patch was superseded by another implementation — nothing equivalent appears to be in the router today. If reopening is not convenient, please at least correct the #3488 record that lists this sub-item as "already fixed by PR #3445".

中文:0.1.213 上该路由仍缺失,Web UI 仍在调用,详见 #3443 的复现与绕过办法。本次关闭的原因是「#3443 已关」,而不是补丁被别的实现取代;若不便 reopen,也建议更正 #3488 里「已由 PR #3445 修复」的记录。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI "Save Key" has no server route — PUT /__bili/external-summary/credential 404s, so external-summary credentials can never be saved from the UI

2 participants