The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(tinyagents): import workload route constants directly
Steven Enamakel847dd2871bf8
diff --git a/crates/openhuman-core/src/agent/tinyagents/README.md b/crates/openhuman-core/src/agent/tinyagents/README.mdindex c24e3ae7ff..ed9c58f586 100644--- a/crates/openhuman-core/src/agent/tinyagents/README.md+++ b/crates/openhuman-core/src/agent/tinyagents/README.md@@ -36,7 +36,7 @@ The adapter seam between OpenHuman and the vendored [`tinyagents`](../../../../.| [`middleware/research_budget.rs`](./middleware/research_budget.rs) | Withdraws the web tools from a top-level turn after eight successful search or fetch calls (forcing an answer only when no other tool remains), and notes once when consecutive web calls fail. || `model.rs` | Helpers and wrappers over native crate `ChatModel` values: message/response translation, usage merging, stream-delta forwarding, `MaxTokensModel`, `ProfileOverrideModel`. || [`tools.rs`](./tools.rs) | `CanonicalSharedToolAdapter`: resolves an OpenHuman shared tool registry and forwards the canonical `tinytools::Tool` contract; `EarlyExitHook` pauses successful `ask_user_clarification`-style calls. |-| `routes.rs` | `WORKLOAD_ROUTE_TIERS` (the tier inventory projected into the model registry), `RequiredCapabilitiesMiddleware`, `FallbackObserverMiddleware`, `UsageCarryMiddleware`, and the per-model fallback policy. |+| `routes.rs` | the workload router projected from the upstream `WORKLOAD_ROUTES` table, `RequiredCapabilitiesMiddleware`, `FallbackObserverMiddleware`, `UsageCarryMiddleware`, and the per-model fallback policy. || `topology.rs` | `all_graph_topologies`: behaviour-free `GraphTopology` exports of every custom OpenHuman graph for debug/inspection. || [`observability.rs`](./observability.rs) + `observability/` | `event_bridge.rs`: `OpenhumanEventBridge`, translating crate `AgentEvent`s into `AgentProgress` and feeding per-call usage into `crate::platform::cost`. `event_projection.rs`: its `EventListener` impl. `cap_pauser.rs`: `CapPauser` and `SubagentScope`. `graph_tracing.rs`: `GraphTracingSink`. || [`host/steering.rs`](./host/steering.rs) | OpenHuman's steering allowlist and the shared `SteeringRegistry` for detached sub-agents. Task primitives are imported directly from `tinyagents_graph::orchestration`. |diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rsindex 8fd2b515e9..40b45d6019 100644--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs@@ -23,7 +23,6 @@ use crate::agent::tinyagents::host::steering;use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::tinyagents::middleware::{self, TurnContextMiddleware};use crate::agent::tinyagents::model::TurnChatModel;-use tinyinference_llm::model::ErrorSlotModel;use crate::agent::tinyagents::observability::{IterationCursor, ProviderUsageCarry, SubagentScope, ToolFailureMap, ToolNameMap,};@@ -37,6 +36,7 @@ use crate::agent::tinyagents::turn_policy::{};use crate::agent::tinyagents::verify_before_finish;use tinyagents_harness::store::InMemoryStore as ToolResultArtifactIndexStore;+use tinyinference_llm::model::ErrorSlotModel;use super::ToolPolicyEnforcement;mod assembled;diff --git a/crates/openhuman-core/src/agent/tinyagents/routes.rs b/crates/openhuman-core/src/agent/tinyagents/routes.rsindex 1e9f7a3155..6a722dd775 100644--- a/crates/openhuman-core/src/agent/tinyagents/routes.rs+++ b/crates/openhuman-core/src/agent/tinyagents/routes.rs@@ -11,11 +11,6 @@ use tinyagents_registry::{WorkloadRoute, WorkloadRouter};use tinyinference_llm::model::workload::WORKLOAD_ROUTES;use tinyinference_llm::model::{CapabilitySet, ModelRequest};-pub(super) use tinyinference_llm::model::workload::{- ROUTE_AGENTIC, ROUTE_BURST, ROUTE_CHAT, ROUTE_CODING, ROUTE_REASONING, ROUTE_SUMMARIZATION,- ROUTE_VISION, WORKLOAD_ROUTE_TIERS,-};-/// The workload routing table (fallback chains and the vision `image_in` gate)/// projected into the crate [`WorkloadRouter`] from the upstream declarative/// [`WORKLOAD_ROUTES`] table, which owns the policy.diff --git a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rsindex 2256e7c138..d8832fcdc3 100644--- a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs@@ -1,5 +1,9 @@use super::*;use std::sync::Arc;+use tinyinference_llm::model::workload::{+ ROUTE_AGENTIC, ROUTE_BURST, ROUTE_CHAT, ROUTE_CODING, ROUTE_REASONING, ROUTE_SUMMARIZATION,+ ROUTE_VISION, WORKLOAD_ROUTE_TIERS,+};use async_trait::async_trait;use futures::StreamExt;diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs b/crates/openhuman-core/src/agent/tinyagents/turn_models.rsindex 7397264b15..6967a25b1a 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs@@ -6,9 +6,8 @@ use std::sync::Arc;use async_trait::async_trait;use crate::agent::tinyagents::model::{BuiltTurnModels, TierRoutes, TurnChatModel};-use tinyinference_llm::model::{ErrorSlotModel, ProfileOverrideModel};-use crate::agent::tinyagents::routes;use tinyagents_harness::host::{ModelResolveRequest, ModelResolver};+use tinyinference_llm::model::{ErrorSlotModel, ProfileOverrideModel};use tinyinference_llm::model::{ResolvedModelRoute, RouteRecordingModel};pub(crate) fn tinyagents_depth_error(@@ -279,7 +278,7 @@ fn build_turn_models_crate(// turn's own model, which is registered as the default primary), each pinned to// the tier alias so the crate registry resolves cross-route fallback across them.let mut routes: TierRoutes = Vec::new();- for &tier in routes::WORKLOAD_ROUTE_TIERS {+ for &tier in tinyinference_llm::model::workload::WORKLOAD_ROUTE_TIERS {if tier == model {continue;}@@ -529,7 +528,7 @@ impl TurnModelSource {let mut models = Self::from_model(custom).with_attachment_config(source.config.clone()).build(model, temperature, context_window, thread_id)?;- for &tier in routes::WORKLOAD_ROUTE_TIERS {+ for &tier in tinyinference_llm::model::workload::WORKLOAD_ROUTE_TIERS {let role = crate::inference::provider::factory::role_for_model_tier(tier);if let Some(custom) = local.role_models