Skip to content

Commit 1152dcc

Browse files
Kotlin: add GENIE + QNN_CONTEXT branches to archive-extraction when expressions
PR #462 adds InferenceFramework.GENIE and ModelFormat.QNN_CONTEXT enum values. The two when expressions in RunAnywhere+ModelManagement.jvmAndroid.kt that translate Kotlin enum → CppBridgeModelRegistry constants were missed during the merge, breaking :compileKotlinJvm with 'when must be exhaustive' errors. Adding the explicit branches. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d37305b commit 1152dcc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sdk/runanywhere-kotlin/src/jvmAndroidMain/kotlin/com/runanywhere/sdk/public/extensions/RunAnywhere+ModelManagement.jvmAndroid.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,13 +722,15 @@ actual fun RunAnywhere.downloadModel(modelId: String): Flow<DownloadProgress> {
722722
InferenceFramework.FLUID_AUDIO -> CppBridgeModelRegistry.Framework.FLUID_AUDIO
723723
InferenceFramework.BUILT_IN -> CppBridgeModelRegistry.Framework.BUILTIN
724724
InferenceFramework.NONE -> CppBridgeModelRegistry.Framework.NONE
725+
InferenceFramework.GENIE -> CppBridgeModelRegistry.Framework.GENIE
725726
InferenceFramework.UNKNOWN -> CppBridgeModelRegistry.Framework.UNKNOWN
726727
}
727728
val racFormat = when (modelInfo.format) {
728729
ModelFormat.GGUF -> CppBridgeModelRegistry.ModelFormat.GGUF
729730
ModelFormat.ONNX -> CppBridgeModelRegistry.ModelFormat.ONNX
730731
ModelFormat.ORT -> CppBridgeModelRegistry.ModelFormat.ORT
731732
ModelFormat.BIN -> CppBridgeModelRegistry.ModelFormat.BIN
733+
ModelFormat.QNN_CONTEXT -> CppBridgeModelRegistry.ModelFormat.QNN_CONTEXT
732734
ModelFormat.UNKNOWN -> CppBridgeModelRegistry.ModelFormat.UNKNOWN
733735
}
734736
val extractedPath = extractArchive(downloadedFile, modelId, racFramework, racFormat, downloadLogger)

0 commit comments

Comments
 (0)