Commit Graph
5 Commits
Author SHA1 Message Date
yetone 9001e6f082 factory: every droid promotion is checked inside its own window (#954)
The rate tests held one date, 2026-10-14, so a promotion starting after
it was never compared with PROMOTIONS. Dropping gemini-4-carbon's line
(#953, from 2026-11-10) left every test green. The new test checks each
promotion droid's registry lists, inline or named, a minute after it
starts, a minute before it ends and a minute after, against what
configModels gives then.

GPT-6 Astra's 60% off ended 2026-09-05, before PROMOTIONS was kept, and
is skipped by a fixed LISTED_SINCE (2026-10-01); with no cutoff the
test was red on it. 7 promotions are checked.

Run on mote with a sandbox HOME: bun test packages/factory, 194 pass.
Broken by hand: deleting Carbon's PROMOTIONS line turns the new test
red (the old ones stay green); Argon at 0.4 turns it and two more red;
the count bar at 99 shows 7 checked.
Not run: the root suite (test-only change in one package; CI runs it).
2026-11-11 08:49:54 +08:00
Mars-SeaandMars-Sea 8ae971dedb 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>
2026-11-11 08:48:27 +08:00
garry569andgarry569 d8f8981d33 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>
2026-11-10 16:05:29 +08:00
Wangzehong111 36f2d757c3 factory 0.1.39: add DeepSeek V4.1 Flash 1017
Offer deepseek-v4.1-flash-1017 on chat completions with the limits,
reasoning variants, attachments and 0.12x rate in Factory.app's Droid
0.251.0 registry. Keep the original Flash entry and its Fireworks route.

Use Baseten: authenticated Factory routing checked on 2026-10-29 orders
1017 as [baseten, fireworks]. Live plugin requests succeeded on both
backends with the distinct 1017 response model IDs. Baseten accepted none
and high; the arithmetic high sample reported 104 reasoning tokens.

Keep the raw registry entry and context helper in a versioned fixture,
including the binary SHA-256. Check both OpenCode config and Magpie's
provider.models hook, retain price checks for every model across the
0.241.1 and 0.251.0 fixtures, and include 1017 in Droid Core usage tests.

Validation: 176 Factory tests pass; all 30 plugins pass check.mjs.
Pack dry-run and an unpacked-package smoke test confirm all five runtime
files are present and the model hooks and request loader load correctly.
2026-10-29 16:15:25 +08:00
Mars-Sea 4a35799021 factory 0.1.32: a model's token multiplier reaches magpie as its rate (#158)
Every model in MODELS carries the tokenMultiplier droid 0.241.1's registry
has for it (testdata/droid-0.241.1-costs.txt, byte for byte). A promotion
running takes its discount off it, with the multiplier before it as rateWas;
one that has ended or not begun is no discount. The rate reaches magpie
through a provider hook (host.js reads rate/rateWas from its models; a
config hook's models carry no rate there). Fast Mode entries stay last.

Reviewed at 498b8723e5350657aa26f8f0e2bb1d859f59803b:
- each multiplier and promotion checked against the testdata excerpt;
  gpt-5.6-sol's expired M promotion is skipped and Pt (20%) applies, as
  droid's first-running-promotion rule gives
- host.js info(): the provider hook's list replaces the config list, and
  the request path strips temperature for OpenAI models in droidBody, so
  capabilities.temperature=true in providerModel changes nothing sent
- factory unchanged on main between the PR's base 7687314 and fe5631c

Run (HOME=$(mktemp -d), PR head merged with main fe5631c):
- bun test: 1620 pass, 2 fail; the two are cursor latency.test reds under
  the full run at load ~260, already filed as #159 and #162; packages/cursor
  alone: 267 pass, 0 fail
- bun test packages/factory: 149 pass, 0 fail
- packages/factory/rate.test.mjs against main's index.mjs: 5 fail
- bun scripts/check.mjs: passes
Not tried with a real Factory account here (the author did, 46 models).
2026-10-16 17:36:20 +08:00