e35aa928adefcaaffdf9109a71ef685bdbf0ad5a
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
fada6e0b98 |
factory 0.1.39: DeepSeek V4.1 Flash 1017 goes to its registry default, Fireworks
Follows Wangzehong111's commit (from #480), with the review's change: the plugin sends x-provider-routing-source: registry_default on every request, and droid 0.251.0 sends that only with apiProviders[0]. 1017's apiProviders is ["fireworks","baseten","databricks"], so Baseten with registry_default is a header pair droid never sends. 1017 now goes to Fireworks like every other model's first upstream; the droid test checks both headers, the README says so, and the fixture header names the binary the bytes were checked against. Reported on Discord by sweanng: the model list had DeepSeek V4.1 Flash but no 1017. Checked: droid 0.251.0 (LATEST) darwin-arm64 from downloads.factory.ai, sha256 d3c0b87f..., has the 1017 entry byte for byte as in testdata, with the c(o,t) helper and I()'s registry_default rule. Closes #480. Co-authored-by: Wangzehong111 <112800852+Wangzehong111@users.noreply.github.com> |
||
|
|
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. |
||
|
|
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 |
||
|
|
b015ee515e |
factory 0.1.29: Claude Code on GLM and other /api/llm/o models goes without the phrases Factory refuses, not "403 Factory: Forbidden" (Echoo on magpie's Discord)
Echoo, with Factory moved onto this plugin, got "API Error: 403 Factory:
Forbidden" from Claude Code on GLM-5.3-Flash, while Codex worked on the
same account and model. GLM is a chat model Factory serves on /api/llm/o,
so magpie translates Claude Code's Messages request into chat completions
(or Responses) before the plugin gets it. Only anthropicBody, the
/api/llm/a route, adapted Claude Code's fixed phrases Factory refuses (its
identity line, "You have been invoked in the following environment", "You
are powered by the model", update-config's "not Claude, so memory", tool
output quoting them). droidBody, for /api/llm/o, only added droid's line,
so all of them went to Factory as they were. The headers, the model and
the account are the same for both agents; Codex's prompt has none of the
phrases.
anthropicBody's per-text adapters are now functions of their own
(claudeIdentity, promptText, systemMessageText, userBlockText), and
droidBody applies them to chat completions and Responses:
- chat's first system message and Responses' instructions as a system
prompt; other system and developer messages as system messages;
- user text as a user block; a chat user string, where magpie joins a
turn's blocks with nothing between them, also reminder by reminder;
- chat's tool messages and Responses' function_call_output as tool output.
The Messages route is unchanged: the refactor kept every earlier test
green before the new code went in.
testdata/claude-code-2.1.300-glm-{chat,responses}.json are magpie's
translations of a real Claude Code 2.1.300 request, captured in a sandbox
HOME (paths changed to /Users/me, tools left out).
Run: bun test in packages/factory, 143 pass. With index.mjs at 0.1.28 the
new claude-chat.test.mjs fails 4 of 5 (the Codex one passes on both).
bun scripts/check.mjs factory: ok. Routed the captured request through the
plugin: each refused phrase is 0 in the chat and Responses bodies now, as
on /api/llm/a (1 each with 0.1.28).
Not tried against Factory itself: there is no Factory account to try with.
|
||
|
|
2170a3781e |
factory 0.1.27: droid's Fast Mode models, and fast asked of their base model goes to them (#119)
psylch on #119 (plugin 0.1.26): claude-opus-5-5-fast answered "Factory: Not found.", and Opus 5.5 asked with speed "fast" was recorded as tier_asked fast, tier_served standard, with nothing said. The plugin now offers droid 0.240.0's Fast Mode models: Opus 5.5/5/4.8 Fast on Anthropic's API, GPT-5.5/5.4/5.3-Codex Fast on Responses, each at its base model's limits and efforts. They go out as droid 0.240.0 sends them (read from its binary, saved in testdata/droid-0.240.0-fast.txt): the Fast Mode id itself as the model, with speed "fast" and the fast-mode-2026-02-01 beta for anthropicFastMode models, at service_tier "priority" for the GPT ones (their apiRequest Ee). A request asking a base model for fast (speed "fast" on Messages, service_tier "priority" on Responses) is sent to its Fast Mode model, as droid's fast toggle switches to it. A model with no Fast Mode model is sent as asked. Left out: Opus 4.6/4.7 Fast and GPT-5.4 Mini Fast (base not offered), GPT-5.6 Sol Fast (unreleased:!0), GLM-5.2 Fast (feature flag, a Baseten id). Run: the full bun test (1222 pass, 0 fail) with a sandbox HOME; the new fast.test.mjs and the picker test fail on the old index.mjs (4 fail). Not tried: a real Factory account (none signed in here), so whether Factory serves the Fast Mode ids at fast speed to a plan, and what its usage says about speed, is unverified. A non-stream request magpie translates for a plugin account drops speed before the plugin sees it, so there only the -fast ids reach fast. |
||
|
|
60c905410e |
factory: Gemini 4 Argon and Gemini 3.x reach Factory's own Gemini route (yetone/magpie#2080)
The plugin offered no Gemini model, so Gemini 4 Argon, new in droid 0.241.1's picker, and the Gemini 3.x models magpie's built-in has were missing for everyone moved onto the plugin. - Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.8/3.7/3.6/3.5 Flash and Gemini 3 Flash are offered on @ai-sdk/google at /api/llm/g/v1, with droid 0.241.1's names, total context 1M, output 65536, efforts and images. Each effort is a thinkingConfig thinkingLevel, as the zed plugin sends Gemini's. - send() takes the Google package's models/<id>:streamGenerateContent to Factory's /api/llm/g/v1/generate, as the built-in does (pathOf Gemini, FactoryGemini): the model in the body, no stream field, the system instruction without a role and opened with droid's line like factoryDroidGoogle. x-api-provider is google; the Google package's x-goog-api-key is dropped. A rewritten body no longer keeps the caller's content-length. - Gemini counts in standard's windows, not Droid Core's, as the built-in's factoryCore has it. - Gemini 4 Argon is behind a Factory feature flag (featureFlag Gemini4Argon, unreleased) in droid 0.241.1; an account it isn't on for may be refused it. testdata/droid-0.241.1-gemini.txt is droid 0.241.1's picker and Gemini entries, byte for byte from @factory/cli-darwin-arm64@0.241.1 bin/droid (each line checked present in the binary). muse-spark-1.2, also new in that picker, is not added here. Run: bun test in packages/factory (130 pass), bun scripts/check.mjs. Broken by hand: without the route rewrite the three gemini.test.mjs tests fail; without google in CORE's exclusion usage.test.mjs fails. Not tried: a real Factory account (none signed in here), so neither Factory's answer to these bodies nor Gemini 4 Argon's flag was seen. |
||
|
|
e4023d9912 |
factory 0.1.25: Haiku 5.5 and Mistral Large 4, in droid 0.240.0's picker, reach Factory through magpie (JL on Discord)
JL (Windows, droid 0.240.0, Factory desktop 0.197.1, magpie 0.1.1226, plugin 0.1.24): droid and Factory desktop offer claude-haiku-5-5, droid through magpie didn't, as the plugin's model table didn't have it. How droid gets its models: its npm package (@factory/cli 0.240.0, the platform binary @factory/cli-darwin-arm64) bundles the model registry in bin/droid; the picker lists that registry (order `y`), gated by availableInCLI, unreleased, feature flags and legacy grouping. Diffing the registry of 0.233.0 (the release the plugin's table was last matched to) against 0.240.0 gives three new models: claude-haiku-5-5, mistral-large-4 and gpt-6-astra-ultrafast. - Haiku 5.5: Anthropic Messages, x-api-provider anthropic, context 872000 / output 128000 (contextLimits ce, as Sonnet 5.5 and Opus 5.5), efforts low..max (droid's "off" is the request without a level). - Mistral Large 4: generic chat completions, x-api-provider mistral, Droid Core (billingPool core), 524288 / 64000, images, effort high. - GPT-6 Astra Ultra Fast stays out: droid offers it only once the user has accepted Factory's high-cost terms (explicitOptInRequirement high_cost). models.test.mjs is new; its fixture (testdata/droid-0.240.0-models.txt) is the registry's own bytes: the picker order, the context helper and the three entries. It checks the two models as droid has them and that every model in droid's picker is offered or on a named list left out (router, Gemini, unreleased, opt-in, the older generations the plugin never offered). With the Haiku 5.5 line removed both tests fail. usage.test.mjs's Core list gains Mistral Large 4. Run: bun test in packages/factory (126 pass), bun scripts/check.mjs factory; a fake Factory saw /api/llm/a/v1/messages with x-api-provider anthropic for claude-haiku-5-5 and /api/llm/o/v1/chat/completions with mistral for mistral-large-4. Not tried against Factory itself (no Factory account here); droid itself was not run. |