neurocore.llm.provider

LLM provider protocol and implementations.

Classes

LLMMessage

LLMResponse

LLMProvider

Protocol for LLM provider implementations.

AnthropicProvider

Anthropic Claude provider using the anthropic SDK.

OpenAIProvider

OpenAI provider using the openai SDK.

GeminiProvider

Google Gemini provider using the google-genai SDK.

MockProvider

Deterministic mock provider for testing. Never calls a real API.

Functions

build_provider(→ LLMProvider | None)

Build an LLMProvider from a config dict.

Module Contents

neurocore.llm.provider.build_provider(config: dict[str, Any]) LLMProvider | None[source]

Build an LLMProvider from a config dict.

Keys read:

llm_provider: “anthropic” | “openai” | “mock” (required to build) llm_model: model identifier (optional, uses provider default) llm_api_key: API key (optional for mock)

Returns None if llm_provider is not set.