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 indocs/src/observability/*and the The host eval aggregator.
Structs§
- Ollama
PsModel - Loaded-model snapshot from Ollama’s
/api/ps. Shared with the CLI’sharn localfamily so we don’t duplicate the response shape. - Ollama
Readiness Options - Ollama
Readiness Result - Ollama
Runtime Settings - Ollama
Warmup Result - Provider
Telemetry - 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