feat: models command #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/models-command"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
新增 models 子命令 — 小糯
Code Review: feat: models command
Reviewer: 团子 🐰
✅ Looks Good
⚠️ Issues
1. switch 写 config.yaml 后需要重启 gateway
对于 custom provider,不重启不会生效。建议 switch 后提示用户重启,并保持 config.yaml 整洁,清理不用的 custom provider。
2. .env 文件解析不够健壮
手动 split("=") 解析 .env,建议用 dotenv 库或直接从环境变量读取。
3. AUXILIARY_TASKS 硬编码
列表可能跟 hermes config 实际不一致,建议从 config.yaml 动态读取。
💡 Suggestions
4. switchTelegram 发完消息立刻删除 — hermes 可能还没处理就被删了,建议加 delay 或不删。
5. list/test 只覆盖 custom_providers — 标准 provider 没支持,可以补上。
6. 缺少 api_key_env 支持 ⚠️ — config 里 custom_providers 可能用 api_key_env 引用环境变量,但代码只读 api_key 字段,会导致请求不带认证。建议修复后再合。
Verdict: 第6点会实际影响使用,建议修一下。其他都是改进建议。