Skip to content

fix(scripts): require DEEPSEEK_BASE_URL in the live planner probe - #701

Draft
Danceiny wants to merge 1 commit into
mainfrom
fix/live-probe-require-gateway-url
Draft

Danceiny wants to merge 1 commit into
mainfrom
fix/live-probe-require-gateway-url

Conversation

@Danceiny

Copy link
Copy Markdown
Owner

为什么改 · Why

没设 DEEPSEEK_BASE_URL 时,这个手动探活脚本会回落到写死的模型网关明文地址。这个端口正在对公网关闭,而这个默认值还把它公布在了公开仓库里。脚本头注释本来就写明这个变量是必需的。

When DEEPSEEK_BASE_URL is unset, this manual probe fell back to a hard-coded plaintext gateway endpoint. That port is being closed to the internet, and the default also published the endpoint in this public repository. The script header already documents the variable as required.

改了什么 · What

  • ts/scripts/booking-copilot-planner-live-probe.ts:去掉 DEEPSEEK_BASE_URL 的默认值;没设置时启动即报错,做法与上一行的 DEEPSEEK_API_KEY 相同。
  • Removes the fallback; an unset DEEPSEEK_BASE_URL now fails fast, exactly like DEEPSEEK_API_KEY on the line above.

最终 SHA 本地证据 · Local final-SHA evidence

TODO(所以是草稿 · hence draft):

  1. HEAD:30604065033dd6a3605d9169e7e80137c2c6a32a(经 GitHub API 提交,单文件 +2/−1)。
  2. cd ts && npx tsc --noEmit:未跑(作者这台机器拉不下仓库,没装依赖)。改动照搬 apiKey 已有的 if (!x) throw 收窄写法;baseUrl 之后只在顶层用到,与 apiKey 的用法相同。
  3. GOTRY_SESSION_LIVE=0 ./scripts/run-all-tests.sh:未跑,原因同上。这个脚本只供手动运行,不在回归里。

最小 E2E · Minimal E2E

N/A:手动探活脚本,不在产品运行路径上。唯一的行为变化:没设 DEEPSEEK_BASE_URL 时直接报错,不再去连旧地址。
N/A: a manual probe outside the product runtime; the only behavior change is failing fast instead of dialing the old endpoint.

语义/架构/维护兼容 · Semantics / architecture / maintenance

维护改动:设了 DEEPSEEK_BASE_URL 的用法完全不变。回滚:revert 这个提交。旧地址仍留在仓库历史里,端口关掉后它就连不上了。

CI · Continuous integration

见本 PR 的检查结果。

自查清单 · Checklist

  • 已在最终 SHA 本地跑 typecheck 与全栈回归 — 未跑,见上方 TODO
  • 已填写最小 E2E 行;N/A 时写明 burden-of-proof
  • 分支从最新 main 切出,单一关注点;只改了本 PR 的具名文件
  • 未调用 deprecated 层
  • 本改动无行为/架构变化(手动脚本的必填参数校验)
  • 未实现任何直接写操作
  • 测试/巡检未写入共享运行时状态
  • 未宣称未实际配置的分支保护、徽章或机器闸
  • N/A 项:6 处状态面同步(不改变系统形态/状态/债务)

The hard-coded fallback pointed at the LLM gateway's plaintext port, which is being closed to the internet, and published that endpoint in this public repository; the script header already documents the variable as required.

This branch has not been deployed

No deployments
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.

1 participant