Skip to content

feat: add LocalAI local runtime support - #915

Merged
Astro-Han merged 7 commits into
mainfrom
feat/localai-runtime-support
Jul 13, 2026
Merged

Astro-Han merged 7 commits into
mainfrom
feat/localai-runtime-support

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the stable localai provider identity across Core, Runtime, CLI, Storage, Headless/Harbor, and Desktop.
  • Default to http://localhost:8080/v1, discover exact model IDs from /v1/models, and keep API-key authentication optional: empty credentials send no Authorization header, while configured credentials use Bearer auth.
  • Ship the byte-identical official LocalAI SVG with immutable provenance, MIT notice, and current-color mask rendering.

Why

Issue #860 Phase 5 needs a first-class LocalAI path without turning every self-hosted OpenAI-compatible deployment into a new provider. This slice reuses the existing OpenAI-compatible runtime and discovery seams while preserving LocalAI's distinct persisted identity and its default no-auth, optional-auth contract. Refs #860.

Scope

This PR adds LocalAI only. It does not add vLLM or another generic self-hosted deployment provider; those remain under openai-compatible. The deterministic two-stage tool fixture is intentionally limited to an officially supported llama.cpp tool-trained Qwen3 configuration and does not claim provider-wide tool-call parity. Phase 7 is out of scope.

Verification

  • node ../../worktree-bootstrap.mjs — rebuilt every workspace from the final rebased tree; renderer production build and notice check passed.
  • npm run typecheck — passed for every workspace after the final rebase.
  • Final LocalAI Core narrow tests — 4 passed: registry, optional-auth state, and keyless readiness.
  • Final LocalAI Runtime narrow tests — 4 passed: no-auth discovery, optional Bearer discovery, exact aliases, and the representative two-stage reasoning/tool loop.
  • Final LocalAI Headless/Harbor narrow tests — 4 passed: provider-scoped env, keyless host cell, exact aliases, and secret isolation.
  • Final LocalAI CLI and Storage narrow tests — 2 passed: optional credentials and exact persisted aliases.
  • Final LocalAI Desktop narrow tests — 5 passed: optional-auth IPC/status/detail and official SVG governance.
  • npm run check:stale and git diff --check origin/main...HEAD — passed.
  • Official SVG byte comparison — matched LocalAI commit b10e330590766ea621c0b03401e77a0589558e76; SHA-256 1349c022f30a58836e9b09591031f25bf4ff6bb8627bb50691a46a1c8a512c39.
  • npm --workspace @maka/desktop run e2e -- --grep "adds LocalAI" — passed locally with one worker after correcting the E2E contract to accept Vite-emitted SVG asset URLs while retaining the computed current-color assertion. No screenshot is attached because this reuses the existing provider-logo layout and mask styling; the byte-governance unit contract plus computed-style E2E are the relevant evidence.

Impact

Existing persisted connections are unchanged. Users can add LocalAI with its localhost default, use discovered exact aliases, and optionally save an API key. No migration is required. The provider and bundled third-party asset notice are user-visible release-note items.

Reviewer notes

Please focus on the optional-auth boundary, exact model-ID preservation, Harbor secret isolation, and the deliberately model-specific tool/reasoning fixture. The official SVG is vendored without modification from mudler/LocalAI and rendered through the existing ProviderAssetMask seam.

The named reviewer pass reported one P2 in the optional-auth validation-state projection. Rebased commit bd458ce5 fixes it at the Core auth-contract owner. After the E2E contract correction, the reviewer audited final HEAD f6bf32165147726ade7b99ca52b73aca6c9a4672 against base 557102b6b5276894c545d920ece883a88be6cf2a and reported 0 P0–P3 findings.

Ready for review

  • Verification is complete and the results above are current after the final merge-queue rebase
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han merged commit c91ba0e into main Jul 13, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the feat/localai-runtime-support branch July 13, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant