Repository navigation
feat: 新增模型轮转、额度看板和密钥管理 - #36
Merged
jasonxu114514 merged 1 commit intoOct 7, 2026
Merged
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
调用方现在可以沿用现有 Base URL 和 API Key,通过
sota/sweet自动选择 Go 模型;管理员可在网页中查看套餐额度、管理调用方密钥和调整模型轮转。主要改动
X-Resolved-Model标记实际模型,用量归属实际模型。验证
go test -race ./... -timeout 60sgo vet ./...、go build -trimpathnpm run format:check、npm run check:web、入口脚本语法检查兼容性说明
真实模型 ID 和已有 API Key 继续可用。Go 额度是共享套餐窗口,换模型不保证解决套餐耗尽;流式中途故障也不保证补齐回答。额度查询使用 OpenCode 官方实现中的
/v1/usage,响应格式变化时显示异常。配置新增rotation/server_key_metadata,回退旧版本需恢复旧配置。运行状态、凭证和本机部署文件未纳入提交。