Skip to main content

somm

Self-hosted LLM telemetry, routing, and intelligence loop.

The main library: SommLLM — one call wraps telemetry, provider routing across ten providers, tool calling, streaming, embeddings, multimodal dispatch, cost tracking, budget gates, online evaluation, durable eval gates, prompt optimization proposals, experiment campaigns, and cross-project model memory (the sommelier). It also exposes a neutral one-attempt harness API for Claude Code, Codex, and OpenCode so task runners do not reimplement CLI and event-stream adapters. Zero-config, privacy-first, no phone-home.

import somm

llm = somm.llm(project="my_app")
result = llm.generate(prompt="Reply with exactly: pong", workload="ping")
print(result.text, result.provider, result.cost_usd)

Async code can call await llm.agenerate(...), await llm.aembed(...), await llm.agenerate_structured(...), or iterate llm.astream(...). These methods use the same synchronous routing, embedding, governance, and telemetry paths without blocking the caller's event loop.

from somm import harnesses
from somm.harnesses import HarnessRequest

result = harnesses.run("codex", HarnessRequest(
    prompt="Fix the failing tests",
    cwd="~/src/my-project",
    capture_dir="./runs/task-1",
))
print(result.outcome, result.final_text)

Full documentation, design docs, and examples live in the somm repository.

New-project Ollama default and text-only Claude CLI calls

The Ollama default remains qwen3:8b for compatibility; Somm does not automatically substitute an installed model. If it is absent, install it with ollama pull qwen3:8b, or run ollama list and select an installed generation model using SOMM_OLLAMA_MODEL, [tool.somm].ollama_model in pyproject.toml, or the per-call --model / model= option. A 404 now includes this guidance.

Claude CLI retains its existing agent/tool behavior by default, even though Somm exposes a single-shot generation interface. For untrusted text, explicitly disable built-in tools, MCP configuration, and setting sources:

somm generate --provider claude-cli --claude-cli-text-only --json "Summarize this text"
result = llm.generate(
    untrusted_text,
    provider="claude-cli",
    claude_cli_text_only=True,
    allow_fallback=False,
)

This passes --tools '' --strict-mcp-config --setting-sources '' as literal argv entries. It requires a Claude CLI provider pin and disabled fallback. Remove configured claude_cli_extra_args / SOMM_CLAUDE_CLI_ARGS first: combining arbitrary CLI arguments with this mode is rejected. This mode controls CLI tool access; it is not an operating-system sandbox.

somm generate exits 0 only for an OK result, and nonzero for failed outcomes, including empty responses. JSON results retain ok, outcome, and error_kind, and include error_detail for actionable diagnostics.

Metadata

Release files for somm 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for somm 0.20.0
File Size Uploaded Provenance Actions
somm-0.20.0.tar.gz 328.5 kB With provenance Details for somm-0.20.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for somm 0.20.0
File Interpreter ABI Platform Actions
somm-0.20.0-py3-none-any.whl Python 3 none any Details for somm-0.20.0-py3-none-any.whl

Total release size: 578.4 kB

Release files / somm-0.20.0.tar.gz

Download URL somm-0.20.0.tar.gz
Size 328.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ff3d72edc8f5f1fc61341158a163b8197e5001fca231bbc0192aa7eb29e7b27c
BLAKE2b-256 checksum
How to use checksums
94f61961f4b835aa5f67c84f790d0b981f463301bb09b2520afe96d8f0f029c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / somm-0.20.0-py3-none-any.whl

Download URL somm-0.20.0-py3-none-any.whl
Size 249.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
483a7589e0bf69082a8ab5a8e8d727936c9201d70cc04f9ff9b0329ac8971e68
BLAKE2b-256 checksum
How to use checksums
574e7fa516742c92a5b62e65689e24e8f1c531cb9149fbc729f107dceb87820f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for somm 0.20.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for somm-0.20.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.20.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page