feat(reliability): implement automatic offline model detection for production
Add @soulcraft/brainy-models as optional dependency for zero-config offline reliability. Enhance robustModelLoader with hierarchical loading strategy (local → online → fail). Add comprehensive production deployment documentation and update README with clear benefits. This solves critical production issues where Universal Sentence Encoder fails to load in Docker/Cloud Run environments due to network timeouts or blocked URLs. The solution provides 100% offline reliability while maintaining backward compatibility and requires no code changes from users.
This commit is contained in:
parent
298648c7d3
commit
fda519db79
5 changed files with 378 additions and 14 deletions
|
|
@ -284,7 +284,9 @@ const mainConfig = {
|
|||
'node:fs',
|
||||
'node:path',
|
||||
'fs',
|
||||
'path'
|
||||
'path',
|
||||
// Optional dependency - externalize to allow graceful failure
|
||||
'@soulcraft/brainy-models'
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +332,9 @@ const workerConfig = {
|
|||
'node:fs',
|
||||
'node:path',
|
||||
'fs',
|
||||
'path'
|
||||
'path',
|
||||
// Optional dependency - externalize to allow graceful failure
|
||||
'@soulcraft/brainy-models'
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue