Skip to content

Models

NucleusIQ uses a provider-agnostic BaseLLM interface. Swap providers without changing the rest of your agent code.

Supported providers

Provider Package Install
OpenAI nucleusiq-openai pip install nucleusiq-openai
Google Gemini nucleusiq-gemini pip install nucleusiq-gemini
Anthropic Claude nucleusiq-anthropic pip install nucleusiq-anthropic
Groq nucleusiq-groq pip install nucleusiq-groq
Ollama nucleusiq-ollama pip install nucleusiq-ollama
Mock (testing) Built-in from nucleusiq.core.llms.mock_llm import MockLLM

Usage

from nucleusiq_openai import BaseOpenAI

llm = BaseOpenAI(model_name="gpt-4o-mini")
from nucleusiq_gemini import BaseGemini

llm = BaseGemini(model_name="gemini-2.5-flash")
from nucleusiq_anthropic import BaseAnthropic

llm = BaseAnthropic(model_name="claude-3-5-sonnet-20241022", async_mode=True)
from nucleusiq_groq import BaseGroq

llm = BaseGroq(model_name="llama-3.3-70b-versatile", async_mode=True)
from nucleusiq_ollama import BaseOllama

llm = BaseOllama(model_name="llama3.2", async_mode=True)
from nucleusiq.core.llms.mock_llm import MockLLM

llm = MockLLM()  # No API key needed

Available models

OpenAI

Model Use case
gpt-4o High capability, multimodal
gpt-4o-mini Fast, cost-effective
gpt-4.1 Latest GPT-4 series
gpt-4.1-mini Balanced performance/cost
gpt-4.1-nano Ultra-fast, lowest cost
o3 Reasoning model
o3-mini Reasoning, cost-effective
o4-mini Latest reasoning model

OpenAI-compatible (self-hosted / BYOM)

Model ids are whatever the server advertises (--served-model-name, LM Studio catalog, Azure deployment name). Declare context_window to match --max-model-len. See OpenAI-compatible provider.

Example Typical engine
gemma-4-27b-it vllm / sglang
local-model llamacpp / lmstudio
Azure deployment name azure (v1 URL only)

nucleusiq-openai-compatible 0.1.0 requires nucleusiq>=0.7.13.

Gemini

Model Context Thinking
gemini-2.5-pro 1M tokens Yes
gemini-2.5-flash 1M tokens Yes
gemini-2.0-flash 1M tokens No
gemini-1.5-pro 2M tokens No
gemini-1.5-flash 1M tokens No

Anthropic (Claude)

Model IDs are org-specific — use Models API or the monorepo helper 09_anthropic_list_models.py. Examples often default to claude-3-5-sonnet-20241022.

nucleusiq-anthropic 0.2.2 requires nucleusiq>=0.7.12 and the official anthropic SDK (>=0.40,<1). Nested structured-output objects now close with additionalProperties: false. See Anthropic provider guide.

Groq

Groq rotates Llama, Mixtral, Qwen, GPT-OSS, and other checkpoints frequently — see Groq models. Typical starter IDs:

Model id Typical use
llama-3.3-70b-versatile Chat + local tools
openai/gpt-oss-20b Structured output demos (json_schema)

nucleusiq-groq 0.1.1 requires nucleusiq>=0.7.12 and ships against the official groq Python SDK (>=1.2,<2).

Ollama

Model ids are whatever your Ollama server exposes (ollama list). Typical local tags:

Model id Typical use
llama3.2 General chat + tools (examples default)
mistral, qwen2.5, … Swap names per your catalog

nucleusiq-ollama 0.2.2 requires nucleusiq>=0.7.12 and uses the official ollama SDK (>=0.5,<1). Multi-turn tool arguments are sent as a mapping. See Ollama provider guide. For an OpenAI /v1 shim (including Ollama's), use OpenAI-compatible and declare context_window yourself.

Parameter control

Set LLM parameters at the agent level:

from nucleusiq.agents import Agent
from nucleusiq.agents.config import AgentConfig
from nucleusiq.prompts.zero_shot import ZeroShotPrompt

config = AgentConfig(
    llm_max_output_tokens=1024,
    verbose=True,
)
agent = Agent(
    name="configured-agent",
    prompt=ZeroShotPrompt().configure(system="You are a helpful assistant."),
    llm=llm,  # e.g. BaseOpenAI / BaseGemini / BaseAnthropic / BaseGroq / BaseOllama from the sections above
    config=config,
)

Provider-specific params

Use provider-specific parameter classes for advanced settings:

from nucleusiq_openai import OpenAILLMParams

config = AgentConfig(
    llm_params=OpenAILLMParams(temperature=0.2, reasoning_effort="high"),
)
from nucleusiq_gemini import GeminiLLMParams, GeminiThinkingConfig

config = AgentConfig(
    llm_params=GeminiLLMParams(
        temperature=0.5,
        thinking_config=GeminiThinkingConfig(thinking_budget=2048),
    ),
)
from nucleusiq.llms.llm_params import LLMParams

config = AgentConfig(
    llm_params=LLMParams(temperature=0.5, max_output_tokens=1024),
)

AnthropicLLMParams (top_k, beta headers) attaches to BaseAnthropic — see Anthropic provider.

from nucleusiq_groq import GroqLLMParams

config = AgentConfig(
    llm_params=GroqLLMParams(
        temperature=0.5,
        parallel_tool_calls=True,
    ),
)
from nucleusiq_ollama import OllamaLLMParams

config = AgentConfig(
    llm_params=OllamaLLMParams(
        temperature=0.5,
        think="high",
        keep_alive="10m",
    ),
)

Per-task overrides

Override parameters for a single execution:

from nucleusiq_openai import OpenAILLMParams

result = await agent.execute(
    task,
    llm_params=OpenAILLMParams(temperature=0.0),
)
from nucleusiq_gemini import GeminiLLMParams

result = await agent.execute(
    task,
    llm_params=GeminiLLMParams(temperature=0.0),
)
from nucleusiq.llms.llm_params import LLMParams

result = await agent.execute(
    task,
    llm_params=LLMParams(temperature=0.0, max_output_tokens=512),
)
from nucleusiq_groq import GroqLLMParams

result = await agent.execute(
    task,
    llm_params=GroqLLMParams(temperature=0.0, max_output_tokens=512),
)
from nucleusiq_ollama import OllamaLLMParams

result = await agent.execute(
    task,
    llm_params=OllamaLLMParams(temperature=0.0, max_output_tokens=512),
)

See also