File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 44
55namespace Cortex ;
66
7+ use Throwable ;
78use Cortex \LLM \LLMManager ;
89use Cortex \Agents \Registry ;
910use Cortex \Console \AgentChat ;
@@ -123,7 +124,13 @@ protected function registerModelInfoFactory(): void
123124 // ->needs(CacheInterface::class)
124125 // ->give($app->make('cache')->store());
125126
126- $ providers [] = $ app ->make ($ provider , is_array ($ config ) ? $ config : []);
127+ try {
128+ $ providers [] = $ app ->make ($ provider , is_array ($ config ) ? $ config : []);
129+ } catch (Throwable ) {
130+ // Silently skip providers that fail to instantiate (e.g., during testbench setup when services aren't available)
131+ // This prevents errors during composer autoload/testbench commands
132+ continue ;
133+ }
127134 }
128135
129136 return new ModelInfoFactory (
You can’t perform that action at this time.
0 commit comments