ModelInfo class


Core metadata for a model entry. Sources pre-IDL: Swift ModelTypes.swift:393 (16 fields) Kotlin ModelTypes.kt:332 (16 fields, Long vs Int drift on download size) Dart model_types.dart:335 (similar shape, nullable divergences) RN HybridRunAnywhereCore.cpp:995-1010 (13 fields, string-typed category/format)

Available extensions

Constructors

ModelInfo({String? id, String? name, ModelCategory? category, ModelFormat? format, InferenceFramework? framework, String? downloadUrl, String? localPath, Int64? downloadSizeBytes, int? contextLength, bool? supportsThinking, bool? supportsLora, ModelSource? source, Int64? createdAtUnixMs, Int64? updatedAtUnixMs, Int64? memoryRequiredBytes, String? checksumSha256, ThinkingTagPattern? thinkingPattern, ModelInfoMetadata? metadata, SingleFileArtifact? singleFile, ArchiveArtifact? archive, MultiFileArtifact? multiFile, String? customStrategyId, bool? builtIn, ModelArtifactType? artifactType, ExpectedModelFiles? expectedFiles, AccelerationPreference? accelerationPreference, RoutingPolicy? routingPolicy, ModelRuntimeCompatibility? compatibility, InferenceFramework? preferredFramework, ModelRegistryStatus? registryStatus, bool? isDownloaded, bool? isAvailable, Int64? lastUsedAtUnixMs, int? usageCount, bool? syncPending, String? statusMessage})
factory
ModelInfo.fromBuffer(List<int> data, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY])
factory
ModelInfo.fromJson(String json, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY])
factory

Properties

accelerationPreference AccelerationPreference
Preferred hardware acceleration backend for this model.
getter/setter pair
archive ArchiveArtifact
getter/setter pair
artifactType ModelArtifactType
High-level artifact classification, complementary to the artifact oneof above. Allows catalog entries to carry a coarse type tag without resolving the full strategy variant.
getter/setter pair
builtIn bool
getter/setter pair
category ModelCategory
getter/setter pair
checksumSha256 String
Lowercase hex SHA-256 checksum for the primary artifact. Per-file checksums for multi-file artifacts live on ModelFileDescriptor.
getter/setter pair
compatibility ModelRuntimeCompatibility
Framework/format compatibility declarations. framework (field 5) is the canonical/preferred runtime when no explicit preferred_framework is set.
getter/setter pair
contextLength int
getter/setter pair
createdAtUnixMs ↔ Int64
getter/setter pair
customStrategyId String
getter/setter pair
downloadSize int?

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
downloadSizeBytes ↔ Int64
getter/setter pair
downloadUri Uri?

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
downloadUrl String
Portable URL/URI string for catalog metadata and download planning. SDK/platform adapters own native HTTP execution, authentication/session state, browser fetch handles, URLSession/background-transfer objects, and permission prompts.
getter/setter pair
expectedFiles ExpectedModelFiles
Manifest of files that are expected on disk after fetch/extraction.
getter/setter pair
format ModelFormat
getter/setter pair
framework InferenceFramework
getter/setter pair
hashCode int
Calculates a hash code based on the contents of the protobuf.
no setterinherited
id String
getter/setter pair
info_ → BuilderInfo
no setter
isAvailable bool
getter/setter pair
isAvailable bool

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
isBuiltIn bool

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
isDownloaded bool

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
isDownloaded bool
getter/setter pair
isFrozen bool
Returns true if this message is marked read-only. Otherwise false.
no setterinherited
lastUsedAtUnixMs ↔ Int64
getter/setter pair
localFilePath String?

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
localPath String
Stable path or URI string after platform adapters have normalized native file handles. Do not place Android SAF/content URI permissions, iOS security-scoped bookmarks, browser FileSystemHandle objects, or other OS-governed capabilities in this C++-owned metadata field.
getter/setter pair
memoryRequiredBytes ↔ Int64
Separate from download_size_bytes: this is the estimated runtime RAM requirement used by compatibility checks and model selection UIs.
getter/setter pair
metadata ModelInfoMetadata
Structured public catalog metadata, including the model description.
getter/setter pair
multiFile MultiFileArtifact
getter/setter pair
name String
getter/setter pair
nullableContextLength int?

Available on ModelInfo, provided by the ProtoModelInfoHelpers extension

no setter
preferredFramework InferenceFramework
getter/setter pair
registryStatus ModelRegistryStatus
Durable registry state. Live byte progress belongs to download_service.DownloadProgress, not ModelInfo.
getter/setter pair
routingPolicy RoutingPolicy
Hybrid (on-device vs cloud) routing policy for this entry.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
singleFile SingleFileArtifact
getter/setter pair
source ModelSource
getter/setter pair
statusMessage String
getter/setter pair
supportsLora bool
getter/setter pair
supportsThinking bool
getter/setter pair
syncPending bool
getter/setter pair
thinkingPattern ThinkingTagPattern
Thinking/reasoning metadata. supports_thinking remains the boolean capability flag; this optional pattern declares model-specific tags.
getter/setter pair
unknownFields → UnknownFieldSet
no setterinherited
updatedAtUnixMs ↔ Int64
getter/setter pair
usageCount int
getter/setter pair

Methods

addExtension(Extension extension, Object? value) → void
Adds an extension field value to a repeated field.
inherited
check() → void
Throws a StateError if the message has required fields without a value.
inherited
clear() → void
Clears all data that was set in this message.
inherited
clearAccelerationPreference() → void
clearArchive() → void
clearArtifact() → void
clearArtifactType() → void
clearBuiltIn() → void
clearCategory() → void
clearChecksumSha256() → void
clearCompatibility() → void
clearContextLength() → void
clearCreatedAtUnixMs() → void
clearCustomStrategyId() → void
clearDownloadSizeBytes() → void
clearDownloadUrl() → void
clearExpectedFiles() → void
clearExtension(Extension extension) → void
Clears an extension field and also removes the extension.
inherited
clearField(int tagNumber) → void
Clears the contents of a given field.
inherited
clearFormat() → void
clearFramework() → void
clearId() → void
clearIsAvailable() → void
clearIsDownloaded() → void
clearLastUsedAtUnixMs() → void
clearLocalPath() → void
clearMemoryRequiredBytes() → void
clearMetadata() → void
clearMultiFile() → void
clearName() → void
clearPreferredFramework() → void
clearRegistryStatus() → void
clearRoutingPolicy() → void
clearSingleFile() → void
clearSource() → void
clearStatusMessage() → void
clearSupportsLora() → void
clearSupportsThinking() → void
clearSyncPending() → void
clearThinkingPattern() → void
clearUpdatedAtUnixMs() → void
clearUsageCount() → void
clone() ModelInfo
Creates a deep copy of the fields in this message.
copyWith(void updates(ModelInfo)) ModelInfo
Apply updates to a copy of this message.
createEmptyInstance() ModelInfo
Creates an empty instance of the same message type as this.
deepCopy() → T

Available on T, provided by the GeneratedMessageGenericExtensions extension

Returns a writable deep copy of this message.
ensureArchive() ArchiveArtifact
ensureCompatibility() ModelRuntimeCompatibility
ensureExpectedFiles() ExpectedModelFiles
ensureMetadata() ModelInfoMetadata
ensureMultiFile() MultiFileArtifact
ensureSingleFile() SingleFileArtifact
ensureThinkingPattern() ThinkingTagPattern
extensionsAreInitialized() bool
inherited
freeze() → GeneratedMessage
Make this message read-only.
inherited
getDefaultForField(int tagNumber) → dynamic
Returns the default value for the given field.
inherited
getExtension(Extension extension) → dynamic
Returns the value of extension.
inherited
getField(int tagNumber) → dynamic
Returns the value of the field associated with tagNumber, or the default value if it is not set.
inherited
getFieldOrNull(int tagNumber) → dynamic
Returns the value of a field, ignoring any defaults.
inherited
getTagNumber(String fieldName) int?
inherited
hasAccelerationPreference() bool
hasArchive() bool
hasArtifactType() bool
hasBuiltIn() bool
hasCategory() bool
hasChecksumSha256() bool
hasCompatibility() bool
hasContextLength() bool
hasCreatedAtUnixMs() bool
hasCustomStrategyId() bool
hasDownloadSizeBytes() bool
hasDownloadUrl() bool
hasExpectedFiles() bool
hasExtension(Extension extension) bool
Returns true if a value of extension is present.
inherited
hasField(int tagNumber) bool
Whether this message has a field associated with tagNumber.
inherited
hasFormat() bool
hasFramework() bool
hasId() bool
hasIsAvailable() bool
hasIsDownloaded() bool
hasLastUsedAtUnixMs() bool
hasLocalPath() bool
hasMemoryRequiredBytes() bool
hasMetadata() bool
hasMultiFile() bool
hasName() bool
hasPreferredFramework() bool
hasRegistryStatus() bool
hasRequiredFields() bool
Whether the message has required fields.
inherited
hasRoutingPolicy() bool
hasSingleFile() bool
hasSource() bool
hasStatusMessage() bool
hasSupportsLora() bool
hasSupportsThinking() bool
hasSyncPending() bool
hasThinkingPattern() bool
hasUpdatedAtUnixMs() bool
hasUsageCount() bool
isInitialized() bool
Whether all required fields in the message and embedded messages are set.
inherited
mergeFromBuffer(List<int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges serialized protocol buffer data into this message.
inherited
mergeFromCodedBufferReader(CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Same as mergeFromBuffer, but takes a CodedBufferReader input.
inherited
mergeFromJson(String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from data, a JSON object, encoded as described by GeneratedMessage.writeToJson.
inherited
mergeFromJsonMap(Map<String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from a JSON object represented as a Dart map.
inherited
mergeFromMessage(GeneratedMessage other) → void
Merges the contents of the other into this message.
inherited
mergeFromProto3Json(Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void
Merges field values from json, a JSON object using proto3 encoding.
inherited
mergeUnknownFields(UnknownFieldSet unknownFieldSet) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebuild(void updates(T)) → T

Available on T, provided by the GeneratedMessageGenericExtensions extension

Apply updates to a copy of this message.
setExtension(Extension extension, Object value) → void
Sets the value of a non-repeated extension field to value.
inherited
setField(int tagNumber, Object value) → void
Sets the value of a field by its tagNumber.
inherited
toBuilder() → GeneratedMessage
Creates a writable, shallow copy of this message.
inherited
toDebugString() String
Returns a String representation of this message.
inherited
toProto3Json({TypeRegistry typeRegistry = const TypeRegistry.empty()}) Object?
Returns an Object representing Proto3 JSON serialization of this.
inherited
toString() String
Returns a String representation of this message.
inherited
whichArtifact() ModelInfo_Artifact
writeToBuffer() Uint8List
Serialize the message as the protobuf binary format.
inherited
writeToCodedBufferWriter(CodedBufferWriter output) → void
Same as writeToBuffer, but serializes to the given CodedBufferWriter.
inherited
writeToJson() String
Returns a JSON string that encodes this message.
inherited
writeToJsonMap() Map<String, dynamic>
Returns the JSON encoding of this message as a Dart Map.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create() ModelInfo
getDefault() ModelInfo