From 7a58dd774d956cb3b548064724f9f86c0754f82e Mon Sep 17 00:00:00 2001 From: David Snelling Date: Thu, 9 Oct 2025 11:08:52 -0700 Subject: [PATCH] fix: pass entire storage config to createStorage (gcsNativeStorage now detected) Critical fix for GCS native storage configuration detection. The setupStorage() method was only passing storage.type and storage.options, but users provide gcsNativeStorage at the storage level, not inside options. Before (broken): createStorage({ type: config.storage.type, ...config.storage.options // undefined! }) After (working): createStorage(config.storage) // passes entire config including gcsNativeStorage This fixes the "GCS native storage configuration is missing" error that caused fallback to memory storage even when gcsNativeStorage was correctly configured. Related to: v3.29.0 GCS native storage fixes --- src/brainy.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/brainy.ts b/src/brainy.ts index 32665296..c8fbec1b 100644 --- a/src/brainy.ts +++ b/src/brainy.ts @@ -2611,10 +2611,9 @@ export class Brainy implements BrainyInterface { * Setup storage */ private async setupStorage(): Promise { - const storage = await createStorage({ - type: this.config.storage?.type || 'auto', - ...this.config.storage?.options - }) + // Pass the entire storage config object to createStorage + // This ensures all storage-specific configs (gcsNativeStorage, s3Storage, etc.) are passed through + const storage = await createStorage(this.config.storage as any) return storage }