Arcane OS Docs Development only

Reference

Arcane.ollama.saveServiceSettings()

Saves managed service settings.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.ollama.saveServiceSettings(settings)

Parameters

settings: OllamaServiceSettingsInput

Return value

Promise<OllamaServiceSettingsResult>

Description

Saves managed service settings.

Overview

Arcane.ollama.saveServiceSettings(settings) applies host-level Ollama service settings. It can restart the managed service, unload models, clamp requested parallel/load values to current capacity, and affect every local client. Use it only in advanced Settings with explicit machine-wide impact disclosure.

Parameters

Omitted fields receive defaults rather than preserving current values, so send the complete desired object. contextLength is 0-262,144; keepAlive is "-1", "0", or 1-9,999 plus m or h; maxLoadedModels is 0-16; numParallel is 1-16; maxQueue is 1-4,096; flashAttention and noCloud are Booleans; and kvCacheType is "f16", "q8_0", or "q4_0". Defaults are 0, "5m", 1, 1, 512, false, "f16", and true respectively. Unknown keys are ignored and should not be sent.

Return value

It resolves to the native platform result plus a completed ArcaneOperation. Microsoft NT reports requested and effective values, support/clamping detail, restart state, recommendation, and post-change health. Require healthy === true when that field is present.

Availability

This is a privileged, exclusive desktop Core Settings method requiring ai.settings.manage. Microsoft NT currently applies the managed change. Linux rejects with OLLAMA_SERVICE_SETTINGS_MANUAL because the systemd override is administrator-managed. Android does not expose it.

Errors and recovery

Correct invalid ranges and enums before calling. Unsupported/manual-platform, managed-service health, installation-lease, apply, restart, postcondition, and rollback errors require the stable resolution. After an uncertain completion, read serviceSettings() and local status before another mutation. Never edit service files or environment from renderer code.

Streaming, cancellation, and events

The workflow emits standard operation lifecycle and progress events, not raw provider chunks. It uses a 50-minute renderer timeout and has no signal. Core does not cooperatively cancel it; timeout or page teardown can occur while the machine-wide transaction continues.

Example

The helper sends a complete desired state and is deliberately not invoked until the Settings application has obtained explicit restart confirmation.

async function saveServiceSettingsAfterConfirmation(desired) {
    return globalThis.Arcane.ollama.saveServiceSettings({
        contextLength: desired.contextLength,
        keepAlive: desired.keepAlive,
        maxLoadedModels: desired.maxLoadedModels,
        numParallel: desired.numParallel,
        maxQueue: desired.maxQueue,
        flashAttention: desired.flashAttention,
        kvCacheType: desired.kvCacheType,
        noCloud: desired.noCloud
    });
}

Reference group

AI and Ollama

Repository and reviewed source access