Repository navigation
Releases
OlliteRT v0.9.7-beta.1
OlliteRT v0.9.7-beta.1
Floating server monitor, network access controls, native JSON Schema output, thinking budgets, and stronger inference reliability
Added
Floating Server Monitor
- Movable system overlay — optionally keep live OlliteRT status visible while using another app
- At-a-glance server state — shows server status, active model, request metrics, model capabilities, and the effective thinking budget
- Quick controls and recovery actions — manage the server and respond to failures without returning to the main app
- Configurable placement and notifications — position and behavior persist across monitor sessions
Configurable Network Access
- Listener scope — bind the server to all interfaces, loopback only, or a specific numeric IPv4/IPv6 address assigned to the phone
- Client allowlists and blocklists — admit or reject exact IPv4/IPv6 addresses and CIDR networks before authentication, request-body parsing, or inference
- Live policy updates — client access rules apply without unloading the active model; listener-address changes restart the server
- Accurate endpoint reporting — Status, Home Assistant setup, and copied URLs reflect the active listener and IPv6 formatting
- Status visibility — active listener scope and client-policy restrictions are shown in the app
Tip
The configurable listener enables OlliteRT to work over private VPN networks such as Tailscale.
Bind to the phone’s Tailscale IP, for example 100.x.y.z, to reach the server from other tailnet devices.
Native Structured Output and Sampling Controls
- Native JSON Schema constrained decoding — OpenAI
response_format.type=json_schemais enforced by LiteRT-LM instead of relying on a prompt hint - Thinking budget control — configure a per-model reasoning-token budget with a logarithmic slider or exact value; Anthropic
thinking.budget_tokensoverrides it per request - Frequency and presence penalties — OpenAI sampler penalties now map to LiteRT-LM repetition controls
- Exact per-turn output cap — request
max_tokensis applied through the native per-message limit - Request seed support — OpenAI-compatible requests can supply a seed, and Advanced Settings can define an optional server-wide default seed
- GPU audio acceleration — optional per-model setting moves the audio executor from CPU to GPU on supported devices
- Improved Gemma 4 tool calls — native parsing accepts nested JSON and quoted-string delimiter tokens while constrained decoding is active
Server Configuration API
- Authenticated
GET /v1/server/config— read the active model and server configuration without sending a request body - Default seed management — read, set, or clear
default_seedthrough the API - Accelerator reporting — configuration responses identify the active
cpu,gpu, ornpuaccelerator - Thinking budget management — read or update the configured reasoning-token budget
- Atomic validation — invalid updates change none of the submitted configuration fields
- See the Server Configuration API reference for the complete field list
Diagnostics and Status Feedback
- Versioned log exports — activity-log JSON and debug logcat exports include app version, version code, flavor, build type, and Git hash
- Live request timers — active log cards show elapsed generation time
- Model-loading timers — startup and keep-alive reload cards show elapsed loading time
- Actionable server errors — the error dialog includes a recovery suggestion and a direct link to the Logs tab
- CPU fallback state — GPU startup failures appear as structured warning events while the app retries on CPU
Miscellaneous
- LiteRT-LM updated to 0.16.1 — brings native structured output, thinking controls, audio acceleration options, tool-streaming improvements, and runtime stability fixes
- Unified Hugging Face authentication — the token configured in Settings is used for new and resumed downloads; the legacy OAuth flow has been removed
- Downloaded model indicators — source cards show downloaded counts and mark locally available models
- Model source persistence — downloaded models remain visible when their remote source is disabled
- Activity Log Storage wording — settings now distinguish persisted in-app activity entries from verbose logs and Android logcat
Changed
- Inference cancellation and timeout ownership — queued, streaming, blocking, disconnected, and timed-out requests now settle through one request-scoped control path
- Long streaming requests honor configured timeouts — the outer SSE timeout follows the selected endpoint timeout instead of stopping at a fixed 150 seconds
- Native runtime operations are serialized — temporary LiteRT flags, engine initialization, cancellation, teardown, benchmark calls, and reload overrides no longer race one another
- Faster stop-sequence matching — streaming output is scanned incrementally instead of repeatedly copying and rescanning the full response
- Faster prompt truncation — oversized prompts use a binary search for the largest fitting history instead of repeated linear rebuilding
- Request-log storage is bounded and ordered — database writes preserve submission order, pruning is deterministic, and retained request/response bodies have a 32 MB memory budget
- Download finalization is recoverable — completed files and extracted directories are swapped atomically while preserving the previous valid model on failure
- Multi-file download progress is canonical — progress uses the same aggregate byte total from scheduling through completion
- Model loading is more resilient — stale auto-start selections fall back to another downloaded model, missing imported files are purged, and partial SoC metadata inherits safe base values
- Update checks are lighter — network fetches run on the I/O dispatcher, duplicate pipelines were consolidated, and the periodic schedule is no longer reset on every app open
- Settings selectors are consistent — network, default-model, and numeric-unit dropdowns share active outlines, aligned popup widths, checkmarks, and animated chevrons
- Logs UI is more responsive — live, cancelled, partial, and compacted responses render from explicit presentation state; metrics dialogs scroll on short screens and large fonts
- App architecture was reorganized — HTTP routes, inference helpers, model lifecycle, repositories, settings, logs, and model-management UI were split into focused components with injected dependencies and deterministic tests
Fixed
- Fixed port collisions causing a fatal process crash; startup now reports the bind error through the normal server-error UI
- Fixed quick server restarts failing while the previous socket remained in
TIME_WAIT - Fixed streaming cancellation or timeout omitting the terminal SSE marker
- Fixed the configured request seed being ignored by LiteRT-LM sampler configuration
- Fixed GPU startup fallback being invisible while the model retried on CPU
- Fixed model keep-alive unloading or OOM cleanup racing an active inference request
- Fixed native cancellation that never settles leaving a reusable but invalid inference runtime
- Fixed stale model reload overrides applying to the wrong model
- Fixed Anthropic auth, IP-policy, and pre-stream failures returning non-Anthropic error envelopes
- Fixed Anthropic thinking blocks emitting empty signatures, malformed tool arguments being discarded, and matched stop sequences not appearing in response metadata
- Fixed
/v1/modelsreturning an OpenAI-shaped list to Anthropic clients - Fixed oversized chunked requests bypassing the request-size guard when
Content-Lengthwas absent - Fixed download finalization reporting success when the final rename failed
- Fixed multi-file model downloads exceeding 100% progress or losing valid existing files during replacement
- Fixed rapid duplicate download taps enqueueing the same model more than once
- Fixed stale allowlist refreshes overwriting newer results
- Fixed benchmark navigation showing a blank screen after Android restored the process
- Fixed imported-model rename failures closing the editor or reporting success too early
- Fixed deleted imported models remaining as ghost entries in the catalog
- Fixed request-log cards losing live output, cancellation controls, truncation details, or diagnostic size metadata
- Fixed request metrics overflowing in landscape orientation or with large system fonts
- Fixed repeated server errors remaining suppressed after the server recovered
- Fixed the dismissed error dialog reappearing after device rotation
- Fixed model search, filters, and sort selection resetting on rotation
- Fixed updat...
OlliteRT v0.9.6-beta.1
OlliteRT v0.9.6-beta.1
Speculative Decoding support (MTP), NPU / TPU support, Anthropic Messages API, Configurable timeouts, KV cache reuse
Added
Speculative Decoding Support (Multi-Token Prediction, MTP)
- Per-model toggle — Inference Settings sheet exposes an MTP toggle on capable models, off by default
- Three-gate activation — allowlist capability, runtime Capabilities API verification, and the user toggle must all agree before MTP is enabled at Engine construction
- Benchmark integration — MTP toggle on the benchmark screen
- Import dialog support — user-imported MTP-capable models can declare and toggle the capability
- Observability —
speculative_decodingfield on/v1/models,ollitert_model_speculative_decoding_enabledPrometheus gauge, MTP pill on the Status screen, Home Assistant sensor config - Gemma 4 E2B / E4B — model files updated to MTP-enabled variants,
updatableModelFilescarries existing users forward - Documentation — capability rows added to model tables, FAQ entry explaining what speculative decoding is, allowlist schema doc updated
- See What is speculative decoding / MTP for more information
Note
Speculative decoding requires to re-download already downloaded Gemma-4 models from previous version. Update button will automatically appear upon installing this version. Downloading new Gemma-4 models will automatically download latest version with speculative decoding support.
NPU / TPU Accelerator Support
- Pixel TPU support for imported models — NPU offered as a selectable accelerator at model import time
- Pixel device renaming — accelerator labels and descriptions show "TPU" on all Pixel devices via
isPixelDevice()
KV Cache Reuse Across Conversation Turns
- Incremental dispatch — when consecutive chat-completion requests on the same model share system prompt and tools, only the new user turn is dispatched to the SDK so the LiteRT-LM KV cache is preserved (substantial latency reduction on long multi-turn conversations)
- Strict invalidation — cache is dropped on any inference error, on tool-use turns, on multimodal turns, on size mismatch, or when the system prompt or tool set changes
- Auditable decisions — verbose-debug logs every per-request
request_incremental decision=EXTEND|RESET reason=…line for diagnostics
Anthropic Messages API (Experimental)
/v1/messagesendpoint — non-streaming and streaming, mirrors Anthropic's Messages API includingmessage_start→content_block_*→message_delta→message_stopSSE sequence/v1/messages/count_tokensendpoint — works with no model loaded, uses the same character-based token estimator as the rest of the serverx-api-keyauth — accepted alongsideAuthorization: Bearerso Anthropic SDKs work without a server-side proxy- Per-request thinking override — Anthropic
thinking.type=enabled|disabledoverrides the model default, silently downgraded when the model has no thinking capability pingheartbeat events — emitted every 10 s during prefill so SDK clients (notably Claude Code) don't time out before the first token on slow on-device prefill- Anthropic-shaped error envelope — selection failures and mid-stream errors render
{"type":"error","error":{type,message}}with propererror.typemapping - Anthropic request counter — Status screen and Prometheus distinguish Anthropic vs OpenAI traffic
- Documentation — new sections in
CLIENT_SETUP.md,API.md, andHOME_ASSISTANT.mdcovering the request/response shape, the SSE event sequence, Claude Code env-var setup, and Python/TypeScript SDK snippets
Warning
Known issue with native tool calling — the LiteRT-LM SDK's ANTLR function-call parser (0.11.0 / 0.12.0) rejects Gemma-4 outputs containing quoted strings inside tool arguments (e.g. Bash commands, Edit old_string, fetched URLs), surfacing as HTTP 500. This impacts every Anthropic tool-using client. Workaround: disable Settings → Schema Injection to fall back to the prompt-based parser. Tracking LiteRT-LM #2418.
Note
While this allows you to connect it to Claude Code, it is not recommended due to the large system prompt from Claude Code that consumes most of the context window. Using alternative harnesses like Pi Agent is a better option.
Advanced Settings — Configurable Timeouts
- Collapsible Advanced Settings card with 7 configurable timeouts:
- chat completions
- responses
- streaming
- blocking
- warmup
- keep-alive recheck
- cleanup await
Tip
Used for setups where response might take longer to generate, than default timeouts (e.g. Vibe coding with harnesses like Pi.dev or Claude Code)
GPU Unavailability Awareness
- Onboarding popup — devices with no accessible OpenCL (e.g. Pixel 5) see a one-time dialog after Getting Started explaining the CPU fallback and the LiteRT-LM sampler limitation
- Server-start popup — dismissible "Don't show again" dialog for users who skipped onboarding
- Grayed-out GPU toggle — accelerator picker disables GPU and shows a "Tap for more information" link to the same dialog
- Automatic CPU fallback — model's configured GPU accelerator is downgraded to CPU when OpenCL is inaccessible
Localhost Connectivity
- Loopback fallback — when phone is not connected to Wi-Fi , the Status screen and "Copy URL" surface
http://localhost:<port>so on-device clients (e.g Termux, web browsers) can still connect. - Status subtitle — endpoint card explains that server is currently reachable only from this device
Miscellaneous
- Cross-channel update notifications default ON for dev/beta flavour — stable users keep the existing opt-in behavior
- Always Send Usage in Streaming toggle — Settings → Metrics, defaults on. Required for Open WebUI / llama.cpp / similar clients to display per-message tokens/sec stats when they don't set
stream_options.include_usage - Resume failed model downloads — failed download cards now show last reached % with an explicit Retry button that resumes via HTTP Range request from the partial
.tmpinstead of restarting from zero - HEAD on liveness endpoints —
/,/v1,/ping,/health,/v1/healthaccept HEAD with no body - Updated LiteRT-LM to 0.12.0 — includes Speculative decoding support (MTP)
Changed
- Header redaction —
Authorization,x-api-key,Cookie, andProxy-Authorizationvalues are masked in any captured request log - Sensitive logging gated on verbose-debug — model manager and backend selection events no longer add noise to the Logs screen unless verbose debug is on
- Old model versions auto-cleaned — when a new version is confirmed on disk, the old version directory (2.5–3.6 GB each) is deleted and the freed space is logged
- Filesystem scan fallback for model resolution — when an updated allowlist's
updatableModelFilesdoesn't list the on-disk version, the server scans for the file directly so the model still loads - Magic truncation lengths replaced with named constants —
LOG_ERROR_PREVIEW_SHORT_CHARS,LOG_ERROR_PREVIEW_LONG_CHARS,STREAM_OUTER_TIMEOUT_SAFETY_BUFFER_SECONDS - Settings reload defers when model is loading — restart triggered from Settings while a load is in-flight is queued and applied after init returns instead of racing native cleanup
- Diagnostic logging on silent fallbacks — config decode, Wi-Fi enumeration, schema injection, tool-call parsing, and JSON parsing failures now log before falling back so diagnostic data isn't lost
stop_sequencefinish reason — natural STOP gets promoted toSTOP_SEQUENCEonly when a stop string actually matched, plumbed through the streaming pipeline so the Anthropic response can echo the matched sequence- Log share intents — exports set explicit
EXTRA_SUBJECT,EXTRA_TITLE, andClipData.newRawUrifilename so receivers stop body-sniffing the JSON - Model update button disabled while server runs — same disabled-with-toast pattern as the benchmark button
- Empty assistant turns dropped from LiteRT initial-messages feed — prevents the SDK from emitting immediate EOS after a cancelled or empty prior response
Fixed
- Fixed model file not found after allowlist
commitHashupdates — server startup now falls back toupdatableModelFilesand a filesystem scan instead of failing - Fixed false "corrupted file" error when falling back to an older model version —
totalBytesis now updated to match the on-disk file size - Fixed
isInferringflag occasionally leaking past stream completion on long-context responses — added a guarantee path in the streaming finally block - Fixed stale "requires model up...
OlliteRT v0.9.5-beta.1
OlliteRT v0.9.5-beta.1
Native tool calling, Ktor HTTP server, multi-repo model sources, and 500+ improvements
Added
Native Tool Calling (Schema Injection)
- Schema injection mode — tool schemas are registered directly with the LiteRT SDK for structured output, producing significantly more reliable tool calls than prompt-based parsing in 0.9.0-beta.1, see demo with Home Assistant Integration
- Real-time streaming with tools — stream tokens in real-time even when native tool calling is active
- Tool call indicator — log cards show a tool badge when the response contains tool calls
- Tools capability — models with native tool calling support now show tools capability chip in Model Cards
- Tools filter — filter the Models screen to show only models that support tool calling
Note
Native tool calling is currently supported only by Gemma-4 models
Multi-Repository Model Sources
Model sources are independently-hosted model lists — similar to how F-Droid repositories work for apps. Each source provides a set of models that OlliteRT refreshes automatically for new models. Once added, new models appear on the Models screen as they're published — no app update required, as long as the bundled SDK supports them. See SDK Compatibility.
- Multiple model sources — add, enable, disable, and remove custom model sources independently in Model Sources screen
- Add sources from file or URL — the + button now offers both a local JSON file picker and URL input
- Repository detail screen — tap any source to see all models it provides, including incompatible ones (greyed out with reason)
- Incompatible model visibility — sources show "N models · M hidden" when some models require a newer app version
- Model deduplication — models with same name across sources are shown only once — Official Source takes priority
Cross-Channel Update Notifications
- Cross-channel awareness — get notified about beta/dev releases while on stable (or vice versa)
- Per-channel notification channels — separate Android notification channels for beta and dev releases
- Dismiss per version — dismiss a notification for a specific version without disabling all notifications
Model Behaviour Settings Card
- Dedicated card — thinking token limit, thread pool, inference timeout, idle unload, and tool calling settings grouped together
- Schema injection toggle — enable/disable native tool calling per preference
- Reject when busy — optional - return error 503 instead of queueing when inference is running
- Transcription enabled by default — force transcription prompt is now on by default, with an editable prompt to guide how the model processes audio input
Note
The transcription prompt guides the model's behavior but does not guarantee accurate transcription — results depend on model capability and audio quality. Used by clients like Open WebUI and Home Assistant when sending audio input. Home Assistant requires a custom integration — see Voice Transcription (STT) for setup.
Monitoring & Metrics
- Processing indicator — status pill now shows real-time Processing state during inference
- Request count in notification — optional live request counter in the foreground notification
Miscellaneous
- Open-source licenses — viewable from Settings footer alongside Privacy Policy
Changed
Model Import Improvements
- Rename after import — editable model name post-import
- Name deduplication — conflicts with built-in models require renaming before import
- Info banner — import dialog shows a disclaimer about default inference settings applied upon import
- Max tokens beyond slider range — manually type a max_tokens value higher than the slider allows, for models that could support larger context window than 32K
- Allowlist schema expanded — new fields for source metadata, tool/thinking capabilities, badges, version gating, and model updates. Backwards compatible — older app versions ignore unknown fields. See Model Allowlist Schema
Performance & Reliability
- Ktor CIO server — replaces NanoHTTPD; proper coroutine-based request handling, robust streaming, native multipart
- kotlinx.serialization everywhere — removed Gson, Moshi, and org.json dependencies; single JSON library
- R8 strips debug logging —
Log.dandLog.vcalls removed from release builds - Gradle build optimizations — parallel, caching, configuration cache, incremental KSP
- AGP 9.2.0, Gradle 9.4.1, Kotlin 2.3.20 — Updated to latest toolchain
- Compose BOM 2026.03.01 — latest Compose runtime
- Navigation Compose 2.9.7 — latest nav library
Stability & Crash Fixes
- OOM isolation — request body parsing OOM no longer destroys the loaded model
- Streaming cancellation — client disconnects now properly halt native inference during prefill
- Executor lifecycle — proper drain-before-cleanup prevents race conditions on service destroy
- Idle unload thread safety — inference lock properly protects model state transitions
- ANR prevention — all DataStore reads moved off main thread; model resolution dispatched to IO
- Crash prevention hardening — safety guards added across startup, service lifecycle, and native resource paths
API Compliance
paramfield in error responses — matches OpenAI error format- JSON control character escaping — SSE output properly escapes
\r,\t, etc. - Stable
createdtimestamp —/v1/modelsuses model load time, not current time content: nullserialization — empty ChatContent serializes as null per spec- Streaming for /v1/completions — text completions now support SSE streaming (previously chat-only)
stream_options.include_usage— token usage stats in the final SSE chunk when requested- Input value clamping — sampler parameters (temperature, top_p, top_k, max_tokens) clamped to valid ranges in both inference and REST API endpoints
- Request body limit raised — 10 MB → 50 MB (supports large multimodal payloads)
Warning
Sending very large requests to low-RAM devices may cause Android to kill the app due to out-of-memory pressure.
Model Management
- Capability toggles for Tools — set tools support during import and toggle post-import in Inference settings
- Version filtering — models can specify minimum app version; incompatible models shown greyed out
- Badge system — data-driven badges (best_overall, new, fastest) from allowlist metadata
- Pinned recommendations — recommended models pinned above available list
- Pull-to-refresh — swipe down on Models screen to refresh sources and storage indicator
- Self-diagnosing empty states — when no models appear, tells you exactly why (version filter, all disabled, no sources)
- User-friendly download errors — network failures show descriptive messages (timeout, no internet, connection lost) instead of raw exception text
- Search highlighting in model cards — matching text highlighted in model descriptions when searching
Settings & UI
- Benchmark error dialog — shows a clear error message when benchmarking fails instead of silently producing no results
- Getting Started screen redesigned — improved layout, clearer step descriptions, and responsive scaling for different screen sizes
- Settings card order revised — cards reordered for a more logical workflow-
- Model Behaviour card — inference-affecting settings grouped separately from UI prefs
- Context Management card — history truncation and prompt trimming in dedicated section
- Updates card — version checking isolated from other settings
- Range validation with visual feedback — inference settings show inline errors for out-of-range values
- Auto-save on settings reset — resetting inference settings to defaults now saves immediately with toast confirmation
- CORS status indicator — Status screen shows CORS as disabled when origins field is empty
Logs & Monitoring
- Tool call badge — log cards indicate when a response used tool calling
- Pending queue status — queued request cards in Logs screen show Pending in queue instead of Generating...
- Improved request logging — consistent status codes and visual indicators across all request outcomes
- Timestamp on processing logs — log cards show timestamp footer while requests are still in progress
- Immediate queue cancellation — queued requests can be cancelled before they start processing
- Clear logs confirmation — confirmation dialog when clearing logs while requests are in progress
- Stop server confirmation — confirmation dialog when stopping the server while requests are active
- Hide health check logs — toggle to suppress /health noise from logs
- Compact image data — base64 payloads collapsed in log display to prevent UI freezes
- **Wrap log text...
OlliteRT v0.9.0-beta.1
Important
This is a beta release. The beta and stable flavors use different application IDs and install side-by-side — they do not share data. When the first stable release ships, you will need to install the stable APK separately and re-download your models.
Features
Core
- Hardware-accelerated inference — runs on your phone's GPU or CPU via Google's LiteRT LM runtime
- Streaming — SSE and non-streaming response modes
- Configurable listen port — default 8000, binds to all interfaces
- Keep-alive idle timeout — (configurable) auto-unloads model after inactivity, reloads on next request
Multimodal and Reasoning
- Vision — send images as base64 data URIs in chat messages
- Audio — inline audio or Whisper-compatible
/v1/audio/transcriptionsendpoint with automatic stereo-to-mono downmix - Thinking — chain-of-thought mode with
<think>tag output (Gemma 4) - Tool calling — (experimental) runtime tool schemas injected via system prompt
Models
- One-tap download — grab models from HuggingFace, import
.litertlmfrom local storage, or add custom model sources via JSON URL with ~24h auto-refresh - Search and sort — filter models by name, sort by size, alphabetical, or default order
- Per-model inference settings — temperature, top-K, top-P, max tokens, thinking mode, system prompt
- Accelerator selection — choose GPU or CPU per model
- Model updates — automatic detection with notifications and per-model update indicators
- Benchmarking — prefill speed, decode speed, TTFB, init time with shareable results
Always On
- Auto-start on boot and app launch — (configurable) server launches automatically with your configured default model
- Foreground notification — Stop Server and Copy URL quick actions
- Battery optimization exemption — prompt to prevent Android from killing the service
Server Configuration
- Authentication — optional bearer token auth and CORS support
- Custom system prompts — global and per-model
- Client sampler override — force server-side temperature/top-k/top-p
- Context management — (configurable) automatic overflow handling: truncate history, compact tool schemas, trim prompt
- Log persistence — local database with configurable retention and auto-pruning
Monitoring and Observability
- Status screen — model name, uptime, request count, decode speed, TTFB, context utilization
- Logs screen — per-request cards with timing, token counts, expandable bodies, JSON highlighting, real-time preview, search, filtering, and log export
- Prometheus metrics —
/metricsendpoint with 29 metrics (memory, throughput, latency, errors) - Health endpoint — extended metrics for Home Assistant REST sensors
- Remote server control — REST API endpoints for server control via Home Assistant
App
- Automatic update checks — via GitHub Releases
- HuggingFace OAuth — sign in to download gated models
- Report Issue — autofills GitHub issue template with relevant device info
Integrations
| Integration | Support |
|---|---|
| Home Assistant | Conversation agent, voice STT, REST sensors and commands, copy HA YAML config from Settings |
| Prometheus | /metrics endpoint — connect your own Grafana or monitoring stack |
| Any OpenAI client | Python SDK, curl, LiteLLM, Open WebUI, etc. |
See the Client Setup guide, Home Assistant docs, and Prometheus docs for details.
Requirements
- Android 12+ (API 31)
- arm64-v8a
- 6 GB RAM minimum (text-only), 8 GB+ recommended (multimodal)
Known Limitations
- Single model, single request — one loaded at a time, requests queue sequentially
- Tool calling is prompt-based — works best with Gemma 4 models
- Token counts are estimated (~4 chars/token) due to LiteRT SDK limitations
Note
Found a bug? Open an issue — beta feedback helps shape the stable release.