factory 0.1.43: droid 1.7.0 models (#927)
droid 1.7.0's new models in the Factory plugin: Fable 5.2, Kimi K3.1 Pro, MiniMax M3.1 Flash, Nemotron 3.5 Super, Inkling, Muse Spark 1.2, Beam 1.0, and GPT-6 Sol/Luna, GPT-5.6 Sol and GLM-5.2 Fast. Each is at droid's limits, efforts, images and token multiplier, with apiProviders[0] as the upstream. gpt-6-sol/gpt-6-luna at service_tier "priority" now go to their Fast Mode models. GLM-5.2 Fast is its own chat model and is not a tier of GLM-5.2. GPT-5.6 Sol Fast Mode gets Sol's 20% promotion until 2026-11-22. Muse Spark 1.2 is left out of CORE (no billingPool "core"). GPT-6.1 Terra, Muse Spark Open, GPT-6.1 Sol Ultra Fast and Muse Spark 1.3 are left out, each with a reason. The first 24 models are unchanged (#119). Review at 9524dcfc6e45b7c2c15245bd1e200d72aeebe17f: - droid 1.7.0 linux-x64 downloaded in WSL (magpie-desktop). SHA-256 4700746f52ec88e3758a18737be13bb74519276de97bc329054e8dae08f15f42 matches. All 24 excerpt lines of testdata/droid-1.7.0-models.txt are in the binary byte for byte (grep -F). The base entries gpt-6-sol (0.8), gpt-6-luna (0.04), gpt-5.6-sol (2) and glm-5.2 match the plugin's. - Each new row was checked against its entry: id, context/output, efforts (off dropped, or kept as none only for GLM-5.2 Fast), images, multiplier, upstream and wire. - First 24 ids are equal on main and the PR, and main's order is kept. CORE gains exactly kimi-k3.1-pro, minimax-m3.1-flash, nemotron-3.5-super, inkling, beam-1.0 and glm-5.2-fast. - In WSL, bun 1.4.2, HOME a temp dir: `bun test packages/factory` gave 193 pass, 0 fail. `bun scripts/check.mjs` passes. - Broken by hand. main's index.mjs with the new tests: 14 fail. Muse kept in CORE: 7 fail. The Sol Fast promotion removed: 2 fail. Fable 5.2 moved first: the first-24 test fails. Luna Fast at 0.04: 3 fail. Beam with images: 1 fails. Not tried: real requests to Factory. Kimi K3.1 Pro, Nemotron 3.5 Super, MiniMax M3.1 Flash, Beam 1.0, GLM-5.2 Fast and Fable 5.2 are behind statsig gates whose default is off in the binary. The author's account listed them, but other accounts may not, as with Gemini 4 Argon. Co-authored-by: garry569 <garry569@users.noreply.github.com>
This commit is contained in:
@@ -63,17 +63,27 @@ Each model is served on the one API droid uses for it:
|
||||
|
||||
| API | Models |
|
||||
|---|---|
|
||||
| Anthropic Messages (`/api/llm/a`) | Fable 5.1, Fable 5, Opus 5.5, Opus 5, Opus 4.8 (each also in Fast Mode), Sonnet 5.5, Sonnet 5, Sonnet 4.6, Haiku 5.5, Haiku 4.5, MiniMax M2.7 |
|
||||
| OpenAI Responses (`/api/llm/o/v1`) | GPT-6.1 Sol, GPT-6 Sol/Astra/Luna, GPT-5.6 Sol/Terra/Luna, GPT-5.5, GPT-5.4, GPT-5.3-Codex (each also in Fast Mode), Grok 4.7, Grok 4.6 |
|
||||
| Chat completions (`/api/llm/o/v1`) | GLM-5.3, GLM-5.3-Flash, GLM-5.2, Kimi K3, DeepSeek V4.1 Flash, DeepSeek V4.1 Flash 1017, Qwen3.8 Max, MiniMax M3, Mistral Large 4, Mistral Medium 3.5, Nemotron 3 Ultra |
|
||||
| Anthropic Messages (`/api/llm/a`) | Fable 5.2, Fable 5.1, Fable 5, Opus 5.5, Opus 5, Opus 4.8 (each also in Fast Mode), Sonnet 5.5, Sonnet 5, Sonnet 4.6, Haiku 5.5, Haiku 4.5, MiniMax M2.7 |
|
||||
| OpenAI Responses (`/api/llm/o/v1`) | GPT-6.1 Sol, GPT-6 Sol/Astra/Luna, GPT-5.6 Sol/Terra/Luna, GPT-5.5, GPT-5.4, GPT-5.3-Codex (GPT-6 Sol/Luna, GPT-5.6 Sol, GPT-5.5, GPT-5.4 and GPT-5.3-Codex also in Fast Mode), Grok 4.7, Grok 4.6 |
|
||||
| Chat completions (`/api/llm/o/v1`) | GLM-5.3, GLM-5.3-Flash, GLM-5.2, GLM-5.2 Fast, Kimi K3.1 Pro, Kimi K3, DeepSeek V4.1 Flash, DeepSeek V4.1 Flash 1017, Qwen3.8 Max, MiniMax M3.1 Flash, MiniMax M3, Mistral Large 4, Mistral Medium 3.5, Nemotron 3.5 Super, Nemotron 3 Ultra, Inkling, Muse Spark 1.2, Beam 1.0 |
|
||||
| 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 (1017 too), Kimi K3 and GLM-5.2 have `none`, droid's "off": they stop
|
||||
thinking.
|
||||
Flash (1017 too), Kimi K3 and GLM-5.2 (GLM-5.2 Fast too) 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.
|
||||
|
||||
droid 1.7.0's new models are included where droid 1.7.0 lists them for an
|
||||
account with no special access, at its registry's limits, efforts and
|
||||
multipliers. Fable 5.2 asks for the same data-retention terms as Fable 5.1
|
||||
in droid; it is placed after the other non-Fast models so magpie's first 24
|
||||
stay as they were (#119). Muse Spark 1.2 is on Fireworks but in droid's
|
||||
standard pool, so Droid Core's windows don't count it. GPT-6.1 Terra and
|
||||
Muse Spark Open (feature-flagged), GPT-6.1 Sol Ultra Fast (high-cost terms)
|
||||
and Muse Spark 1.3 (Responses on Google, which the plugin doesn't send) are
|
||||
not included.
|
||||
|
||||
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.
|
||||
@@ -87,8 +97,9 @@ A model's price is its token multiplier in droid's registry
|
||||
(`0.8×`), so a cheap one is picked without opening droid. A promotion running
|
||||
comes off it, with the multiplier before the discount struck through beside
|
||||
the price (`rateWas`): Mistral Large 4's launch discount, Gemini 4 Argon's,
|
||||
Gemini 3.8/3.7 Flash's and GPT-5.6 Sol's, each while droid's own dates for it
|
||||
hold. A promotion that has ended is no discount at all.
|
||||
Gemini 3.8/3.7 Flash's and GPT-5.6 Sol's (its Fast Mode too), each while
|
||||
droid's own dates for it hold. A promotion that has ended is no discount at
|
||||
all.
|
||||
|
||||
Gemini's requests go to Factory's generate route with the model in the
|
||||
body, droid's line opening the system instruction. Gemini 4 Argon is behind
|
||||
@@ -102,8 +113,9 @@ beta on Anthropic's API, at `service_tier: "priority"` on OpenAI's. A request
|
||||
that asks the base model for fast (Claude Code's `speed: "fast"`, a
|
||||
Responses request's `service_tier: "priority"`) is sent to its Fast Mode
|
||||
model, as droid's own fast toggle does: asked of the base model, Factory
|
||||
answered at standard speed (#119). Opus 4.6/4.7 Fast, GPT-5.4 Mini Fast, GPT-5.6 Sol Fast (unreleased)
|
||||
and GLM-5.2 Fast (behind a feature flag) are not included.
|
||||
answered at standard speed (#119). GLM-5.2 Fast is a model of its own on
|
||||
chat completions, at droid's 524,288-token context, and isn't sent for fast
|
||||
asked of GLM-5.2. Opus 4.6/4.7 Fast and GPT-5.4 Mini Fast are not included.
|
||||
|
||||
auto is not included: droid picks it on the client side.
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@ import { readFileSync } from "node:fs"
|
||||
import { FactoryAuthPlugin } from "./index.mjs"
|
||||
|
||||
const DROID = readFileSync(new URL("./testdata/droid-0.240.0-fast.txt", import.meta.url), "utf8")
|
||||
const DROID_170 = readFileSync(new URL("./testdata/droid-1.7.0-models.txt", import.meta.url), "utf8")
|
||||
const real = globalThis.fetch
|
||||
afterEach(() => (globalThis.fetch = real))
|
||||
|
||||
function entry(id) {
|
||||
const line = DROID.split("\n").find((l) => l.startsWith(`"${id}":{id:"${id}",`))
|
||||
function entry(id, droid = DROID) {
|
||||
const line = droid.split("\n").find((l) => l.startsWith(`"${id}":{id:"${id}",`))
|
||||
if (!line) throw new Error(`${id} is not in the fixture`)
|
||||
return line
|
||||
}
|
||||
@@ -31,6 +32,8 @@ async function plugin() {
|
||||
}
|
||||
|
||||
const OFFERED = ["claude-opus-5-5-fast", "claude-opus-5-fast", "claude-opus-4-8-fast", "gpt-5.5-fast", "gpt-5.4-fast", "gpt-5.3-codex-fast"]
|
||||
// droid 1.7.0's, offered as it lists them (index.mjs, above MODELS)
|
||||
const OFFERED_170 = ["gpt-6-sol-fast", "gpt-6-luna-fast", "gpt-5.6-sol-fast", "glm-5.2-fast"]
|
||||
|
||||
test("droid's Fast Mode models are offered at their base model's limits and efforts", async () => {
|
||||
const { models } = await plugin()
|
||||
@@ -46,9 +49,28 @@ test("droid's Fast Mode models are offered at their base model's limits and effo
|
||||
expect(Object.keys(m.variants)).toEqual(efforts)
|
||||
}
|
||||
// left out, each for its reason (index.mjs, above MODELS)
|
||||
for (const id of ["claude-opus-4-6-fast", "claude-opus-4-7-fast", "gpt-5.4-mini-fast", "gpt-5.6-sol-fast", "glm-5.2-fast"]) expect(models[id]).toBeUndefined()
|
||||
expect(entry("gpt-5.6-sol-fast")).toContain("unreleased:!0")
|
||||
expect(entry("glm-5.2-fast")).toContain("featureFlag:")
|
||||
for (const id of ["claude-opus-4-6-fast", "claude-opus-4-7-fast", "gpt-5.4-mini-fast"]) expect(models[id]).toBeUndefined()
|
||||
})
|
||||
|
||||
test("droid 1.7.0's GPT Fast Mode models are offered at their base model's limits and efforts, GLM-5.2 Fast at its own", async () => {
|
||||
const { models } = await plugin()
|
||||
for (const id of OFFERED_170) {
|
||||
const text = entry(id, DROID_170)
|
||||
const base = text.match(/baseVariant:"([^"]+)"/)[1]
|
||||
const m = models[id]
|
||||
expect(m).toBeDefined()
|
||||
expect(m.name).toBe(text.match(/,name:"([^"]+)"/)[1])
|
||||
expect(m.provider).toEqual(models[base].provider)
|
||||
expect(m.variants).toEqual(models[base].variants)
|
||||
if (id.startsWith("gpt-")) {
|
||||
expect(text).toContain("contextLimits:E,apiRequest:pe,")
|
||||
expect(m.limit).toEqual(models[base].limit)
|
||||
}
|
||||
}
|
||||
expect(DROID_170).toContain('pe=C({parallelToolCalls:!0,extendedCache:!0,safetyId:!0,verbosity:"low",serviceTier:"priority"})')
|
||||
expect(DROID_170).toContain("E=g(1050000,128000)")
|
||||
expect(entry("glm-5.2-fast", DROID_170)).toContain("contextLimits:g(524288,131072)")
|
||||
expect(models["glm-5.2-fast"].limit).toEqual({ context: 524288, output: 131072 })
|
||||
})
|
||||
|
||||
test("an Opus Fast Mode model goes out as droid sends it: its own id, speed fast and the fast-mode beta", async () => {
|
||||
@@ -94,10 +116,19 @@ test("a GPT Fast Mode model goes out as droid sends it: its own id at the priori
|
||||
sent = JSON.parse(seen[1].body)
|
||||
expect(sent.model).toBe("gpt-5.5-fast")
|
||||
// a model with no Fast Mode model is left as it was asked
|
||||
await l.fetch(url, { method: "POST", body: JSON.stringify({ model: "gpt-6-sol", service_tier: "priority", input: "hi" }) })
|
||||
await l.fetch(url, { method: "POST", body: JSON.stringify({ model: "gpt-6.1-sol", service_tier: "priority", input: "hi" }) })
|
||||
sent = JSON.parse(seen[2].body)
|
||||
expect(sent.model).toBe("gpt-6-sol")
|
||||
expect(sent.model).toBe("gpt-6.1-sol")
|
||||
expect(sent.service_tier).toBe("priority")
|
||||
// GPT-6 Sol's is droid 1.7.0's
|
||||
await l.fetch(url, { method: "POST", body: JSON.stringify({ model: "gpt-6-sol", service_tier: "priority", input: "hi" }) })
|
||||
sent = JSON.parse(seen[3].body)
|
||||
expect(sent.model).toBe("gpt-6-sol-fast")
|
||||
expect(sent.service_tier).toBe("priority")
|
||||
// GLM-5.2 Fast is a model of its own on chat completions, not a tier of GLM-5.2's
|
||||
const chat = "https://api.factory.ai/api/llm/o/v1/chat/completions"
|
||||
await l.fetch(chat, { method: "POST", body: JSON.stringify({ model: "glm-5.2", service_tier: "priority", messages: [{ role: "user", content: "hi" }] }) })
|
||||
expect(JSON.parse(seen[4].body).model).toBe("glm-5.2")
|
||||
})
|
||||
|
||||
// #119 (psylch, 0.1.27): magpie shows a provider with nothing picked only
|
||||
@@ -109,6 +140,6 @@ test("the Fast Mode models come after every other model, so magpie's first 24 ar
|
||||
const ids = Object.keys(models)
|
||||
const first = ids.findIndex((id) => id.endsWith("-fast"))
|
||||
expect(ids.slice(first).every((id) => id.endsWith("-fast"))).toBe(true)
|
||||
expect(ids.slice(first)).toEqual(OFFERED)
|
||||
expect(ids.slice(first)).toEqual([...OFFERED, ...OFFERED_170])
|
||||
for (const id of ["gpt-5.3-codex", "grok-4.7", "grok-4.6", "glm-5.3", "glm-5.3-flash"]) expect(ids.slice(0, 24)).toContain(id)
|
||||
})
|
||||
|
||||
@@ -54,8 +54,15 @@ const E4 = ["low", "medium", "high", "xhigh"]
|
||||
// refused it. The Fast Mode models are droid 0.240.0's (fastBody; testdata/
|
||||
// droid-0.240.0-fast.txt), at their base model's limits and efforts as
|
||||
// droid has them. Left out: Opus 4.6/4.7 Fast and GPT-5.4 Mini Fast (their
|
||||
// base models aren't offered), GPT-5.6 Sol Fast (unreleased:!0) and
|
||||
// GLM-5.2 Fast (behind a feature flag, on a Baseten model id of its own).
|
||||
// base models aren't offered). droid 1.7.0's new models (testdata/
|
||||
// droid-1.7.0-models.txt) are offered where droid 1.7.0 lists them for an
|
||||
// account with no special access: Fable 5.2, Kimi K3.1 Pro, Nemotron 3.5
|
||||
// Super, MiniMax M3.1 Flash, Inkling, Muse Spark 1.2, Beam 1.0, and GPT-6
|
||||
// Sol, GPT-6 Luna, GPT-5.6 Sol and GLM-5.2 Fast (GLM-5.2 Fast at its own
|
||||
// limits). Left out: GPT-6.1 Terra and Muse Spark Open (feature flags droid
|
||||
// lists them under only once on), GPT-6.1 Sol Ultra Fast (high-cost terms,
|
||||
// as Astra's), and Muse Spark 1.3 (Responses on Google, a route the plugin
|
||||
// has no wire for).
|
||||
const MODELS = [
|
||||
["claude-fable-5.1", "Fable 5.1", ANTHROPIC, "anthropic", 867000, 128000, E5, true, 4],
|
||||
["claude-fable-5", "Fable 5", ANTHROPIC, "anthropic", 867000, 128000, E5, true, 4],
|
||||
@@ -85,15 +92,21 @@ const MODELS = [
|
||||
["glm-5.3", "GLM-5.3", CHAT, "fireworks", 1040000, 131072, ["low", "high", "max"], false, 0.56],
|
||||
["glm-5.3-flash", "GLM-5.3-Flash", CHAT, "fireworks", 1048576, 131072, ["low", "high", "max"], true, 0.06],
|
||||
["glm-5.2", "GLM-5.2", CHAT, "baseten", 1040000, 131072, ["none", "high", "max"], false, 0.56],
|
||||
["kimi-k3.1-pro", "Kimi K3.1 Pro", CHAT, "fireworks", 1000000, 131072, ["low", "high", "max"], true, 0.8],
|
||||
["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],
|
||||
["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.1-flash", "MiniMax M3.1 Flash", CHAT, "fireworks", 1000000, 131072, E5, true, 0.06],
|
||||
["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],
|
||||
["mistral-large-4", "Mistral Large 4", CHAT, "mistral", 524288, 64000, ["high"], true, 0.544],
|
||||
["mistral-medium-3.5", "Mistral Medium 3.5", CHAT, "mistral", 256000, 64000, ["high"], true, 0.6],
|
||||
["nemotron-3.5-super", "Nemotron 3.5 Super", CHAT, "baseten", 1000000, 65536, ["high"], true, 0.08],
|
||||
["nemotron-3-ultra", "Nemotron 3 Ultra", CHAT, "baseten", 202000, 65536, ["high"], false, 0.24],
|
||||
["inkling", "Inkling", CHAT, "fireworks", 1040000, 32768, ["minimal", "low", "medium", "high", "xhigh", "max"], true, 0.4],
|
||||
["muse-spark-1.2", "Muse Spark 1.2", CHAT, "fireworks", 1040000, 131072, E4, false, 0.5],
|
||||
["beam-1.0", "Beam 1.0", CHAT, "baseten", 1048576, 32768, E5, false, 0.52],
|
||||
["gemini-4-argon", "Gemini 4 Argon", GEMINI, "google", 1000000, 65536, ["low", "medium", "high"], true, 1.6],
|
||||
["gemini-3.1-pro-preview", "Gemini 3.1 Pro", GEMINI, "google", 1000000, 65536, ["low", "medium", "high"], true, 0.8],
|
||||
["gemini-3.8-flash", "Gemini 3.8 Flash", GEMINI, "google", 1000000, 65536, ["low", "medium", "high"], true, 0.6],
|
||||
@@ -101,6 +114,9 @@ const MODELS = [
|
||||
["gemini-3.6-flash", "Gemini 3.6 Flash", GEMINI, "google", 1000000, 65536, ["low", "medium", "high"], true, 0.6],
|
||||
["gemini-3.5-flash", "Gemini 3.5 Flash", GEMINI, "google", 1000000, 65536, ["minimal", "low", "medium", "high"], true, 0.6],
|
||||
["gemini-3-flash-preview", "Gemini 3 Flash", GEMINI, "google", 1000000, 65536, ["minimal", "low", "medium", "high"], true, 0.2],
|
||||
// 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],
|
||||
// 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
|
||||
@@ -113,6 +129,10 @@ const MODELS = [
|
||||
["gpt-5.5-fast", "GPT-5.5 Fast Mode", RESPONSES, "openai", 1050000, 128000, E4, true, 5],
|
||||
["gpt-5.4-fast", "GPT-5.4 Fast Mode", RESPONSES, "openai", 1050000, 128000, E4, true, 2],
|
||||
["gpt-5.3-codex-fast", "GPT-5.3-Codex Fast Mode", RESPONSES, "openai", 400000, 128000, E4, true, 1.4],
|
||||
["gpt-6-sol-fast", "GPT-6 Sol Fast Mode", RESPONSES, "openai", 1050000, 128000, E6, true, 1.6],
|
||||
["gpt-6-luna-fast", "GPT-6 Luna Fast Mode", RESPONSES, "openai", 1050000, 128000, E6, true, 0.08],
|
||||
["gpt-5.6-sol-fast", "GPT-5.6 Sol Fast Mode", RESPONSES, "openai", 1050000, 128000, E6, true, 4],
|
||||
["glm-5.2-fast", "GLM-5.2 Fast", CHAT, "baseten", 524288, 131072, ["none", "high", "max"], false, 0.84],
|
||||
].map(([id, name, wire, upstream, context, output, efforts, images, rate]) => ({ id, name, wire, upstream, context, output, efforts, images, rate }))
|
||||
|
||||
const byId = new Map(MODELS.map((m) => [m.id, m]))
|
||||
@@ -172,6 +192,7 @@ function variant(npm, effort) {
|
||||
// promotion that has ended is no discount at all.
|
||||
const PROMOTIONS = [
|
||||
{ id: "gpt-5.6-sol", discount: 0.2, from: "2026-08-22T00:00:00Z", to: "2026-11-22T00:00:00Z" },
|
||||
{ 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-3.8-flash", discount: 0.5, from: "2026-08-17T21:10:19Z", to: "2027-01-01T08:00:00Z" },
|
||||
@@ -940,8 +961,10 @@ async function deviceSignIn() {
|
||||
// is a balance in cents.
|
||||
|
||||
// CORE are the models Droid Core's windows count: those of a vendor other
|
||||
// than Anthropic, OpenAI, xAI and Google. Standard's count every other model.
|
||||
const CORE = MODELS.filter((m) => !["anthropic", "openai", "xai", "google"].includes(m.upstream)).map((m) => m.id)
|
||||
// than Anthropic, OpenAI, xAI and Google, but Muse Spark 1.2, Meta's on
|
||||
// Fireworks, which droid keeps out of the core pool (no billingPool "core").
|
||||
// Standard's count every other model.
|
||||
const CORE = MODELS.filter((m) => !["anthropic", "openai", "xai", "google"].includes(m.upstream) && m.id !== "muse-spark-1.2").map((m) => m.id)
|
||||
|
||||
// statusLine is a status as Go's HTTP client names it, "403 Forbidden".
|
||||
const statusLine = (status) => `${status} ${STATUS_CODES[status] ?? ""}`.trim()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// 0.240.0's own registry entries, saved byte for byte in testdata.
|
||||
import { expect, test } from "bun:test"
|
||||
import { readFileSync } from "node:fs"
|
||||
import { FactoryAuthPlugin } from "./index.mjs"
|
||||
import { FactoryAuthPlugin, _internal } from "./index.mjs"
|
||||
|
||||
const DROID = readFileSync(new URL("./testdata/droid-0.240.0-models.txt", import.meta.url), "utf8")
|
||||
|
||||
@@ -62,7 +62,7 @@ test("every model in droid 0.240.0's picker is offered, or left out for a reason
|
||||
// droid picks these itself, client side
|
||||
auto: "router", "auto-fast": "router",
|
||||
// not released (unreleased:!0) or not in the registry
|
||||
"garnet-07-15": "unreleased", "atlas-07-21": "unreleased", "aster-07-15": "unreleased", inkling: "unreleased",
|
||||
"garnet-07-15": "unreleased", "atlas-07-21": "unreleased", "aster-07-15": "unreleased",
|
||||
// asks the user to accept Factory's high-cost terms first
|
||||
"gpt-6-astra-ultrafast": "opt-in",
|
||||
// older generations the plugin has never offered, as before
|
||||
@@ -71,10 +71,8 @@ test("every model in droid 0.240.0's picker is offered, or left out for a reason
|
||||
"gpt-5.2-codex": "older", "gpt-5.1-codex-max": "older", "grok-4.5": "older", "kimi-k2.5": "older",
|
||||
"glm-5.1": "older", "glm-5": "older", "glm-4.7": "older",
|
||||
"deepseek-v4-flash-0731": "older", "deepseek-v4-pro": "older",
|
||||
// Fast Mode models whose base model isn't offered, unreleased, or
|
||||
// behind a feature flag (fast.test.mjs)
|
||||
// Fast Mode models whose base model isn't offered (fast.test.mjs)
|
||||
"claude-opus-4-7-fast": "older", "claude-opus-4-6-fast": "older", "gpt-5.4-mini-fast": "older",
|
||||
"gpt-5.6-sol-fast": "unreleased", "glm-5.2-fast": "flag",
|
||||
}
|
||||
const missing = picker.filter((id) => !got[id] && !reason[id])
|
||||
expect(missing).toEqual([])
|
||||
@@ -82,6 +80,83 @@ test("every model in droid 0.240.0's picker is offered, or left out for a reason
|
||||
expect(got["gpt-6-astra-ultrafast"]).toBeUndefined()
|
||||
})
|
||||
|
||||
// droid 1.7.0 offers models the plugin didn't: Fable 5.2, Kimi K3.1 Pro,
|
||||
// MiniMax M3.1 Flash, Beam 1.0 and more. The cases are 1.7.0's entries.
|
||||
const DROID_170 = readFileSync(new URL("./testdata/droid-1.7.0-models.txt", import.meta.url), "utf8")
|
||||
|
||||
// entry170 is a model's 1.7.0 entry; Inkling's key is unquoted there.
|
||||
function entry170(id) {
|
||||
const line = DROID_170.split("\n").find((l) => l.startsWith(`"${id}":{id:"${id}",`) || l.startsWith(`${id}:{id:"${id}",`))
|
||||
if (!line) throw new Error(`${id} is not in the fixture`)
|
||||
return line
|
||||
}
|
||||
|
||||
const NEW_170 = ["claude-fable-5.2", "kimi-k3.1-pro", "nemotron-3.5-super", "minimax-m3.1-flash", "inkling", "muse-spark-1.2", "beam-1.0", "gpt-6-sol-fast", "gpt-6-luna-fast", "gpt-5.6-sol-fast", "glm-5.2-fast"]
|
||||
|
||||
test("droid 1.7.0's new models are offered as droid has them", async () => {
|
||||
const got = await models()
|
||||
for (const id of NEW_170) {
|
||||
const text = entry170(id)
|
||||
const m = got[id]
|
||||
const row = _internal.MODELS.find((r) => r.id === id)
|
||||
expect(m).toBeDefined()
|
||||
expect(m.name).toBe(text.match(/,name:"([^"]+)"/)[1])
|
||||
// Factory routes a request to the entry's first upstream
|
||||
// (x-provider-routing-source: registry_default)
|
||||
expect(row.upstream).toBe(JSON.parse(text.match(/apiProviders:(\[[^\]]*\])/)[1])[0])
|
||||
const chat = text.includes('apiModelProvider:"generic-chat-completion-api"')
|
||||
expect(m.provider.npm).toBe(chat ? "@ai-sdk/openai-compatible" : text.includes('provider:"anthropic"') ? "@ai-sdk/anthropic" : "@ai-sdk/openai")
|
||||
const g = text.match(/contextLimits:g\((\d+e\d+|\d+),(\d+)\)/)
|
||||
if (g) expect(m.limit).toEqual({ context: Number(g[1]), output: Number(g[2]) })
|
||||
// droid takes images unless an entry says images:!1
|
||||
expect(m.attachment).toBe(!text.includes("images:!1"))
|
||||
// droid's "off" is none where a model's base takes it (GLM-5.2's), else left out
|
||||
const efforts = JSON.parse(text.match(/reasoningEffort:\{supported:(\[[^\]]*\])/)[1])
|
||||
expect(Object.keys(m.variants).filter((e) => e !== "none")).toEqual(efforts.filter((e) => e !== "off" && e !== "none"))
|
||||
if (!efforts.includes("off") && !efforts.includes("none")) expect(m.variants.none).toBeUndefined()
|
||||
}
|
||||
// Fable 5.2's opt-in is the data retention terms Fable 5.1, offered, asks too
|
||||
expect(DROID_170).toContain('So={kind:"data_retention",modelFamily:"Fable",tosVersion:e4H}')
|
||||
expect(entry170("claude-fable-5.2")).toContain("explicitOptInRequirement:So,")
|
||||
expect(entry170("claude-fable-5.1")).toContain("explicitOptInRequirement:So,")
|
||||
expect(DROID_170).toContain("b=Ee({thinkingConsumesContext:!1,maxInputTokens:867000,maxOutputTokens:128000})")
|
||||
expect(entry170("claude-fable-5.2")).toContain("contextLimits:b,")
|
||||
expect(got["claude-fable-5.2"].limit).toEqual({ context: 867000, output: 128000 })
|
||||
})
|
||||
|
||||
test("Droid Core's windows count droid 1.7.0's core pool, not Muse Spark 1.2", () => {
|
||||
for (const id of NEW_170) {
|
||||
expect(_internal.CORE.includes(id)).toBe(entry170(id).includes('billingPool:"core"'))
|
||||
}
|
||||
expect(_internal.MODELS.find((m) => m.id === "muse-spark-1.2").upstream).toBe("fireworks")
|
||||
})
|
||||
|
||||
test("every model in droid 1.7.0's picker is offered, or left out for a reason", async () => {
|
||||
const got = await models()
|
||||
const picker = JSON.parse(DROID_170.match(/^var ee=(\[[^\]]*\]);/m)[1])
|
||||
const reason = {
|
||||
auto: "router", "auto-fast": "router",
|
||||
"garnet-07-15": "unreleased", "atlas-07-21": "unreleased", "aster-07-15": "unreleased",
|
||||
"gpt-6-astra-ultrafast": "opt-in", "gpt-6.1-sol-ultrafast": "opt-in",
|
||||
// listed only once their feature flag is on for an account
|
||||
"gpt-6.1-terra": "flag", "muse-spark-open": "flag",
|
||||
// Responses on Google: no wire of the plugin's goes there
|
||||
"muse-spark-1.3": "wire",
|
||||
"claude-opus-4-7": "older", "claude-opus-4-6": "older", "claude-opus-4-5-20251101": "older",
|
||||
"claude-sonnet-4-5-20250929": "older", "gpt-5.5-pro": "older", "gpt-5.4-mini": "older", "gpt-5.2": "older",
|
||||
"gpt-5.2-codex": "older", "gpt-5.1-codex-max": "older", "grok-4.5": "older", "kimi-k2.5": "older",
|
||||
"glm-5.1": "older", "glm-5": "older", "glm-4.7": "older",
|
||||
"deepseek-v4-flash-0731": "older", "deepseek-v4-pro": "older",
|
||||
"claude-opus-4-7-fast": "older", "claude-opus-4-6-fast": "older", "gpt-5.4-mini-fast": "older",
|
||||
}
|
||||
expect(picker.filter((id) => !got[id] && !reason[id])).toEqual([])
|
||||
expect(Object.keys(reason).filter((id) => got[id])).toEqual([])
|
||||
expect(entry170("gpt-6.1-sol-ultrafast")).toContain('explicitOptInRequirement:{kind:"high_cost"')
|
||||
expect(entry170("gpt-6.1-terra")).toContain("featureFlag:k.Gpt61Terra,")
|
||||
expect(entry170("muse-spark-open")).toContain("featureFlag:k.MuseSparkOpen,")
|
||||
expect(entry170("muse-spark-1.3")).toContain('apiEndpoint:"responses",apiProviders:["google"]')
|
||||
})
|
||||
|
||||
// yetone/magpie#2080: droid 0.241.1 offers Gemini 4 Argon; the plugin
|
||||
// offered no Gemini at all. The cases are droid 0.241.1's entries.
|
||||
const DROID_241 = readFileSync(new URL("./testdata/droid-0.241.1-gemini.txt", import.meta.url), "utf8")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-factory-auth",
|
||||
"version": "0.1.42",
|
||||
"version": "0.1.43",
|
||||
"description": "Sign in to a Factory (Droid) subscription from OpenCode or magpie",
|
||||
"type": "module",
|
||||
"main": "./opencode.mjs",
|
||||
|
||||
@@ -4,17 +4,18 @@
|
||||
// droid. A promotion running comes off it, with the multiplier before the
|
||||
// discount as rateWas — magpie strikes that through beside the price, as it
|
||||
// does for WorkBuddy's credits and Qoder's price factors. The cases are droid
|
||||
// 0.241.1's registry costs and 0.251.0's 1017 entry, saved in testdata.
|
||||
// 0.241.1's registry costs, 0.251.0's 1017 entry and 1.7.0's new models,
|
||||
// saved in testdata.
|
||||
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"]
|
||||
const DROID = ["droid-0.241.1-costs.txt", "droid-0.251.0-deepseek-1017.txt", "droid-1.7.0-models.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.
|
||||
// cost is a model's cost text, as its entry keeps it (Inkling's key unquoted).
|
||||
function cost(id) {
|
||||
const line = DROID.split("\n").find((l) => l.startsWith(`"${id}":`))
|
||||
const line = DROID.split("\n").find((l) => l.startsWith(`"${id}":`) || l.startsWith(`${id}:{id:"${id}",`))
|
||||
if (!line) throw new Error(`${id} is not in the fixture`)
|
||||
return line.slice(line.indexOf("cost:"))
|
||||
}
|
||||
@@ -68,9 +69,12 @@ test("a promotion running comes off the rate, the multiplier before it as rateWa
|
||||
expect(models[m.id].rateWas).toBe(price(m.id, now).rateWas)
|
||||
}
|
||||
// the five droid 0.241.1 offers a price off on: Sol's 20%, Mistral Large 4's
|
||||
// launch discount, and Gemini 4 Argon's, 3.8 Flash's and 3.7 Flash's 50%
|
||||
// launch discount, and Gemini 4 Argon's, 3.8 Flash's and 3.7 Flash's 50%;
|
||||
// and Sol's 20% on GPT-5.6 Sol Fast Mode in 1.7.0
|
||||
const discounted = _internal.MODELS.filter((m) => models[m.id].rateWas > 0).map((m) => m.id)
|
||||
expect(discounted).toEqual(["gpt-5.6-sol", "mistral-large-4", "gemini-4-argon", "gemini-3.8-flash", "gemini-3.7-flash"])
|
||||
expect(discounted).toEqual(["gpt-5.6-sol", "mistral-large-4", "gemini-4-argon", "gemini-3.8-flash", "gemini-3.7-flash", "gpt-5.6-sol-fast"])
|
||||
expect(models["gpt-5.6-sol-fast"].rate).toBe(3.2)
|
||||
expect(models["gpt-5.6-sol-fast"].rateWas).toBe(4)
|
||||
expect(models["gemini-4-argon"].rate).toBe(0.8)
|
||||
expect(models["gemini-4-argon"].rateWas).toBe(1.6)
|
||||
})
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// Excerpts, byte for byte, of droid 1.7.0 (its bundled model registry): the
|
||||
// picker order, the context helper and the constants the entries name, and
|
||||
// the entries of the models new since 0.251.0, offered or left out, with
|
||||
// Fable 5.1's beside Fable 5.2's. Checked against the linux-x64 CLI from
|
||||
// downloads.factory.ai/factory-cli/releases/1.7.0/linux/x64/droid,
|
||||
// SHA-256 4700746f52ec88e3758a18737be13bb74519276de97bc329054e8dae08f15f42.
|
||||
var ee=["auto","auto-fast","claude-fable-5.2","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-astra","gpt-6-astra-ultrafast","gpt-6.1-sol","gpt-6.1-sol-ultrafast","gpt-6-sol","gpt-6-sol-fast","gpt-5.6-sol","gpt-5.6-sol-fast","gpt-6-luna","gpt-6-luna-fast","gpt-5.6-luna","gpt-6.1-terra","gpt-5.6-terra","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.1-pro","kimi-k3","qwen3.8-max","nemotron-3.5-super","nemotron-3-ultra","deepseek-v4.1-flash-1017","deepseek-v4.1-flash","deepseek-v4-flash-0731","deepseek-v4-pro","minimax-m3.1-flash","minimax-m3","muse-spark-1.3","muse-spark-open","muse-spark-1.2","beam-1.0","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 g(e,o){return R({maxInputTokens:e-o,maxOutputTokens:o})}
|
||||
b=Ee({thinkingConsumesContext:!1,maxInputTokens:867000,maxOutputTokens:128000})
|
||||
E=g(1050000,128000)
|
||||
pe=C({parallelToolCalls:!0,extendedCache:!0,safetyId:!0,verbosity:"low",serviceTier:"priority"})
|
||||
So={kind:"data_retention",modelFamily:"Fable",tosVersion:e4H}
|
||||
A={discount:0.6,startsAt:new Date("2026-08-29T04:00:00Z"),expiresAt:new Date("2026-09-05T02:00:00Z"),label:"60% off"}
|
||||
ti={discount:0.2,startsAt:new Date("2026-08-22T00:00:00Z"),expiresAt:new Date("2026-11-22T00:00:00Z"),label:"20% off"}
|
||||
"claude-fable-5.2":{id:"claude-fable-5.2",name:"Fable 5.2",shortName:"Fable 5.2",provider:"anthropic",apiProviders:["anthropic"],apiProviderConfig:{anthropic:{modelId:"claude-fable-5-2",pricing:{source:"pending-official-pricing-docs",rates:{input:"8",output:"40",cacheRead:"0.2",cacheWrite:{"5m":"10","1h":"16"}}}}},routingConfig:m.FABLE_5_2,reasoningEffort:{supported:["low","medium","high","xhigh","max"],default:"high"},tier:"premium",featureFlag:k.ClaudeFable52,explicitOptInRequirement:So,zdrApiProviders:["anthropic"],pdf:!0,systemPromptReminders:["no-comments","parallel-tool-calls","plain-prose"],contextLimits:b,thinking:je,neutralTranscriptSerialization:!0,compactThroughLatestSignedThinking:!0,supportsMidConversationToolChanges:!0,supportsMidConversationEffortChanges:!0,disabledForPilots:!1,cost:{tokenMultiplier:3.2,outputTokenMultiplier:5},matchPatterns:[/fable[^a-z0-9]*5[.-]?2(?![.\d])/i,/claude-fable-5[.-]?2(?![.\d])/i],newUntil:new Date("2026-11-14T00:00:00Z")}
|
||||
"claude-fable-5.1":{id:"claude-fable-5.1",name:"Fable 5.1",shortName:"Fable 5.1",provider:"anthropic",apiProviders:v,apiProviderConfig:{anthropic:{modelId:"claude-fable-5-1",pricing:{source:J,rates:{input:"10",output:"50",cacheRead:"0.25",cacheWrite:{"5m":"12.5","1h":"20"}}}},vertex_anthropic:{modelId:"claude-fable-5-1"},bedrock_anthropic:{modelId:"anthropic.claude-fable-5-1"}},routingConfig:m.FABLE_5_1,reasoningEffort:{supported:["off","low","medium","high","xhigh","max"],default:"high"},tier:"premium",explicitOptInRequirement:So,zdrApiProviders:["anthropic","vertex_anthropic"],pdf:!0,systemPromptReminders:["no-comments","parallel-tool-calls","plain-prose"],contextLimits:b,thinking:je,neutralTranscriptSerialization:!0,compactThroughLatestSignedThinking:!0,refusalFallbackModels:["claude-opus-5"],supportsMidConversationToolChanges:!0,supportsMidConversationEffortChanges:!0,disabledForPilots:!1,cost:{tokenMultiplier:4,cacheReadTokenMultiplier:0.025,outputTokenMultiplier:5},regionOverrides:{eu:{apiProviders:["vertex_anthropic"]}},matchPatterns:[/fable[^a-z0-9]*5[.-]?1(?![.\d])/i,/claude-fable-5[.-]?1/i],newUntil:new Date("2026-09-06T00:00:00Z")}
|
||||
"gpt-6.1-terra":{id:"gpt-6.1-terra",name:"GPT-6.1 Terra",shortName:"GPT-6.1 Terra",provider:"openai",apiProviders:["openai"],reasoningEffort:{supported:["none","low","medium","high","xhigh","max"],default:"medium"},tier:"standard",featureFlag:k.Gpt61Terra,pdf:!0,compatibilityGroup:"gpt5-family",supportsVerbosity:!0,supportsMidConversationToolChanges:!0,contextLimits:E,apiRequest:N,disabledForPilots:!1,cost:{tokenMultiplier:0.4,cacheReadTokenMultiplier:0.05,outputTokenMultiplier:5},matchPatterns:[/gpt[^a-z0-9]*6[.-]?1[^a-z0-9]*terra(?![^a-z0-9]*(?:flex|fast))/i],newUntil:new Date("2026-11-01T00:00:00Z")}
|
||||
"gpt-6.1-sol-ultrafast":{id:"gpt-6.1-sol-ultrafast",name:"GPT-6.1 Sol Ultra Fast",shortName:"GPT-6.1 Sol Ultra Fast",baseVariant:"gpt-6.1-sol",provider:"openai",apiProviders:["openai"],apiProviderConfig:{openai:{modelId:"gpt-6.1-sol"}},reasoningEffort:{supported:["low","medium","high","xhigh","max"],default:"medium"},tier:"premium",explicitOptInRequirement:{kind:"high_cost",modelFamily:"gpt-6.1-sol-ultrafast",tosVersion:AIH},pdf:!0,compatibilityGroup:"gpt5-family",supportsVerbosity:!0,supportsMidConversationToolChanges:!0,contextLimits:E,apiRequest:di,disabledForPilots:!0,cost:{tokenMultiplier:4.8,cacheReadTokenMultiplier:0.05,outputTokenMultiplier:5},matchPatterns:[/gpt[^a-z0-9]*6[.-]?1[^a-z0-9]*sol[^a-z0-9]*ultra[^a-z0-9]*fast/i],newUntil:new Date("2026-10-18T00:00:00Z")}
|
||||
"kimi-k3.1-pro":{id:"kimi-k3.1-pro",name:"Kimi K3.1 Pro",shortName:"Kimi K3.1 Pro",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["fireworks","baseten","databricks"],apiProviderConfig:{fireworks:{...ie,modelId:"accounts/fireworks/models/kimi-k3p1-pro"},baseten:{...ri,modelId:"moonshotai/Kimi-K3.1-Pro"},databricks:{...ie,modelId:"system.ai.kimi-k3-1-pro"}},featureFlag:k.KimiK31Pro,reasoningEffort:{supported:["low","high","max"],default:"max"},chatCompletionRequest:Me({toolMessageIncludesName:!0}),tier:"standard",billingPool:"core",images:!0,pdf:!1,contextLimits:g(1e6,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.8,outputTokenMultiplier:5},usesUSBasedInference:!1,matchPatterns:[/kimi[^a-z0-9]*k3[.-]1[^a-z0-9]*pro$/i,/kimi-k3p1-pro$/i],newUntil:new Date("2026-10-29T00:00:00Z")}
|
||||
"nemotron-3.5-super":{id:"nemotron-3.5-super",newUntil:new Date("2026-10-20T00:00:00Z"),name:"Nemotron 3.5 Super",shortName:"Nemotron 3.5 Super",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["baseten"],apiProviderConfig:{baseten:Ge},featureFlag:k.Nemotron35Super,unreleased:!0,inferCustomModelCapabilities:!1,reasoningEffort:{supported:["off","high"],default:"high"},chatCompletionRequest:V(),tier:"standard",billingPool:"core",images:!0,pdf:!1,contextLimits:g(1e6,65536),disabledForPilots:!1,cost:{tokenMultiplier:0.08,cacheReadTokenMultiplier:0.2,outputTokenMultiplier:2.5},usesUSBasedInference:!0}
|
||||
"minimax-m3.1-flash":{id:"minimax-m3.1-flash",newUntil:new Date("2026-10-28T00:00:00Z"),name:"MiniMax M3.1 Flash",shortName:"MiniMax M3.1 Flash",matchPatterns:[/minimax-m3p1-flash/i],provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["fireworks"],apiProviderConfig:{fireworks:{...vo,modelId:"accounts/fireworks/models/minimax-m3p1-flash"}},reasoningEffort:{supported:["low","medium","high","xhigh","max"],default:"max"},thinking:(e)=>tN(e)?{output_config:{effort:e},betaFlags:[]}:void 0,chatCompletionRequest:Ao(),systemPromptAdditions:{batchTodoWrite:!0},tier:"standard",billingPool:"core",featureFlag:k.MinimaxM31Flash,images:!0,pdf:!1,contextLimits:g(1e6,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.06,outputTokenMultiplier:4},usesUSBasedInference:!0}
|
||||
"muse-spark-1.3":{id:"muse-spark-1.3",name:"Muse Spark 1.3",shortName:"Muse Spark 1.3",provider:"factory",apiEndpoint:"responses",apiProviders:["google"],apiProviderConfig:{google:{publisher:"meta",publicEndpoint:!1}},reasoningEffort:{supported:["low","medium","high","xhigh"],default:"high"},tier:"standard",newUntil:new Date("2026-10-27T00:00:00Z"),images:!0,pdf:!0,contextLimits:g(1040000,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.5,cacheReadTokenMultiplier:0.12,outputTokenMultiplier:3.4},regionOverrides:{eu:{apiProviders:[]},us:S}}
|
||||
"muse-spark-open":{id:"muse-spark-open",name:"Muse Spark Open",shortName:"Muse Spark Open",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["baseten"],apiProviderConfig:{baseten:{modelId:"meta-models/muse-spark-open",pricing:{source:oe,rates:{input:"1.25",output:"4.25",cacheRead:"0.15"}},chatCompletions:{thinkingMode:"reasoning-effort",buildRequestParams:Se({emitNone:!0})}}},reasoningEffort:{supported:["low","medium","high","xhigh","max"],default:"high"},chatCompletionRequest:V(),tier:"standard",featureFlag:k.MuseSparkOpen,newUntil:new Date("2026-10-20T00:00:00Z"),images:!0,pdf:!1,contextLimits:g(1040000,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.5,cacheReadTokenMultiplier:0.12,outputTokenMultiplier:3.4},usesUSBasedInference:!0}
|
||||
"muse-spark-1.2":{id:"muse-spark-1.2",name:"Muse Spark 1.2",shortName:"Muse Spark 1.2",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["fireworks"],apiProviderConfig:{fireworks:{...te,modelId:"accounts/fireworks/models/muse-spark-1p2-open"}},reasoningEffort:{supported:["low","medium","high","xhigh"],default:"high"},chatCompletionRequest:V(),tier:"standard",newUntil:new Date("2026-10-18T00:00:00Z"),images:!1,pdf:!1,contextLimits:g(1040000,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.5,cacheReadTokenMultiplier:0.12,outputTokenMultiplier:3.4}}
|
||||
"beam-1.0":{id:"beam-1.0",name:"Beam 1.0",shortName:"Beam 1.0",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["baseten"],featureFlag:k.Beam10,matchPatterns:[/^(?:reflection\/)?beam[- ]1\.0$/i],chatCompletionRequest:Y(),apiProviderConfig:{baseten:{modelId:"reflection/Beam-1.0",chatCompletions:{thinkingMode:"reasoning-effort",buildRequestParams:({effort:e})=>({reasoning_effort:e,allow_missing_thinking:!0})}}},reasoningEffort:{supported:["low","medium","high","xhigh","max"],default:"high"},tier:"standard",billingPool:"core",newUntil:new Date("2026-10-21T00:00:00Z"),images:!1,pdf:!1,contextLimits:g(1048576,32768),disabledForPilots:!1,cost:{tokenMultiplier:0.52,outputTokenMultiplier:3.3076923076923075},usesUSBasedInference:!0}
|
||||
inkling:{id:"inkling",newUntil:new Date("2000-01-01T00:00:00Z"),name:"Inkling",shortName:"Inkling",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["fireworks"],routingConfig:m.INKLING,apiProviderConfig:{fireworks:{...Ar,modelId:"accounts/fireworks/models/inkling"}},reasoningEffort:{supported:["off","minimal","low","medium","high","xhigh","max"],default:"high"},chatCompletionRequest:vt(),tier:"standard",billingPool:"core",images:!0,pdf:!1,contextLimits:g(1040000,32768),disabledForPilots:!1,cost:{tokenMultiplier:0.4,cacheReadTokenMultiplier:0.17,outputTokenMultiplier:4.05},usesUSBasedInference:!0,matchPatterns:[/inkling/i]}
|
||||
"gpt-6-sol-fast":{id:"gpt-6-sol-fast",name:"GPT-6 Sol Fast Mode",shortName:"GPT-6 Sol Fast Mode",baseVariant:"gpt-6-sol",provider:"openai",apiProviders:["openai"],apiProviderConfig:{openai:{modelId:"gpt-6-sol"}},reasoningEffort:{supported:["none","low","medium","high","xhigh","max"],default:"medium"},tier:"premium",pdf:!0,compatibilityGroup:"gpt5-family",supportsVerbosity:!0,supportsMidConversationToolChanges:!0,contextLimits:E,apiRequest:pe,disabledForPilots:!1,cost:{tokenMultiplier:1.6,outputTokenMultiplier:5},matchPatterns:[/gpt[^a-z0-9]*6[^a-z0-9]*sol[^a-z0-9]*fast/i],newUntil:new Date("2026-10-18T00:00:00Z")}
|
||||
"gpt-6-luna-fast":{id:"gpt-6-luna-fast",name:"GPT-6 Luna Fast Mode",shortName:"GPT-6 Luna Fast Mode",baseVariant:"gpt-6-luna",provider:"openai",apiProviders:["openai"],apiProviderConfig:{openai:{modelId:"gpt-6-luna"}},reasoningEffort:{supported:["none","low","medium","high","xhigh","max"],default:"medium"},tier:"standard",pdf:!0,compatibilityGroup:"gpt5-family",supportsVerbosity:!0,supportsMidConversationToolChanges:!0,contextLimits:E,apiRequest:pe,disabledForPilots:!1,cost:{tokenMultiplier:0.08,outputTokenMultiplier:5},matchPatterns:[/gpt[^a-z0-9]*6[^a-z0-9]*luna[^a-z0-9]*fast/i],newUntil:new Date("2026-10-18T00:00:00Z")}
|
||||
"gpt-5.6-sol-fast":{id:"gpt-5.6-sol-fast",name:"GPT-5.6 Sol Fast Mode",shortName:"GPT-5.6 Sol Fast Mode",baseVariant:"gpt-5.6-sol",provider:"openai",apiProviders:["openai","azure_openai"],routingConfig:m.GPT56_SOL,reasoningEffort:{supported:["none","low","medium","high","xhigh","max"],default:"medium"},tier:"premium",pdf:!0,compatibilityGroup:"gpt5-family",supportsVerbosity:!0,supportsMidConversationToolChanges:!0,unreleased:!0,contextLimits:E,apiRequest:pe,disabledForPilots:!1,cost:{tokenMultiplier:4,outputTokenMultiplier:5,promotions:[A,ti]},matchPatterns:[/gpt[^a-z0-9]*5[.-]?6[^a-z0-9]*(?:sol[^a-z0-9]*)?fast/i],newUntil:new Date("2026-08-04T00:00:00Z")}
|
||||
"glm-5.2-fast":{id:"glm-5.2-fast",name:"GLM-5.2 Fast",shortName:"GLM-5.2 Fast",baseVariant:"glm-5.2",provider:"factory",apiModelProvider:"generic-chat-completion-api",apiProviders:["baseten"],apiProviderConfig:{baseten:{...Ge,modelId:"zai-org/GLM-5.2-Fast",pricing:{source:oe,rates:{input:"2.1",output:"6.6",cacheRead:"0.21"}}}},routingConfig:m.GLM_5_2_FAST,reasoningEffort:{supported:["off","high","max"],default:"high"},chatCompletionRequest:V(),tier:"standard",billingPool:"core",featureFlag:k.Glm52Fast,images:!1,pdf:!1,contextLimits:g(524288,131072),disabledForPilots:!1,cost:{tokenMultiplier:0.84,outputTokenMultiplier:3.2},usesUSBasedInference:!0,newUntil:new Date("2026-07-07T00:00:00Z"),matchPatterns:[/glm[^a-z0-9]*5[.-]?2[^a-z0-9]*fast/i,/glm-5p2-fast/i]}
|
||||
@@ -20,7 +20,7 @@ const LIMITS = {
|
||||
extraUsageAllowed: true,
|
||||
}
|
||||
|
||||
const CORE = ["glm-5.3", "glm-5.3-flash", "glm-5.2", "kimi-k3", "deepseek-v4.1-flash", "deepseek-v4.1-flash-1017", "qwen3.8-max", "minimax-m3", "minimax-m2.7", "mistral-large-4", "mistral-medium-3.5", "nemotron-3-ultra"]
|
||||
const CORE = ["glm-5.3", "glm-5.3-flash", "glm-5.2", "kimi-k3.1-pro", "kimi-k3", "deepseek-v4.1-flash", "deepseek-v4.1-flash-1017", "qwen3.8-max", "minimax-m3.1-flash", "minimax-m3", "minimax-m2.7", "mistral-large-4", "mistral-medium-3.5", "nemotron-3.5-super", "nemotron-3-ultra", "inkling", "beam-1.0", "glm-5.2-fast"]
|
||||
|
||||
const account = (over = {}) => ({
|
||||
type: "oauth",
|
||||
|
||||
Reference in New Issue
Block a user