square-235 (plugins#638): Qoder CN billed magpie's DeepSeek-Flash (dfmodel)
calls as Auto, at Auto's rate; Kimi-K3.1-Pro was billed as itself.
opencode-qoder-auth 0.2.54 (plugins fa144e4) stops sending the model's
whole model-list entry (minimal_version, strategies, prices,
thinking_config) as model_config and sends the trimmed object Qoder's own
client builds (CN CLI 1.1.81, desktop 0.4.3). A model with no key of its
own, or key auto, is refused with a 400, never sent. npm has 0.2.54
(npm view --prefer-online). This raises both Qoder movers' min, so moved
users get it.
Run (mote), at this tree on origin/main 95d0c97bf (rebased; run again at this head):
- go vet ./internal/provider, and with GOOS=linux and GOOS=windows: ok.
- go test -count=1 -timeout 45m ./internal/provider: ok (132.8s).
- gofmt -l internal/provider: clean.
- plugins: packages/qoder bun test 363 pass, 0 fail; bun scripts/check.mjs ok.
Broken by hand: with min back at 0.2.53, TestQoderMoversSendTheClientsModelConfig
went red ("the qoder mover installs opencode-qoder-auth 0.2.53").
Not tried: a real Qoder CN chat with dfmodel and its billing row; that the
listing entry caused the Auto billing is likely, not confirmed. QwenWork
was not tried.
Thanks to square-235 for the report and the billing screenshots.
22 lines
824 B
Go
22 lines
824 B
Go
package provider
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/yetone/magpie/internal/update"
|
|
)
|
|
|
|
// Qoder's plugin before 0.2.54 sent a model's whole model-list entry as the
|
|
// request's model_config, which Qoder's own client never does, and Qoder CN
|
|
// billed DeepSeek-Flash (dfmodel) calls as Auto at Auto's rate beside it
|
|
// (plugins#638, square-235). 0.2.54 sends model_config as Qoder's client
|
|
// builds it and refuses a model with no key of its own. The movers keep
|
|
// every moved Qoder and Qoder CN user on a version that has it.
|
|
func TestQoderMoversSendTheClientsModelConfig(t *testing.T) {
|
|
for _, id := range []string{"qoder", QoderCNID} {
|
|
if update.Newer("0.2.54", movers[id].min) {
|
|
t.Fatalf("the %s mover installs opencode-qoder-auth %s, which sends the model-list entry as model_config", id, movers[id].min)
|
|
}
|
|
}
|
|
}
|