Arcane OS Docs Development only

Reference

Arcane.ollama.saveSettings()

Saves only runtime-owned default-model, boot-load, keep-alive, and context settings.

  • Reference

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

Syntax

Arcane.ollama.saveSettings(settings)

Parameters

settings: ArcaneAISettingsInput

Return value

Promise<ArcaneAISettingsResult>

Description

Saves only runtime-owned default-model, boot-load, keep-alive, and context settings.

Overview

Arcane.ollama.saveSettings(settings) saves runtime-owned Ollama defaults. Use it for default model, managed startup load, residency, and context. Use select() for the size preference and ai.saveProviderSettings() for provider, OpenAI model, credential, and response length.

Parameters

Recognized fields are defaultModel, bootLoad, bootKeepAlive, and contextLength; omissions preserve current values. defaultModel uses the Ollama name pattern. bootLoad is Boolean. bootKeepAlive is "5m", "30m", "1h", "24h", or "-1". contextLength is 0 for Automatic or 1,024-262,144. Unknown keys, including stale provider/preference fields, are ignored so they cannot overwrite newer provider selection; do not send them.

Return value

It resolves to the complete updated ArcaneModelSelection settings snapshot plus a completed operation. It does not return selection-only mutation fields such as created, baseModel, or aliasChanged.

Availability

This is an exclusive desktop Core Settings mutation requiring ai.settings.manage. When Ollama is selected, the default model must be installed. Enabling boot load performs resource admission and loads the model. Android does not expose this method.

Errors and recovery

Correct invalid model, keep-alive, or context values locally. A missing default model, native-admission failure, load failure, or persistence error requires the stable resolution and a fresh settings read before retry. Unknown stale fields are intentionally ignored rather than validated.

Streaming, cancellation, and events

The save emits standard operation events but no provider chunks. It uses the 50-minute renderer timeout and has no signal. Core does not cooperatively cancel the mutation, so refresh settings() after an uncertain completion.

Example

The helper fetches current state and changes only runtime-owned fields. It is not invoked until an admitted Settings UI has confirmed the desired values.

async function saveRuntimeSettingsAfterConfirmation(desired) {
    return globalThis.Arcane.ollama.saveSettings({
        defaultModel: desired.defaultModel,
        bootLoad: desired.bootLoad,
        bootKeepAlive: desired.bootKeepAlive,
        contextLength: desired.contextLength
    });
}

Reference group

AI and Ollama

Repository and reviewed source access