Registers llm on the real MJGlobal.Instance.ClassFactory under one or more
DriverClass names — exactly how production drivers resolve. Every
ClassFactory.CreateInstance<BaseLLM>(BaseLLM, driverClass, apiKey) for a
registered name yields the SAME scripted instance, so a test scripts and
asserts through one object no matter how many drivers the code under test
instantiates.
Registrations persist on the MJGlobal singleton and the ClassFactory has no
unregister API — pair with resetMJSingletons() from this package in
beforeEach/afterEach so each test gets a fresh factory (re-registering the
same DriverClass name without a reset logs a duplicate-registration warning,
though the newest registration still wins).
Registers
llmon the realMJGlobal.Instance.ClassFactoryunder one or more DriverClass names — exactly how production drivers resolve. EveryClassFactory.CreateInstance<BaseLLM>(BaseLLM, driverClass, apiKey)for a registered name yields the SAME scripted instance, so a test scripts and asserts through one object no matter how many drivers the code under test instantiates.Registrations persist on the MJGlobal singleton and the ClassFactory has no unregister API — pair with
resetMJSingletons()from this package inbeforeEach/afterEachso each test gets a fresh factory (re-registering the same DriverClass name without a reset logs a duplicate-registration warning, though the newest registration still wins).