MORPH
®
EXPLORE
SEARCH
/
SIGN IN
SIGN UP
EXPLORE
SEARCH
dhruvhead
/
magpie
UNCLAIMED
0
0
0
Go
CODE
ISSUES
AGENTS
RELEASES
PACKAGES
DOCS
ACTIVITY
main
1 branch
422 tags
Code
claude-code
codex
deepseek
gemini-cli
llm
macos
yetone
agents: Factory's Droid CLI is an agent magpie sets up (#242 tasselx) — droid keeps its settings in ~/.factory/settings.json ($FACTORY_HOME_OVERRIDE/.factory when set), its BYOK models the customModels array ({model, displayName, baseUrl, apiKey, provider "anthropic" | "openai" (Responses) | "generic-chat-completion-api", maxOutputTokens, noImageSupport …}), picked as "custom:<id>". Picking a catalog model through magpie appends one entry per catalog model after the user's own (so their ids never move), each with an explicit id "custom:magpie/<provider>/<model>", the catalog's label as displayName, the gateway and token `magpie`, its context (maxContextLimit) and output when known, noImageSupport always written (droid takes a Chat Completions model as blind otherwise), and the API its provider speaks natively so the gateway relays it as it is: Responses → "openai" at /v1, Messages → "anthropic" at the gateway root (Anthropic's SDK adds /v1), anything else "generic-chat-completion-api" at /v1; and sets sessionDefaultSettings.model. The model shows in magpie as magpie/<ref>; the user's sessionDefaultSettings.model is stashed and put back on reset (a top-level "model", the docs' spelling, is left alone and is what droid falls back to), magpie's entries go and an emptied customModels or sessionDefaultSettings with them; everything else in the file, the user's entries included, is kept byte for byte. The picker offers the user's own custom models by the id droid gives them (its "id", else the displayName with whitespace as dashes and a count of the same name before it), including the legacy ~/.factory/config.json custom_models, which magpie never writes. Sync rewrites magpie's entries as providers change; Check reports a missing entry or a changed baseUrl/apiKey; its requests are Droid's in usage (User-Agent factory-cli/<version>). Icon is Factory's own favicon glyph (factory.ai/favicon.svg); lobehub has none. From the docs: docs.factory.ai/cli/byok/overview (customModels fields, the three providers, config.json legacy snake_case merged under settings.json), /cli/configuration/settings (model, sessionDefaultSettings.*), /droid-exec/overview (custom:<Display-Name>-<index>). Verified by reading the shipped droid 0.229.0 bundle (@factory/cli-linux-x64, unpacked, never installed or run): the zod schema of an entry (also id, index, maxContextLimit, enableThinking, reasoningEffort, bedrock-converse), ids as custom:${displayName.trim().replace(/\s+/g,"-")}-${n} with n counting equal names, an entry's own id winning, the lookup by id, top-level model/reasoningEffort/specModeModel moved into sessionDefaultSettings only when unset there, getModel reading sessionDefaultSettings.model, noImageSupport defaulting by provider, FACTORY_HOME_OVERRIDE, and BYOK requests carrying factory-cli/<version>. Tested in a sandbox HOME (internal/agent/droid_test.go): set/sync/reset on a settings.json as droid leaves it with a Groq BYOK model (its entry byte-identical, the file restored exactly), each protocol's provider and baseUrl, a moved baseUrl caught by Check and healed by Sync, picking the user's own model while on magpie's, no file at all, a top-level model, FACTORY_HOME_OVERRIDE and legacy config.json ids (custom:Local-Qwen-0/-1) offered and never written. go build -tags nogui (and GOOS=linux, GOOS=windows) and go test -tags nogui ./... pass (TestClaudeSignedOut and TestClaudeAccountNamedAsItsLogin flaked under load and pass alone). Not tried with a real droid: whether droid's /model lists the entries, that it reaches the gateway on each protocol, and how it sends thinking for a custom model (magpie sets no reasoningEffort/enableThinking) are unverified.
cb65895
·
1d ago
·
719 Commits
.github
build
internal
site
.gitignore
109 B
accounts_cli_test.go
768 B
accounts_cli.go
14.0 KB
autostart_cli.go
660 B
backup_cmd.go
4.7 KB
console_windows.go
935 B
go.mod
2.3 KB
go.sum
12.2 KB
groups_cli_test.go
8.6 KB
groups_cli.go
25.0 KB
groups_effort_cli_test.go
1.9 KB
groups_rules_cli_test.go
6.3 KB
groups_rules_cli.go
6.3 KB
gui_off.go
168 B
gui_on.go
354 B
library_cli.go
10.1 KB
LICENSE
1.0 KB
main.go
15.0 KB
Makefile
5.3 KB
model_cli_test.go
1.5 KB
model_cli.go
5.8 KB
providers_cli.go
26.1 KB
quota_cli.go
6.0 KB
README.md
26.2 KB
sessions_cli_test.go
4.3 KB
sessions_cli.go
12.0 KB
update_cli.go
2.1 KB
usage_cli_test.go
2.1 KB
usage_cli.go
5.3 KB
visible_cli.go
4.8 KB
web_cli.go
1.9 KB
webdav_cli_test.go
6.6 KB
webdav_cli.go
8.3 KB