Skip to main content

Module api

Module api 

Source
Expand description

LLM API entry points and re-exports. The transport layer, request/ response parsing, auth, context-window discovery, and option/result types each live in their own submodule under self; this file only wires them together and hosts the vm_call_llm_full* chat entry points that provider-specific completion / agent paths dispatch into.

Modules§

telemetry_source
Wire-format identifiers for ProviderTelemetry::source. Keep these in sync with the matching strings in docs/src/observability/* and the The host eval aggregator.

Structs§

OllamaPsModel
Loaded-model snapshot from Ollama’s /api/ps. Shared with the CLI’s harn local family so we don’t duplicate the response shape.
OllamaReadinessOptions
OllamaReadinessResult
OllamaRuntimeSettings
OllamaWarmupResult
ProviderTelemetry
Provider-side timing and runtime accounting captured per LLM call.

Constants§

HARN_OLLAMA_KEEP_ALIVE_ENV
HARN_OLLAMA_NUM_CTX_ENV
OLLAMA_DEFAULT_KEEP_ALIVE
OLLAMA_DEFAULT_NUM_CTX
OLLAMA_HOST_ENV

Functions§

fetch_provider_max_context
Fetch the server-reported maximum context length for a given model, if available. Caches results per (base_url, model_id) so we only pay the discovery cost once per session.
normalize_ollama_keep_alive
Public wrapper around the internal keep-alive parser, used by callers (CLI flags, host bridges) that want the same normalization Harn applies to environment overrides.
ollama_readiness
ollama_runtime_settings_from_env
warm_ollama_model
warm_ollama_model_with_settings