ov.agents.llm#
Provider-agnostic LLM facade for the ov agent layer (thin, injected, optional).
ov’s deterministic core needs no model. The agent layer adds bounded model use
— always dependency-injected, so there is no provider lock-in and the package
imports fine with no LLM SDK present. This facade is a thin layer over
coact.llm (itself glue over skill.ai), adding the two ov-specific things
coact’s generic facade does not carry:
model routing — the per-role default models from the spec’s §10 cost gate: operator → Haiku (throughput, many steps), UX-analyst → Sonnet (grounded narrative judgment), Arch-analyst / orchestrator → Opus (design reasoning / planning);
a multimodal
structured()path — the UX analyst grounds judgment in marked screenshots, which coact’s text-onlystructuredcannot carry. Inject any object exposingstructured(prompt, schema, *, images=...)for full control (real vision client); otherwise this degrades to coact’s portable text-only path, which is still grounded because the evidence bundle’s facts are textual summaries of each marked region (§8.1).
Module Attributes
Per-role default model selectors (host SDK literals), from the §10 cost gate. |
Functions
|
The default model selector for a role (falls back to |
|
Resolve |
|
Best-effort schema-conforming dict from an LLM, or |
- ov.agents.llm.DEFAULT_MODELS: dict[str, str] = {'arch': 'opus', 'operator': 'haiku', 'orchestrator': 'opus', 'ux': 'sonnet'}#
Per-role default model selectors (host SDK literals), from the §10 cost gate.
- ov.agents.llm.default_model(role)[source]#
The default model selector for a role (falls back to
"sonnet").>>> default_model("operator"), default_model("arch"), default_model("???") ('haiku', 'opus', 'sonnet')
- Return type:
- ov.agents.llm.resolve_llm(llm=None)[source]#
Resolve
llmto acallable(str) -> str, orNone.One injection convention: a callable (used as-is), an
awStepConfig, a model-name string, orNoneto discover an ambient provider. A plain callable short-circuits (no optional dependency needed); the other forms defer tocoact.llm.resolve_llm().>>> resolve_llm(lambda p: "hi")("x") 'hi'
- ov.agents.llm.structured(prompt, schema, *, llm=None, images=None, retries=1)[source]#
Best-effort schema-conforming dict from an LLM, or
Noneif unavailable.Resolution order honours dependency injection:
if
llmexposes astructuredmethod, it is used as-is — this is the multimodal path (the method may acceptimages=); a real vision client plugs in here;otherwise fall through to coact’s portable text-only
structured(anyimagesare dropped — the bundle’s textual facts still ground the claims);if no LLM is resolvable at all, return
Noneso callers fall back to a deterministic-only path (no crash, no provider lock-in).