On this page
Overview
Recognizes Ollama model identifier syntax and compares ordinary resident-model aliases without changing requests.
- Artifact
OllamaModelIdentifier.js· esm - Classification
public first party - Availability
Cross-host - Normalization
Exact identifier/null or boolean results; alias comparison applies Ollama's default registry, namespace and tag without changing either input.
Import and lifecycle
import * as module from '/node_modules/arcane-os/runtime/arcane/modules/OllamaModelIdentifier.js';
Pure syntax recognition and name comparison; performs no I/O or model loading and does not change outbound requests.
Application-facing behavior: normalizeOllamaModelIdentifier(), isOllamaModelIdentifier(), sameOllamaModelIdentifier(left, right).
Protocol and host implementation
In-process only This detail does not widen the application-facing API or grant authority.
Exports, signatures, parameters, and results
| Binding | Form | Declaration or signature | Parameter syntax |
|---|---|---|---|
normalizeOllamaModelIdentifier | function | function normalizeOllamaModelIdentifier(value) | value |
isOllamaModelIdentifier | function | function isOllamaModelIdentifier(value) | value |
sameOllamaModelIdentifier | function | function sameOllamaModelIdentifier(left,right) | left,right |
| Callable | Kind | Exact public signature | Parameter syntax |
|---|---|---|---|
normalizeOllamaModelIdentifier | exported-function | function normalizeOllamaModelIdentifier(value) | value |
isOllamaModelIdentifier | exported-function | function isOllamaModelIdentifier(value) | value |
sameOllamaModelIdentifier | exported-function | function sameOllamaModelIdentifier(left,right) | left,right |
Parameter meanings and results
normalizeOllamaModelIdentifier(value) returns the exact accepted identifier or null, including null for surrounding whitespace; isOllamaModelIdentifier(value) returns boolean. sameOllamaModelIdentifier(left,right) compares strings case-insensitively with the default registry.ollama.ai host, library namespace and latest tag. Explicit different hosts, namespaces and tags remain distinct; non-string inputs return false. Comparison does not rewrite either input or establish model residency.
Events, side effects, and errors
Source-literal CustomEvent dispatches
No source-literal CustomEvent dispatch is part of this artifact.
Lifecycle and event flow
This artifact has no additional documented lifecycle event flow.
Direct coded failures
This artifact directly assigns no stable coded failure.
Exported Error subclasses
This artifact exports no Error subclass.
Documented failure behavior
No additional module-specific rejection behavior is documented.
Availability and capabilities
Cross-host. Exact identifier/null or boolean results; alias comparison applies Ollama's default registry, namespace and tag without changing either input.
None.
Contract example
import {sameOllamaModelIdentifier} from '/node_modules/arcane-os/runtime/arcane/modules/OllamaModelIdentifier.js';
console.log(sameOllamaModelIdentifier('moon-cheese', 'registry.ollama.ai/library/moon-cheese:latest'));
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.