Decisions, AI & Fleet·6 min read·docs/language-models.md

Language Models & Budgets

Anthropic, OpenAI, Gemini, and Ollama providers, untrusted-data framing, and UTC daily spend caps.

Interactive Guide LabHostile-data framing & UTC spend caps
Visual Isometric WalkthroughDevelopers & SOC Automation Teams

Interactive Isometric Architecture Simulators

AI SOC Agent Investigation via 23 MCP Tools (Eyes Only, Zero Auto-Kill)

See how Claude, Cursor, or Codex investigate live clusters safely without ever holding the trigger.

Explore all 23 MCP tools →
RING 3 · AI / PROCUntrusted user spaceRING 0 · eBPFTetragon v1.8.0PQ ZERO-TRUSTML-DSA-65 + HPKEHUB · CEL & MCPGraphs & 23 toolsHUMAN SEALSHA-256 audit chainMCP STDIO / LOOPBACK →
Step 1 of 5 · Opt-In MCPinternal/adapter/mcp/server.go

External AI agent connects over stdio or loopback /mcp

MCP is disabled by default. When enabled (-mcp), clients connect via ometsuke mcp-stdio or loopback HTTP with strict Origin checks — and never receive the console mutation token.

Developer invariant · Even a completely compromised AI client has zero HTTP/API credential capable of calling a mutating console endpoint.
MCP client bridge (zero mutation token)
ometsuke mcp-stdio -server http://127.0.0.1:7070/mcp
tools/list -> 23 tools registered:
  21 strictly ReadOnlyHint=true  (ledger, fleet, kernel, memory, DFIR)
   2 non-enforcing proposals     (policy_propose, case_recommend)

The language model explains cases and answers questions about numbered evidence. Open the console with the operator link, then choose Settings → Model providers. Select a protocol, enter the exact model ID and API base, and choose the output format the endpoint accepts. The Use DeepSeek preset button fills in the protocol, endpoint, model and JSON format for DeepSeek Flash. Enter the provider key and save. Future calls use the saved settings immediately.

The same page manages jev and Liquid AI credentials, the active judge, the daily budget and the behavior when spending reaches the limit. A graph calls the selected judge only when its provider and model version match the graph revision. The shipped graph pins jev. Comparing Liquid AI for that graph requires a separate graph revision and thresholds calibrated for that model. Previous judgments and case explanations retain their original provenance.

Each credential field supports keeping, replacing or clearing the key. Changing a provider destination requires a fresh choice about the credential. Ometsuke stores dashboard edits in providers.json in the data directory with permissions 0600. A key inherited from the environment or startup configuration stays at its original destination and follows rotation there until an operator replaces or clears it. The HTTP read response exposes key availability. An outdated form must reload the current settings before saving.

Under Policies → Suggest a watch policy, ask about an observed file or executable. For example, “Which program should I monitor for TCP connections?” Or include an exact path from the latest 128 ledger entries, the window Ometsuke checks for eligible observations. Ometsuke matches it locally and sends the model numbered descriptions and counts. Select a citation to read the observation on this host. Review policy draft opens the proposed target, activity and scope in guided setup. Check the generated YAML and give a reason before loading it in watch mode. A recorded process start can justify monitoring future connections. Evidence of an actual connection requires a matching network observation.

AI help opens within the current page, including first run, threat investigation, audit and settings. A selected graph step can supply the installed rule, its exits or its judge thresholds. A selected threat supplies the observed sequence and local links to the underlying ledger entries. Unsaved form fields and provider credentials stay outside this context. The built-in guide remains available before a provider is configured. Case questions use the case's own numbered evidence. Threat investigation

#Reading model usage

Settings → Model usage shows provider operations for an inclusive UTC date range. It opens on the last seven days and keeps 90 UTC calendar days. Filter by protocol, configured model ID or operation. Totals and groups cover every matching operation. The recent list shows the latest 50 by start time. The same information is available from GET /api/v1/model-usage with optional from, to, protocol, model and operation parameters.

A call is one provider operation admitted by the daily budget. Operations include judgments, case explanations, event insights, case and section questions, watch-draft requests and delegated socket assessments. HTTP attempts count requests handed to the transport, including retries by System One or the Anthropic SDK. A transport failure can occur before the service receives a request. Cache hits and refusals before reservation produce no provider call. Completed calls include elapsed time and the outcome, including provider errors, invalid responses, refusals and cancellation. A running call has no final latency and stays out of latency averages.

Input and output counts have independent sources. A reported zero is an observed value. For compatible endpoints that omit usage, Ometsuke estimates from the request and available response text. An unreadable or absent counter can remain unknown. Anthropic input includes reported cache creation and cache reads. Gemini output includes reported reasoning tokens. A retry can return counts for the final response while leaving consumption on earlier attempts unknown.

Estimated costs are in USD using local rates. The API returns integer millionths of a dollar. Unknown model IDs use the highest configured rates. Incomplete cost totals include only the known or estimated portion. For compatible endpoints, the daily budget uses each reported count, including zero. It estimates missing input from the request and allows for the requested generation limit when output is missing. Consult the provider invoice for the charge.

The ledger keeps the model ID, protocol, operation, timing, outcome, counts and cost. Prompts, responses, evidence, upstream error text, endpoints and credentials are outside the call record. A start is recorded before the request and each HTTP attempt is counted before transport. After an unexpected exit, startup marks unfinished calls interrupted. Their final token counts, duration and cost remain unknown. Ometsuke logs a storage failure and continues applying the daily budget. Existing installations retain their historical daily spending. Token counts and individual calls start with the upgraded version.

Keep the ledger and the private provider settings file together in an owner-only backup so the audit and saved configuration refer to the same revision.

The following environment settings also work in the owner-only file passed to ometsuke -config. They supply the initial configuration for a new data directory.

OMETSUKE_LLM_PROVIDERAPI base used by defaultModel IDCredential at that base
anthropichttps://api.anthropic.comDefaults to claude-opus-5-5; choose an ID your account can accessANTHROPIC_API_KEY
openai-chathttps://api.openai.com/v1A Chat Completions model IDOPENAI_API_KEY
openai-responseshttps://api.openai.com/v1A Responses model IDOPENAI_API_KEY
geminihttps://generativelanguage.googleapis.com/v1betaA generateContent model ID, with an optional models/ prefixGEMINI_API_KEY
ollamahttp://localhost:11434A model already available from that Ollama server, including its tagOptional on loopback

For example, start a local OpenAI-compatible model server, give the model the alias local-assistant, and add the following to an owner-only configuration file. Set its permissions with chmod 600 before starting Ometsuke.

dotenv
OMETSUKE_LLM_PROVIDER=openai-chat
OMETSUKE_LLM_MODEL=local-assistant
OMETSUKE_LLM_BASE_URL=http://127.0.0.1:8080/v1
OMETSUKE_LLM_FORMAT=schema

For Ollama, select ollama and use the exact model name shown by ollama list. For a hosted provider, select its protocol and exact model ID and supply the credential privately. For a gateway, set its HTTPS API base, select the protocol it exposes and use OMETSUKE_LLM_API_KEY for its credential. Include the API version when the endpoint requires it. Ometsuke appends the operation path. A custom HTTPS gateway needs its dedicated key. Loopback endpoints can run without one when the provider is selected explicitly.

Use schema when the endpoint accepts a response schema. json requests a JSON object on protocols with that feature, and prompt includes the schema in the instructions for text-only endpoints. All three modes require a single JSON object with the expected fields and valid local evidence references. Tool calls, refusals and truncated responses cannot authorize an action. Compatibility depends on the endpoint implementing the selected protocol and the model following that output contract. Anthropic Messages · Chat Completions · Responses · Gemini · Ollama

For DeepSeek, select openai-chat, set the base to https://api.deepseek.com, use model ID deepseek-flash, and select json. Supply the provider credential privately as OMETSUKE_LLM_API_KEY. The lab verified an explanation, follow-up questions, a missing fact and a monitor-only policy suggestion through the real DeepSeek endpoint using synthetic evidence. DeepSeek API · JSON output · Lab results

The daily budget tracks estimated spending from reported usage or a fallback allowance. Unknown model IDs use the highest input and output rates in Ometsuke's price table. Check the provider's billing controls for a financial limit. The graph's calibrated judge is configured separately and keeps its pinned model and version. Operations · Decision models