Skip to content

修复 [DeepSeek 联网搜索] 工具描述超长导致导入失败 - #137

Merged
hao65103940 merged 1 commit into
1Panel-dev:mainfrom
gzzwp:feat/tool-deepseek-search-desc-fix
Oct 19, 2026
Merged

hao65103940 merged 1 commit into
1Panel-dev:mainfrom
gzzwp:feat/tool-deepseek-search-desc-fix

Conversation

@gzzwp

@gzzwp gzzwp commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

修复 DeepSeek 联网搜索工具描述超长

#135 已合并,但其中的工具在导入 MaxKB 时报错:

value too long for type character varying(128)

原因

Tool.desc 字段在 apps/tools/models/tool.py 中定义为 models.CharField(max_length=128),
而 #135 提交的 .tool 里描述为 168 字符,落库时被 PostgreSQL 拒绝。

改动

  • 描述压缩至 108 字符,保留触发条件与搜索语法说明
  • 重新生成 1.0.0/DeepSeek联网搜索.tool
  • 其余文件(源码、README、data.yaml、logo)与 添加 [DeepSeek 联网搜索] 工具 #135 一致

验证

  • 逐字段比对 Tool 模型的 max_length 约束,确认无超长字段
  • .tool 通过 RestrictedUnpickler 白名单反序列化自测
  • 生成脚本已加入长度断言,后续不会再漏

建议合并本 PR 后,#135 引入的版本即可正常导入。

@github-actions

Copy link
Copy Markdown

✅ PR 自动校验结果

状态: 校验通过

ℹ️  本次 PR 未涉及 tools/ 目录下的工具,跳过校验。

Tool.desc 在数据库中是 varchar(128),1Panel-dev#135 中的描述为 168 字符,
导入时抛 StringDataRightTruncation: value too long for type character varying(128)。
将描述压缩至 108 字符并重新生成 .tool,其余文件与 1Panel-dev#135 一致。
@gzzwp
gzzwp force-pushed the feat/tool-deepseek-search-desc-fix branch from 9fe6015 to 1308372 Compare October 19, 2026 09:35
@github-actions

Copy link
Copy Markdown

✅ PR 自动校验结果

状态: 校验通过

ℹ️  本次 PR 未涉及 tools/ 目录下的工具,跳过校验。

@hao65103940
hao65103940 merged commit b81aa26 into 1Panel-dev:main Oct 19, 2026
1 check passed
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.

2 participants