feat(react-native): added model compatibility checks to React Native SDK#318
feat(react-native): added model compatibility checks to React Native SDK#318JoshuaChil wants to merge 2 commits intoRunanywhereAI:mainfrom
Conversation
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 335d4c6 in 10 seconds. Click for details.
- Reviewed
447lines of code in6files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_nCYCfx4Njcr78jtM
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
📝 WalkthroughWalkthroughAdds a model compatibility feature to the RunAnywhere SDK: three new public APIs (checkModelCompatibility, checkModelsCompatibility, getDeviceCapabilities), supporting types, core implementation, re-exports, and README docs for usage examples. Changes
Sequence Diagram(s)sequenceDiagram
actor Client
participant RunAnywhere
participant CompatibilityExtension as Compatibility
participant ModelRegistry
participant NativeCore as NativeCore
participant FileSystem
Client->>RunAnywhere: checkModelsCompatibility([modelIds])
RunAnywhere->>Compatibility: checkModelsCompatibility(models)
Compatibility->>NativeCore: getDeviceInfo()
NativeCore-->>Compatibility: device specs (memory, cpu, chip, gpu/npu)
Compatibility->>FileSystem: getStorageInfo()
FileSystem-->>Compatibility: storage stats
Compatibility->>ModelRegistry: resolve model info (for each modelId)
ModelRegistry-->>Compatibility: ModelInfo
Compatibility->>Compatibility: performCompatibilityCheck(model, device)
Compatibility-->>RunAnywhere: aggregated results
RunAnywhere-->>Client: Promise resolves with compatibility map
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| export type { | ||
| ModelCompatibilityResult, | ||
| DeviceCapabilities, | ||
| } from './CompatibilityTypes' No newline at end of file |
There was a problem hiding this comment.
missing semicolon at end of export statement
| } from './CompatibilityTypes' | |
| } from './CompatibilityTypes'; |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/types/index.ts
Line: 152:152
Comment:
missing semicolon at end of export statement
```suggestion
} from './CompatibilityTypes';
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| checkModelCompatibility, | ||
| checkModelsCompatibility, | ||
| getDeviceCapabilities, | ||
| } from './RunAnywhere+Compatibility'; No newline at end of file |
There was a problem hiding this comment.
missing semicolon at end of export statement
| } from './RunAnywhere+Compatibility'; | |
| } from './RunAnywhere+Compatibility'; |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/Public/Extensions/index.ts
Line: 158:158
Comment:
missing semicolon at end of export statement
```suggestion
} from './RunAnywhere+Compatibility';
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.|
|
||
|
|
There was a problem hiding this comment.
unnecessary blank lines at start of file - remove for consistency with other SDK files
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/types/CompatibilityTypes.ts
Line: 1:2
Comment:
unnecessary blank lines at start of file - remove for consistency with other SDK files
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| function calculateRequiredStorage(model: ModelInfo): number { | ||
| const baseStorage = model.downloadSize || model.memoryRequired || 0; | ||
| return Math.ceil(baseStorage * STORAGE_MULTIPLIER); | ||
| } No newline at end of file |
There was a problem hiding this comment.
missing newline at end of file
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Compatibility.ts
Line: 244:244
Comment:
missing newline at end of file
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| function calculateRequiredMemory(model: ModelInfo): number { | ||
| // Use memoryRequired if available, otherwise estimate from download size | ||
| const baseMemory = model.memoryRequired || model.downloadSize || 0; | ||
| return Math.ceil(baseMemory * MEMORY_MULTIPLIER); |
There was a problem hiding this comment.
models with zero memoryRequired and downloadSize will return 0, causing incorrect compatibility checks - add validation or fallback
function calculateRequiredMemory(model: ModelInfo): number {
const baseMemory = model.memoryRequired || model.downloadSize || 0;
if (baseMemory === 0) {
logger.warning(`Model ${model.id} has no memory/size data - cannot check compatibility`);
}
return Math.ceil(baseMemory * MEMORY_MULTIPLIER);
}Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Compatibility.ts
Line: 232:235
Comment:
models with zero `memoryRequired` and `downloadSize` will return 0, causing incorrect compatibility checks - add validation or fallback
```typescript
function calculateRequiredMemory(model: ModelInfo): number {
const baseMemory = model.memoryRequired || model.downloadSize || 0;
if (baseMemory === 0) {
logger.warning(`Model ${model.id} has no memory/size data - cannot check compatibility`);
}
return Math.ceil(baseMemory * MEMORY_MULTIPLIER);
}
```
How can I resolve this? If you propose a fix, please make it concise.| checkModelCompatibility: Compatibility.checkModelCompatibility, | ||
| checkModelsCompatibility: Compatibility.checkModelsCompatibility, | ||
| getDeviceCapabilities: Compatibility.getDeviceCapabilities, |
There was a problem hiding this comment.
inconsistent indentation - uses 4 spaces instead of 2 spaces like rest of file
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/Public/RunAnywhere.ts
Line: 708:710
Comment:
inconsistent indentation - uses 4 spaces instead of 2 spaces like rest of file
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| /** Memory multiplier for model loading (typically 1.5x model size) */ | ||
| const MEMORY_MULTIPLIER = 1.5; | ||
|
|
||
| /** Storage multiplier for extraction/temp files (1.2x download size) */ | ||
| const STORAGE_MULTIPLIER = 1.2; |
There was a problem hiding this comment.
arbitrary multipliers (1.5x memory, 1.2x storage) noted by author - consider making these configurable or adding TODO comment explaining they need validation from maintainers
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Compatibility.ts
Line: 33:37
Comment:
arbitrary multipliers (1.5x memory, 1.2x storage) noted by author - consider making these configurable or adding TODO comment explaining they need validation from maintainers
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere`+Compatibility.ts:
- Around line 200-226: performCompatibilityCheck currently treats zero/absent
resource metadata as compatible; update it to "fail closed" by detecting when
calculateRequiredMemory(model) <= 0 or calculateRequiredStorage(model) <= 0 and
treating those cases as incompatible: set canRun = false and/or canFit = false,
ensure isCompatible = false, and return the computed
requiredMemory/requiredStorage and available values so callers can surface an
error; use the existing symbols calculateRequiredMemory,
calculateRequiredStorage, MIN_RAM_OVERHEAD_BYTES, MIN_STORAGE_OVERHEAD_BYTES and
ensure any existing logic that compares device.availableMemory/availableStorage
only runs when required values are > 0 (or short-circuit earlier) to avoid false
positives.
🧹 Nitpick comments (2)
sdk/runanywhere-react-native/packages/core/README.md (1)
144-173: Clarify the batch return shape in the docs.
checkModelsCompatibilityreturns a map keyed by model ID in the implementation, but the example doesn’t show how to consume that shape. Consider adding a short snippet usingObject.entries(results)to make it explicit.sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Compatibility.ts (1)
178-187: Batch API drops errored/missing models silently.
Right now, failures are only logged and the entry is omitted, which makes it impossible for callers to distinguish “missing model” from “not checked.” Consider returning an explicit entry (or a separate error map) so consumers can handle failures deterministically.
| function performCompatibilityCheck( | ||
| model: ModelInfo, | ||
| device: DeviceCapabilities | ||
| ): ModelCompatibilityResult { | ||
| // Calculate required resources | ||
| const requiredMemory = calculateRequiredMemory(model); | ||
| const requiredStorage = calculateRequiredStorage(model); | ||
|
|
||
| // Check memory compatibility | ||
| const canRun = device.availableMemory >= requiredMemory + MIN_RAM_OVERHEAD_BYTES; | ||
|
|
||
| // Check storage compatibility | ||
| const canFit = | ||
| device.availableStorage >= requiredStorage + MIN_STORAGE_OVERHEAD_BYTES; | ||
|
|
||
| // Overall compatibility | ||
| const isCompatible = canRun && canFit; | ||
|
|
||
| return { | ||
| canRun, | ||
| canFit, | ||
| isCompatible, | ||
| requiredMemory, | ||
| availableMemory: device.availableMemory, | ||
| requiredStorage, | ||
| availableStorage: device.availableStorage, | ||
| }; |
There was a problem hiding this comment.
Guard against missing/zero model resource metadata to avoid false positives.
If requiredMemory or requiredStorage resolves to 0, the check can incorrectly mark large models as compatible. This is already happening per the PR notes. Consider treating unknown/zero metadata as incompatible (or surface an error).
🛡️ Proposed fix (fail closed on missing metadata)
function performCompatibilityCheck(
model: ModelInfo,
device: DeviceCapabilities
): ModelCompatibilityResult {
// Calculate required resources
const requiredMemory = calculateRequiredMemory(model);
const requiredStorage = calculateRequiredStorage(model);
+
+ if (requiredMemory <= 0 || requiredStorage <= 0) {
+ logger.warning('Model resource metadata missing/invalid', {
+ model: model.id,
+ requiredMemory,
+ requiredStorage,
+ });
+ return {
+ canRun: false,
+ canFit: false,
+ isCompatible: false,
+ requiredMemory,
+ availableMemory: device.availableMemory,
+ requiredStorage,
+ availableStorage: device.availableStorage,
+ };
+ }
// Check memory compatibility
const canRun = device.availableMemory >= requiredMemory + MIN_RAM_OVERHEAD_BYTES;🤖 Prompt for AI Agents
In
`@sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere`+Compatibility.ts
around lines 200 - 226, performCompatibilityCheck currently treats zero/absent
resource metadata as compatible; update it to "fail closed" by detecting when
calculateRequiredMemory(model) <= 0 or calculateRequiredStorage(model) <= 0 and
treating those cases as incompatible: set canRun = false and/or canFit = false,
ensure isCompatible = false, and return the computed
requiredMemory/requiredStorage and available values so callers can surface an
error; use the existing symbols calculateRequiredMemory,
calculateRequiredStorage, MIN_RAM_OVERHEAD_BYTES, MIN_STORAGE_OVERHEAD_BYTES and
ensure any existing logic that compares device.availableMemory/availableStorage
only runs when required values are > 0 (or short-circuit earlier) to avoid false
positives.
There was a problem hiding this comment.
Pull request overview
This PR adds model compatibility checking functionality to the React Native SDK, enabling developers to determine if a model can run on their device before downloading or loading it. This addresses a gap in the React Native SDK compared to other platform SDKs.
Changes:
- Added three new public API functions:
checkModelCompatibility(),checkModelsCompatibility(), andgetDeviceCapabilities() - Implemented compatibility checking logic based on device RAM, storage, and model requirements
- Added comprehensive TypeScript type definitions for compatibility results and device capabilities
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/runanywhere-react-native/packages/core/src/types/CompatibilityTypes.ts | New type definitions for ModelCompatibilityResult and DeviceCapabilities interfaces |
| sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Compatibility.ts | Core implementation of compatibility checking with device info retrieval and requirement calculations |
| sdk/runanywhere-react-native/packages/core/src/types/index.ts | Export statements for new compatibility types |
| sdk/runanywhere-react-native/packages/core/src/Public/Extensions/index.ts | Export statements for new compatibility functions |
| sdk/runanywhere-react-native/packages/core/src/Public/RunAnywhere.ts | Integration of compatibility functions into main SDK object, plus minor indentation formatting fixes |
| sdk/runanywhere-react-native/packages/core/README.md | Added documentation and usage examples for the new compatibility API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import * as VoiceSession from './Extensions/RunAnywhere+VoiceSession'; | ||
| import * as StructuredOutput from './Extensions/RunAnywhere+StructuredOutput'; | ||
| import * as Audio from './Extensions/RunAnywhere+Audio'; | ||
| import * as Compatibility from './Extensions/RunAnywhere+Compatibility' |
There was a problem hiding this comment.
Missing semicolon at the end of the import statement. All other import statements in this file end with a semicolon (see lines 47, 48, 49).
| import * as Compatibility from './Extensions/RunAnywhere+Compatibility' | |
| import * as Compatibility from './Extensions/RunAnywhere+Compatibility'; |
| hasNPU, | ||
| chipName, | ||
| deviceModel, | ||
| platform: Platform.OS |
There was a problem hiding this comment.
Missing semicolon at the end of the statement. The codebase consistently uses semicolons at the end of statements (see lines 139-147 in this file).
| deviceModel: string; | ||
|
|
||
| /** Device Platform */ | ||
| platform: 'ios' | 'android' | 'windows' | 'macos' | 'web'; |
There was a problem hiding this comment.
The platform type definition includes 'windows', 'macos', and 'web', but React Native's Platform.OS only returns 'ios' or 'android' (and potentially 'windows', 'macos', 'web' for React Native for Web/Desktop, but these are not widely used in typical React Native apps). This type mismatch could lead to TypeScript accepting invalid platform values. Consider restricting the type to match the actual React Native platforms: 'ios' | 'android', or if the SDK plans to support other platforms in the future, document this explicitly.
| platform: 'ios' | 'android' | 'windows' | 'macos' | 'web'; | |
| platform: 'ios' | 'android'; |
| function calculateRequiredMemory(model: ModelInfo): number { | ||
| // Use memoryRequired if available, otherwise estimate from download size | ||
| const baseMemory = model.memoryRequired || model.downloadSize || 0; | ||
| return Math.ceil(baseMemory * MEMORY_MULTIPLIER); | ||
| } |
There was a problem hiding this comment.
When both model.memoryRequired and model.downloadSize are 0 or undefined (as noted in the PR description for some models like llama-2-7b-chat-q4_k_m), the calculated required memory and storage will be 0. This could lead to misleading compatibility results where a model appears compatible when the actual resource requirements are unknown. Consider adding validation to detect this case and either log a warning, throw an error, or return a special compatibility result indicating that requirements are unknown.
| console.log(`RAM: ${(caps.availableMemory / 1e9).toFixed(1)} / ${(caps.totalMemory / 1e9).toFixed(1)} GB`); | ||
| console.log(`Storage: ${(caps.availableStorage / 1e9).toFixed(1)} / ${(caps.totalStorage / 1e9).toFixed(1)} GB`); | ||
| console.log(`CPU: ${caps.cpuCores} cores, GPU: ${caps.hasGPU}, NPU: ${caps.hasNPU}`); | ||
|
|
There was a problem hiding this comment.
Missing closing triple backticks for the code block that starts at line 146. The code block should be closed before the markdown separator on line 174. Add ``` at the end of line 173 to properly close the code block.
| checkModelCompatibility: Compatibility.checkModelCompatibility, | ||
| checkModelsCompatibility: Compatibility.checkModelsCompatibility, | ||
| getDeviceCapabilities: Compatibility.getDeviceCapabilities, |
There was a problem hiding this comment.
Inconsistent indentation: these lines have 4 spaces of indentation while other properties at the same level (e.g., Audio section on lines 687-702) use 2 spaces. Adjust to use 2 spaces for consistency with the rest of the object.
| checkModelCompatibility: Compatibility.checkModelCompatibility, | |
| checkModelsCompatibility: Compatibility.checkModelsCompatibility, | |
| getDeviceCapabilities: Compatibility.getDeviceCapabilities, | |
| checkModelCompatibility: Compatibility.checkModelCompatibility, | |
| checkModelsCompatibility: Compatibility.checkModelsCompatibility, | |
| getDeviceCapabilities: Compatibility.getDeviceCapabilities, |
| export type { | ||
| ModelCompatibilityResult, | ||
| DeviceCapabilities, | ||
| } from './CompatibilityTypes' No newline at end of file |
There was a problem hiding this comment.
Missing semicolon at the end of the export statement. All other export type statements in this file end with a semicolon (see lines 101, 111, 123, 135, 146).
| } from './CompatibilityTypes' | |
| } from './CompatibilityTypes'; |
|
Hi Joshua, |
|
@JoshuaChil Let me know if you've any questions. Once you're having the CPP changes - you can connect it via the react native SDK. |
|
@shubhammalhotra28 , thank you so much for feedback! I will get on making change asap. Two quick questions:
|
|
@JoshuaChil
Let me know if you've any other questions :) |
|
Hi @JoshuaChil - any updates on this ? Or stuck with anything ? |
Hey @shubhammalhotra28 , worked on it for quite a bit, took some time since I'm getting familiar with C++. Was running into some issues/errors, but wanted to give myself a bit more time to fully understand the feature and build out. I will keep trying until Thursday night, and if not able to complete feature will commit what I have and maybe reach out to see if we can fix the errors together. If any issues there please let me know. Thanks! Edit: Sorry for delays! Schedule got a bit packed this week. I will PR on Saturday. |
@shubhammalhotra28, I re-opened this in a new PR since I have made significant changes. Struggled with implementation (I think I am just new to C++, and this has definitely been a skill jump, but great learning experience!) Would deeply appreciate feedback, I feel my current approach is not in alignment with style guide architectures, and would love any advice. I will continue to work on iterations as needed. Also - currently I have attempted to implement using downloadSize from model registry, but seem to be returning 0 for all models . I don't believe I had this issue earlier and think it may be an issue in the backend? After receiving feedback I will also work to implement fallbacks for compatibility checks in cases where there is missing metadata. |
Description
Adds model compatibility checking API to the React Native SDK, enabling apps to determine if a model can run on the current device before downloading or loading it.
Motivation
Whereas portions of other SDK's have functions, such as those for checking sufficient memory, React Native SDK lacks compatibility check functions to simplify for developers. I started with React Native due to higher TypeScript familiarity, but this could fill a gap if implemented across other SDK's as well.
Changes
New Features
checkModelCompatibility(modelId)- Check if a single model can run on the devicecheckModelsCompatibility(modelIds[])- Batch check multiple modelsgetDeviceCapabilities()- Get device hardware info (RAM, storage, CPU, GPU, NPU, chip)Implementation
CompatibilityTypes.tswithModelCompatibilityResultandDeviceCapabilitiesinterfacesRunAnywhere+Compatibility.tswith compatibility checking logicRunAnywhere.tsRunAnywhereDeviceInfomodule for accurate hardware detectionFiles Changed
sdk/runanywhere-react-native/packages/core/src/types/CompatibilityTypes.ts(new)sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Compatibility.ts(new)sdk/runanywhere-react-native/packages/core/src/types/index.ts(exports)sdk/runanywhere-react-native/packages/core/src/Public/Extensions/index.ts(exports)sdk/runanywhere-react-native/packages/core/src/Public/RunAnywhere.ts(integration)sdk/runanywhere-react-native/packages/core/README.md(documentation)Important Notes/Considerations
Thank you! This is my first OSS PR, apologies if any mistakes are present. Would deeply appreciate feedback.
Additional Commit
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
Greptile Overview
Greptile Summary
This PR adds model compatibility checking functionality to the React Native SDK, enabling developers to verify if models can run on devices before downloading. The implementation follows the SDK's extension pattern and integrates cleanly with existing services.
Key Changes:
checkModelCompatibility()andcheckModelsCompatibility()functions to verify model-device compatibilitygetDeviceCapabilities()function to retrieve device hardware informationRunAnywhereDeviceInfonative module andModelRegistryfor dataIssues Found:
memoryRequiredanddownloadSizewill silently return 0 for required resources, causing incorrect compatibility checks (affects llama-2-7b-chat-q4_k_m and mistral-7b-instruct-q4_k_m mentioned by author)Recommendations:
calculateRequiredMemory()andcalculateRequiredStorage()to warn or fail gracefullyConfidence Score: 3/5
RunAnywhere+Compatibility.tslines 232-243 where zero-value models will cause incorrect compatibility checksImportant Files Changed
Sequence Diagram
sequenceDiagram participant App as Application participant RA as RunAnywhere participant Compat as Compatibility Extension participant MR as ModelRegistry participant DI as DeviceInfoModule participant FS as FileSystem App->>RA: checkModelCompatibility(modelId) RA->>Compat: checkModelCompatibility(modelId) Compat->>MR: getModel(modelId) MR-->>Compat: ModelInfo Compat->>Compat: getDeviceCapabilities() Compat->>DI: Promise.all([getTotalRAM(), getAvailableRAM(), ...]) Compat->>FS: Promise.all([getTotalDiskSpace(), getAvailableDiskSpace()]) DI-->>Compat: RAM, CPU, GPU, NPU, chip info FS-->>Compat: Storage info Compat->>Compat: Construct DeviceCapabilities Compat->>Compat: performCompatibilityCheck(model, device) Compat->>Compat: calculateRequiredMemory(model) Compat->>Compat: calculateRequiredStorage(model) Compat->>Compat: Check canRun (memory check) Compat->>Compat: Check canFit (storage check) Compat->>Compat: Determine isCompatible Compat-->>RA: ModelCompatibilityResult RA-->>App: ModelCompatibilityResult Note over App,FS: Batch Check Flow App->>RA: checkModelsCompatibility([modelIds]) RA->>Compat: checkModelsCompatibility([modelIds]) Compat->>Compat: getDeviceCapabilities() (once) loop For each modelId Compat->>MR: getModel(modelId) MR-->>Compat: ModelInfo Compat->>Compat: performCompatibilityCheck(model, device) end Compat-->>RA: Record<modelId, ModelCompatibilityResult> RA-->>App: Record<modelId, ModelCompatibilityResult>(2/5) Greptile learns from your feedback when you react with thumbs up/down!