1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Runtime model state — what a provider has actually loaded *right now*,
//! as opposed to the declared metadata returned by
//! [`crate::ModelMetaProbe::describe`].
//!
//! The motivating footgun: Ollama's `/api/show` reports a manifest
//! `context_length` of e.g. 128k, but the daemon will silently load the
//! model with whatever `num_ctx` the running configuration has set —
//! 2048 by default. Agents then truncate input at 2048 tokens with no
//! visible warning. [`RuntimeDescriptor`] surfaces the *currently loaded*
//! context window alongside the manifest one so callers can compare.
//!
//! Probes that can answer "is this model loaded, and with what
//! settings?" return [`RuntimeDescriptor`] from a dedicated method
//! (e.g. [`crate::OllamaProbe::runtime`]); probes against providers
//! without a runtime-introspection endpoint simply don't grow that
//! method.
use ;
use crateProviderId;
/// Snapshot of a provider's currently loaded model state.
///
/// `#[non_exhaustive]` so adjacent runtime fields (GPU memory split,
/// keep-alive deadline, currently-pinned LoRAs, etc.) can be added
/// without a breaking change.
///
/// `expires_at` is kept as a free-form `String` (provider-supplied,
/// usually an RFC 3339 timestamp) so this crate stays clear of a date /
/// time-crate choice — callers parse on demand.