Copy Pi model extras onto Custom without replacing Stem's Pi - #6
Open
TeleporterGuy wants to merge 2 commits into
Open
Copy Pi model extras onto Custom without replacing Stem's Pi#6TeleporterGuy wants to merge 2 commits into
TeleporterGuy wants to merge 2 commits into
Conversation
vLLM does not advertise thinking flags, and Stem's catalog sync was stripping them to id-only models. A pasted or linked models.json overlay now merges onto the Custom endpoint and survives startup until you replace or disconnect it.
A single socket read can carry an addressed control frame and a later broadcast together, which made the pushTo test fail on CI when it expected exactly one block.
Owner
|
Could you test it on your endpoint? That's the one place the wire format is
|
join3r
added a commit
that referenced
this pull request
Aug 17, 2026
The per-model overrides box asks for strings nobody guesses: which thinkingFormat a server wants, which levels it answers to. The person who reported the problem had all of them already, in a working pi models.json for the same box — and the feature made them transcribe it by hand into a differently-shaped object, which is the step most likely to be the thing that goes wrong. Import from a models.json takes the paste and does the reshaping. It lives inside OverridesField, so the add form and the edit-in-place block both get it with no wiring of their own, and it writes nothing: it calls onChange with converted text and stops. Save remains the single write path, still validating through parseModelOverrides and still refusing rather than writing — so an import is a suggestion to read and edit, not a change to anything. That matters more here than it looks: the input is a file the user did not necessarily write. Provider-level compat and headers fold down into every model, the model's own value winning any key it names. pi merges provider compat into each model itself (mergeCompat in provider-composer.js) and reads modelOverrides[id] .headers onto the request (rawModelHeaders), so this is what pi would have done with the file rather than an approximation — and it is the only way the provider-wide thinkingFormat of a typical vLLM config survives a trip through a per-model box. Stem writes its own provider block into models.json, pinning supportsReasoningEffort false, so a model that inherits everything and declares nothing still needs an entry of its own. id becomes the key; api and baseUrl are dropped. pi's ModelOverrideSchema has no such fields, so they would ride along inert while READING as though the box could repoint the endpoint — the one thing it deliberately cannot do. Only the import is taken from PR #6. The rest of that branch writes the copied block into the provider's models array and freezes the catalog, which (verified by running it) replaces Stem's compat defaults wholesale, ends model discovery, and writes unvalidated entries that make pi's loader fail models.json as a unit — getProviderIds() returns [], so Ollama goes down alongside the endpoint being edited. Its file-path field and IPC channel are not taken either: paste is enough, and a path is a second thing to get wrong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
models.jsonoverlay (reasoning,thinkingFormat,maxTokens, and the rest of that provider block) and merge it onto Stem's owncustomcatalog.~/.pi, no wholesalemodels.jsonreplace, ChatGPT/Grok auth and Pi settings untouched.reasoning: falseafter every spawn.Test plan
models.json(or a path), Read overlay, Copy into Stem; picker showscustom/<id>and reasoning effort for models withreasoning: true.{ id }stubs.npx vitest run tests/unit/models-copy.test.ts tests/unit/models-config.test.ts tests/unit/settings.test.ts