Repository navigation
docs(cli): document removal of legacy config.json custom models - #76
Closed
lukealvoeiro wants to merge 1 commit into
Closed
lukealvoeiro wants to merge 1 commit into
lukealvoeiro wants to merge 1 commit into
Conversation
The CLI no longer reads custom_models from ~/.factory/config.json. Replace the legacy-support note with a migration note and field mapping to customModels in settings.json, point the video walkthrough at settings.json with camelCase fields, and rename stale snake_case field references (EN and JP). Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
|
Droid finished @lukealvoeiro's task —— View job LGTM. The documentation updates align the BYOK guidance with settings.json, and no actionable issues were found. 0 inline comments posted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gap
EXEC-N300 / ROOT-N302 (F, P2). The BYOK docs say that custom models in
~/.factory/config.json(custom_models, snake_case fields) are still supported and are merged withsettings.json. The video walkthrough tells users to paste BYOK configuration into~/.factory/config.json. The CLI no longer reads that file for custom models, so users who follow the docs end up with models that do not exist.Evidence
docs/cli/byok/overview.mdx:46: "Legacy support: Custom models in~/.factory/config.jsonusing snake_case field names (custom_models,base_url, etc.) are still supported for backwards compatibility. Both files are loaded and merged, withsettings.jsontaking priority." The same claim appears at:241("orconfig.jsonif using legacy format") and in the JP mirror atdocs/jp/cli/byok/overview.mdx:46and:179.docs/cli/getting-started/video-walkthrough.mdx:250,263-291: the directory tree lists "config.json # Model configuration and BYOK", the section is titled "config.json - Bring Your Own Key", and a step says "Paste the configuration into~/.factory/config.json". The example also uses a nonexistent schema (models,name, provideropenrouter). The JP mirror has the same content.packages/runtime/settings/src/legacyCustomModelMigration.ts. A later commit in the same PR also removed the transitional startup warning ("refactor(cli): remove transitional BYOK warnings"). Custom models are now parsed only fromcustomModelsin settings (packages/runtime/settings/src/SettingsParsing.ts).The audit used a hermetic home whose user config dir is
$AUDIT_HOME/.factory-dev.config.jsoncontained:{"custom_models":[{"model":"legacy-mock","model_display_name":"Legacy Mock","base_url":"http://127.0.0.1:9/v1","api_key":"sk-test-placeholder","provider":"generic-chat-completion-api"}]}Why it matters
Users who follow the BYOK overview or the video walkthrough put models where the CLI never looks. The models do not show up in
/model,droid exec -mrejects them, anddroid doctorreports no problem. Nothing tells the user their config is being ignored.Fix
This is a docs-only change. #25453 removed legacy support on purpose, so this PR does not restore it.
config.jsoncustom_modelsis no longer read and maps each old field to itssettings.jsonname:model_display_name→displayName,base_url→baseUrl,api_key→apiKey,max_tokens→maxOutputTokens,max_context_limit→maxContextLimit,enable_thinking→enableThinking,thinking_max_tokens→thinkingMaxTokens,reasoning_effort→reasoningEffort,extra_args→extraArgs,extra_headers→extraHeaders, andsupports_images: false→noImageSupport: true.model,providerandbedrockare unchanged. The mapping comes from the deleted migration code and matches the currentSettingsParsing.ts.config.jsonif using legacy format)" wording is replaced with a pointer to the migration note.config.jsonis removed from the directory tree, the section now describescustomModelsinsettings.jsonwith a valid camelCase OpenRouter example (samebaseUrlandprovideras the OpenRouter BYOK page), and the step now says "Add to settings.json".model_display_name→displayNamein custom-droids (EN/JP),api_key→apiKeyin ollama (EN/JP), andbase_url→baseUrlin the enterprise gateways page (EN/JP).Validation
The
customModelsform documented here is accepted. Withsettings.json={"customModels":[{"model":"legacy-mock","displayName":"Legacy Mock","baseUrl":"http://127.0.0.1:9/v1","apiKey":"sk-test-placeholder","provider":"generic-chat-completion-api","maxOutputTokens":4096}]}:-m custom:legacy-mock(custom:plus themodelfield, as custom-droids describes) also resolves to "Available tools for Legacy Mock".After the change,
grep -rn -E "custom_models|model_display_name|base_url|config.json" docs --include=*.mdx(changelog excluded) finds those terms only in the new migration notes and the "no longer read" sentences.MDX sanity: code-fence counts are even in every changed file, the
<Note>and<Steps>/<Step>tags are balanced, and the tables inside<Note>have a blank line before them.No docs lint or Mintlify render was run (the repo has no root lint script).
Found by the scheduled CLI arguments audit (2026-10-17).