Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题
TokenStatusExpired
或TokenStatusExhausted
,更新 token 的过期时间或余额也无法重新激活 TokenRemainQuota
)实际上无法被编辑,点击保存后其实不会更新数据库复现方式
问题 1
将某个 Token 的余额耗尽,直到 API 出现
额度已用尽
的提示后,更新余额,也无法重新再激活 Token。问题 2
编辑 token 余额然后再刷新就会发现,token 的余额不会变化
修复
编辑 Token 时,同步更新 Token 的
Status
和RemainQuota
。一些其他的修复
顺手跑了下
gofmt
,还补上了漏掉的几个 claude 模型和价格。隐患
当初设计
UpdateToken
这个接口的时候,没有更新Status
和RemainQuota
是否有什么特殊的考量?