模型实例卡重做:名字不截、密钥不撒谎、不可用就别摆统计;只留 flash 与 pro 两条

三条毛病一次改净:

**① 名字被截断**。用途名是活动里声明的那个名,看不全等于没显示 —— 卡面改成
   40px 图标 + **名字独占一行、折行也不截**(overflow-wrap: anywhere),
   厂商与型号退到第二行小字。

**② 「已绑定」是谎**。种子从前塞一个 `sk-placeholder` 冒充密钥,卡上写着「已绑定」,
   一自检就是 `api key ... is invalid`;抽屉里那格也照「是不是新建」写占位,
   于是没钥匙的实例也显示「已绑定 · 留空保持原值」。现在:
     · 种子**读不到环境密钥就不绑**,如实显示未绑定;
     · 抽屉的占位与判词改看 `keyBound` —— 没绑就写「还没有密钥 —— 不填这条实例调不动」。
   **界面撒谎比缺功能更坏**:缺功能人会去补,撒谎的人会照着假状态做决定。

**③ 不可用还摆一排统计**。没密钥连调都调不起来,「系统用途/端点」那些格没有意义 ——
   未绑定时卡上只剩一句判词 +「去配置」;绑好了才谈端点与「测试」。
   系统用途从卡面撤了(用户:不要管是不是系统用途,两条都能用)。

**只留两条实例**:`deepseek-v4-flash` 与 `deepseek-v4-pro`,都不预设系统用途。
配套两件:
  · `pickSystemUse` 加**回落** —— 没人勾就取第一条能用的(启用且已绑密钥);
    从前非勾不可,没勾那天系统叙述整条哑掉,那是配置疏忽不该变成功能缺失(补了三条测试);
  · 六个活动包里声明的用途名 `quote-extractor` 改指 `deepseek-v4-flash`,各升一个补丁版。

顺带补 `DELETE /api/gov/llm/:id`(卡上 ⋯ 菜单):还有活动声明着这个用途名就拒(409)——
删了那些活动一调模型就是「用途名未绑定」,而人当时以为只是清一条没用的记录。
实测:用它把库里遗留的 quote-extractor 删掉,现在库里就是那两条,卡上如实写「未绑定密钥 · 不可用」。
五闸绿。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
2026-07-30 01:53:42 +08:00
co-authored by Claude Opus 5
parent fffb46eae7
commit da8ac8f9bc
15 changed files with 276 additions and 80 deletions
+3 -3
View File
@@ -41,7 +41,7 @@ export const manifest: ActivityManifest = {
identity: {
activityId: ACTIVITY_ID,
name: 'A2 · 替代选型',
packageVersion: '0.1.2',
packageVersion: '0.1.3',
category: '统一报价',
sdkVersion: '0.1.0-m5',
checksum: 'dev-checksum-quote-alternative',
@@ -92,14 +92,14 @@ export const manifest: ActivityManifest = {
resources: {
tools: [{ name: 'crm.history-price-read' }],
skills: ALTERNATIVE_SKILLS.map((s) => s.id),
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
roles: ['FAE'],
budget: { steps: 100, tokens: 260_000, activeMinutes: 360, humanCalls: 6 },
},
},
declarations: {
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
tools: [{ name: 'crm.history-price-read' }],
ledger: [
{
+3 -3
View File
@@ -16,7 +16,7 @@ export const manifest: ActivityManifest = {
identity: {
activityId: ACTIVITY_ID,
name: 'A7 · 情报归档',
packageVersion: '0.1.5',
packageVersion: '0.1.6',
category: '统一报价',
sdkVersion: '0.1.0-m5',
checksum: 'dev-checksum-quote-archive',
@@ -65,14 +65,14 @@ export const manifest: ActivityManifest = {
resources: {
tools: [],
skills: ARCHIVE_SKILLS.map((s) => s.id),
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
roles: ['BD'],
budget: { steps: 30, tokens: 60_000, activeMinutes: 60, humanCalls: 2 },
},
},
declarations: {
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
tools: [],
ledger: [
{
+3 -3
View File
@@ -43,7 +43,7 @@ export const manifest: ActivityManifest = {
identity: {
activityId: ACTIVITY_ID,
name: '客户RFQ受理',
packageVersion: '0.1.8',
packageVersion: '0.1.9',
category: '统一报价',
sdkVersion: '0.1.0-m5',
checksum: 'dev-checksum-quote-intake',
@@ -104,7 +104,7 @@ export const manifest: ActivityManifest = {
resources: {
tools: [{ name: 'crm.history-price-read' }],
skills: INTAKE_SKILLS.map((s) => s.id),
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
roles: ['BD'],
budget: { steps: 40, tokens: 120_000, activeMinutes: 60, humanCalls: 4 },
},
@@ -112,7 +112,7 @@ export const manifest: ActivityManifest = {
/* 声明 */
declarations: {
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
tools: [{ name: 'crm.history-price-read' }],
ledger: [
{
+3 -3
View File
@@ -18,7 +18,7 @@ export const manifest: ActivityManifest = {
identity: {
activityId: ACTIVITY_ID,
name: 'A6 · 报价议价',
packageVersion: '0.1.4',
packageVersion: '0.1.5',
category: '统一报价',
sdkVersion: '0.1.0-m5',
checksum: 'dev-checksum-quote-negotiate',
@@ -72,14 +72,14 @@ export const manifest: ActivityManifest = {
resources: {
tools: [{ name: 'mail.send' }, { name: 'crm.history-price-read' }],
skills: NEGOTIATE_SKILLS.map((s) => s.id),
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
roles: ['BD'],
budget: { steps: 50, tokens: 120_000, activeMinutes: 60, humanCalls: 3 },
},
},
declarations: {
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
tools: [{ name: 'mail.send' }, { name: 'crm.history-price-read' }],
ledger: [
{
+3 -3
View File
@@ -62,7 +62,7 @@ export const manifest: ActivityManifest = {
identity: {
activityId: ACTIVITY_ID,
name: 'A4 · 成本定价',
packageVersion: '0.1.5',
packageVersion: '0.1.6',
category: '统一报价',
sdkVersion: '0.1.0-m5',
checksum: 'dev-checksum-quote-pricing',
@@ -117,14 +117,14 @@ export const manifest: ActivityManifest = {
resources: {
tools: [{ name: 'quote-pricing.basis' }, { name: 'crm.history-price-read' }],
skills: PRICING_SKILLS.map((s) => s.id),
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
roles: ['BD'],
budget: { steps: 60, tokens: 150_000, activeMinutes: 120, humanCalls: 3 },
},
},
declarations: {
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
tools: [{ name: 'crm.history-price-read' }, { name: 'quote-pricing.basis' }],
ledger: [
{
+3 -3
View File
@@ -45,7 +45,7 @@ export const manifest: ActivityManifest = {
identity: {
activityId: ACTIVITY_ID,
name: 'A3 · 渠道寻源',
packageVersion: '0.1.2',
packageVersion: '0.1.3',
category: '统一报价',
sdkVersion: '0.1.0-m5',
checksum: 'dev-checksum-quote-sourcing',
@@ -97,14 +97,14 @@ export const manifest: ActivityManifest = {
resources: {
tools: [{ name: 'mail.send' }, { name: 'crm.history-price-read' }],
skills: SOURCING_SKILLS.map((s) => s.id),
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
roles: ['PRM'],
budget: { steps: 120, tokens: 300_000, activeMinutes: 480, humanCalls: 8 },
},
},
declarations: {
models: ['quote-extractor'],
models: ['deepseek-v4-flash'],
tools: [{ name: 'mail.send' }, { name: 'crm.history-price-read' }],
ledger: [
{