Repository navigation
feat(compose): answer a variant's requires.inputs from the site profile - #54
Merged
Merged
Conversation
A catalog variant may declare requires.inputs: chart values it needs and
cannot know. The site profile answers them in features.inputs, keyed by chart
path, with model.pathTemplate's placeholders ({{hf}}, {{org}}, {{name}},
{{model}}). compose sets each answer in the derived layer, so the deployer's
overrides win over it, and refuses a plan whose merged values leave an input
unset or answer it with a value of the wrong type or pattern.
swissd re-checks the catalog's rules on load. The API and plan format do not
change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
A value the variant's values gives an input's path is its default: swissd checks it on load against the input's type and pattern instead of refusing it. The site's features.inputs answer now merges over that default (it yields only to the site layer), and the deploy's overrides over both. Compose refuses only an input left with no answer from any layer; "" is none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
A value values gives an input's path is its default and must pass the input's type and pattern, "" and null included. Compose checks "" like any answer; only an absent or null value is "not set". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
catalog.Input gains Default. Compose puts each input's answer in the derived layer: the site profile's features.inputs, else the input's default; the deploy's overrides go over it. swissd checks the default against the input's type and pattern on load, and again refuses a variant whose values set an input's path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
…level A variant's inputs move from requires.inputs to the variant's top level, and the site profile's answers from features.inputs to a top-level inputs map. The v2 index no longer carries inputs. No rule yet keeps an input off a path swiss derives from requires; the catalog schema can add one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
catalog.Input.Path becomes Key, and ValidInputPath ValidInputKey; the site profile's inputs are keyed the same way.
aceforeverd
marked this pull request as ready for review
November 10, 2026 03:55
SiteProfile gains inputs, answers by input key; ResolvedVariant gains inputs, with an Input schema; POST /api/plans says how they are answered and that a plan left without an answer is 400.
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.
Part of modelsphere/modelsphere#57 . Should answer L3 configuration in variants.
A catalog variant can declare
inputs, besiderequires: chart values every deploy must answer, such as a Mooncake master address. The site profile answers them in a top-levelinputsmap, keyed by the input'skey. Answers can usemodel.pathTemplate's placeholders:{{hf}},{{org}},{{name}}and{{model}}.Compose:
default;""is checked like any answer).Catalog load:
catalog.VariantgainsInputs, each naming its chart value byKey. swissd re-checks the catalog's input rules:valuesdoesn't set it;model.localPathcan never be an input.The v2 index doesn't carry inputs.
Profile parse: refuses an unknown placeholder, a value that isn't a string, number or boolean, and a key that
extraalso sets.Not here: no rule separating
requiresandinputs. Keeping an input off a key swiss derives fromrequiresis left to the catalog schema.API and plan format: unchanged;
docs/openapi.yamldocumentsSiteProfile.inputs,ResolvedVariant.inputs(anInputschema), and howPOST /api/plansanswers inputs (a plan left without one is 400).Rollout order: this needs to reach every site before any variant declares inputs, because an older swissd refuses the unknown key.
Related: modelsphere/model-catalog#103, modelsphere/console#125