xAI answers a request for grok-4.7 with model grok-4.7-build (the
reporter's requests log; two relays' notes say the same for grok-4.6 ->
grok-4.6-build). Its own list (SuperGrok's, cached 2026-10-02) offers
grok-4.7 and grok-4.7-build-fast and no grok-4.7-build to ask for, so the
-build name is xAI's name for the build serving the model.
GrokServing reads past "-build" after a Grok model's version and joins
GeminiServing under ServingName, which Swapped, a kept requests-log row and
a kept route's try all use. Only names starting with grok count, and only
the same variant: grok-4.7 answered by grok-4.7-build-fast, grok-4.6-build
or grok-4.7-mini is still a swap, as is gpt-5 answered as gpt-5-build.
Run:
- TestSwappedGrokServingName, TestKeptRowGrokServingNameNotSwapped,
TestRouteKeptGrokServingNameNotSwapped (new). With ServingName reduced to
GeminiServing the usage tests fail ("grok-4.7 answered as grok-4.7-build
is the model asked for", "serving name true, fast variant true").
- go test -tags nogui ./internal/agent ./internal/usage ./internal/gateway
ok; gofmt -l clean; go vet for darwin, linux, windows clean.
- Not tried against xAI itself: no request was sent from the owner's Grok
account; the served name is the reporter's.
37 lines
1.5 KiB
Go
37 lines
1.5 KiB
Go
package gateway
|
|
|
|
import "testing"
|
|
|
|
// A route kept with a try marked swapped for Antigravity's
|
|
// gemini-3.8-flash answered as gemini-3.8-flash-n (Google's name for the
|
|
// deployment serving it, dumplings on Discord) is read as not swapped;
|
|
// gpt-5 answered by gpt-5-mini stays swapped.
|
|
func TestRouteKeptGeminiServingNameNotSwapped(t *testing.T) {
|
|
r := &Route{Swapped: true, Served: "gemini-3.8-flash-n", Tries: []Try{{Model: "gemini-3.8-flash", Served: "gemini-3.8-flash-n", Swapped: true}}}
|
|
r.routedAgain()
|
|
if r.Swapped || r.Tries[0].Swapped {
|
|
t.Fatalf("still swapped: %+v", r)
|
|
}
|
|
r = &Route{Swapped: true, Served: "gpt-5-mini", Tries: []Try{{Model: "gpt-5", Served: "gpt-5-mini", Swapped: true}}}
|
|
r.routedAgain()
|
|
if !r.Swapped || !r.Tries[0].Swapped {
|
|
t.Fatalf("a real swap was cleared: %+v", r)
|
|
}
|
|
}
|
|
|
|
// A route kept with a try marked swapped for grok-4.7 answered as
|
|
// grok-4.7-build (xAI's name for the build serving it, #1455) is read as
|
|
// not swapped; grok-4.7 answered by grok-4.7-build-fast stays swapped.
|
|
func TestRouteKeptGrokServingNameNotSwapped(t *testing.T) {
|
|
r := &Route{Swapped: true, Served: "grok-4.7-build", Tries: []Try{{Model: "grok-4.7", Served: "grok-4.7-build", Swapped: true}}}
|
|
r.routedAgain()
|
|
if r.Swapped || r.Tries[0].Swapped {
|
|
t.Fatalf("still swapped: %+v", r)
|
|
}
|
|
r = &Route{Swapped: true, Served: "grok-4.7-build-fast", Tries: []Try{{Model: "grok-4.7", Served: "grok-4.7-build-fast", Swapped: true}}}
|
|
r.routedAgain()
|
|
if !r.Swapped || !r.Tries[0].Swapped {
|
|
t.Fatalf("a real swap was cleared: %+v", r)
|
|
}
|
|
}
|