Repository navigation
[feat] 为 ZCode 插件提供订阅窗口预热接口 - #544
Closed
YangHonghang wants to merge 1 commit into
Closed
YangHonghang wants to merge 1 commit into
YangHonghang wants to merge 1 commit into
Conversation
Contributor
|
谢谢,写得很克制(不自己调度、不重试、说明也很诚实),但这个方向我们不做,所以先关掉。 原因:「窗口重置后发一条极小消息,让五小时窗口提前开始计时」本质是在用自动请求去调度订阅额度。对订阅厂商来说,这类不是用户发起、定时出现的请求最容易被判成异常用法,风险落在用户的账号上;而好处只是窗口早开一点。magpie 对订阅的原则是只转发用户自己的请求,不替用户「刷」或「预热」额度。 另外它是一个宿主还没有调用的接口,合进来也只是暂时用不到的代码。如果你在用 ZCode 时有别的痛点(比如额度显示、窗口到期提示),欢迎开 issue 说说。 |
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.
为 ZCode 插件新增可选的
auth.warmup(getAuth, provider, options?)接口,供宿主在订阅窗口重置后显式调用,向指定账号的 Coding Plan 发送一条极小消息。本 PR 仅包含插件侧能力。
auth.warmup是拟议接口,目前 Magpie 宿主尚未调用;安装插件不会自动开始预热。主仓库需要另行接入设置、按账号调度、并发控制、去重和额度复查。sent仅表示收到有效模型响应,不等同于五小时窗口已启动。真实套餐是否支持由该模型启动同一窗口,仍需实际验证;本次未使用真实凭据或消耗额度。验证:ZCode 全部 196 项测试通过,
bun scripts/check.mjs zcode通过,git diff --check通过。