InitRunner

Providers

The default model is openai/gpt-4o-mini. Switch to any supported provider, a local Ollama instance, or a custom OpenAI-compatible endpoint by changing the spec.model block.

Standard Providers

ProviderExtra to installExample model
openai(included)gpt-4o-mini
anthropicinitrunner[anthropic]claude-sonnet-4-20250514
googleinitrunner[google]gemini-2.0-flash
groqinitrunner[groq]llama-3.3-70b-versatile
mistralinitrunner[mistral]mistral-large-latest
cohereinitrunner[cohere]command-r-plus
bedrockinitrunner[bedrock]anthropic.claude-sonnet-4-20250514-v1:0
xaiinitrunner[xai]grok-3

Install all provider extras at once:

pip install initrunner[all-models]

Example

spec:
  model:
    provider: anthropic
    name: claude-sonnet-4-20250514

Ollama (Local Models)

Set provider: ollama. No API key is needed — the runner defaults to http://localhost:11434/v1:

spec:
  model:
    provider: ollama
    name: llama3.2

Override the URL if Ollama is on a different host or port:

spec:
  model:
    provider: ollama
    name: llama3.2
    base_url: http://192.168.1.50:11434/v1

Docker note: If the runner is inside Docker and Ollama is on the host, use http://host.docker.internal:11434/v1 as the base_url.

OpenRouter / Custom Endpoints

Any OpenAI-compatible API works. Set provider: openai, point base_url at the endpoint, and specify which env var holds the API key:

spec:
  model:
    provider: openai
    name: anthropic/claude-sonnet-4
    base_url: https://openrouter.ai/api/v1
    api_key_env: OPENROUTER_API_KEY

This also works for vLLM, LiteLLM, Azure OpenAI, or any other service that exposes the OpenAI chat completions format.

Model Config Reference

FieldTypeDefaultDescription
providerstr"openai"Provider name (openai, anthropic, google, groq, mistral, ollama)
namestr"gpt-4o-mini"Model identifier
base_urlstr | nullnullCustom endpoint URL (triggers OpenAI-compatible mode)
api_key_envstr | nullnullEnvironment variable containing the API key
temperaturefloat0.1Sampling temperature (0.0-2.0)
max_tokensint4096Maximum tokens per response (1-128000)

Full Role Example

apiVersion: initrunner/v1
kind: Agent
metadata:
  name: support-agent
  description: Answers questions from the support knowledge base
  tags:
    - support
    - rag
spec:
  role: |
    You are a support agent. Use search_documents to find relevant
    articles before answering. Always cite your sources.
  model:
    provider: openai
    name: gpt-4o-mini
    temperature: 0.1
    max_tokens: 4096
  ingest:
    sources:
      - "./knowledge-base/**/*.md"
      - "./docs/**/*.pdf"
    chunking:
      strategy: fixed
      chunk_size: 512
      chunk_overlap: 50
  tools:
    - type: filesystem
      root_path: ./src
      read_only: true
    - type: mcp
      transport: stdio
      command: npx
      args: ["-y", "@anthropic/mcp-server-filesystem"]
  triggers:
    - type: file_watch
      paths: ["./knowledge-base"]
      extensions: [".html", ".md"]
      prompt_template: "Knowledge base updated: {path}. Re-index."
    - type: cron
      schedule: "0 9 * * 1"
      prompt: "Generate weekly support coverage report."
  guardrails:
    max_tokens_per_run: 50000
    max_tool_calls: 20
    timeout_seconds: 300
    max_request_limit: 50

On this page