Repository navigation
feat(custom-model): mark the model a session is using in the endpoint model picker - #757
Conversation
… default context length Fixes Ark0N#754
… injection - share one context-length resolution (discovered figure, endpoint default fallback) across the routes and boot recovery, with a recovery test - record listed per-slot context figures with a slot count of 1 and force the slot-count fallback once per rediscovery - open up the codex model launch token for qwen3-style ids (model-plain-colon), pinned by a spawn-golden case - pass the full discovered window to opencode as limit.context - translate the picker search strings and document the discovery precedence
…rite Round-four review item 3: the swap route wrote the new config.toml into the very dir a live codex session uses as CODEX_HOME before checking the pattern, and its refusal then deleted that dir. buildCustomModelInjection is pure, so the check runs on its result and a refused id never touches the filesystem. Pinned by a two-apply codex route test.
Round-four review item 4: focusing the search input on every picker open raises the OS keyboard over the list on phones; guard it the way readmymind-ui.js does.
…r routes and schema Round-four review smaller item: the discovery comment claimed a shared ceiling while schemas.ts restated the literal twice; the constant now lives in schemas.ts (routes already import from it, no cycle) and both bounds reference it.
…ed figure wins Round-four review smaller items: api-reference now states the opposite-of-apiKey behaviour for an omitted defaultContextLength, and the wiki sentence follows the code, modelContextLengths[id] ?? defaultContextLength: any stored figure beats the default.
Round-four review smaller item: one getCustomModelForPersist().launchModel expectation, like the pi/grok/omp tests beside it, pins Ark0N#750 on the one-shot path.
|
Thanks for splitting this out of #752. This PR marks the model one of your live sessions is using on an endpoint that cannot report its own loaded model, and explains an unmarked list when nothing is known. The tests are thorough and the
On the stack: #752 is now at 884e67d, eight commits past the 1b8ac40 this branch carries. The three commits that are this PR's own change apply cleanly on top of it (checked with |
…nt cannot report it Only llama-swap answers what is loaded, so behind a gateway such as Bifrost nothing was marked and the picker fell back to discovery order apart from the one CLI that had launched there before. A live session whose own injected endpoint is that host now promotes its model as "In use by a session", under its own tag and below llama-swap's "Currently loaded" answer, reading only what Codeman injected rather than terminal text, and never a stopped session. When genuinely nothing is known the picker says so instead of leaving an unmarked wall, and stays quiet for an endpoint that merely failed to answer.
…r lists Round-four review, split fix 1: a stale 'last used' id kept the promotion truthy, so no row was tagged and the 'Nothing is marked' line stayed hidden. Derive it from promoted && models.includes(promoted).
… and exited panes Review round on PR Ark0N#757. The route turns EVERY upstream failure into isLlamaSwap: false, so the old line silently promised an unreachable endpoint was merely mute, and the live-session check missed a null pid (the PTY exited, the same test keep-warm applies). - Require pid !== null in _getCustomModelInUseBySession, pinned by a 'process exited' case in the marks-nothing table - Reword #customModelPickUnknown to claim only that nothing was reported, true for a down endpoint too; drop the 'stays quiet for a failed probe' promise from changeset, docs and comments - architecture-invariants: add the In-use tier, both pin fences (customModel not displayModel; stopped/null-pid/paneExit never count) and the unknown-line rule - Mirror the wording through i18n (key + zh-CN), index.html fixture, styles.css comment, and the run-menu tests
|
Pushed 4aeab0d, rebased onto #752's 884e67d so the diff is this PR's four commits only. Thanks for running it against a closed port and a dead hostname.
Full |
86e3e0f to
4aeab0d
Compare
|
Thank you, Devvyn, for the quick round-two push. This PR marks the model one of your running sessions is using on an endpoint that cannot report its own loaded model, and says so plainly when nothing is known. All four round-one points are in at this head: the line now claims only that nothing was reported (true for a down endpoint as well), the in-use lookup skips a session with a null Three small things I will tidy at merge time unless you get to them first:
This merges after #752. If #752 lands as a squash merge, this branch needs a rebase onto master first so only its own four commits remain. |
The launch-id check is pure, so it now runs before the context warning and the swap confirmation: nobody agrees to evict a model only to get the 400. Also the search-box and in-use comments, the model-plain-colon wording, and the wiki's order of the picker's marks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you, this is in the 1.48.0 release, merged after #752 with the wiki and comment tidies on top. |
Context
The model picker for a custom endpoint marks the model the endpoint reports as loaded (llama-swap) and the last one used. For an endpoint that cannot report which model it has loaded, nothing is marked, which reads like the question was ignored.
Split out of #752 at the maintainer's request (one change per PR). Stacked on #752: until that merges, this PR's diff also shows its commits; the change that is new here is the three commits at the end.
What changed
docs/custom-model-endpoints.mdand a changeset (mode 100644 like the others).Verification
typecheck,lintandformat:checkare clean.npm test: 666 files passed, 13,539 tests passed, 12 skipped, 0 failed.