refactor(agent): runAgent uses Agent upstreams only; deprecate legacy settings.pi fields

pi.provider / baseUrl / model / thinkingLevel / apiKeySecretRef are now
DEPRECATED_SETTINGS_FIELDS: kept in the schema for stored JSON, dropped
from PATCH /settings and from the settings sections, never read by the
server. runAgent fails with a clear message when no upstream is set.
The agent demo gate checks the default upstream provider; e2e seeds a
fake upstream as default. OpenAPI summaries say Agent upstream.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 13:45:40 +08:00
1 parent fb7727cf66
commit 3e37ac8ae7
15 files changed
+122 -115

No files matched your search

+5 -5
View File
@@ -1246,14 +1246,14 @@ export const Api = {
method: "get",
path: "/pi/upstreams",
scope: "admin",
summary: "Pi 上游列表(不含密钥)",
summary: "Agent 上游列表(不含密钥)",
response: pi.PiUpstreamList,
}),
get: ep({
method: "get",
path: "/pi/upstreams/{id}",
scope: "admin",
summary: "Pi 上游详情",
summary: "Agent 上游详情",
params: IdParam,
response: pi.PiUpstream,
}),
@@ -1262,7 +1262,7 @@ export const Api = {
path: "/pi/upstreams",
scope: "admin",
auth: "session",
summary: "新建 Pi 上游(apiKey 只写,存 secret 表)",
summary: "新建 Agent 上游(apiKey 只写,存 secret 表)",
body: pi.PiUpstreamCreate,
response: pi.PiUpstream,
}),
@@ -1271,7 +1271,7 @@ export const Api = {
path: "/pi/upstreams/{id}",
scope: "admin",
auth: "session",
summary: "修改 Pi 上游(provider 不可改;makeDefault 设默认上游)",
summary: "修改 Agent 上游(provider 不可改;makeDefault 设默认上游)",
params: IdParam,
body: pi.PiUpstreamUpdate,
response: pi.PiUpstream,
@@ -1281,7 +1281,7 @@ export const Api = {
path: "/pi/upstreams/{id}",
scope: "admin",
auth: "session",
summary: "删除 Pi 上游(连同凭据;是默认上游时清空默认)",
summary: "删除 Agent 上游(连同凭据;是默认上游时清空默认)",
params: IdParam,
response: OkResult,
}),