provider: the built-in Factory offers Gemini 4 Argon, as droid 0.241.1 does (#2080)
droid 0.241.1's picker has Gemini 4 Argon (provider google, 1M total context, 65536 output, low/medium/high, images); the built-in's table stopped at Gemini 3.1 Pro. It goes to /api/llm/g like the other Gemini models. In droid it is behind a Factory feature flag (Gemini4Argon, unreleased), so an account it isn't on for may be refused it. TestFactoryDroid0241Gemini reads droid 0.241.1's picker and Gemini entries (testdata, byte for byte from @factory/cli-darwin-arm64@0.241.1 bin/droid, the same fixture as the plugin's) and checks every Gemini model there is offered with droid's name, limits, efforts and images, on Gemini, in standard's pool. Moved users get it from plugin 0.1.26 (the next commit raises the mover's min). Run: gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows on internal/provider and internal/gateway; go test ./internal/provider ./internal/gateway -count=1 (ok, under load average ~260). Broken by hand: without the row the new test fails. Not tried: a real Factory account (none here).
This commit is contained in:
@@ -585,7 +585,8 @@ type factoryModel struct {
|
||||
// factoryModels are the ones droid's /model picker offers, less auto (droid
|
||||
// picks it client side). Gemini's are the ones droid 0.231.0's CLI registry
|
||||
// still offers (provider google); 2.5 and Gemini 3 Pro Image are
|
||||
// availableInCLI false there, and stay out. They go to /api/llm/g.
|
||||
// availableInCLI false there, and stay out. They go to /api/llm/g. Gemini 4
|
||||
// Argon is droid 0.241.1's (#2080), behind a Factory feature flag there.
|
||||
// Haiku 5.5 and Mistral Large 4 are droid 0.240.0's; GPT-6 Astra Ultra
|
||||
// Fast, new there too, stays out, as droid offers it only once the user
|
||||
// has accepted Factory's high-cost terms for it.
|
||||
@@ -611,6 +612,7 @@ var factoryModels = []factoryModel{
|
||||
{"gpt-5.3-codex", "GPT-5.3-Codex", Responses, "openai", 400000, 128000, []string{"low", "medium", "high", "xhigh"}, true},
|
||||
{"grok-4.7", "Grok 4.7", Responses, "xai", 500000, 63356, []string{"low", "medium", "high", "xhigh"}, true},
|
||||
{"grok-4.6", "Grok 4.6", Responses, "xai", 200000, 63356, []string{"low", "medium", "high", "xhigh"}, true},
|
||||
{"gemini-4-argon", "Gemini 4 Argon", Gemini, "google", 1000000, 65536, []string{"low", "medium", "high"}, true},
|
||||
{"gemini-3.1-pro-preview", "Gemini 3.1 Pro", Gemini, "google", 1000000, 65536, []string{"low", "medium", "high"}, true},
|
||||
{"gemini-3.8-flash", "Gemini 3.8 Flash", Gemini, "google", 1000000, 65536, []string{"low", "medium", "high"}, true},
|
||||
{"gemini-3.7-flash", "Gemini 3.7 Flash", Gemini, "google", 1000000, 65536, []string{"low", "medium", "high"}, true},
|
||||
|
||||
@@ -76,3 +76,54 @@ func TestFactoryDroid0240Models(t *testing.T) {
|
||||
t.Error("GPT-6 Astra Ultra Fast is opt-in in droid and stays out")
|
||||
}
|
||||
}
|
||||
|
||||
// #2080: droid 0.241.1 offers Gemini 4 Argon. The fixture is droid
|
||||
// 0.241.1's picker and Gemini entries, byte for byte; I(total, output)
|
||||
// states the total context, as k does for Gemini 3.
|
||||
func TestFactoryDroid0241Gemini(t *testing.T) {
|
||||
raw, err := os.ReadFile("testdata/factory_droid_0.241.1_gemini.txt")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
src := string(raw)
|
||||
var picker []string
|
||||
json.Unmarshal([]byte(regexp.MustCompile(`(?m)^var y=(\[[^\]]*\]);`).FindStringSubmatch(src)[1]), &picker)
|
||||
n := 0
|
||||
for _, id := range picker {
|
||||
if !strings.HasPrefix(id, "gemini-") {
|
||||
continue
|
||||
}
|
||||
n++
|
||||
var text string
|
||||
for _, l := range strings.Split(src, "\n") {
|
||||
if strings.HasPrefix(l, `"`+id+`":{id:"`+id+`",`) {
|
||||
text = l
|
||||
}
|
||||
}
|
||||
m, ok := factoryModelOf(id)
|
||||
if !ok || text == "" {
|
||||
t.Fatalf("%s offered %v, in the fixture %v", id, ok, text != "")
|
||||
}
|
||||
if name := regexp.MustCompile(`,name:"([^"]+)"`).FindStringSubmatch(text)[1]; m.name != name {
|
||||
t.Errorf("%s name %q, droid %q", id, m.name, name)
|
||||
}
|
||||
lim := regexp.MustCompile(`contextLimits:[Ik]\((\d+e\d+|\d+),(\d+)\)`).FindStringSubmatch(text)
|
||||
ctx, _ := strconv.ParseFloat(lim[1], 64)
|
||||
out, _ := strconv.Atoi(lim[2])
|
||||
if m.context != int(ctx) || m.output != out {
|
||||
t.Errorf("%s limits %d/%d, droid %v/%d", id, m.context, m.output, ctx, out)
|
||||
}
|
||||
var efforts []string
|
||||
json.Unmarshal([]byte(regexp.MustCompile(`reasoningEffort:\{supported:(\[[^\]]*\])`).FindStringSubmatch(text)[1]), &efforts)
|
||||
if !slices.Equal(m.efforts, efforts) {
|
||||
t.Errorf("%s efforts %v, droid %v", id, m.efforts, efforts)
|
||||
}
|
||||
// droid takes images unless an entry says images:!1
|
||||
if m.api != Gemini || m.upstream != "google" || !m.images || strings.Contains(text, "images:!1") || factoryCore(id) {
|
||||
t.Errorf("%s: %+v", id, m)
|
||||
}
|
||||
}
|
||||
if n != 7 {
|
||||
t.Errorf("droid 0.241.1 offers %d Gemini models", n)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Excerpts, byte for byte, of droid 0.241.1 (@factory/cli-darwin-arm64@0.241.1,
|
||||
// bin/droid, its bundled model registry): the picker order, the context
|
||||
// helper Gemini 4 Argon's limits use, and the entries of its Gemini models.
|
||||
// The Gemini 3 entries' k(1e6,65536) is the same total context and output.
|
||||
var y=["auto","auto-fast","claude-fable-5.1","claude-fable-5","claude-opus-5-5","claude-opus-5-5-fast","claude-opus-5","claude-opus-5-fast","claude-opus-4-8","claude-opus-4-8-fast","claude-opus-4-7","claude-opus-4-7-fast","claude-opus-4-6","claude-opus-4-6-fast","claude-opus-4-5-20251101","claude-sonnet-5-5","claude-sonnet-5","claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-haiku-5-5","claude-haiku-4-5-20251001","gpt-6.1-sol","gpt-6-astra","gpt-6-astra-ultrafast","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-sol-fast","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5","gpt-5.5-fast","gpt-5.5-pro","gpt-5.4","gpt-5.4-fast","gpt-5.4-mini","gpt-5.4-mini-fast","gpt-5.3-codex","gpt-5.3-codex-fast","gpt-5.2","gemini-4-argon","garnet-07-15","gemini-3.1-pro-preview","gemini-3.8-flash","gemini-3.7-flash","gemini-3.6-flash","gemini-3.5-flash","gemini-3-flash-preview","inkling","mistral-large-4","mistral-medium-3.5","glm-5.3-flash","glm-5.3","glm-5.2","glm-5.2-fast","kimi-k3","qwen3.8-max","nemotron-3-ultra","deepseek-v4.1-flash","deepseek-v4-flash-0731","deepseek-v4-pro","minimax-m3","muse-spark-1.2","grok-4.7","grok-4.6","grok-4.5","atlas-07-21","aster-07-15","minimax-m2.7","kimi-k2.5","gpt-5.2-codex","glm-5.1","glm-5","glm-4.7","gpt-5.1-codex-max"];
|
||||
function I(o,t){return O({maxInputTokens:o-t,maxOutputTokens:t})}
|
||||
"gemini-4-argon":{id:"gemini-4-argon",name:"Gemini 4 Argon",shortName:"Gemini 4 Argon",provider:"google",systemPromptReminders:b,apiProviders:["google"],regionOverrides:{us:h},reasoningEffort:{supported:["low","medium","high"],default:"medium"},tier:"standard",featureFlag:J.Gemini4Argon,unreleased:!0,images:!0,pdf:!0,contextLimits:I(1e6,65536),thinking:N(),apiRequest:v({supportsMedium:!0,omitSamplingParameters:!0,maxOutputTokens:65536,preserveNativeContent:!0}),disabledForPilots:!1,cost:{tokenMultiplier:1.6,outputTokenMultiplier:5,cacheReadTokenMultiplier:0.05,promotions:[{discount:0.5,startsAt:new Date("2026-10-13T16:00:00Z"),expiresAt:new Date("2026-12-01T08:00:00Z"),label:"50% off"}]},newUntil:new Date("2026-10-18T16:00:00Z")}
|
||||
"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",newUntil:new Date("2000-01-01T00:00:00Z"),name:"Gemini 3.1 Pro",shortName:"Gemini 3.1 Pro",provider:"google",systemPromptReminders:b,apiProviders:["google"],reasoningEffort:{supported:["low","medium","high"],default:"high"},tier:"standard",pdf:!0,contextLimits:k(1e6,65536),thinking:N(),apiRequest:v({supportsMedium:!0}),disabledForPilots:!1,cost:{tokenMultiplier:0.8},regionOverrides:{us:h},matchPatterns:[/gemini[^a-z0-9]*3\.?1[^a-z0-9]*pro/i]}
|
||||
"gemini-3.8-flash":{id:"gemini-3.8-flash",name:"Gemini 3.8 Flash",shortName:"Gemini 3.8 Flash",provider:"google",systemPromptReminders:b,apiProviders:["google"],regionOverrides:{eu:{apiProviders:["google"]}},reasoningEffort:{supported:["low","medium","high"],default:"high"},tier:"standard",pdf:!0,contextLimits:k(1e6,65536),thinking:N(),apiRequest:v({supportsMedium:!0}),disabledForPilots:!1,cost:{tokenMultiplier:0.6,outputTokenMultiplier:5,promotions:[Mt]},matchPatterns:[/gemini[^a-z0-9]*3[.-]?8[^a-z0-9]*flash/i],newUntil:new Date("2026-09-07T00:00:00Z")}
|
||||
"gemini-3.7-flash":{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",shortName:"Gemini 3.7 Flash",provider:"google",systemPromptReminders:b,apiProviders:["google"],regionOverrides:{eu:{apiProviders:["google"]}},reasoningEffort:{supported:["low","medium","high"],default:"high"},tier:"standard",pdf:!0,contextLimits:k(1e6,65536),thinking:N(),apiRequest:v({supportsMedium:!0}),disabledForPilots:!1,cost:{tokenMultiplier:0.6,outputTokenMultiplier:5,promotions:[Mt]},matchPatterns:[/gemini[^a-z0-9]*3[.-]?7[^a-z0-9]*flash/i],newUntil:new Date("2026-08-18T00:00:00Z")}
|
||||
"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",shortName:"Gemini 3.6 Flash",provider:"google",systemPromptReminders:b,apiProviders:["google"],regionOverrides:{eu:{apiProviders:["google"]}},reasoningEffort:{supported:["low","medium","high"],default:"high"},tier:"standard",pdf:!0,contextLimits:k(1e6,65536),thinking:N(),apiRequest:v(),disabledForPilots:!1,cost:{tokenMultiplier:0.6,outputTokenMultiplier:5},matchPatterns:[/gemini[^a-z0-9]*3[.-]?6[^a-z0-9]*flash/i],newUntil:new Date("2026-07-29T00:00:00Z")}
|
||||
"gemini-3.5-flash":{id:"gemini-3.5-flash",newUntil:new Date("2000-01-01T00:00:00Z"),name:"Gemini 3.5 Flash",shortName:"Gemini 3.5 Flash",provider:"google",systemPromptReminders:b,apiProviders:["google"],regionOverrides:{eu:{apiProviders:["google"]}},reasoningEffort:{supported:["minimal","low","medium","high"],default:"high"},tier:"standard",pdf:!0,contextLimits:k(1e6,65536),thinking:N(),apiRequest:v(),disabledForPilots:!1,cost:{tokenMultiplier:0.6},matchPatterns:[/gemini[^a-z0-9]*3\.?5[^a-z0-9]*flash/i]}
|
||||
"gemini-3-flash-preview":{id:"gemini-3-flash-preview",newUntil:new Date("2000-01-01T00:00:00Z"),name:"Gemini 3 Flash",shortName:"Gemini 3 Flash",provider:"google",systemPromptReminders:b,apiProviders:["google"],reasoningEffort:{supported:["minimal","low","medium","high"],default:"high"},tier:"standard",pdf:!0,contextLimits:k(1e6,65536),thinking:N(),apiRequest:v(),disabledForPilots:!1,cost:{tokenMultiplier:0.2},regionOverrides:{us:h},matchPatterns:[/gemini[^a-z0-9]*3[^a-z0-9]*flash/i]}
|
||||
Reference in New Issue
Block a user