Skip to content

feat(runtime): add managed Basalt serving - #173

Open
MrScripty wants to merge 9 commits into
mainfrom
feat/basalt-runtime
Open

MrScripty wants to merge 9 commits into
mainfrom
feat/basalt-runtime

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

Summary

  • Install Basalt through Pumas's GitHub version manager and recognize native Basalt v2 packs in import, Hugging Face downloads, and package facts.
  • Serve a selected pack through a managed Basalt profile. The Linux x64 build gate and engine GPU check control availability, and Pumas checks the owned listener and loaded model before publishing readiness.
  • Use the existing Ctrl+click Inference editor and JSON-RPC settings methods for per-model thinking level, token limit, and sampling defaults. Explicit chat or typed operation values take precedence.
  • Keep the typed text projection compatible with Basalt's reasoning-only truncation and streamed reasoning. The typed result exposes answer text and completion status.

Verification

  • 2,202 library tests, 363 app-manager tests, 489 RPC tests, and 1,044 frontend tests passed. Feature-disabled builds, contract generation, desktop build, Clippy, and release gate tests passed.
  • The Electron app persisted Thinking Level and Maximum Output Tokens through the real backend. A reopened Pumas endpoint returned the saved values and rejected an invalid update.
  • Pumas installed Basalt v0.5.6 from GitHub and returned device_unavailable with CUDA devices hidden.
  • Pumas downloaded and published the 19.7 GB DQ8 pack. The installed file matched the publisher SHA-256.
  • The real pack loaded at an 8,192-token context on an RTX 5090 Laptop. The saved one-token limit and an explicit override worked through both chat and typed operations. The typed endpoint delivered completed SSE and correctly identified a red test image.
  • Reconstruction Workbench's existing Pumas client discovered the profile and received READY. Unloading removed the serving entry and stopped the engine. The same pack was then reloaded from the desktop backend.

Install Basalt through the GitHub runtime manager, admit native model packs, and manage a dedicated serving profile on supported NVIDIA hardware. Apply per-model settings through the desktop editor and the Pumas inference gateway.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6b4094cf-4b3f-4c01-9660-99778ca36059
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR adds a new managed inference route and extends shared model and API paths.

Fix the Basalt unload race before merging; an older unload request can stop a newer model.

Findings

  1. P1 Unload stops a newer model ▶
  2. P2 Broken installation looks complete ▶

Summary

Adds managed Basalt installation and serving for supported Linux x64 builds.

  • Pumas recognizes Basalt v2 packs as models it can import and discover.
  • A managed Basalt profile installs and runs on supported Linux x64 builds.
  • Pumas serves a selected Basalt pack through an owned runtime profile.
  • Basalt chat and typed generation use saved defaults and expose answer text.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Select Basalt pack and profile] --> B[Resolve installed runtime]
  B --> C[Check GPU availability]
  C --> D[Start owned Basalt process]
  D --> E[Check owned listener and loaded model]
  E --> F[Publish loaded model]
  F --> G[Merge saved defaults with explicit options]
  G --> H[Forward chat or typed operation]
  H --> I[Return answer and completion status]
Loading

Reviews (1) · Last reviewed commit: "feat(runtime): add managed Basalt servin..." · Reviewed by Greptile

Project .basalt from imported and existing model records so the Serve dialog admits the pack. Use the exhaustive provider descriptors when reading serving snapshots so a Basalt row does not hide loaded status.
Basalt serializes absent answer text as null even when finish_reason is stop. Project this case to empty text with the provider finish reason and keep provider reasoning outside the typed result.
MrScripty and others added 5 commits December 1, 2026 00:56
Brings in PUMAS_GITHUB_TOKEN (#159), which the inference review job
needs for the ONNX Runtime release listing, and the draft-release
workflow (#160).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
The completeness check required only bin/basalt, but every launch runs
the server with the archive's .venv/bin/python. A version whose
environment was lost after a partial restore or deletion was listed as
installed and failed on every launch.

basalt_distribution now owns both paths: SERVER_PYTHON, which the
launcher uses, and REQUIRED_FILES, which the completeness check uses,
so the two cannot drift apart. Addresses the Greptile review on #173.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
Unloading a model from a dedicated-process provider stopped whichever
process owned the profile. If another request replaced model A with
model B between the lookup and the stop, unloading A stopped B and cut
off its requests.

The process owner gains stop_if_model_with_receipt: it matches the
session's launch model file and requests the stop under one registry
lock, the same way the generation-checked stop does.
PumasApi::stop_runtime_profile_serving_model resolves the model's
primary file and uses it, and the dedicated-process unload calls that.
A successor launched for another model is left running and the unload
reports nothing unloaded. Addresses the Greptile review on #173.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
…erving

installer.rs keeps both sides' closure captures: the Basalt server
preparation (cleanup, progress, log, shutdown) and the ONNX Runtime
wheel selected for the install. The published 0.8.0 attribution
inventories are restored as released; the current 0.8.2 sets are
regenerated after a frozen pnpm install instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
…Basalt

Conflict resolution, keeping both sides:
- The calm GUI deleted the old app shell (apps.ts, AppIcon, AppShellPanels,
  AppPanelRenderer, useManagedApps) that this branch extended for Basalt.
  The calm GUI builds its engine list from the backend provider registry,
  so Basalt appears through its registered provider; the old-shell entries
  and BasaltPanel are dropped with the shell. Basalt keeps its display
  labels ('Basalt', mode 'Serve') in runtimeProviderDescriptors.ts.
- useServingStatus keeps main's provider set and adds 'basalt', so a
  Basalt row still does not hide loaded status (this branch's test kept).
- ProviderServingPlacementPolicy::request_controls, new on main, gains the
  BasaltDedicated arm: only the context size may differ from the profile,
  matching serving::placement.
- model_operations.rs combines main's (modalities, declarations) and
  resolve_with with this branch's explicit_output_limit.
- The desktop contract is regenerated from the merged sources; the 0.8.0
  attribution stays as published and 0.8.2 is regenerated after a frozen
  install.
- The provider-label test's "unknown id" example moves off 'basalt'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkfbGSuzL9SpH8epTy2hMe
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