neurocore.llm.provider¶
LLM provider protocol and implementations.
Classes¶
Protocol for LLM provider implementations. |
|
Anthropic Claude provider using the anthropic SDK. |
|
OpenAI provider using the openai SDK. |
|
Google Gemini provider using the google-genai SDK. |
|
Deterministic mock provider for testing. Never calls a real API. |
|
Provider backed by LiteLLM, routing to 100+ model APIs. |
Functions¶
|
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: provider name (required to build). One of
anthropic | openai | openai-compatible | ollama | vllm | litellm | gemini | mock.
llm_model: model identifier (optional, uses provider default) llm_api_key: API key (optional for mock/local gateways) llm_base_url: endpoint for openai-compatible/ollama/vllm/litellm
Returns None if llm_provider is not set.