basalt / ai/src / createProvider
Function: createProvider()
> createProvider(env?, options?): AIProvider
Defined in: ai/src/provider/factory.ts:48
Build an AIProvider from environment. AI_PROVIDER selects the vendor (default anthropic); AI_MODEL, AI_API_KEY, AI_BASE_URL tune it.
The read-only ai:analyze / ai:doctor commands never call this — their rules are deterministic and run offline. A provider is only needed for the optional --explain narrative and, later, for ai:plan / ai:make.
Parameters
env?
ProviderEnv = {}