Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.6.10-alpha.6 编辑已有渠道或创建渠道报错 #1928

Closed
huangyafei opened this issue Nov 14, 2024 · 1 comment · Fixed by #1957
Closed

v0.6.10-alpha.6 编辑已有渠道或创建渠道报错 #1928

huangyafei opened this issue Nov 14, 2024 · 1 comment · Fixed by #1957
Labels
bug Something isn't working

Comments

@huangyafei
Copy link

例行检查

  • [ x ] 我已确认目前没有类似 issue
  • [ x ] 我已确认我已升级到最新版本
  • [ x ] 我已完整查看过项目 README,尤其是常见问题部分
  • [ x ] 我理解并愿意跟进此 issue,协助测试和提供反馈
  • [ x ] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

docker 部署,使用 SQLite 数据库。

升级到 v0.6.10-alpha.6 后:

  1. 编辑已有渠道,在底部点击「提交」,报错:UNIQUE constraint failed: abilities.group, abilities.model, abilities.channel_id
  2. 新增渠道,在底部点击「提交」,报错:UNIQUE constraint failed: abilities.group, abilities.model, abilities.channel_id

报错后,刷新页面,能看到编辑或新增的内容已经保存了,并且在渠道列表页测试正常。但无法通过 API 调用模型。

@huangyafei huangyafei added the bug Something isn't working label Nov 14, 2024
@ZhangTianrong
Copy link
Contributor

ZhangTianrong commented Dec 1, 2024

我也遇到了同样的问题,而且并不止是出现在 v0.6.10-alpha6, 回退到 v0.6.10-alpha5 仍然有次问题。检查日志后发现是默认模型列表中存在重复,导致无法添加,例如对于 Claude 渠道,默认模型如下:
image
其中 claude-3-5-haiku-20241022 出现了两次,删除后即可添加渠道。
具体来所就是 relay/adaptor/anthropic/constants.go 这里定义错了。这些内容如果不是写死在 package 里可能好一些,随着新渠道和模型的推出,未必要更新软件版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants