Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
skip sharded GGUFs in the Local LLM installer's Ollama path
[._.]/ Adam Eivy66e81d7a4251
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex cbd96b3075..97034c0694 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -81,6 +81,7 @@## Fixed+- **The Local LLM installer no longer offers Ollama a sharded GGUF it can't pull.** Picking a large quant whose GGUF is split into parts (e.g. `unsloth/Qwen3-Coder-Next-GGUF:UD-Q8_K_XL`, ~80 GB across two files) failed with Ollama's raw `400: The specified tag is a sharded GGUF. Ollama does not support this yet.` ([ollama/ollama#5245](https://github.com/ollama/ollama/issues/5245)). The Hugging Face catalog already detected multi-part shards (it sums their sizes) but still presented them as Ollama-installable. Each variant now carries a `sharded` flag; on the Ollama backend a sharded quant is marked unsupported, the quant picker tags it `· sharded (not on Ollama)`, the **Install** button is disabled with the reason, and the RAM-aware default skips it so it never auto-selects a build that can't be pulled. LM Studio is unaffected — it loads sharded GGUFs natively, so the same quant stays installable there. As defense-in-depth for the pull-by-name path, an Ollama pull that hits the sharded-GGUF 400 is now tagged `code: SHARDED_GGUF` and surfaces an actionable toast ("pick a smaller single-file quant, or install on LM Studio") instead of the raw error. (`server/services/huggingFaceCatalog.js`, `server/services/ollamaManager.js`, `client/src/components/settings/LocalLlmTab.jsx`)- **The `/do:next` Slashdo button now honors the app's Work Tracker.** Per-app Work Tracker (PLAN.md / GitHub / GitLab / JIRA) already routed the *scheduled* `claim-work` flow, but the manual `/do:next` button inlined the raw slashdo command body — which always drains PLAN.md unless `--issues` is passed. Clicking it for an app set to GitHub/GitLab/JIRA Issues silently worked the wrong queue. The button now resolves the app's Work Tracker and delegates to the same claim flow the scheduler uses (`plan-task` / `claim-issue` / `claim-issue-gitlab` / `jira-sprint-manager`, via a shared `buildClaimWorkTask` router that also drives the scheduled path), inheriting the JIRA flow's CoS-managed worktree+PR isolation. It also resolves the same configured `claim-work` metadata the scheduler does (global → per-app override → Code Review Defaults), so clicking it honors the app's `issueAuthorFilter` (e.g. claim any open issue, not just owner-filed) and configured reviewers instead of silently forcing owner-only + Copilot. The task description and button tooltip now read generically ("claim the next work item per this app's Work Tracker") instead of naming PLAN.md.- **The GitHub Release workflow no longer crashes on a large changelog.** The v2.22.0 release (a ~175KB changelog) failed at the "Create Release" step with `Argument list too long`: the changelog was passed to `softprops/action-gh-release` as the `body:` input, which GitHub materializes as an `INPUT_BODY` environment variable, and a 175KB env var overflows `ARG_MAX` when the action's Node process is exec'd. The body also exceeds GitHub's hard 125,000-character release-note limit (a separate HTTP 422). The workflow now writes the (placeholder-substituted) changelog to a file and feeds it via `body_path:` instead of an env var, and caps it at 120,000 chars on a whole-line boundary — appending a pointer to the full changelog file at the tag when truncated. (`.github/workflows/release.yml`)- Scheduled-task descriptions in the Automation UI no longer fall back to a raw dasherized label. `claim-work` (the single-source work-tracker router), `code-reviewer-a`/`code-reviewer-b`, and `do-replan` now show real one-line descriptions instead of "claim work" / "code reviewer a", which read as orphaned/legacy tasks. A parity guard test now keeps the description map in sync with the task-type list.diff --git a/client/src/components/settings/LocalLlmTab.jsx b/client/src/components/settings/LocalLlmTab.jsxindex 4760b17a45..1873882d46 100644--- a/client/src/components/settings/LocalLlmTab.jsx+++ b/client/src/components/settings/LocalLlmTab.jsx@@ -406,6 +406,11 @@ export function LocalLlmTab() {// this model"; needing a newer Ollama to do it is an implementation// detail, not a separate decision.upgradeOllamaAndRetry(modelId);+ } else if (err?.code === 'SHARDED_GGUF') {+ // Ollama can't pull a multi-part GGUF (#5245). The catalog disables+ // Install for known-sharded quants, but a pull-by-name still lands here —+ // explain the fix rather than echoing Ollama's raw 400.+ toast.error('Ollama can’t install sharded (multi-part) GGUFs. Pick a smaller single-file quant, or install this build on LM Studio.');} else {// Any other failure: restore the default toast we suppressed.toast.error(err?.message || 'Install failed');@@ -763,6 +768,11 @@ export function LocalLlmTab() {// Installed state is per-quant (Ollama tracks each separately),// so gate Install on the SELECTED variant, not the result default.const chosenInstalled = chosenVariant ? chosenVariant.installed : m.installed;+ // A sharded quant can't be pulled by the active backend (Ollama+ // #5245) — disable Install with the server's reason rather than+ // letting the user hit the raw 400. (The server only sets+ // `unsupportedReason` when the variant is unsupported.)+ const chosenUnsupported = chosenVariant?.unsupportedReason ?? null;const size = chosenVariant?.size || m.size;const sizeBytes = chosenVariant?.sizeBytes ?? m.sizeBytes;const fit = chosenVariant?.fit;@@ -801,7 +811,7 @@ export function LocalLlmTab() {>{variants.map((v) => (<option key={v.installId} value={v.installId}>- {v.quant}{v.size ? ` · ${v.size}` : ''}{v.installed ? ' · installed' : ''}{v.recommended ? ' · recommended' : ''}{v.fit === 'too-large' ? ' · exceeds RAM' : ''}+ {v.quant}{v.size ? ` · ${v.size}` : ''}{v.installed ? ' · installed' : ''}{v.recommended ? ' · recommended' : ''}{v.fit === 'too-large' ? ' · exceeds RAM' : ''}{v.unsupported === 'sharded' ? ' · sharded (not on Ollama)' : ''}</option>))}</select>@@ -862,13 +872,19 @@ export function LocalLlmTab() {) : (<buttononClick={() => (isAudio ? installAudio(m) : install(chosenId))}- disabled={busy}- className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 flex items-center gap-1"+ disabled={busy || !!chosenUnsupported}+ title={chosenUnsupported || undefined}+ className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1">{actionInProgress === `install-${chosenId}` ? <BrailleSpinner /> : <Download size={12} />}Install</button>)}+ {chosenUnsupported && !chosenInstalled && (+ <span className="text-[11px] text-port-warning text-right max-w-[12rem] leading-snug" title={chosenUnsupported}>+ Sharded — use LM Studio or a smaller quant+ </span>+ )}{isHf && m.repository && (<ahref={`https://huggingface.co/${m.repository}`}diff --git a/server/services/huggingFaceCatalog.js b/server/services/huggingFaceCatalog.jsindex ebbd4c9c4c..6abc026a3c 100644--- a/server/services/huggingFaceCatalog.js+++ b/server/services/huggingFaceCatalog.js@@ -331,7 +331,8 @@ function displayName(repoId) {}// Backend-specific pull/download id for a chosen quant.-// ollama → `hf.co/<repo>:<quant>` (Ollama resolves the GGUF, incl. shards)+// ollama → `hf.co/<repo>:<quant>` (Ollama resolves a single-file GGUF; it+// CANNOT pull multi-part shards — see ollama/ollama#5245)// lmstudio → `<repo>@<quant>` (the `lms get <repo>@<quant>` syntax)// A null quant falls back to the bare repo so the backend picks its own default.function variantInstallId(backend, repoId, quant) {@@ -360,6 +361,20 @@ function shardSetKey(filename) {return m ? `${m[1]}-of-${m[2]}` : filename}+// A shard-set key (from a `…-NNNNN-of-MMMMM.gguf` file) ends in `-of-MMMMM` with+// no `.gguf` suffix; a standalone key is the full filename (`.gguf` and all). So+// the trailing `-of-#####` (anchored, no extension) is unambiguous.+function isShardedKey(key) {+ return /-of-\d{5}$/i.test(key)+}++// Why Ollama can't install a sharded quant — surfaced on the variant so the UI+// can disable Install with an actionable reason instead of letting the user hit+// Ollama's raw 400. LM Studio loads sharded GGUFs natively, so it's unaffected.+const OLLAMA_SHARDED_REASON =+ 'Ollama cannot install multi-part (sharded) GGUFs (ollama/ollama#5245). ' ++ 'Pick a smaller single-file quant, or install this build on LM Studio.'+function buildVariants(model, backend, usableBytes) {const repoId = repoIdOf(model)// quant → (shard-set/standalone key → summed size). Backends install by quant@@ -377,16 +392,33 @@ function buildVariants(model, backend, usableBytes) {}return [...groups.entries()].map(([quant, units]) => {- const largestUnit = Math.max(0, ...units.values())+ // The installable unit is the largest shard-set/standalone group; whether+ // THAT unit is sharded decides Ollama-compatibility (a quant may have both+ // a sharded build and a standalone one — the standalone wins on size ties+ // only if larger, but the unit we'd actually pull is the one we measure).+ let chosenKey = null+ let largestUnit = 0+ for (const [key, size] of units) {+ if (size >= largestUnit) { largestUnit = size; chosenKey = key }+ }const sizeBytes = largestUnit > 0 ? largestUnit : null- return {+ const sharded = chosenKey ? isShardedKey(chosenKey) : false+ const variant = {quant,format: 'gguf',installId: variantInstallId(backend, repoId, quant),sizeBytes,size: formatBytes(sizeBytes) || quant,- fit: classifyFit(sizeBytes, usableBytes)+ fit: classifyFit(sizeBytes, usableBytes),+ sharded+ }+ // Ollama can't pull shards; mark the variant so the picker disables Install+ // and the RAM-aware default skips it. LM Studio handles shards, so no flag.+ if (sharded && backend === 'ollama') {+ variant.unsupported = 'sharded'+ variant.unsupportedReason = OLLAMA_SHARDED_REASON}+ return variant}).sort((a, b) => (b.sizeBytes || 0) - (a.sizeBytes || 0))}@@ -710,9 +742,16 @@ function contextLengthOf(model) {// pick the smallest (all flagged too-large) rather than falling through as if// memory were unknown.function applyChosenVariant(result, variants, { usableBytes, rewriteInstallId }) {- const chosen = (usableBytes != null ? pickVariantForBudget(variants, usableBytes) : null)- || variants.find((v) => v.quant && v.quant === result.quant)- || preferredQuantVariant(variants)+ // The default must be something the backend can actually install — never land+ // the RAM-aware/QUANT_PRIORITY pick on an Ollama-unsupported (sharded) variant.+ // Pick from the installable subset; only if EVERY variant is unsupported (a+ // repo that ships nothing but shards) fall back to the full list so the card+ // still has a coherent default (Install stays disabled per-variant downstream).+ const installable = variants.filter((v) => !v.unsupported)+ const pool = installable.length > 0 ? installable : variants+ const chosen = (usableBytes != null ? pickVariantForBudget(pool, usableBytes) : null)+ || pool.find((v) => v.quant && v.quant === result.quant)+ || preferredQuantVariant(pool)// Flag by identity (robust whether or not the id is rewritten) so the controlled// <select> and the recommended marker always agree on the chosen variant.for (const v of variants) v.recommended = v === chosendiff --git a/server/services/huggingFaceCatalog.test.js b/server/services/huggingFaceCatalog.test.jsindex d61b9f3e04..27c733304e 100644--- a/server/services/huggingFaceCatalog.test.js+++ b/server/services/huggingFaceCatalog.test.js@@ -282,6 +282,58 @@ describe('huggingFaceCatalog', () => {expect(result.variants[0]).toMatchObject({ quant: 'BF16', sizeBytes: 40_000_000_000 })})+ it('flags a sharded quant as Ollama-unsupported (ollama/ollama#5245)', async () => {+ const repo = 'org/Sharded-Only-GGUF'+ fetch+ .mockResolvedValueOnce(listing(repo, ['Big-Q8_0-00001-of-00002.gguf', 'Big-Q8_0-00002-of-00002.gguf']))+ .mockResolvedValueOnce(blobs(repo, {+ 'Big-Q8_0-00001-of-00002.gguf': 40_000_000_000,+ 'Big-Q8_0-00002-of-00002.gguf': 40_000_000_000,+ }))++ const [result] = await searchHuggingFaceModels({ backend: 'ollama', query: 'sharded', systemMemoryBytes: 128 * 1024 ** 3 })++ expect(result.variants[0]).toMatchObject({ quant: 'Q8_0', sharded: true, unsupported: 'sharded' })+ expect(result.variants[0].unsupportedReason).toMatch(/sharded/i)+ })++ it('does not flag a sharded quant on LM Studio (it loads shards natively)', async () => {+ const repo = 'org/Sharded-Lms-GGUF'+ fetch+ .mockResolvedValueOnce(listing(repo, ['Big-Q8_0-00001-of-00002.gguf', 'Big-Q8_0-00002-of-00002.gguf']))+ .mockResolvedValueOnce(blobs(repo, {+ 'Big-Q8_0-00001-of-00002.gguf': 40_000_000_000,+ 'Big-Q8_0-00002-of-00002.gguf': 40_000_000_000,+ }))++ const [result] = await searchHuggingFaceModels({ backend: 'lmstudio', query: 'sharded', systemMemoryBytes: 128 * 1024 ** 3 })++ expect(result.variants[0]).toMatchObject({ quant: 'Q8_0', sharded: true })+ expect(result.variants[0].unsupported).toBeUndefined()+ })++ it('defaults Ollama to a single-file quant when the larger quant is sharded', async () => {+ const repo = 'org/Mixed-Shard-GGUF'+ fetch+ // Q8_0 is sharded (80 GB, two parts); Q4_K_M is a single 40 GB file.+ .mockResolvedValueOnce(listing(repo, [+ 'M-Q8_0-00001-of-00002.gguf', 'M-Q8_0-00002-of-00002.gguf', 'M-Q4_K_M.gguf',+ ]))+ .mockResolvedValueOnce(blobs(repo, {+ 'M-Q8_0-00001-of-00002.gguf': 40_000_000_000,+ 'M-Q8_0-00002-of-00002.gguf': 40_000_000_000,+ 'M-Q4_K_M.gguf': 40_000_000_000,+ }))++ const [result] = await searchHuggingFaceModels({ backend: 'ollama', query: 'mixed', systemMemoryBytes: 256 * 1024 ** 3 })++ // Even on a huge machine where the 80 GB Q8_0 "fits", the RAM-aware default+ // must skip the sharded build and recommend the installable single-file quant.+ expect(result.quant).toBe('Q4_K_M')+ expect(result.variants.find((v) => v.recommended).quant).toBe('Q4_K_M')+ expect(result.variants.find((v) => v.quant === 'Q8_0')).toMatchObject({ unsupported: 'sharded' })+ })+it('builds LM Studio variant ids with the @quant syntax and still detects installed repos', async () => {const repo = 'bartowski/LmModel-GGUF'fetchdiff --git a/server/services/ollamaManager.js b/server/services/ollamaManager.jsindex bf78125d53..2e71d2e22d 100644--- a/server/services/ollamaManager.js+++ b/server/services/ollamaManager.js@@ -636,10 +636,28 @@ async function pullModel(modelId, onProgress) {}console.error(`⚠️ Ollama pull failed for ${modelId}: ${lastError}`)- const code = isOllamaOutdatedError(lastError) ? 'OLLAMA_OUTDATED' : undefined+ const code = isShardedGgufError(lastError) ? 'SHARDED_GGUF'+ : isOllamaOutdatedError(lastError) ? 'OLLAMA_OUTDATED'+ : undefinedreturn { success: false, error: lastError, modelId, ...(code ? { code } : {}) }}+/**+ * Detect Ollama's refusal to pull a multi-part (sharded) GGUF. The HF passthrough+ * registry returns a 400 whose message names "sharded GGUF" and links the tracking+ * issue (ollama/ollama#5245). The catalog already flags sharded quants so the UI+ * disables Install — this classifier is defense-in-depth for the pull-by-name path+ * (a raw `hf.co/<repo>:<quant>` typed into the search box) so the caller can show+ * an actionable message instead of the raw 400. Match the phrase plus the 400 so+ * an unrelated 400 can't slip through.+ * @param {string|null|undefined} error+ */+function isShardedGgufError(error) {+ if (!error) return false+ const str = String(error)+ return /\b400\b/.test(str) && /sharded gguf/i.test(str)+}+/*** Detect Ollama's "model requires a newer version" 412 response surfaced in the* NDJSON stream. The registry returns it when a new model format (e.g. a freshdiff --git a/server/services/ollamaManager.test.js b/server/services/ollamaManager.test.jsindex 0ca0fd1aef..47f1d71e61 100644--- a/server/services/ollamaManager.test.js+++ b/server/services/ollamaManager.test.js@@ -172,4 +172,17 @@ describe('ollamaManager.pullModel transient-error retry', () => {expect(result.code).toBe('OLLAMA_OUTDATED')expect(pullUrls).toHaveLength(1) // not retried — outdated binary won't fix itself})++ it('tags a 400 "sharded GGUF" error with code SHARDED_GGUF', async () => {+ const pullModel = await loadPullModel()+ const { pullUrls } = stubFetch([+ makeStreamResponse([{ error: 'pull model manifest: 400: {"error":"The specified tag is a sharded GGUF. Ollama does not support this yet. Please use another tag or \\"latest\\". Follow this issue for more info: https://github.com/ollama/ollama/issues/5245"}' }])+ ])++ const { result } = await runPull(pullModel, 'hf.co/unsloth/Qwen3-Coder-Next-GGUF:UD-Q8_K_XL')++ expect(result.success).toBe(false)+ expect(result.code).toBe('SHARDED_GGUF')+ expect(pullUrls).toHaveLength(1) // not retried — sharding won't resolve on retry+ })})