Studio: export autoLoadOnDeviceModel for tests

Allows behavioral simulations to drive the real auto-load implementation
directly instead of asserting on source text only. No runtime change.
This commit is contained in:
shimmyshimmer 2026-07-23 16:45:56 -07:00 committed by Unsloth
commit 5d06d64a26

View file

@ -1569,8 +1569,10 @@ function isAutoLoadableGgufVariant(variant: GgufVariantDetail | null): boolean {
* scan folders), then the smallest complete chat-capable on-device model
* (GGUF first, then safetensors). Never downloads: with no valid on-device
* candidate the caller shows the actionable "no model" error instead.
*
* Exported for tests.
*/
async function autoLoadOnDeviceModel(): Promise<{
export async function autoLoadOnDeviceModel(): Promise<{
loaded: boolean;
blockedByTrustRemoteCode: boolean;
/** True when an inventory failure was already surfaced to the user. */