Files
plugins/packages/factory/package.json
T
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

12 lines
499 B
JSON

{
"name": "@magpie-community/opencode-factory-auth",
"version": "0.1.32",
"description": "Sign in to a Factory (Droid) subscription from OpenCode or magpie",
"type": "module",
"main": "./index.mjs",
"files": ["index.mjs", "anthropic-tools.mjs", "README.md"],
"keywords": ["opencode", "opencode-plugin", "magpie", "factory", "droid"],
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/factory" }
}