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:
1 parent
fb7727cf66
commit
3e37ac8ae7
15 files changed
+122
-115
No files matched your search
@@ -10,7 +10,6 @@ import {
|
||||
useRemovePiUpstream,
|
||||
useUpdatePiUpstream,
|
||||
} from "~/api/pi.ts";
|
||||
import { useSettings } from "~/api/settings.ts";
|
||||
import { ConfirmDialog } from "~/components/console/confirm-dialog.tsx";
|
||||
import { DataTable } from "~/components/console/data-table.tsx";
|
||||
import { DetailSection, DetailSheet } from "~/components/console/detail-sheet.tsx";
|
||||
@@ -39,12 +38,10 @@ import { SettingsBlock } from "./settings-block.tsx";
|
||||
export function PiUpstreamsBlock() {
|
||||
const list = usePiUpstreams();
|
||||
const providers = usePiProviders(false);
|
||||
const settings = useSettings();
|
||||
const [wizard, setWizard] = useState(false);
|
||||
const [openId, setOpenId] = useState<string | null>(null);
|
||||
const open = list.data?.items.find((u) => u.id === openId) ?? null;
|
||||
const pv = providers.data?.providers;
|
||||
const legacy = settings.data?.pi.provider;
|
||||
|
||||
return (
|
||||
<SettingsBlock
|
||||
@@ -67,10 +64,7 @@ export function PiUpstreamsBlock() {
|
||||
error={list.error}
|
||||
onRetry={() => list.refetch()}
|
||||
onRowClick={(r) => setOpenId(r.id)}
|
||||
empty={{
|
||||
title: "还没有上游",
|
||||
description: legacy ? `没有上游时按旧设置运行(provider:${legacy})。` : undefined,
|
||||
}}
|
||||
empty={{ title: "还没有上游" }}
|
||||
columns={[
|
||||
{
|
||||
key: "name",
|
||||
|
||||
Reference in new issue
Block a user