diff --git a/packages/factory/README.md b/packages/factory/README.md index b1c472f..371df2c 100644 --- a/packages/factory/README.md +++ b/packages/factory/README.md @@ -69,17 +69,18 @@ Each model is served on the one API droid uses for it: | Gemini generate (`/api/llm/g/v1/generate`) | Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.8/3.7/3.6/3.5 Flash, Gemini 3 Flash | Reasoning efforts are the variants droid offers for each model. DeepSeek V4.1 -Flash (including 1017), Kimi K3 and GLM-5.2 have `none`, droid's "off": they stop thinking. +Flash (1017 too), Kimi K3 and GLM-5.2 have `none`, droid's "off": they stop +thinking. Reasoning is mandatory on GLM-5.3 and GLM-5.3-Flash (Fireworks turns `none` away), so `low` is their least. DeepSeek V4.1 Flash 1017 (`deepseek-v4.1-flash-1017`) is a separate model entry, with droid 0.251.0's 1,040,000-token context, 131,072-token output, image support, `none`/`low`/`high`/`max` efforts and 0.12x token multiplier. -It uses Baseten, first in Factory's routing when checked on 2026-10-29; -live requests accepted the model on both Baseten and Fireworks. The -original Flash stays on Fireworks. Factory gates 1017 with a feature flag, -so availability still depends on the account. +Like every other model here it goes to its registry's default upstream, +`apiProviders[0]`, which is Fireworks, as droid sends it with +`x-provider-routing-source: registry_default`. Factory gates 1017 with a +feature flag, so availability still depends on the account. A model's price is its token multiplier in droid's registry (`cost.tokenMultiplier`), which magpie shows beside the model as its rate diff --git a/packages/factory/droid.test.mjs b/packages/factory/droid.test.mjs index 6216425..9b34305 100644 --- a/packages/factory/droid.test.mjs +++ b/packages/factory/droid.test.mjs @@ -80,15 +80,16 @@ test("another agent's request to /api/llm/o opens with droid's line", async () = expect(b.instructions).toBe(DROID_LINE) }) -// Factory's routing on 2026-10-29 prefers Baseten for 1017 and Fireworks -// for the original Flash; live 1017 requests succeeded on both upstreams. -test("1017 uses Baseten with every reasoning effort and keeps the original Flash on Fireworks", async () => { +// droid sends registry_default with apiProviders[0], so 1017 goes to +// Fireworks, the first of its ["fireworks","baseten","databricks"]. +test("1017 goes to its registry default, Fireworks, with every reasoning effort", async () => { const { send } = await loaded({ ...signedIn }) const model = "deepseek-v4.1-flash-1017" for (const effort of ["none", "low", "high", "max"]) { const s = await send(chat, JSON.stringify({ model, messages: [{ role: "user", content: "hi" }], reasoning_effort: effort, stream: true })) expect(s.url).toBe(chat) - expect(s.headers.get("x-api-provider")).toBe("baseten") + expect(s.headers.get("x-api-provider")).toBe("fireworks") + expect(s.headers.get("x-provider-routing-source")).toBe("registry_default") expect(JSON.parse(s.body)).toMatchObject({ model, reasoning_effort: effort, stream: true }) } const original = await send(chat, JSON.stringify({ model: "deepseek-v4.1-flash", messages: [{ role: "user", content: "hi" }] })) diff --git a/packages/factory/index.mjs b/packages/factory/index.mjs index f4ea380..e45820e 100644 --- a/packages/factory/index.mjs +++ b/packages/factory/index.mjs @@ -87,8 +87,7 @@ const MODELS = [ ["glm-5.2", "GLM-5.2", CHAT, "baseten", 1040000, 131072, ["none", "high", "max"], false, 0.56], ["kimi-k3", "Kimi K3", CHAT, "fireworks", 262144, 65536, ["none", "low", "high", "max"], true, 1.2], ["deepseek-v4.1-flash", "DeepSeek V4.1 Flash", CHAT, "fireworks", 1040000, 131072, ["none", "low", "high", "max"], true, 0.12], - // Factory's routing prefers Baseten for 1017; both upstreams accept it. - ["deepseek-v4.1-flash-1017", "DeepSeek V4.1 Flash 1017", CHAT, "baseten", 1040000, 131072, ["none", "low", "high", "max"], true, 0.12], + ["deepseek-v4.1-flash-1017", "DeepSeek V4.1 Flash 1017", CHAT, "fireworks", 1040000, 131072, ["none", "low", "high", "max"], true, 0.12], ["qwen3.8-max", "Qwen3.8 Max", CHAT, "fireworks", 262144, 131072, ["low", "medium", "xhigh"], false, 0.8], ["minimax-m3", "MiniMax M3", CHAT, "fireworks", 512000, 64000, ["high"], true, 0.12], ["minimax-m2.7", "MiniMax M2.7", ANTHROPIC, "fireworks", 196600, 64000, ["high"], false, 0.12], diff --git a/packages/factory/testdata/droid-0.251.0-deepseek-1017.txt b/packages/factory/testdata/droid-0.251.0-deepseek-1017.txt index f61300c..5ddc9ae 100644 --- a/packages/factory/testdata/droid-0.251.0-deepseek-1017.txt +++ b/packages/factory/testdata/droid-0.251.0-deepseek-1017.txt @@ -1,5 +1,6 @@ -// Excerpts, byte for byte, of Factory.app's bundled droid 0.251.0 -// (Contents/Resources/bin/droid): the total-context helper and 1017 entry. -// Binary SHA-256: 7cf155967a78b75a47de53c5ed99522b77c22a4abd1617e74f167d882c059cfa +// Excerpts, byte for byte, of droid 0.251.0: the total-context helper and +// the 1017 entry. Checked against the darwin-arm64 CLI from +// downloads.factory.ai/factory-cli/releases/0.251.0/darwin/arm64/droid, +// SHA-256 d3c0b87ff7cf942ee40a954ffa00204125d29241fe5e4ef458643622b74c25f9. function c(o,t){return R({maxInputTokens:o-t,maxOutputTokens:t})} "deepseek-v4.1-flash-1017":{id:"deepseek-v4.1-flash-1017",name:"DeepSeek V4.1 Flash 1017",shortName:"DeepSeek V4.1 Flash 1017",provider:"factory",apiModelProvider:"generic-chat-completion-api",featureFlag:w.DeepSeekV41Flash1017,apiProviders:["fireworks","baseten","databricks"],routingConfig:m.DEEPSEEK_V4_1_FLASH_1017,apiProviderConfig:{fireworks:{...Z,modelId:"accounts/fireworks/models/deepseek-v4p1-flash-1017"},baseten:{...Z,modelId:"deepseek-ai/DeepSeek-V4.1-Flash-1017",chatCompletions:{...Z.chatCompletions,thinkingMode:"reasoning-effort"}},databricks:{...bt,modelId:"system.ai.deepseek-v4-1-flash-1017"}},reasoningEffort:{supported:["off","low","high","max"],default:"high"},chatCompletionRequest:Pe(),tier:"standard",billingPool:"core",images:!0,pdf:!1,contextLimits:c(1040000,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.12,cacheReadTokenMultiplier:0.024,outputTokenMultiplier:4},usesUSBasedInference:!0,matchPatterns:[/deepseek[^a-z0-9]*v?4(?:[^a-z0-9]*1|p1)[^a-z0-9]*flash[^a-z0-9]*1017/i],newUntil:new Date("2026-10-22T00:00:00Z")}