Repository navigation
添加了令牌分组,令牌选择删除 - #33
Merged
Merged
Conversation
|
Runtime money pricing follow-up pushed in What changed:
Verification:
Postgres note: used the unpooled Neon host for schema-isolated tests because the pooler rejects startup |
|
Update: runtime money usage settlement follow-up pushed in Summary:
Verification:
|
jiutubaba
pushed a commit
to jiutubaba/fx-api
that referenced
this pull request
May 17, 2026
* refactor: 自定义业务错误 * refactor: 隐藏服务器错误与统一 panic 响应
lingozhi
referenced
this pull request
in lingozhi/new-api
Jul 17, 2026
Measured over 262 prod requests, all six channels serving the SAME model at the SAME reasoning effort — so the spread is the channel, not the request: #41 1275ms (n=90) #51 1328ms (n=66) #42 2337ms (n=17) #33 3388ms (n=24) #45 3537ms (n=52) #57 8133ms (n=8) Bucketing by uncached prompt tokens holds p50 flat (1612/1934/2073/1802 for 0-2k/2-6k/6-20k/20k+), which rules out prefill volume as the cause. Meanwhile ~100% of requests are affinity-pinned, so the health-weighted selection that was supposed to steer around slow channels almost never runs — the only exit is IsChannelFastEnoughForAffinity, and `score > 0.1` with `score = 1/(1+latency)` only fires past 9s. #45 and #57 kept their sticky traffic forever; 33% of requests were pinned to a channel 2.6x+ slower than the one next to it. Release relative to the best peer for the same model+path instead: leave only when the sticky is BOTH slower than 2s absolute and >2x that peer. The absolute floor stops churn over gaps nobody can feel (0.3s vs 0.15s is 2x), the ratio stops churn for gains too small to repay a migration. #42 at 1.83x stays. The reason this could not just be turned on: migration causes a cold prompt cache by construction, and a cold 240k-token prefill measured 23348ms. That one number breaks two mechanisms at once, both of which then punish the channel we just chose *for being the fastest*: - the latency EWMA, which is shared by every affinity key on the channel, so one migration would make the destination look slow to all of them and stampede them off it, each paying its own cold prefill; - cooldownSlowChannelIfNeeded, an entirely separate path that yanks a channel out of rotation for 30 minutes past 30s FRT — 23.3s is 78% of that. So the release is gated three ways. ColdCacheStart marks the attempt and keeps its latency out of both mechanisms (failures still count — a cold start is no excuse for erroring). A per-key cooldown stops one key bouncing. A global minimum interval drains a slow channel one key at a time, because the slow verdict is per-channel: without it every key pinned to #45 leaves on the same tick and their cold prefills land on #41 together, making it genuinely slow — a cascade no latency-exclusion can prevent, since that load is real. Circuit-open releases stay unconditional and never reach AcquireChannelHealth, or a rate-limited key would be parked on a tripped channel and a paying request would become its half-open probe. Accepted: weighted re-selection can hand a released key back to the same slow channel (~12.5% by weight). Not excluded — that risks a 503, and the cache there is still warm, so the only cost is the 10-minute slot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Firesuiry
pushed a commit
to Firesuiry/tako-newapi
that referenced
this pull request
Aug 27, 2026
…QuantumNous#33) Collapse standalone search onto the existing channel ability pool. POST /v1/search now selects web_search (or x_search for grok_x) with priority/weight instead of brand virtual models or a random whitelist. Channel-level RPM/RPD plus optional ability overrides apply to all capabilities, and 429 parks the channel briefly. Billing uses standalone_web_search to avoid colliding with chat tool prices.
salem-2007
added a commit
to salem-2007/new-api
that referenced
this pull request
Sep 10, 2026
leicanxi
added a commit
to leicanxi/flowbee-api
that referenced
this pull request
Oct 5, 2026
QuantumNous#33:此前「免费模型调用速率」这条规则只在福利页讲,而进钱包、进概览的人远多于 进福利页的人,多数用户不知道它存在。本轮加露出点,不改名词。 - 概览第 2 步「添加额度」右侧一行浅灰提示:`1 档 · 距 2 档还差 ¥0.943` - 钱包标题下一行两个入口胶囊:`免费模型调用速率·1 档(余额决定)` / `福利(免费余额)` - 档位解析收敛为唯一实现 lib/welfare-tier.ts(福利页 / 钱包 / 概览三处共用), 并把「余额低于最低档 = 未解锁(level -1)」锁进单测 —— 按 0 起步会把未解锁 用户误标成 1 档,改造QuantumNous#23 修过一次 - 钱包页与福利页拿到最新 self 后回写登录态:此前充值后概览那行提示不会刷新, 看着像充值没生效 - 术语沿用「速率 / N 档」,不用「等级 + Lv」——Lv 会被读成累积型会员等级, 而真实规则是余额随时决定档位、余额降了会掉档 - 福利页摘要条补「每分钟次数用完后会优先使用补贴通道」(auto 令牌的实际去向) QuantumNous#34:顶栏的语言切换换成福利页入口(Gift 图标 -> /invite)。语言切换属低频设置, 而福利页有签到 / 邀请的免费余额,值得常年露在顶栏。原实现保留为注释便于回滚。 附带两处: - 后台赞助审核列表加订单状态列与筛选,只统计 success —— 点开支付页但未付款的 pending 记录与真实支持长得一样,不标状态会把人数和金额算高 - 补上 .gitignore 的 *.db-wal / *.db-shm(启用 WAL 后漏配的两条)
yuanjie-ai
pushed a commit
to apiduo/apiduo
that referenced
this pull request
Nov 18, 2026
priority 是回退链而不是隔离手段:GetRandomSatisfiedChannel 的 retry 直接 是降序优先级层的索引,RetryTimes=1 刚好够降一层。当前 QuantumNous#29(p1) → QuantumNous#33(p0) 就是这条链。 断链实测(QuantumNous#29 base_url 指向 127.0.0.1:1):60ms 返回 202、落点 channel_id=33、 platform=local-image-async、57 秒出图、只有回退渠道被计费。 同时留档三条否决点:504/524 不重试(造断链不能用超时)、LocalError 不重试、 2xx/NoRetry 不重试(任务已接受就不换渠道,避免二次计费)。
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.
No description provided.