provider: moved Grok users get grok-auth 0.1.14, which asks for a window offered without a k as that window (#1679)

#1679's fix (df4ea0ff6) reaches only the built-in. A moved Grok user's
requests go through @magpie-community/opencode-grok-auth, whose modelOf
read only <id>@<N>k, so grok-4.7@131072 went to Grok as a model of that
name. plugins f980265 (grok 0.1.14) reads the bare-digit window as the
built-in now does; this raises the mover's min so keepMovedCurrent
updates every moved user to it.

Run: plugin bun test 41 pass, the new modelOf test FAILs with modelOf
put back; scripts/check.mjs grok ok; npm view
@magpie-community/opencode-grok-auth@0.1.14 version on
registry.npmjs.org gives 0.1.14. Here: gofmt -l clean; go test
-tags nogui -count=1 ./internal/provider -run
'Mover|Moved|Migrat|Grok|Adopt|HandOver|KeepMoved' ok.
This commit is contained in:
yetone
2026-10-13 10:40:36 +08:00
parent 0c6752dbdf
commit a069f224c0
+1 -1
View File
@@ -108,7 +108,7 @@ func init() {
// names, as the built-in does: the homes stay where they are.
movers["grok"] = &mover{
pkg: "@magpie-community/opencode-grok-auth",
min: "0.1.12", // a Go key the Provider API refuses is taken as Go's and asked at /alpha/generate (#969); a failure's status and its sign-in mark as the built-in's; grok-4.7's reasoning levels; a token Grok refuses early reads as expired; the sign-in renewed ahead of time through auth.refresh; a 429 shows a spent Rate limit window until it lifts; a login with no link says why; a tool whose parameters are a root union goes as a plain object (#1271); a plain Codex agent_message (a subagent's task or reply) goes as the user's message, not refused with 422 "unknown item type", a sealed one as it came (plugins#61); a model Grok lists at two windows is offered at each, grok-4.7@500k sent with x-grok-context-window (plugins#83)
min: "0.1.14", // a Go key the Provider API refuses is taken as Go's and asked at /alpha/generate (#969); a failure's status and its sign-in mark as the built-in's; grok-4.7's reasoning levels; a token Grok refuses early reads as expired; the sign-in renewed ahead of time through auth.refresh; a 429 shows a spent Rate limit window until it lifts; a login with no link says why; a tool whose parameters are a root union goes as a plain object (#1271); a plain Codex agent_message (a subagent's task or reply) goes as the user's message, not refused with 422 "unknown item type", a sealed one as it came (plugins#61); a model Grok lists at two windows is offered at each, grok-4.7@500k sent with x-grok-context-window (plugins#83); a window offered without a k (grok-4.7@131072) goes as that window, not as a model named so (#1679)
agents: []string{"grok"},
out: func() ([]Moving, error) {
var out []Moving