Skip to main content

createLLMProviderFromConfig

steamharness.createLLMProviderFromConfig(): LLMProvider
createLLMProviderFromConfig(config?: ConfigurationValues): LLMProvider

The runtime factory reads the current execution snapshot. The named SDK export also accepts an explicit configuration object. Neither reads environment variables.

KeyAliasesMeaning
LLM_TYPETYPEopenai-completion, openai-responses, anthropic
LLM_API_KEYAPI_KEY, APIKEYRequired API key
LLM_BASE_URLBASE_URLOptional endpoint
LLM_MODELMODELOptional model

Declare these string fields in configuration.json and enter values in Project configurations. Mark API key fields sensitive. Missing required keys or unknown provider types produce input_validation. Defaults are gpt-4.1-mini for OpenAI and claude-3-haiku-20240307 for Anthropic.

const provider = steamharness.createLLMProviderRef("default", () =>
steamharness.createLLMProviderFromConfig());

See Project configurations.