mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
1.6 KiB
1.6 KiB
02.1 — Workload routes as ModelRegistry entries
Today run_turn_via_tinyagents_shared registers exactly one crate-internal
ProviderModel per run. Target: register the run's full resolved route set so fallback and
capability resolution happen inside the SDK.
Steps
- Extend
assemble_turn_harnessto register oneProviderModelper workload route the turn may use (chat,agentic,reasoning,coding,memory,subconscious,burst,summarization,vision— fromprovider/router.rstier names), each with its realModelProfile(already built at construction; add structured-output/reasoning flags from provider capabilities as they gain accessors). - Use
ModelRequest::with_required_capabilities/ModelSelection/ModelHintso per-call needs (vision, tools, reasoning) reject unfit models pre-dispatch instead of failing at the provider. router.rskeeps owning tier-name → provider-string policy; the translation to registry entries lives in one adapter fn (tinyagents/model.rsor a newtinyagents/routes.rs).- Record resolution in events (
ResolvedModel/ModelResolutionSourcealready onModelResponse).
Deletions
- Ad hoc model-capability checks scattered on turn paths (vision gates in
subagent_runner/ops/graph.rs,model_visionparam threading) onceCapabilitySetcovers them.
Acceptance
- A turn requesting vision on a non-vision model fails pre-dispatch with a typed error; fallback picks the next capable route.
- Adapter-inventory test asserts the registered route set.