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

1 participant