factory 0.1.44: add Gemini 4 Carbon (#953)
Registers gemini-4-carbon on Factory's Google Gemini route, with the same shape as gemini-4-argon: 1M context, 65536 output, low/medium/high, a 1.6x multiplier and 50% off from 2026-11-10T16:00Z to 2026-12-01T08:00Z. Factory 0.1.44. Reviewed and run at fd9b634f41d7021715842f3db7bde28a9e8e6888: - Downloaded Droid 1.7.1 (darwin/arm64) on mote: SHA-256 761730017d94…7bd4, as the testdata says. The Carbon entry in the binary is byte for byte the testdata line, and it differs from Argon's only in id, name, the feature flag, the pricing note and the dates. - mote, sandbox HOME: `bun test packages/factory` 193 pass; `bun scripts/check.mjs factory` ok. PR CI (root suite under a temp HOME) green. - Broken by hand: Carbon at 1.5x turns 3 rate tests red. Carbon sits at index 48 of 59, after the Fast Mode block's rule; the first 24 are unchanged. - Not caught: dropping Carbon's promotion leaves every test green, since the promotion test reads only named promotion variables, not inline `promotions:[…]`. Argon has the same gap on main. Not tried: a real request. Carbon is behind Factory's Gemini4Carbon flag, unreleased in Droid 1.7.1. Co-authored-by: Mars-Sea <Mars-Sea@users.noreply.github.com>
This commit is contained in:
@@ -117,6 +117,8 @@ const MODELS = [
|
||||
// after the rest, as the Fast Mode models are: first, it would push
|
||||
// GLM-5.3-Flash out of magpie's first 24 (#119)
|
||||
["claude-fable-5.2", "Fable 5.2", ANTHROPIC, "anthropic", 867000, 128000, E5, true, 3.2],
|
||||
// Droid 1.7.1 adds Carbon behind Factory's Gemini4Carbon feature flag.
|
||||
["gemini-4-carbon", "Gemini 4 Carbon", GEMINI, "google", 1000000, 65536, ["low", "medium", "high"], true, 1.6],
|
||||
// The Fast Mode models come last: magpie shows a provider with no models
|
||||
// picked only the first 24 of its list, and placed beside their base
|
||||
// models in 0.1.27 they pushed GPT-5.3-Codex, Grok 4.7, Grok 4.6, GLM-5.3
|
||||
@@ -195,6 +197,7 @@ const PROMOTIONS = [
|
||||
{ id: "gpt-5.6-sol-fast", discount: 0.2, from: "2026-08-22T00:00:00Z", to: "2026-11-22T00:00:00Z" },
|
||||
{ id: "mistral-large-4", discount: 0.5, from: "2026-10-06T00:00:00Z", to: "2026-10-20T00:00:00Z" },
|
||||
{ id: "gemini-4-argon", discount: 0.5, from: "2026-10-13T16:00:00Z", to: "2026-12-01T08:00:00Z" },
|
||||
{ id: "gemini-4-carbon", discount: 0.5, from: "2026-11-10T16:00:00Z", to: "2026-12-01T08:00:00Z" },
|
||||
{ id: "gemini-3.8-flash", discount: 0.5, from: "2026-08-17T21:10:19Z", to: "2027-01-01T08:00:00Z" },
|
||||
{ id: "gemini-3.7-flash", discount: 0.5, from: "2026-08-17T21:10:19Z", to: "2027-01-01T08:00:00Z" },
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-factory-auth",
|
||||
"version": "0.1.43",
|
||||
"version": "0.1.44",
|
||||
"description": "Sign in to a Factory (Droid) subscription from OpenCode or magpie",
|
||||
"type": "module",
|
||||
"main": "./opencode.mjs",
|
||||
|
||||
@@ -10,7 +10,7 @@ import { expect, test } from "bun:test"
|
||||
import { readFileSync } from "node:fs"
|
||||
import { FactoryAuthPlugin, _internal } from "./index.mjs"
|
||||
|
||||
const DROID = ["droid-0.241.1-costs.txt", "droid-0.251.0-deepseek-1017.txt", "droid-1.7.0-models.txt"]
|
||||
const DROID = ["droid-0.241.1-costs.txt", "droid-0.251.0-deepseek-1017.txt", "droid-1.7.0-models.txt", "droid-1.7.1-carbon.txt"]
|
||||
.map((name) => readFileSync(new URL(`./testdata/${name}`, import.meta.url), "utf8")).join("\n")
|
||||
|
||||
// cost is a model's cost text, as its entry keeps it (Inkling's key unquoted).
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// Registry entry from https://downloads.factory.ai/factory-cli/releases/1.7.1/darwin/arm64/droid
|
||||
// SHA-256 761730017d94d73cc040b97ea48b0c1d8ebda494c663b5fe89ca29a1168e7bd4
|
||||
"gemini-4-carbon":{id:"gemini-4-carbon",name:"Gemini 4 Carbon",shortName:"Gemini 4 Carbon",provider:"google",systemPromptReminders:b,apiProviders:["google"],apiProviderConfig:{google:{pricing:{source:"pending-official-pricing-docs",rates:{input:"1.6",output:"8",cacheRead:"0.08"}}}},regionOverrides:{us:O},reasoningEffort:{supported:["low","medium","high"],default:"medium"},tier:"standard",featureFlag:w.Gemini4Carbon,unreleased:!0,images:!0,pdf:!0,contextLimits:g(1e6,65536),thinking:v(),apiRequest:D({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-11-10T16:00:00Z"),expiresAt:new Date("2026-12-01T08:00:00Z"),label:"50% off"}]},newUntil:new Date("2026-11-15T16:00:00Z")}
|
||||
Reference in New Issue
Block a user