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: consume split inference crates
Steven Enamakel5c6f6dd8b0e9
diff --git a/Cargo.lock b/Cargo.lockindex e715ffca44..869e399aa7 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -4180,7 +4180,8 @@ dependencies = ["tinyflows-sqlite","tinyhosts","tinyhumans-sdk",- "tinyinference",+ "tinyinference-core",+ "tinyinference-local","tinyjuice-bus","tinymcp","tinymcp-bus",@@ -6450,7 +6451,7 @@ dependencies = ["tinyagents-harness","tinyagents-language","tinyagents-tracing",- "tinyinference",+ "tinyinference-core","tokio",]@@ -6476,7 +6477,7 @@ dependencies = ["tempfile","thiserror 2.0.20","tinyagents-tracing",- "tinyinference",+ "tinyinference-core","tinytools","tinytools-agent","tokio",@@ -6502,7 +6503,7 @@ dependencies = ["tinyagents-graph","tinyagents-harness","tinyagents-language",- "tinyinference",+ "tinyinference-core",][[package]]@@ -6718,16 +6719,33 @@ dependencies = [][[package]]-name = "tinyinference"+name = "tinyinference-core"version = "0.2.1"dependencies = ["anyhow","async-trait","bytes",- "flate2","futures","hex","httpdate",+ "reqwest",+ "serde",+ "serde_json",+ "sha2 0.11.0",+ "thiserror 2.0.20",+ "tokio",+ "tracing",+ "url",+]++[[package]]+name = "tinyinference-local"+version = "0.2.1"+dependencies = [+ "bytes",+ "flate2",+ "futures",+ "hex","once_cell","reqwest","serde",@@ -6736,6 +6754,7 @@ dependencies = ["sysinfo","tar","thiserror 2.0.20",+ "tinyinference-core","tokio","tracing","url",diff --git a/Cargo.toml b/Cargo.tomlindex 22cf6898f4..5d1c91122e 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -40,11 +40,13 @@ openhuman-session = { path = "crates/openhuman-session" }tinymemory-api = { path = "vendor/tinymemory/crates/tinymemory-api" }[patch."https://github.com/tinyhumansai/tinyinference"]-tinyinference = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }+tinyinference-core = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }+tinyinference-local = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local" }[patch.crates-io]motosan-ai-oauth = { path = "vendor/motosan-ai-oauth" }-tinyinference = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }+tinyinference-core = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }+tinyinference-local = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local" }tinyflows = { path = "vendor/tinyflows/crates/tinyflows" }tinychannels = { path = "vendor/tinychannels" }diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lockindex 50cbd9d4aa..df69232081 100644--- a/crates/openhuman-app/Cargo.lock+++ b/crates/openhuman-app/Cargo.lock@@ -4315,7 +4315,8 @@ dependencies = ["tinyflows-sqlite","tinyhosts","tinyhumans-sdk",- "tinyinference",+ "tinyinference-core",+ "tinyinference-local","tinyjuice-bus","tinymcp","tinymcp-bus",@@ -7009,7 +7010,7 @@ dependencies = ["tinyagents-harness","tinyagents-language","tinyagents-tracing",- "tinyinference",+ "tinyinference-core","tokio",]@@ -7017,23 +7018,30 @@ dependencies = [name = "tinyagents-harness"version = "2.1.2"dependencies = [+ "anyhow","async-trait","base64 0.22.1","bytes","chrono",+ "dirs 5.0.1","flate2","futures",+ "log","regex","reqwest 0.12.28","rusqlite","serde","serde_json","sha2 0.11.0",+ "tempfile","thiserror 2.0.20","tinyagents-tracing",- "tinyinference",+ "tinyinference-core","tinytools",+ "tinytools-agent","tokio",+ "uuid",+ "wait-timeout",][[package]]@@ -7054,7 +7062,7 @@ dependencies = ["tinyagents-graph","tinyagents-harness","tinyagents-language",- "tinyinference",+ "tinyinference-core",][[package]]@@ -7300,12 +7308,14 @@ dependencies = [][[package]]-name = "tinyinference"+name = "tinyinference-core"version = "0.2.1"dependencies = [+ "anyhow","async-trait","bytes","futures",+ "hex","httpdate","reqwest 0.12.28","serde",@@ -7313,6 +7323,31 @@ dependencies = ["sha2 0.11.0","thiserror 2.0.20","tokio",+ "tracing",+ "url",+]++[[package]]+name = "tinyinference-local"+version = "0.2.1"+dependencies = [+ "bytes",+ "flate2",+ "futures",+ "hex",+ "once_cell",+ "reqwest 0.12.28",+ "serde",+ "serde_json",+ "sha2 0.11.0",+ "sysinfo",+ "tar",+ "thiserror 2.0.20",+ "tinyinference-core",+ "tokio",+ "tracing",+ "url",+ "zip 2.4.2",][[package]]@@ -7427,6 +7462,16 @@ dependencies = ["serde_json",]+[[package]]+name = "tinytools-agent"+version = "0.1.0"+dependencies = [+ "regex",+ "serde",+ "serde_json",+ "tinytools",+]+[[package]]name = "tinyvec"version = "1.12.0"diff --git a/crates/openhuman-app/Cargo.toml b/crates/openhuman-app/Cargo.tomlindex fac00eb697..ca4a28f2b7 100644--- a/crates/openhuman-app/Cargo.toml+++ b/crates/openhuman-app/Cargo.toml@@ -320,7 +320,8 @@ tinymemory-api = { path = "../../vendor/tinymemory/crates/tinymemory-api" }[patch."https://github.com/tinyhumansai/tinyinference"]# Crates in this world name tinyinference by git rev; without this the shell# world resolves TWO copies of the same types. Mirrors the root Cargo.toml.-tinyinference = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }+tinyinference-core = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }+tinyinference-local = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local" }[patch.crates-io]# Keep reqwest defaults disabled in this independent Cargo world too. Without@@ -334,9 +335,10 @@ motosan-ai-oauth = { path = "../../vendor/motosan-ai-oauth" }# match the one the core crate names, or cargo resolves two distinct packages# and the shell's `dyn Tool` stops being the core's. See the core manifest.tinytools = { path = "../../vendor/tinyagents/vendor/tinytools/crates/tinytools" }-# tinymemory-core declares `tinyinference = "0.2"` (crates-io-shaped, unpublished),+# tinymemory-core declares `tinyinference-core = "0.2"` (crates-io-shaped, unpublished),# so this world must patch it exactly as the root manifest does.-tinyinference = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }+tinyinference-core = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }+tinyinference-local = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local" }# TinyFlows and TinyChannels are vendored beside TinyAgents so integration# work can test crate changes against OpenHuman before publishing.tinyflows = { path = "../../vendor/tinyflows/crates/tinyflows" }diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.tomlindex 1cc72c5c54..23d22c4717 100644--- a/crates/openhuman-core/Cargo.toml+++ b/crates/openhuman-core/Cargo.toml@@ -415,7 +415,8 @@ tinyagents-graph = { path = "../../vendor/tinyagents/crates/tinyagents-graph", ftinyagents-language = { path = "../../vendor/tinyagents/crates/tinyagents-language" }tinyagents-registry = { path = "../../vendor/tinyagents/crates/tinyagents-registry" }tinyagents-session = { path = "../../vendor/tinyagents/crates/tinyagents-session" }-tinyinference = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }+tinyinference-core = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }+tinyinference-local = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local" }# TinyTools — the tool vocabulary: the `Tool` trait, `ToolResult`, and the# permission / scope / timeout classifications this host enforces around a call.#diff --git a/crates/openhuman-core/src/agent/agent_tests.rs b/crates/openhuman-core/src/agent/agent_tests.rsindex ce9b8f14ad..55201350e5 100644--- a/crates/openhuman-core/src/agent/agent_tests.rs+++ b/crates/openhuman-core/src/agent/agent_tests.rs@@ -36,7 +36,7 @@ use crate::tools::{Tool, ToolResult};use anyhow::Result;use async_trait::async_trait;use std::sync::{Arc, Mutex};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};// ═══════════════════════════════════════════════════════════════════════════// Test Helpers — Mock Provider, Mock Tool, Mock Memory@@ -73,7 +73,7 @@ impl ChatModel<()> for ScriptedProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let mut guard = self.responses.lock().unwrap();let response = if guard.is_empty() {ChatResponse {@@ -98,8 +98,10 @@ impl ChatModel<()> for FailingProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {- Err(tinyinference::Error::Model("provider error".to_string()))+ ) -> tinyinference_core::Result<ModelResponse> {+ Err(tinyinference_core::Error::Model(+ "provider error".to_string(),+ ))}}diff --git a/crates/openhuman-core/src/agent/bus_tests.rs b/crates/openhuman-core/src/agent/bus_tests.rsindex 42244ef33e..5bd9fc76a2 100644--- a/crates/openhuman-core/src/agent/bus_tests.rs+++ b/crates/openhuman-core/src/agent/bus_tests.rs@@ -5,7 +5,7 @@ use tinybus::NativeRegistry;/// in these tests, so the provider trait object is never actually/// invoked — an empty native scripted model only satisfies the type.fn test_request() -> AgentTurnRequest {- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));AgentTurnRequest {turn_model_source: crate::agent::tinyagents::TurnModelSource::from_model(model),diff --git a/crates/openhuman-core/src/agent/harness/graph_tests.rs b/crates/openhuman-core/src/agent/harness/graph_tests.rsindex 357b8a3e8a..0d796b67f0 100644--- a/crates/openhuman-core/src/agent/harness/graph_tests.rs+++ b/crates/openhuman-core/src/agent/harness/graph_tests.rs@@ -2,9 +2,9 @@ use super::*;use crate::tools::ToolResult;use async_trait::async_trait;use tinyagents_harness::testkit::ScriptedModel;-use tinyinference::message::AssistantMessage;-use tinyinference::model::{ChatModel, ModelProfile, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::AssistantMessage;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelResponse};+use tinyinference_core::tool::ToolCall;struct PingTool;#[async_trait]diff --git a/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_spec_views_tests.rs b/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_spec_views_tests.rsindex cc51f95f98..fb87b6583b 100644--- a/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_spec_views_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_spec_views_tests.rs@@ -124,7 +124,7 @@ fn dedup_keeps_the_original_allocation_of_the_winning_spec() {/// spec views must be empty rather than desynchronised.#[test]fn spec_views_stay_consistent_for_a_tool_less_agent() {- let model: std::sync::Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: std::sync::Arc<dyn tinyinference_core::model::ChatModel<()>> =std::sync::Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));let agent = crate::agent::AgentBuilder::new().chat_model(model)diff --git a/crates/openhuman-core/src/agent/harness/session/builder/factory.rs b/crates/openhuman-core/src/agent/harness/session/builder/factory.rsindex 6dbcdf7ebe..bdd64e961d 100644--- a/crates/openhuman-core/src/agent/harness/session/builder/factory.rs+++ b/crates/openhuman-core/src/agent/harness/session/builder/factory.rs@@ -657,7 +657,7 @@ impl Agent {let full_config = Arc::clone(&base_config);// For cloud reflection, wrap the provider in an Arc.// For local, no provider needed.- let reflection_provider: Option<Arc<dyn tinyinference::model::ChatModel<()>>> =+ let reflection_provider: Option<Arc<dyn tinyinference_core::model::ChatModel<()>>> =if config.learning.reflection_source == crate::config::ReflectionSource::Cloud {let (model, resolved_model) =provider::create_chat_model_with_model_id("reasoning", config, 0.3)?;diff --git a/crates/openhuman-core/src/agent/harness/session/builder/setters.rs b/crates/openhuman-core/src/agent/harness/session/builder/setters.rsindex 537a1904a6..ea3d6e60b9 100644--- a/crates/openhuman-core/src/agent/harness/session/builder/setters.rs+++ b/crates/openhuman-core/src/agent/harness/session/builder/setters.rs@@ -58,7 +58,7 @@ impl AgentBuilder {/// Sets an already-constructed TinyAgents chat model. This is the native/// injection seam for tests and embedders; no legacy `Provider` adapter is/// constructed.- pub fn chat_model(mut self, model: Arc<dyn tinyinference::model::ChatModel<()>>) -> Self {+ pub fn chat_model(mut self, model: Arc<dyn tinyinference_core::model::ChatModel<()>>) -> Self {self.turn_model_source = Some(crate::agent::tinyagents::TurnModelSource::from_model(model));self}diff --git a/crates/openhuman-core/src/agent/harness/session/runtime/turn_helpers.rs b/crates/openhuman-core/src/agent/harness/session/runtime/turn_helpers.rsindex 9c498244d3..d1446e35d0 100644--- a/crates/openhuman-core/src/agent/harness/session/runtime/turn_helpers.rs+++ b/crates/openhuman-core/src/agent/harness/session/runtime/turn_helpers.rs@@ -83,7 +83,7 @@ impl Agent {return kind.to_string();}- let scrubbed = tinyinference::sanitize::sanitize_api_error(&err.to_string())+ let scrubbed = tinyinference_core::sanitize::sanitize_api_error(&err.to_string()).replace(['\n', '\r', '\t'], " ").split_whitespace().collect::<Vec<_>>()diff --git a/crates/openhuman-core/src/agent/harness/session/runtime_tests.rs b/crates/openhuman-core/src/agent/harness/session/runtime_tests.rsindex 6f0cac1077..fc9935f3cb 100644--- a/crates/openhuman-core/src/agent/harness/session/runtime_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/runtime_tests.rs@@ -10,7 +10,9 @@ use anyhow::anyhow;use async_trait::async_trait;use parking_lot::Mutex;use std::sync::Arc;-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse, ModelStream, ModelStreamItem};+use tinyinference_core::model::{+ ChatModel, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,+};use tokio::sync::Mutex as AsyncMutex;use tokio::time::{sleep, Duration};@@ -24,7 +26,7 @@ impl ChatModel<()> for StaticModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let response = self.response.lock().take().unwrap_or_else(|| {Ok(ChatResponse {text: Some("done".into()),@@ -39,7 +41,7 @@ impl ChatModel<()> for StaticModel {&response, &request,),),- Err(error) => Err(tinyinference::Error::Model(error.to_string())),+ Err(error) => Err(tinyinference_core::Error::Model(error.to_string())),}}@@ -47,7 +49,7 @@ impl ChatModel<()> for StaticModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let response = self.invoke(state, request).await?;Ok(Box::pin(futures::stream::iter(vec![ModelStreamItem::Started,@@ -95,8 +97,10 @@ impl ChatModel<()> for PersistentErrModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {- Err(tinyinference::Error::Model(self.build_error().to_string()))+ ) -> tinyinference_core::Result<ModelResponse> {+ Err(tinyinference_core::Error::Model(+ self.build_error().to_string(),+ ))}}diff --git a/crates/openhuman-core/src/agent/harness/session/session_tests.rs b/crates/openhuman-core/src/agent/harness/session/session_tests.rsindex 6909fd23c0..5a1ac7c51f 100644--- a/crates/openhuman-core/src/agent/harness/session/session_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/session_tests.rs@@ -16,8 +16,8 @@ use anyhow::Result;use async_trait::async_trait;use parking_lot::Mutex;use std::sync::Arc;-use tinyinference::message::Message;-use tinyinference::model::{+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};@@ -37,7 +37,7 @@ impl ChatModel<()> for MockProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let mut guard = self.responses.lock();let response = if guard.is_empty() {ChatResponse {@@ -56,7 +56,7 @@ impl ChatModel<()> for MockProvider {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let response = self.invoke(state, request).await?;Ok(Box::pin(futures::stream::iter(vec![ModelStreamItem::Started,@@ -93,7 +93,7 @@ impl ChatModel<()> for RecordingProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let system_prompt = request.messages.iter().find_map(|message| match message {Message::System(_) => Some(message.text()),_ => None,@@ -121,7 +121,7 @@ impl ChatModel<()> for RecordingProvider {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let response = self.invoke(state, request).await?;Ok(Box::pin(futures::stream::iter(vec![ModelStreamItem::Started,diff --git a/crates/openhuman-core/src/agent/harness/session/transcript_history.rs b/crates/openhuman-core/src/agent/harness/session/transcript_history.rsindex a76eced6ce..2574ba4d13 100644--- a/crates/openhuman-core/src/agent/harness/session/transcript_history.rs+++ b/crates/openhuman-core/src/agent/harness/session/transcript_history.rs@@ -154,7 +154,7 @@ use std::sync::Arc;use async_trait::async_trait;use tinyagents_harness::memory::ChatHistory;use tinyagents_harness::{Result as TaResult, TinyAgentsError};-use tinyinference::message::Message;+use tinyinference_core::message::Message;use crate::agent::message_convert::{history_to_messages, message_to_chat_message};use crate::agent::messages::ChatMessage;diff --git a/crates/openhuman-core/src/agent/harness/session/transcript_history_tests.rs b/crates/openhuman-core/src/agent/harness/session/transcript_history_tests.rsindex 806dd6ea13..e915615240 100644--- a/crates/openhuman-core/src/agent/harness/session/transcript_history_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/transcript_history_tests.rs@@ -42,8 +42,10 @@ fn history(dir: &TempDir) -> SessionTranscriptHistory {}fn user(text: &str) -> Message {- Message::User(tinyinference::message::UserMessage {- content: vec![tinyinference::message::ContentBlock::Text(text.to_string())],+ Message::User(tinyinference_core::message::UserMessage {+ content: vec![tinyinference_core::message::ContentBlock::Text(+ text.to_string(),+ )],})}@@ -374,9 +376,9 @@ async fn trait_path_loses_the_provenance_that_append_turn_preserves() {.replace("thread-1",vec![Message::Assistant(- tinyinference::message::AssistantMessage {+ tinyinference_core::message::AssistantMessage {id: None,- content: vec![tinyinference::message::ContentBlock::Text(+ content: vec![tinyinference_core::message::ContentBlock::Text("72F and sunny.".into(),)],tool_calls: vec![],diff --git a/crates/openhuman-core/src/agent/harness/session/turn/core/failed_turn.rs b/crates/openhuman-core/src/agent/harness/session/turn/core/failed_turn.rsindex f138180a5a..a77a95ce02 100644--- a/crates/openhuman-core/src/agent/harness/session/turn/core/failed_turn.rs+++ b/crates/openhuman-core/src/agent/harness/session/turn/core/failed_turn.rs@@ -9,7 +9,7 @@ use crate::agent::tinyagents::{render_unanswered_steps, TranscriptSnapshot, TranscriptSnapshotSink,};use anyhow::Result;-use tinyinference::message::Message;+use tinyinference_core::message::Message;/// Leads the note a failed turn leaves in history, so the model (and a reader/// of the transcript) can tell it from a reply.diff --git a/crates/openhuman-core/src/agent/harness/session/turn/session_io/wrapup.rs b/crates/openhuman-core/src/agent/harness/session/turn/session_io/wrapup.rsindex babae2fe54..f857d25db6 100644--- a/crates/openhuman-core/src/agent/harness/session/turn/session_io/wrapup.rs+++ b/crates/openhuman-core/src/agent/harness/session/turn/session_io/wrapup.rs@@ -7,7 +7,7 @@ use crate::agent::messages::ChatMessage;use crate::agent::progress::AgentProgress;use crate::inference::provider::{ChatResponse, UsageInfo, AGENT_TURN_MAX_OUTPUT_TOKENS};use futures::StreamExt;-use tinyinference::model::{ModelRequest, ModelStreamItem};+use tinyinference_core::model::{ModelRequest, ModelStreamItem};impl Agent {/// **disabled** so the model returns prose rather than another tool call.diff --git a/crates/openhuman-core/src/agent/harness/session/turn_tests.rs b/crates/openhuman-core/src/agent/harness/session/turn_tests.rsindex b59c9b3a7a..a8fb46d7ac 100644--- a/crates/openhuman-core/src/agent/harness/session/turn_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/turn_tests.rs@@ -17,8 +17,8 @@ use async_trait::async_trait;use std::collections::HashSet;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::Arc;-use tinyinference::message::Message;-use tinyinference::model::{+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};use tokio::sync::Mutex as AsyncMutex;@@ -39,7 +39,7 @@ impl ChatModel<()> for DummyProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("unused"))}}@@ -65,7 +65,7 @@ impl ChatModel<()> for SequenceProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.tool_counts.lock().await.push(request.tools.len());self.requests.lock().await.push(request@@ -99,7 +99,7 @@ impl ChatModel<()> for SequenceProvider {&response, &request,),),- Err(error) => Err(tinyinference::Error::Model(error.to_string())),+ Err(error) => Err(tinyinference_core::Error::Model(error.to_string())),}}@@ -107,7 +107,7 @@ impl ChatModel<()> for SequenceProvider {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {// The legacy fixture implemented `chat` but did not write provider// deltas. Preserve that non-streaming wire behavior: the harness still// receives the authoritative completed response, while turn-owneddiff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rsindex 5e3c554827..4f926a4276 100644--- a/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/extract_tool.rs@@ -35,8 +35,8 @@ use crate::agent::harness::session::transcript::{use crate::agent::messages::ChatMessage;use crate::agent::tinyagents::TurnModelSource;use crate::tools::{Tool, ToolCategory, ToolResult};-use tinyinference::message::Message;-use tinyinference::model::ModelRequest;+use tinyinference_core::message::Message;+use tinyinference_core::model::ModelRequest;// ── Tunables ──────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/checkpoint.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/checkpoint.rsindex 0215512407..f8b690868b 100644--- a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/checkpoint.rs+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/checkpoint.rs@@ -7,8 +7,8 @@use crate::inference::provider::UsageInfo;use std::sync::Arc;-use tinyinference::message::Message;-use tinyinference::model::{ChatModel, ModelRequest};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelRequest};/// A checkpoint result. `usage`, when present, is the provider usage from the/// summary call so the caller can fold it into sub-agent token/cost accounting.diff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_failed_run_tests.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_failed_run_tests.rsindex d35b24ffa6..fe560f1024 100644--- a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_failed_run_tests.rs+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_failed_run_tests.rs@@ -15,7 +15,7 @@ impl ChatModel<()> for FailsOnThirdCallProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let n = self.calls.fetch_add(1, Ordering::SeqCst);if n < 2 {Ok(tool_response(@@ -24,7 +24,7 @@ impl ChatModel<()> for FailsOnThirdCallProvider {serde_json::json!({ "msg": format!("round-{n}") }),))} else {- Err(tinyinference::Error::Model(+ Err(tinyinference_core::Error::Model("400 Bad Request: provider boom".to_string(),))}@@ -124,7 +124,7 @@ async fn failed_subagent_run_keeps_its_unanswered_round_out_of_history() {#[test]fn failed_run_history_keeps_the_original_seed_not_the_provider_bound_one() {use crate::agent::tinyagents::TranscriptSnapshot;- use tinyinference::message::Message;+ use tinyinference_core::message::Message;let original = vec![ChatMessage::user("describe [IMAGE:attachment-1]")];let snapshot = TranscriptSnapshot {diff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_tests.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_tests.rsindex 665a16f767..4cca1178c4 100644--- a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_tests.rs+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph_tests.rs@@ -2,11 +2,11 @@ use super::*;use crate::tools::ToolResult;use async_trait::async_trait;use std::sync::atomic::{AtomicUsize, Ordering};-use tinyinference::message::{AssistantMessage, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::ToolCall;+use tinyinference_core::tool::ToolCall;fn native_tool_profile() -> &'static ModelProfile {static PROFILE: std::sync::LazyLock<ModelProfile> = std::sync::LazyLock::new(|| ModelProfile {@@ -67,7 +67,7 @@ impl ChatModel<()> for TwoStepProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let n = self.calls.fetch_add(1, Ordering::SeqCst);if n == 0 {Ok(tool_response("1", "echo", serde_json::json!({"msg": "hi"})))@@ -145,7 +145,7 @@ impl ChatModel<()> for ThinkingStreamProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("Hello"))}@@ -153,7 +153,7 @@ impl ChatModel<()> for ThinkingStreamProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let response = ModelResponse::assistant("Hello");Ok(Box::pin(futures::stream::iter(vec![ModelStreamItem::Started,@@ -286,7 +286,7 @@ impl ChatModel<()> for AskThenAnswer {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let n = self.calls.fetch_add(1, Ordering::SeqCst);if n == 0 {Ok(tool_response(@@ -384,7 +384,7 @@ impl ChatModel<()> for LoopForeverProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {if !request.tools.is_empty() {Ok(tool_response("n", "noop", serde_json::json!({})))} else {@@ -535,7 +535,7 @@ impl ChatModel<()> for SpawnAttemptProvider {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {if self.calls.fetch_add(1, Ordering::SeqCst) == 0 {Ok(tool_response("1", "spawn_subagent", serde_json::json!({})))} else {diff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/ops_tests.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/ops_tests.rsindex 51de751409..2a1e18c16d 100644--- a/crates/openhuman-core/src/agent/harness/subagent_runner/ops_tests.rs+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/ops_tests.rs@@ -72,11 +72,11 @@ use crate::agent::harness::fork_context::with_parent_context;use crate::agent::harness::run_queue::{QueueMode, QueuedMessage, RunQueue};use parking_lot::Mutex;use std::sync::Arc;-use tinyinference::message::{AssistantMessage, ContentBlock, Message, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::ToolCall;+use tinyinference_core::tool::ToolCall;/// Mock provider whose response queue can be inspected by the test/// to verify the bytes that arrive at the model.@@ -151,7 +151,7 @@ impl ChatModel<()> for ScriptedProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(self.take_response(request))}@@ -159,7 +159,7 @@ impl ChatModel<()> for ScriptedProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let response = self.take_response(request);let reasoning = response.messagediff --git a/crates/openhuman-core/src/agent/host_runtime.rs b/crates/openhuman-core/src/agent/host_runtime.rsindex b976979523..91667b94ef 100644--- a/crates/openhuman-core/src/agent/host_runtime.rs+++ b/crates/openhuman-core/src/agent/host_runtime.rs@@ -111,7 +111,7 @@ fn maybe_hide_window(cmd: &mut tokio::process::Command, hide: bool) {if !hide {return;}- tinyinference::local::process::apply_no_window(cmd);+ tinyinference_local::process::apply_no_window(cmd);#[cfg(windows)]tracing::debug!(creation_flags = "0x08000000",diff --git a/crates/openhuman-core/src/agent/learning/README.md b/crates/openhuman-core/src/agent/learning/README.mdindex 21de2747c4..67fc5c8efc 100644--- a/crates/openhuman-core/src/agent/learning/README.md+++ b/crates/openhuman-core/src/agent/learning/README.md@@ -101,7 +101,7 @@ These are subscriber registrations rather than a single `bus.rs`; subscriptions- `crate::memory` — the `Memory` trait + `MemoryCategory` for KV persistence (hooks, transcript ingest), `guard::MemoryGuard` and `ops::guard::active_memory_guard` for the facet store, and `memory::api::provider::MemoryProvider` / `api::types` for the enrichment document upsert.- `crate::agent::hooks` — `PostTurnHook` / `TurnContext` / `ToolCallRecord` implemented by the three hooks.- `crate::agent::harness::session::transcript` — `SessionTranscript` parsing for transcript ingestion.-- `crate::inference::provider::create_chat_model_from_string_with_model_id` (profile summarisation) and `crate::inference::local::global` (local reflection route); `ReflectionHook` also accepts an optional `tinyinference::model::ChatModel` for the cloud fallback.+- `crate::inference::provider::create_chat_model_from_string_with_model_id` (profile summarisation) and `crate::inference::local::global` (local reflection route); `ReflectionHook` also accepts an optional `tinyinference_core::model::ChatModel` for the cloud fallback.- `crate::config` — `Config` / `LearningConfig` / `ReflectionSource` feature flags and `config::rpc` loader.- `crate::agent::context::prompt` — `PromptContext` / `PromptSection` / `LearnedContextData` for prompt injection.- `crate::integrations::composio` — `composio::client` (Gmail fetch for enrichment) and `composio::profile_md` (`replace_managed_block` for `PROFILE.md`).diff --git a/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs b/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rsindex c371d7a104..42f107a71c 100644--- a/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs+++ b/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs@@ -71,8 +71,8 @@ Rules:\n\"[linkedin_enrichment] sending profile to LLM for summarisation");- use tinyinference::message::Message;- use tinyinference::model::ModelRequest;+ use tinyinference_core::message::Message;+ use tinyinference_core::model::ModelRequest;let summary = model_chat.invoke(&(),diff --git a/crates/openhuman-core/src/agent/learning/reflection.rs b/crates/openhuman-core/src/agent/learning/reflection.rsindex 91638069e0..a41d74e5fc 100644--- a/crates/openhuman-core/src/agent/learning/reflection.rs+++ b/crates/openhuman-core/src/agent/learning/reflection.rs@@ -44,7 +44,7 @@ pub struct ReflectionHook {config: LearningConfig,full_config: Arc<Config>,memory: Arc<dyn Memory>,- provider: Option<Arc<dyn tinyinference::model::ChatModel<()>>>,+ provider: Option<Arc<dyn tinyinference_core::model::ChatModel<()>>>,/// Per-session reflection counts for throttling. Key is session_id (or "__global__").session_counts: Mutex<HashMap<String, usize>>,}@@ -56,11 +56,11 @@ pub struct ReflectionHook {/// user turn with no per-request overrides — the [`ChatModel`] equivalent of the/// former `simple_chat(prompt, "hint:reasoning", 0.3)`.async fn invoke_cloud_reflection(- provider: &Arc<dyn tinyinference::model::ChatModel<()>>,+ provider: &Arc<dyn tinyinference_core::model::ChatModel<()>>,prompt: &str,) -> anyhow::Result<String> {- use tinyinference::message::Message;- use tinyinference::model::ModelRequest;+ use tinyinference_core::message::Message;+ use tinyinference_core::model::ModelRequest;Ok(provider.invoke(&(),@@ -75,7 +75,7 @@ impl ReflectionHook {config: LearningConfig,full_config: Arc<Config>,memory: Arc<dyn Memory>,- provider: Option<Arc<dyn tinyinference::model::ChatModel<()>>>,+ provider: Option<Arc<dyn tinyinference_core::model::ChatModel<()>>>,) -> Self {Self {config,diff --git a/crates/openhuman-core/src/agent/message_convert.rs b/crates/openhuman-core/src/agent/message_convert.rsindex 7706013037..d5bf57a039 100644--- a/crates/openhuman-core/src/agent/message_convert.rs+++ b/crates/openhuman-core/src/agent/message_convert.rs@@ -14,10 +14,10 @@//! resulting transcript back out, so a turn can run on the `tinyagents`//! agent-loop while callers keep speaking openhuman's `ChatMessage` vocabulary.-use tinyinference::message::{+use tinyinference_core::message::{AssistantMessage, ContentBlock, ImageRef, Message, SystemMessage, ToolMessage, UserMessage,};-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;use crate::agent::messages::{ChatMessage, ConversationMessage, ToolResultMessage};diff --git a/crates/openhuman-core/src/agent/messages.rs b/crates/openhuman-core/src/agent/messages.rsindex 7df1dc4046..aaf97d59a9 100644--- a/crates/openhuman-core/src/agent/messages.rs+++ b/crates/openhuman-core/src/agent/messages.rs@@ -1,6 +1,6 @@//! Durable OpenHuman transcript records.//!-//! Runtime model calls use [`tinyinference::message::Message`]. These+//! Runtime model calls use [`tinyinference_core::message::Message`]. These//! compact records preserve the stable JSONL/thread storage contract used by//! existing installations and carry OpenHuman-only message metadata.diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rsindex fc0def9751..91c9088796 100644--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs@@ -25,7 +25,7 @@ use tinyagents_session::run_ledger::{self, AgentTeamMemberStatus, AgentTeamMemberUpsert, AgentTeamStatus, AgentTeamTaskStatus,AgentTeamTaskUpsert, AgentTeamUpsert,};-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};// ── Mocks (mirror workflow_runs::engine_tests) ──────────────────────────────@@ -97,9 +97,9 @@ impl ChatModel<()> for CannedModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {if self.fail {- return Err(tinyinference::Error::Model(+ return Err(tinyinference_core::Error::Model("mock model forced failure".to_string(),));}diff --git a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/ops_tests.rsindex 1544b9330d..2523f7fa04 100644--- a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs@@ -11,7 +11,7 @@ use std::sync::{atomic::{AtomicUsize, Ordering},Arc,};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};use tokio::time::Duration;#[derive(Default)]@@ -135,7 +135,7 @@ impl ChatModel<()> for CodingQuestionModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let flattened = request.messages.iter()@@ -225,7 +225,7 @@ impl ChatModel<()> for ParallelCodingModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.state.calls.fetch_add(1, Ordering::SeqCst);let current = self.state.active.fetch_add(1, Ordering::SeqCst) + 1;self.record_peak(current);@@ -439,7 +439,7 @@ impl ChatModel<()> for BlockingModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {tokio::time::sleep(Duration::from_secs(60)).await;Ok(text_response("NEVER_REACHED"))}diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rsindex ebf89e06c5..3b2611a977 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs@@ -7,7 +7,7 @@ use crate::agent::tinyagents::orchestration::{DetachedTaskRegistryError, SteeringCommand, SteeringCommandKind,};use tinyagents_harness::ids::TaskId;-use tinyinference::message::Message as TaMessage;+use tinyinference_core::message::Message as TaMessage;use super::cancel::now_ms;use super::registry::registry;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rsindex 2b29c274e0..684e875139 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs@@ -159,14 +159,14 @@ pub(super) fn scout_failure_signal(err: &SubagentRunError) -> String {/// Two billing shapes reach here, both **user-state, not defects**:/// * the managed OpenHuman backend's budget-exhausted 400/// (`{"error":"Insufficient budget","errorCode":"USER_INSUFFICIENT_CREDITS"}`),-/// matched by [`tinyinference::classification::is_budget_exhausted_message`];+/// matched by [`tinyinference_core::classification::is_budget_exhausted_message`];/// * a BYO provider's insufficient-credits 402, matched by/// [`crate::core::observability::is_insufficient_credits_message`].////// Both delegate to the crate's single-source classifiers so the phrase sets/// can't drift from the cron halt / `before_send` nets that share them.pub(super) fn is_expected_billing_failure(message: &str) -> bool {- tinyinference::classification::is_budget_exhausted_message(message)+ tinyinference_core::classification::is_budget_exhausted_message(message)|| crate::core::observability::is_insufficient_credits_message(message)}diff --git a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rsindex 7138cf07f1..eee2ac3d5f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rs@@ -352,7 +352,7 @@ fn parent_context_with_specs(// The context needs *a* memory to be constructed with and never reads one// back, which is exactly what `noop_memory` is for.let memory: Arc<dyn crate::memory::Memory> = crate::memory::test_support::noop_memory();- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));crate::agent::harness::fork_context::ParentExecutionContext {workspace_descriptor: None,diff --git a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rsindex f88e57e800..11cb755f76 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs@@ -102,7 +102,7 @@ fn selector(parent_thread_id: &str) -> subagent_sessions::SubagentSessionSelecto}fn parent_context(workspace_dir: &Path) -> ParentExecutionContext {- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));ParentExecutionContext {workspace_descriptor: None,diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 29fa60e110..4275928b78 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -24,9 +24,9 @@ use std::sync::{atomic::{AtomicUsize, Ordering},Arc,};-use tinyinference::message::{AssistantMessage, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::{AssistantMessage, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;use tokio::time::{sleep, timeout, Duration};const PARENT_PROMPT_CANARY: &str = "parallel-fanout-e2e-canary";@@ -107,7 +107,7 @@ fn parent_context(max_parallel_tools: usize) -> ParentExecutionContext {max_parallel_tools,..Default::default()};- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::replies(vec!["ok",]));@@ -322,7 +322,10 @@ impl ParallelHarnessProvider {}}- async fn respond_for_subagent(&self, flattened: &str) -> tinyinference::Result<ModelResponse> {+ async fn respond_for_subagent(+ &self,+ flattened: &str,+ ) -> tinyinference_core::Result<ModelResponse> {let current = self.state.active_subagent_calls@@ -345,7 +348,7 @@ impl ParallelHarnessProvider {sleep(Duration::from_millis(5)).await;}- let response = (|| -> tinyinference::Result<ModelResponse> {+ let response = (|| -> tinyinference_core::Result<ModelResponse> {if flattened.contains(RESEARCH_PROMPT_CANARY) {if flattened.contains("research-step-3-ok") {Ok(text_response(RESEARCH_DONE_CANARY))@@ -385,7 +388,7 @@ impl ParallelHarnessProvider {))}} else {- Err(tinyinference::Error::Model(format!(+ Err(tinyinference_core::Error::Model(format!("unexpected subagent payload: {flattened}")))}@@ -415,7 +418,7 @@ impl ChatModel<()> for ParallelHarnessProvider {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.state.total_calls.fetch_add(1, Ordering::SeqCst);let flattened = request.messagesdiff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rsindex bd9585a382..d294422524 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs@@ -56,7 +56,7 @@ impl crate::memory::Memory for MockMemory {}fn test_parent_ctx(workspace_dir: PathBuf) -> ParentExecutionContext {- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::replies(vec!["done",]));diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rsindex f0003f61e9..b851f6e4c2 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs@@ -14,8 +14,8 @@ use parking_lot::Mutex;use serde_json::json;use std::path::Path;use std::sync::Arc;-use tinyinference::message::Message;-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};const SPAWN_SUBAGENT_CANARY: &str = "tool-e2e-spawn-subagent-canary";const ARCHETYPE_DELEGATION_CANARY: &str = "tool-e2e-archetype-delegation-canary";@@ -507,7 +507,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let flattened = flatten_messages(&request.messages);self.seen.lock().push(flattened.clone());for (needle, answer) in &self.responses {@@ -515,7 +515,7 @@ impl ChatModel<()> for ScriptedModel {return Ok(ModelResponse::assistant(*answer));}}- Err(tinyinference::Error::Model(format!(+ Err(tinyinference_core::Error::Model(format!("unexpected model request: {flattened}")))}diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rsindex 25728a5b2c..794f6a9149 100644--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs@@ -32,7 +32,7 @@ use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, Recaluse crate::tools::Tool;use tinyagents_session::run_ledger::WorkflowRunStatus;use tinyagents_session::run_ledger::{get_workflow_run, upsert_workflow_run, WorkflowRunUpsert};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};use super::super::types::{WorkflowDefinition, WorkflowPhase, WorkflowSafetyTier};@@ -137,7 +137,7 @@ impl ChatModel<()> for PeakModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.calls.fetch_add(1, Ordering::SeqCst);let current = self.active.fetch_add(1, Ordering::SeqCst) + 1;self.record_peak(current);@@ -153,7 +153,7 @@ impl ChatModel<()> for PeakModel {if let Some(needle) = self.fail_on.lock().as_ref() {if flattened.contains(needle.as_str()) {- return Err(tinyinference::Error::Model(+ return Err(tinyinference_core::Error::Model("mock model forced failure".to_string(),));}diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rsindex bd2e919a09..411847775c 100644--- a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs@@ -3,7 +3,7 @@ use super::{SpanKind, SpanStatus, TraceContext};use tinyagents_harness::events::AgentEvent;use tinyagents_harness::ids::{CallId, EventId, RunId};use tinyagents_harness::observability::AgentObservation;-use tinyinference::usage::Usage;+use tinyinference_core::usage::Usage;/// Wraps an event as a journalled observation stamped at `ts`.fn obs(offset: u64, ts: u64, event: AgentEvent) -> AgentObservation {diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rsindex 7c09eb0581..7442a1e282 100644--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs@@ -3,7 +3,7 @@ use std::collections::BTreeMap;use crate::agent::progress_tracing::SpanKind;use tinyagents_harness::ids::{CallId, EventId, RunId};-use tinyinference::usage::Usage;+use tinyinference_core::usage::Usage;fn span(trace: &str,diff --git a/crates/openhuman-core/src/agent/schemas.rs b/crates/openhuman-core/src/agent/schemas.rsindex b07f4639ab..685d7cd01b 100644--- a/crates/openhuman-core/src/agent/schemas.rs+++ b/crates/openhuman-core/src/agent/schemas.rs@@ -518,7 +518,7 @@ fn handle_graph_topologies(_params: Map<String, Value>) -> ControllerFuture {fn local_catalog_models_from_config(config: &crate::config::Config,) -> Vec<crate::platform::cost::catalog::LocalCatalogModel> {- use tinyinference::local::profile::{profile_for_kind, LocalProviderKind, ToolSupport};+ use tinyinference_local::profile::{profile_for_kind, LocalProviderKind, ToolSupport};config.model_registrydiff --git a/crates/openhuman-core/src/agent/tinyagents/convert.rs b/crates/openhuman-core/src/agent/tinyagents/convert.rsindex e835db9389..e4187a6a18 100644--- a/crates/openhuman-core/src/agent/tinyagents/convert.rs+++ b/crates/openhuman-core/src/agent/tinyagents/convert.rs@@ -4,7 +4,7 @@//! OpenHuman transcript record it adapts. This module remains until WP-4//! decides the host tool-trait boundary.-use tinyinference::tool::ToolSchema;+use tinyinference_core::tool::ToolSchema;use crate::tools::ToolSpec;diff --git a/crates/openhuman-core/src/agent/tinyagents/embeddings.rs b/crates/openhuman-core/src/agent/tinyagents/embeddings.rsindex 913d6455ce..5a9d0ca595 100644--- a/crates/openhuman-core/src/agent/tinyagents/embeddings.rs+++ b/crates/openhuman-core/src/agent/tinyagents/embeddings.rs@@ -6,8 +6,8 @@//! (rate-limit + retry). This adapter is a **thin seam**: it wraps an//! `Arc<dyn EmbeddingProvider>` and re-exposes it as the crate's provider-neutral//! [`EmbeddingModel`] so the harness's retrieval surface-//! ([`Retriever`](tinyinference::embeddings::Retriever) /-//! [`VectorStore`](tinyinference::embeddings::VectorStore)) can drive+//! ([`Retriever`](tinyinference_core::embeddings::Retriever) /+//! [`VectorStore`](tinyinference_core::embeddings::VectorStore)) can drive//! OpenHuman embeddings without cloning provider logic.//!//! The only real work here is bridging the batch signature: the crate trait@@ -22,8 +22,8 @@use std::sync::Arc;use async_trait::async_trait;-use tinyinference::embeddings::EmbeddingModel as TaEmbeddingModel;-use tinyinference::{Error as TiError, Result as TaResult};+use tinyinference_core::embeddings::EmbeddingModel as TaEmbeddingModel;+use tinyinference_core::{Error as TiError, Result as TaResult};use crate::inference::embeddings::EmbeddingProvider;diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rsindex 0ed4276e1d..2273e2a919 100644--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs@@ -12,7 +12,7 @@ use tinyagents_harness::middleware::{use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::steering::SteeringHandle;use tinyagents_registry::{CapabilityRegistry, RegistryDiagnostic, RegistrySnapshot};-use tinyinference::model::CapabilitySet;+use tinyinference_core::model::CapabilitySet;use tokio::sync::mpsc::Sender;use crate::agent::harness::tool_result_artifacts::ToolResultArtifactIndexStore;diff --git a/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs b/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rsindex 9fdfc48098..d7ba20756d 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs@@ -65,7 +65,7 @@ use tinyagents_harness::error::{Result, TinyAgentsError};use tinyagents_harness::host::budget_gate::{BudgetGate, CallEstimate, CompressionHint, ContextState, Permit,};-use tinyinference::usage::Usage;+use tinyinference_core::usage::Usage;use crate::config::{Config, DEFAULT_MODEL};use crate::cron::scheduler_gate;diff --git a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rsindex 15cbf18236..2142bc5f5c 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs@@ -71,7 +71,7 @@ use std::sync::Arc;use async_trait::async_trait;use tinyagents_harness::error::{Result as TinyAgentsResult, TinyAgentsError};use tinyagents_harness::host::{ContextComposer, TurnContextRequest};-use tinyinference::message::Message;+use tinyinference_core::message::Message;use crate::agent::prompts::{load_agents_md_layers, render_connected_identities, AgentsMdContent, ConnectedIntegration,diff --git a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rsindex 7abdaef0a8..44edf8e1ac 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs@@ -70,7 +70,9 @@ use async_trait::async_trait;use tinyagents_harness::error::TinyAgentsError;use tinyagents_harness::host::{ModelResolveRequest, ModelResolver};use tinyagents_harness::Result as TaResult;-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream};+use tinyinference_core::model::{+ ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream,+};use crate::config::Config;use crate::inference::provider::{create_chat_model_with_model_id, role_for_model_tier};@@ -229,7 +231,7 @@ impl<State: Send + Sync> ChatModel<State> for StatelessModel {&self,_state: &State,request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.inner.invoke(&(), request).await}@@ -237,7 +239,7 @@ impl<State: Send + Sync> ChatModel<State> for StatelessModel {&self,_state: &State,request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {self.inner.stream(&(), request).await}}diff --git a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver_tests.rsindex 027df55003..841e74be0f 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver_tests.rs@@ -142,7 +142,7 @@ impl ChatModel<()> for EchoModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant(self.0))}}diff --git a/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rsindex 3e1da83a28..eb54003da6 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rs@@ -1,7 +1,7 @@use super::*;use std::sync::Arc;use tinyagents_harness::ids::{CallId, RunId, ThreadId};-use tinyinference::usage::Usage;+use tinyinference_core::usage::Usage;use tokio::sync::mpsc;fn run() -> RunId {diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rsindex a9222d0e56..9d6b7ea5cb 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rs@@ -9,7 +9,7 @@ use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{MiddlewareToolOutcome, ToolHandler, ToolMiddleware};use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;use crate::security::approval::{redact_args, summarize_action, ApprovalGate, ExecutionOutcome, GateOutcome,diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/arg_recovery.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/arg_recovery.rsindex 8ca02b5517..0c9a4bba9d 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/arg_recovery.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/arg_recovery.rs@@ -8,7 +8,7 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;-use tinyinference::tool::{ToolCall as TaToolCall, ToolSchema};+use tinyinference_core::tool::{ToolCall as TaToolCall, ToolSchema};use crate::tools::Tool;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/artifact_index_toc.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/artifact_index_toc.rsindex f1a4e8f007..216461dee8 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/artifact_index_toc.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/artifact_index_toc.rs@@ -6,8 +6,8 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;-use tinyinference::message::Message as TaMessage;-use tinyinference::model::ModelRequest;+use tinyinference_core::message::Message as TaMessage;+use tinyinference_core::model::ModelRequest;use super::message_trim::estimate_text_tokens;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/cli_rpc_only.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/cli_rpc_only.rsindex 66d2a4c762..b43325392a 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/cli_rpc_only.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/cli_rpc_only.rs@@ -9,7 +9,7 @@ use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{MiddlewareToolOutcome, ToolHandler, ToolMiddleware};use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;use crate::tools::Tool;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/cost_budget.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/cost_budget.rsindex f110cf0e7c..fc4164bf2d 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/cost_budget.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/cost_budget.rs@@ -7,7 +7,7 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{AgentRun, BudgetTracker, Middleware};-use tinyinference::model::ModelRequest;+use tinyinference_core::model::ModelRequest;/// `before_model`: enforce OpenHuman's daily/monthly cost budgets **before** a/// model call spends (issue #4249, Phase 5). Reads the globaldiff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rsindex d92ab859be..134c525b03 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rs@@ -6,7 +6,7 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{MiddlewareToolOutcome, ToolHandler, ToolMiddleware};-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;/// Recursively scrub credential-shaped string leaves inside a JSON value.fn scrub_json_credentials(value: serde_json::Value) -> serde_json::Value {diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/embedder_hooks.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/embedder_hooks.rsindex 7eb274fda7..f7353f3169 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/embedder_hooks.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/embedder_hooks.rs@@ -7,7 +7,7 @@ use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;/// Delivers tool lifecycle events to hooks installed by an embedding host.pub(crate) struct EmbedderToolHooksMiddleware {diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rsindex 598d6c7f35..1a61c61d65 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs@@ -8,8 +8,8 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;-use tinyinference::message::{ContentBlock, Message as TaMessage};-use tinyinference::model::ModelRequest;+use tinyinference_core::message::{ContentBlock, Message as TaMessage};+use tinyinference_core::model::ModelRequest;use crate::agent::context::CLEARED_PLACEHOLDER;@@ -129,7 +129,7 @@ impl Middleware<()> for FinalCallWrapUpMiddleware {turn's conclusion");request.tools.clear();- request.tool_choice = tinyinference::model::ToolChoice::None;+ request.tool_choice = tinyinference_core::model::ToolChoice::None;// Give the concluding call back the results microcompact blanked.//// `MicrocompactMiddleware` replaces every tool-result body past thediff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/loop_guards.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/loop_guards.rsindex 6c46892437..17c7b7f219 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/loop_guards.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/loop_guards.rs@@ -114,7 +114,7 @@ fn has_inference_failure_envelope(result: &str) -> bool {/// Ported from legacy `tool_loop::terminal_inference_failure_kind` (#3104).pub(crate) fn terminal_inference_failure_kind(result: &str) -> Option<TerminalInferenceFailure> {use crate::inference::provider::is_provider_config_rejection_message;- use tinyinference::classification::is_budget_exhausted_message;+ use tinyinference_core::classification::is_budget_exhausted_message;if !has_inference_failure_envelope(result) {return None;}diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_protocol.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_protocol.rsindex a487a0a00b..71291d635b 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_protocol.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_protocol.rs@@ -7,7 +7,7 @@ use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{AgentRun, Middleware};use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;/// Agents are told to follow a **read-index → dedupe → write → update-index**/// cycle around durable memory, but the contract was never enforced, so it wasdiff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rsindex 19084a8354..10a988e78a 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rs@@ -6,8 +6,8 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;-use tinyinference::message::{ContentBlock, Message as TaMessage};-use tinyinference::model::ModelRequest;+use tinyinference_core::message::{ContentBlock, Message as TaMessage};+use tinyinference_core::model::ModelRequest;// ── ImageAwareMessageTrimMiddleware ───────────────────────────────────────────diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route.rsindex 6fe95efbc8..e934b30d38 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route.rs@@ -9,7 +9,7 @@ use serde_json::{json, Value};use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;use crate::tools::agent_policy::ToolPolicySession;use crate::tools::toolpacks::{self, GroupMode, USE_SKILL};diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/prompt_cache.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/prompt_cache.rsindex b82dcc3cff..a3093d0033 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/prompt_cache.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/prompt_cache.rs@@ -8,8 +8,8 @@ use sha2::{Digest, Sha256};use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;-use tinyinference::message::Message as TaMessage;-use tinyinference::model::{ModelRequest, PromptSegment, SegmentRole};+use tinyinference_core::message::Message as TaMessage;+use tinyinference_core::model::{ModelRequest, PromptSegment, SegmentRole};/// Stable SHA-256 fingerprint over canonical JSON. TinyAgents' prompt builder/// uses the same shape for `ModelRequest::prompt_fingerprint`; OpenHuman buildsdiff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeat_progress.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeat_progress.rsindex 06b344d2b2..19ddf13c38 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeat_progress.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeat_progress.rs@@ -16,15 +16,15 @@ use tinyagents_harness::no_progress::{};use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::message::{ContentBlock, Message};-use tinyinference::model::{ModelRequest, ModelResponse};+use tinyinference_core::message::{ContentBlock, Message};+use tinyinference_core::model::{ModelRequest, ModelResponse};use super::loop_guards::is_repeat_call_exempt;use crate::agent::context::CLEARED_PLACEHOLDER;/// Extract the assistant's visible text (concatenated [`ContentBlock::Text`]/// blocks) from a model response message, for the repeat-output signature.-fn assistant_visible_text(message: &tinyinference::message::AssistantMessage) -> String {+fn assistant_visible_text(message: &tinyinference_core::message::AssistantMessage) -> String {let mut out = String::new();for block in &message.content {if let ContentBlock::Text(t) = block {diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rsindex a3593aa41b..d8fecbf38f 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs@@ -12,8 +12,8 @@ use tinyagents_harness::middleware::Middleware;use tinyagents_harness::no_progress::{NoProgress, NoProgressTracker, ToolAttempt};use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::message::Message as TaMessage;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::message::Message as TaMessage;+use tinyinference_core::tool::ToolCall as TaToolCall;use super::loop_guards::{is_recoverable_tool_failure, is_repeat_call_exempt, recoverable_identical_halt_summary,diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_exposure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_exposure.rsindex 5c382d17d8..de04adbed8 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_exposure.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_exposure.rs@@ -11,8 +11,8 @@ use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{ContextualToolSelectionMiddleware, Middleware, ToolAllowlistMiddleware,};-use tinyinference::model::ModelRequest;-use tinyinference::tool::ToolSchema;+use tinyinference_core::model::ModelRequest;+use tinyinference_core::tool::ToolSchema;/// SHADOW tool-exposure middleware (issue #4249, 01.3 — dynamic exposure).///diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rsindex c46103d018..502014926c 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rs@@ -12,7 +12,7 @@ use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::events::AgentEvent;use tinyagents_harness::middleware::Middleware;use tinyagents_harness::tool::{ToolPolicy as TaToolPolicy, ToolResult as TaToolResult};-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;use crate::agent::harness::tool_result_artifacts::{apply_per_result_persistence, artifact_read_target, page_artifact_read, ArtifactRead,diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rsindex 2f4981eccc..2dac8872aa 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs@@ -10,7 +10,7 @@ use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{MiddlewareToolOutcome, ToolHandler, ToolMiddleware};use tinyagents_harness::tool::ToolResult as TaToolResult;-use tinyinference::tool::ToolCall as TaToolCall;+use tinyinference_core::tool::ToolCall as TaToolCall;use crate::agent::tinyagents::policy_denial::PolicyDenial;use crate::tools::Tool;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rsindex 895bb84a8b..6209ca2731 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs@@ -12,8 +12,8 @@ use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::Middleware;use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::tool::{ToolPolicy as TaToolPolicy, ToolResult as TaToolResult};-use tinyinference::message::Message;-use tinyinference::model::{ModelRequest, ModelResponse};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ModelRequest, ModelResponse};use crate::agent::harness::tool_result_artifacts::ToolResultArtifactStore;use crate::agent::tinyagents::payload_summarizer::PayloadSummarizer;@@ -370,7 +370,7 @@ impl Middleware<()> for HandoffMiddleware {&self,_ctx: &mut RunContext<()>,_state: &(),- call: &mut tinyinference::tool::ToolCall,+ call: &mut tinyinference_core::tool::ToolCall,) -> TaResult<()> {if crate::agent::harness::tool_result_artifacts::artifact_read_target(&call.name,diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rsindex 891ecc43cc..3ad426bb86 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs@@ -75,7 +75,7 @@ async fn cost_budget_is_a_noop_without_a_global_tracker() {/// must be inert (no panic, `Ok`) when no shadow tracker is installed.#[tokio::test]async fn cost_budget_shadow_after_agent_never_fails_the_run() {- use tinyinference::usage::Usage;+ use tinyinference_core::usage::Usage;// No shadow tracker: after_agent is a silent no-op.let plain = CostBudgetMiddleware::new();diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_tests.rsindex 5a56346612..1f0f948d76 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_tests.rs@@ -17,9 +17,9 @@ use async_trait::async_trait;use tinyagents_harness::middleware::{AgentRun, BudgetTracker, Middleware};use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};use tinyagents_harness::tool::{ToolPolicy as TaToolPolicy, ToolResult as TaToolResult};-use tinyinference::message::{ContentBlock, Message as TaMessage};-use tinyinference::model::{ModelResponse, SegmentRole};-use tinyinference::tool::{ToolCall as TaToolCall, ToolSchema};+use tinyinference_core::message::{ContentBlock, Message as TaMessage};+use tinyinference_core::model::{ModelResponse, SegmentRole};+use tinyinference_core::tool::{ToolCall as TaToolCall, ToolSchema};use crate::agent::context::CLEARED_PLACEHOLDER;use crate::agent::tinyagents::payload_summarizer::{@@ -31,7 +31,7 @@ use tinyagents_harness::context::{RunConfig, RunContext};use tinyagents_harness::no_progress::{DEFAULT_REPEAT_CALL_THRESHOLD, DEFAULT_REPEAT_OUTPUT_THRESHOLD,};-use tinyinference::model::ModelRequest;+use tinyinference_core::model::ModelRequest;fn ctx() -> RunContext<()> {RunContext::new(RunConfig::new("mw-test"), ())@@ -301,7 +301,7 @@ fn body_failure_result(name: &str, extra: serde_json::Value) -> TaToolResult {fn repeated_success_response(tool: &str, args: serde_json::Value) -> ModelResponse {ModelResponse {- message: tinyinference::message::AssistantMessage {+ message: tinyinference_core::message::AssistantMessage {id: None,content: vec![ContentBlock::Text("working".to_string())],tool_calls: vec![TaToolCall::new("repeat-1", tool, args)],diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rsindex a0c380f883..64e84302e4 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs@@ -177,7 +177,7 @@ async fn wrap_up_withdraws_tools_and_appends_the_instruction_on_the_last_call()let mut request = ModelRequest {messages: vec![TaMessage::user("hi")],tools: vec![ToolSchema::new("echo", "echo", serde_json::json!({}))],- tool_choice: tinyinference::model::ToolChoice::Required,+ tool_choice: tinyinference_core::model::ToolChoice::Required,..Default::default()};@@ -188,7 +188,10 @@ async fn wrap_up_withdraws_tools_and_appends_the_instruction_on_the_last_call()"tools must be withdrawn, not discouraged");assert!(- matches!(request.tool_choice, tinyinference::model::ToolChoice::None),+ matches!(+ request.tool_choice,+ tinyinference_core::model::ToolChoice::None+ ),"a Required choice with no tools is a provider 400");assert_eq!(diff --git a/crates/openhuman-core/src/agent/tinyagents/model.rs b/crates/openhuman-core/src/agent/tinyagents/model.rsindex d399a4580b..f540ca63d1 100644--- a/crates/openhuman-core/src/agent/tinyagents/model.rs+++ b/crates/openhuman-core/src/agent/tinyagents/model.rs@@ -3,12 +3,12 @@use std::sync::{Arc, Mutex};use async_trait::async_trait;-use tinyinference::message::{AssistantMessage, ContentBlock, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, ContentBlock, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::{ToolCall as TaToolCall, ToolDelta};-use tinyinference::usage::Usage;+use tinyinference_core::tool::{ToolCall as TaToolCall, ToolDelta};+use tinyinference_core::usage::Usage;use tokio::sync::mpsc::UnboundedSender;use crate::agent::messages::ChatMessage;@@ -454,7 +454,7 @@ impl ChatModel<()> for RouteRecordingModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.record_route();self.inner.invoke(state, request).await}@@ -463,7 +463,7 @@ impl ChatModel<()> for RouteRecordingModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {self.record_route();self.inner.stream(state, request).await}@@ -519,7 +519,7 @@ impl ChatModel<()> for ProfileOverrideModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.inner.invoke(state, self.pin_request_options(request)).await@@ -529,7 +529,7 @@ impl ChatModel<()> for ProfileOverrideModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {self.inner.stream(state, self.pin_request_options(request)).await@@ -569,7 +569,7 @@ impl ChatModel<()> for MaxTokensModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.inner.invoke(state, self.cap(request)).await}@@ -577,7 +577,7 @@ impl ChatModel<()> for MaxTokensModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {self.inner.stream(state, self.cap(request)).await}}diff --git a/crates/openhuman-core/src/agent/tinyagents/model_g1_usage_tests_tests.rs b/crates/openhuman-core/src/agent/tinyagents/model_g1_usage_tests_tests.rsindex 5996f2a582..b75dcd4fac 100644--- a/crates/openhuman-core/src/agent/tinyagents/model_g1_usage_tests_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/model_g1_usage_tests_tests.rs@@ -122,7 +122,7 @@ fn tool_enabled_response_still_extracts_tool_call_markup() {fn tool_request() -> ModelRequest {ModelRequest {- tools: vec![tinyinference::tool::ToolSchema::new(+ tools: vec![tinyinference_core::tool::ToolSchema::new("lookup","looks up a record",serde_json::json!({diff --git a/crates/openhuman-core/src/agent/tinyagents/model_route_recording_tests_tests.rs b/crates/openhuman-core/src/agent/tinyagents/model_route_recording_tests_tests.rsindex bd7058c907..631097897d 100644--- a/crates/openhuman-core/src/agent/tinyagents/model_route_recording_tests_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/model_route_recording_tests_tests.rs@@ -11,7 +11,7 @@ impl ChatModel<()> for SuccessfulModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("ok"))}}@@ -79,7 +79,7 @@ impl ChatModel<()> for IdentifiedModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("ok"))}}diff --git a/crates/openhuman-core/src/agent/tinyagents/observability.rs b/crates/openhuman-core/src/agent/tinyagents/observability.rsindex 906d0ed8d7..335a97cd76 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability.rs@@ -19,7 +19,7 @@ use std::sync::Arc;#[cfg(test)]use tinyagents_harness::events::AgentEvent;#[cfg(test)]-use tinyinference::usage::Usage;+use tinyinference_core::usage::Usage;#[cfg(test)]use crate::agent::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/tinyagents/observability/cap_pauser_tests.rs b/crates/openhuman-core/src/agent/tinyagents/observability/cap_pauser_tests.rsindex dfe171ff80..aa5ec32fd1 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability/cap_pauser_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability/cap_pauser_tests.rs@@ -12,9 +12,9 @@ use tinyagents_harness::steering::SteeringPolicy;use tinyagents_harness::subagent::SubAgent;use tinyagents_harness::testkit::{FakeTool, ScriptedModel, SlowModel};use tinyagents_harness::tool::ToolResult;-use tinyinference::message::{AssistantMessage, Message};-use tinyinference::model::{ChatModel, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::{AssistantMessage, Message};+use tinyinference_core::model::{ChatModel, ModelResponse};+use tinyinference_core::tool::ToolCall;const CAP: usize = 3;diff --git a/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs b/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rsindex a78892766d..d2a94baa38 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs@@ -7,7 +7,7 @@ use std::sync::{Arc, Mutex};use tokio::sync::mpsc::Sender;-use tinyinference::usage::Usage;+use tinyinference_core::usage::Usage;use crate::agent::progress::AgentProgress;use crate::inference::provider::UsageInfo;diff --git a/crates/openhuman-core/src/agent/tinyagents/retriever.rs b/crates/openhuman-core/src/agent/tinyagents/retriever.rsindex 5880c9cdc0..ac7896cd10 100644--- a/crates/openhuman-core/src/agent/tinyagents/retriever.rs+++ b/crates/openhuman-core/src/agent/tinyagents/retriever.rs@@ -44,7 +44,7 @@ use std::sync::{Arc, OnceLock};use serde_json::json;use tinyagents_harness::events::{AgentEvent, EventSink};-use tinyinference::embeddings::{+use tinyinference_core::embeddings::{EmbeddingModel as TaEmbeddingModel, InMemoryVectorStore, Retriever, ScoredDoc,};diff --git a/crates/openhuman-core/src/agent/tinyagents/routes.rs b/crates/openhuman-core/src/agent/tinyagents/routes.rsindex 9a0b36c141..65dcd80de1 100644--- a/crates/openhuman-core/src/agent/tinyagents/routes.rs+++ b/crates/openhuman-core/src/agent/tinyagents/routes.rs@@ -8,7 +8,7 @@ use tinyagents_harness::events::AgentEvent;use tinyagents_harness::middleware::{MiddlewareModelOutcome, ModelHandler, ModelMiddleware};use tinyagents_harness::retry::FallbackPolicy;use tinyagents_registry::{ModelRouter, WorkloadRoute};-use tinyinference::model::{CapabilitySet, ModelRequest};+use tinyinference_core::model::{CapabilitySet, ModelRequest};use crate::config::{MODEL_AGENTIC_V1, MODEL_BURST_V1, MODEL_CHAT_V1, MODEL_CODING_V1, MODEL_REASONING_V1,diff --git a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rsindex 93bd3006d0..845ead6d01 100644--- a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs+++ b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs@@ -29,7 +29,7 @@ use std::sync::Arc;use std::time::Duration;use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};-use tinyinference::message::Message as TaMessage;+use tinyinference_core::message::Message as TaMessage;use crate::agent::harness::run_queue::{QueueMode, QueuedMessage, RunQueue};use crate::core::bus::BUS;diff --git a/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs b/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rsindex 152d03c4f8..290d57b0d6 100644--- a/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs+++ b/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs@@ -28,7 +28,7 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::middleware::Middleware;use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};-use tinyinference::model::ModelResponse;+use tinyinference_core::model::ModelResponse;use crate::agent::cost::TurnCost;use crate::agent::stop_hooks::{StopDecision, StopHook, TurnState};diff --git a/crates/openhuman-core/src/agent/tinyagents/summarize.rs b/crates/openhuman-core/src/agent/tinyagents/summarize.rsindex 0fd7af566b..0d2de4b90b 100644--- a/crates/openhuman-core/src/agent/tinyagents/summarize.rs+++ b/crates/openhuman-core/src/agent/tinyagents/summarize.rs@@ -31,10 +31,10 @@ use tinyagents_harness::error::{Result as TaResult, TinyAgentsError};use tinyagents_harness::summarization::{estimate_tokens, CompressionProvenance, SummarizationPolicy, Summarizer, SummaryRecord,};-use tinyinference::message::Message as TaMessage;+use tinyinference_core::message::Message as TaMessage;-use tinyinference::message::Message as HarnessMessage;-use tinyinference::model::{ChatModel, ModelRequest};+use tinyinference_core::message::Message as HarnessMessage;+use tinyinference_core::model::{ChatModel, ModelRequest};/// Fraction of the model's context window at which summarization fires.///diff --git a/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rsindex 64075ad2d1..d80b44ce48 100644--- a/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rs@@ -68,7 +68,7 @@ fn crate_native_text_mode_disables_native_tools_on_workload_fallbacks() {#[test]fn direct_model_turn_source_builds_without_provider_adapter() {- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::replies(vec!["done",]));diff --git a/crates/openhuman-core/src/agent/tinyagents/tools.rs b/crates/openhuman-core/src/agent/tinyagents/tools.rsindex 1aec2861ce..6514d22429 100644--- a/crates/openhuman-core/src/agent/tinyagents/tools.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tools.rs@@ -14,7 +14,7 @@ use tinyagents_harness::tool::{SandboxMode, Tool, ToolAccess, ToolExecutionContext, ToolPolicy, ToolResult as TaToolResult,ToolRuntime, ToolSideEffects, ToolTimeout as TaToolTimeout, WorkspaceAccess,};-use tinyinference::tool::{ToolCall as TaToolCall, ToolSchema};+use tinyinference_core::tool::{ToolCall as TaToolCall, ToolSchema};use tinytools::ToolRunContext;/// A captured early-exit: a sub-agent invoked an early-exit tool (e.g.diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs b/crates/openhuman-core/src/agent/tinyagents/turn_models.rsindex d551f9bc8e..13ebd79935 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs@@ -23,7 +23,7 @@ pub(crate) fn tinyagents_depth_error(}}-/// The per-turn crate [`ChatModel`](tinyinference::model::ChatModel) set,+/// The per-turn crate [`ChatModel`](tinyinference_core::model::ChatModel) set,/// built once from an openhuman [`Provider`] by [`build_turn_models`] — the/// single place a turn's `native model adapters are constructed (issue #4249, Phase 5).///@@ -258,7 +258,7 @@ impl TurnModelSource {/// does not expose (common for deterministic scripted tests).pub(crate) fn from_model_with_profile(model: TurnChatModel,- profile: tinyinference::model::ModelProfile,+ profile: tinyinference_core::model::ModelProfile,) -> Self {Self::from_model(Arc::new(ProfileOverrideModel::new(model, profile)))}@@ -331,8 +331,8 @@ impl TurnModelSource {});let local_kind = provider_string.as_deref()- .and_then(tinyinference::local::profile::kind_from_provider_string);- tinyinference::model::context_window_with_local_fallback(+ .and_then(tinyinference_local::profile::kind_from_provider_string);+ tinyinference_local::profile::context_window_with_local_fallback(model,crate::inference::model_context::context_window_for_model(model),local_kind,@@ -353,7 +353,7 @@ impl TurnModelSource {let provider = source.primary_override.clone().unwrap_or_else(|| {crate::inference::provider::provider_for_role(&source.role, &source.config)});- tinyinference::local::profile::is_local_provider_string(&provider)+ tinyinference_local::profile::is_local_provider_string(&provider)})}@@ -401,8 +401,7 @@ impl TurnModelSource {let provider_string = cn.primary_override.clone().unwrap_or_else(|| {crate::inference::provider::provider_for_role(&cn.role, &cn.config)});- let is_local =- tinyinference::local::profile::is_local_provider_string(&provider_string);+ let is_local = tinyinference_local::profile::is_local_provider_string(&provider_string);let provider_id = if provider_string == "openhuman"|| provider_string.is_empty()|| provider_string == "cloud"@@ -431,7 +430,7 @@ impl TurnModelSource {Err(anyhow::anyhow!("turn model source is missing a model"))}- /// Build a standalone summarizer [`ChatModel`](tinyinference::model::ChatModel)+ /// Build a standalone summarizer [`ChatModel`](tinyinference_core::model::ChatModel)/// over this source's provider — a fresh adapter (own error slot) for one-off/// summary calls outside the main turn (e.g. the sub-agent cap-hit checkpoint),/// so the caller can `invoke` without naming the `Provider` trait. The output@@ -440,7 +439,7 @@ impl TurnModelSource {&self,model: &str,temperature: f64,- ) -> anyhow::Result<Arc<dyn tinyinference::model::ChatModel<()>>> {+ ) -> anyhow::Result<Arc<dyn tinyinference_core::model::ChatModel<()>>> {if let Some(direct) = &self.direct_model {let profile = direct.profile().cloned().unwrap_or_default();return Ok(Arc::new(diff --git a/crates/openhuman-core/src/agent/tools/delegate.rs b/crates/openhuman-core/src/agent/tools/delegate.rsindex 07c0ad402b..3fa4f272d3 100644--- a/crates/openhuman-core/src/agent/tools/delegate.rs+++ b/crates/openhuman-core/src/agent/tools/delegate.rs@@ -11,8 +11,8 @@ use serde_json::json;use std::collections::HashMap;use std::sync::Arc;use std::time::Duration;-use tinyinference::message::Message;-use tinyinference::model::{ChatModel, ModelRequest};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelRequest};/// Tool that delegates a subtask to a named agent with a different/// provider/model configuration. Enables multi-agent workflows wherediff --git a/crates/openhuman-core/src/agent/triage/evaluator_tests.rs b/crates/openhuman-core/src/agent/triage/evaluator_tests.rsindex efa7850f11..c83b640519 100644--- a/crates/openhuman-core/src/agent/triage/evaluator_tests.rs+++ b/crates/openhuman-core/src/agent/triage/evaluator_tests.rs@@ -25,7 +25,7 @@ fn arm_error_label(err: &ArmError) -> &'static str {// `provider_name` we inspect to disambiguate.fn unused_model_source() -> crate::agent::tinyagents::TurnModelSource {- let model: StdArc<dyn tinyinference::model::ChatModel<()>> =+ let model: StdArc<dyn tinyinference_core::model::ChatModel<()>> =StdArc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));crate::agent::tinyagents::TurnModelSource::from_model(model)}diff --git a/crates/openhuman-core/src/agent/triage/routing.rs b/crates/openhuman-core/src/agent/triage/routing.rsindex 3d82013a8d..1ca80030e7 100644--- a/crates/openhuman-core/src/agent/triage/routing.rs+++ b/crates/openhuman-core/src/agent/triage/routing.rs@@ -146,7 +146,7 @@ fn build_remote_provider(config: &Config) -> anyhow::Result<ResolvedProvider> {use crate::inference::provider::factory::{create_chat_model_from_string_with_model_id, PROVIDER_OPENHUMAN,};- use tinyinference::local::profile::is_local_provider_string;+ use tinyinference_local::profile::is_local_provider_string;let resolved = provider::provider_for_role("subconscious", config);let r = resolved.trim();diff --git a/crates/openhuman-core/src/api/rest.rs b/crates/openhuman-core/src/api/rest.rsindex d6df0f0c58..3bdf1b6540 100644--- a/crates/openhuman-core/src/api/rest.rs+++ b/crates/openhuman-core/src/api/rest.rs@@ -821,7 +821,7 @@ impl BackendOAuthClient {let is_transient_infra =crate::core::observability::is_transient_http_status_code(status_code);let is_budget_exhausted = status_code == 400- && tinyinference::classification::is_budget_exhausted_message(&text);+ && tinyinference_core::classification::is_budget_exhausted_message(&text);if is_budget_exhausted {tracing::info!(method = method.as_str(),diff --git a/crates/openhuman-core/src/bin/library_profile/mock.rs b/crates/openhuman-core/src/bin/library_profile/mock.rsindex 7f0445febb..cdc5d71cb9 100644--- a/crates/openhuman-core/src/bin/library_profile/mock.rs+++ b/crates/openhuman-core/src/bin/library_profile/mock.rs@@ -7,9 +7,9 @@ use std::time::Duration;use async_trait::async_trait;use openhuman_core::inference::provider::types::{ChatResponse, ToolCall};-use tinyinference::message::{AssistantMessage, ContentBlock, Message};-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall as TinyAgentsToolCall;+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall as TinyAgentsToolCall;/// A plain `ChatResponse` carrying only text (no tool calls).pub fn response(text: &str) -> ChatResponse {@@ -319,7 +319,7 @@ impl ChatModel<()> for SubagentMock {&self,_state: &(),request: ModelRequest,- ) -> Result<ModelResponse, tinyinference::Error> {+ ) -> Result<ModelResponse, tinyinference_core::Error> {Ok(model_response(self.dispatch(&joined_request(&request)).await,))@@ -376,7 +376,7 @@ impl ChatModel<()> for LatencyMock {&self,_state: &(),request: ModelRequest,- ) -> Result<ModelResponse, tinyinference::Error> {+ ) -> Result<ModelResponse, tinyinference_core::Error> {self.latency.sleep_sampled().await;let joined = joined_request(&request);record(&self.prompts, &joined);@@ -406,7 +406,7 @@ impl ChatModel<()> for PlainTextMock {&self,_state: &(),request: ModelRequest,- ) -> Result<ModelResponse, tinyinference::Error> {+ ) -> Result<ModelResponse, tinyinference_core::Error> {let joined = joined_request(&request);record(&self.prompts, &joined);Ok(model_response(response(&self.text)))@@ -492,7 +492,7 @@ impl ChatModel<()> for SkillRunMock {&self,_state: &(),request: ModelRequest,- ) -> Result<ModelResponse, tinyinference::Error> {+ ) -> Result<ModelResponse, tinyinference_core::Error> {Ok(model_response(self.reply(&joined_request(&request))))}}diff --git a/crates/openhuman-core/src/bin/rss_bench.rs b/crates/openhuman-core/src/bin/rss_bench.rsindex 04d68cf3cd..1366839d58 100644--- a/crates/openhuman-core/src/bin/rss_bench.rs+++ b/crates/openhuman-core/src/bin/rss_bench.rs@@ -39,7 +39,7 @@ use std::process::Stdio;use std::sync::Arc;use std::time::Duration;use tempfile::TempDir;-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};/// Roster sizes measured by default: the 1-agent baseline and the/// representative 8-agent company roster from #5046.@@ -62,7 +62,7 @@ impl ChatModel<()> for MockModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("ok"))}}diff --git a/crates/openhuman-core/src/channels/context_tests.rs b/crates/openhuman-core/src/channels/context_tests.rsindex 2f2616f913..22e462b281 100644--- a/crates/openhuman-core/src/channels/context_tests.rs+++ b/crates/openhuman-core/src/channels/context_tests.rs@@ -40,7 +40,7 @@ fn memory_entry(key: &str, content: &str, score: Option<f64>) -> MemoryEntry {}fn runtime_context() -> ChannelRuntimeContext {- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::replies(vec!["ok",]));diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rsindex a9efd4e0ac..b2197585de 100644--- a/crates/openhuman-core/src/channels/routes_tests.rs+++ b/crates/openhuman-core/src/channels/routes_tests.rs@@ -113,7 +113,7 @@ impl Channel for RecordingChannel {}fn runtime_context(workspace_dir: PathBuf) -> ChannelRuntimeContext {- let model: Arc<dyn tinyinference::model::ChatModel<()>> =+ let model: Arc<dyn tinyinference_core::model::ChatModel<()>> =Arc::new(tinyagents_harness::testkit::ScriptedModel::replies(vec!["ok",]));diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex 496678d024..127025c264 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -138,7 +138,7 @@ pub(crate) async fn process_channel_runtime_message(("provider", route.provider.as_str()),],);- let safe_err = tinyinference::sanitize::sanitize_api_error(&err.to_string());+ let safe_err = tinyinference_core::sanitize::sanitize_api_error(&err.to_string());let message = format!("⚠️ Failed to initialize provider `{}`. Please run `/models` to choose another provider.\nDetails: {safe_err}",route.providerdiff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex b7f81b278e..53ca695f03 100644--- a/crates/openhuman-core/src/channels/runtime/test_support.rs+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs@@ -26,7 +26,7 @@ use std::path::PathBuf;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};use tinymemory_api::types::{MemoryCategory, MemoryEntry};#[derive(Debug, Clone)]@@ -247,7 +247,7 @@ impl ChatModel<()> for HarnessModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let message = request.messages.last()diff --git a/crates/openhuman-core/src/channels/tests/common.rs b/crates/openhuman-core/src/channels/tests/common.rsindex d74ef1bd5e..50a4a50a73 100644--- a/crates/openhuman-core/src/channels/tests/common.rs+++ b/crates/openhuman-core/src/channels/tests/common.rs@@ -5,9 +5,9 @@ use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;use tempfile::TempDir;-use tinyinference::message::{AssistantMessage, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::{AssistantMessage, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;fn message_role(message: &Message) -> &'static str {match message {@@ -93,7 +93,7 @@ impl ChatModel<()> for DummyModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("ok"))}}@@ -182,7 +182,7 @@ impl ChatModel<()> for SlowModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {tokio::time::sleep(self.delay).await;let message = request.messages@@ -207,7 +207,7 @@ impl ChatModel<()> for ToolCallingModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let has_tool_results = request.messages.iter().any(|message| {matches!(message, Message::Tool(_)) || message.text().contains("[Tool results]")});@@ -246,7 +246,7 @@ impl ChatModel<()> for IterativeToolModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let completed_iterations = Self::completed_tool_iterations(&request.messages);if completed_iterations >= self.required_tool_iterations {Ok(ModelResponse::assistant(format!(@@ -273,7 +273,7 @@ impl ChatModel<()> for HistoryCaptureModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let snapshot = request.messages.iter()@@ -312,7 +312,7 @@ impl ChatModel<()> for ModelCaptureModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.call_count.fetch_add(1, Ordering::SeqCst);self.models.lock()diff --git a/crates/openhuman-core/src/channels/tests/discord_integration.rs b/crates/openhuman-core/src/channels/tests/discord_integration.rsindex 1cd2c05279..e6c952ba64 100644--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs@@ -34,7 +34,7 @@ use crate::agent::bus::{mock_agent_run_turn, AgentTurnResponse};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};// ── Test helpers ────────────────────────────────────────────────────────────@@ -93,7 +93,7 @@ impl ChatModel<()> for FixedResponseModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant(self.response))}}diff --git a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rsindex 77e4eae7c3..ab5267b898 100644--- a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs@@ -12,7 +12,7 @@ use crate::inference::provider;use std::collections::HashMap;use std::sync::atomic::Ordering;use std::sync::{Arc, Mutex};-use tinyinference::model::ChatModel;+use tinyinference_core::model::ChatModel;#[tokio::test]async fn process_channel_message_executes_native_tool_calls() {diff --git a/crates/openhuman-core/src/channels/tests/telegram_integration.rs b/crates/openhuman-core/src/channels/tests/telegram_integration.rsindex a44752b924..2e20f82fa2 100644--- a/crates/openhuman-core/src/channels/tests/telegram_integration.rs+++ b/crates/openhuman-core/src/channels/tests/telegram_integration.rs@@ -17,7 +17,7 @@ use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};// ── Test helpers ────────────────────────────────────────────────────────────@@ -69,7 +69,7 @@ impl ChatModel<()> for FixedResponseModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant(self.response))}}diff --git a/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs b/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rsindex 733ff4e9ff..c11ed3bd7e 100644--- a/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs+++ b/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs@@ -55,7 +55,7 @@ use crate::config::Config;use crate::inference::embeddings::{DEFAULT_CLOUD_EMBEDDING_DIMENSIONS, DEFAULT_CLOUD_EMBEDDING_MODEL,};-use tinyinference::embeddings::{DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL};+use tinyinference_core::embeddings::{DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL};/// The removed provider value that must not reach the embedding factory.const REMOVED_PROVIDER: &str = "fastembed";diff --git a/crates/openhuman-core/src/config/migrations/mod.rs b/crates/openhuman-core/src/config/migrations/mod.rsindex c56861185d..b2ae622c57 100644--- a/crates/openhuman-core/src/config/migrations/mod.rs+++ b/crates/openhuman-core/src/config/migrations/mod.rs@@ -380,7 +380,7 @@ pub async fn run_pending(config: &mut Config) {.trim().eq_ignore_ascii_case("fastembed"){- let base = tinyinference::local::ollama::ollama_base_url_from_override(+ let base = tinyinference_local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref(),);migrate_legacy_embedding_provider::local_ollama_reachable(&base).awaitdiff --git a/crates/openhuman-core/src/config/ops/local_ai_presets.rs b/crates/openhuman-core/src/config/ops/local_ai_presets.rsindex b237e39296..ddde5e42e3 100644--- a/crates/openhuman-core/src/config/ops/local_ai_presets.rs+++ b/crates/openhuman-core/src/config/ops/local_ai_presets.rs@@ -1,7 +1,7 @@//! OpenHuman configuration mapping for TinyInference local-model presets.use crate::config::schema::LocalAiConfig;-use tinyinference::local::presets::{all_presets, preset_for_tier, ModelTier, VisionMode};+use tinyinference_local::presets::{all_presets, preset_for_tier, ModelTier, VisionMode};pub fn vision_mode_for_config(config: &LocalAiConfig) -> VisionMode {match current_tier_from_config(config) {@@ -14,7 +14,7 @@ pub fn vision_mode_for_config(config: &LocalAiConfig) -> VisionMode {VisionMode::Ondemand}}- tier => tinyinference::local::presets::vision_mode_for_tier(tier),+ tier => tinyinference_local::presets::vision_mode_for_tier(tier),}}@@ -65,7 +65,7 @@ pub fn current_tier_from_config(config: &LocalAiConfig) -> ModelTier {}fn preset_matches_config(- preset: &tinyinference::local::presets::ModelPreset,+ preset: &tinyinference_local::presets::ModelPreset,config: &LocalAiConfig,) -> bool {let vision_matches = if matches!(preset.vision_mode, VisionMode::Disabled) {diff --git a/crates/openhuman-core/src/config/ops/model.rs b/crates/openhuman-core/src/config/ops/model.rsindex 3216dac8b9..ef9e3f692d 100644--- a/crates/openhuman-core/src/config/ops/model.rs+++ b/crates/openhuman-core/src/config/ops/model.rs@@ -317,8 +317,9 @@ pub async fn apply_memory_settings(// `embeddings::rpc::update_settings`), so a chat model id pasted here// would otherwise be stored unchecked and 400 "does not exist" on every// memory re-embed (2205 events from one user). Conservative check — see- // `tinyinference::embeddings::catalog::non_embedding_model_reason`.- if let Some(reason) = tinyinference::embeddings::catalog::non_embedding_model_reason(&model)+ // `tinyinference_core::embeddings::catalog::non_embedding_model_reason`.+ if let Some(reason) =+ tinyinference_core::embeddings::catalog::non_embedding_model_reason(&model){return Err(format!("invalid embeddings model `{model}`: {reason}"));}@@ -423,7 +424,7 @@ pub async fn apply_local_ai_settings(config.local_ai.opt_in_confirmed = v;}if let Some(provider) = update.provider {- config.local_ai.provider = tinyinference::local::provider::normalize_provider(&provider);+ config.local_ai.provider = tinyinference_local::provider::normalize_provider(&provider);}if let Some(base_url) = update.base_url {config.local_ai.base_url = match base_url {@@ -433,16 +434,13 @@ pub async fn apply_local_ai_settings(// must NOT go through `validate_ollama_url` (which strips the path).// `provider_from_name` maps omlx → Ollama, so guard on the slug here.Some(base_url)- if tinyinference::local::provider::normalize_provider(- &config.local_ai.provider,- ) != "omlx"- && tinyinference::local::provider::provider_from_name(+ if tinyinference_local::provider::normalize_provider(&config.local_ai.provider)+ != "omlx"+ && tinyinference_local::provider::provider_from_name(&config.local_ai.provider,- ) == tinyinference::local::provider::LocalAiProvider::Ollama =>+ ) == tinyinference_local::provider::LocalAiProvider::Ollama =>{- Some(tinyinference::local::ollama::validate_ollama_url(- &base_url,- )?)+ Some(tinyinference_local::ollama::validate_ollama_url(&base_url)?)}Some(base_url) => Some(base_url.trim().trim_end_matches('/').to_string()),};diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay.rs b/crates/openhuman-core/src/config/schema/load/env_overlay.rsindex 739289c7b3..4649c2caa5 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay.rs@@ -59,7 +59,7 @@ impl Config {set_runtime_proxy_config(self.proxy.clone());- tinyinference::embeddings::set_rate_limit(self.memory.embedding_rate_limit_per_min);+ tinyinference_core::embeddings::set_rate_limit(self.memory.embedding_rate_limit_per_min);// Launch flags are process-local and intentionally win over both the// persisted file and ordinary environment overlays. They are applieddiff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rsindex 450dc1140c..06c24a510d 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs@@ -9,10 +9,9 @@ impl Config {if let Some(tier_str) = env.get("OPENHUMAN_LOCAL_AI_TIER") {let tier_str = tier_str.trim().to_ascii_lowercase();if !tier_str.is_empty() {- if let Some(tier) =- tinyinference::local::presets::ModelTier::from_str_opt(&tier_str)+ if let Some(tier) = tinyinference_local::presets::ModelTier::from_str_opt(&tier_str){- if tier == tinyinference::local::presets::ModelTier::Custom {+ if tier == tinyinference_local::presets::ModelTier::Custom {tracing::warn!(tier = %tier_str,"ignoring custom OPENHUMAN_LOCAL_AI_TIER; only built-in presets are supported"diff --git a/crates/openhuman-core/src/core/jsonrpc.rs b/crates/openhuman-core/src/core/jsonrpc.rsindex 487e2dac2b..c4587d730d 100644--- a/crates/openhuman-core/src/core/jsonrpc.rs+++ b/crates/openhuman-core/src/core/jsonrpc.rs@@ -180,7 +180,7 @@ pub async fn rpc_handler(State(state): State<AppState>, Json(req): Json<RpcReque// query params, or pasted-through provider error text that// includes tokens. `sanitize_api_error` runs the same scrub// used in the SessionExpired publish path below.- let redacted = tinyinference::sanitize::sanitize_api_error(&display_message);+ let redacted = tinyinference_core::sanitize::sanitize_api_error(&display_message);tracing::warn!(method = %method,elapsed_ms = ms as u64,@@ -277,7 +277,7 @@ pub async fn invoke_method(state: AppState, method: &str, params: Value) -> Resu// the UI. Generic downstream/provider 401s must stay recoverable errors;// otherwise a scoped integration failure can log the user out.if let Err(ref msg) = result {- let sanitized_reason = tinyinference::sanitize::sanitize_api_error(msg);+ let sanitized_reason = tinyinference_core::sanitize::sanitize_api_error(msg);if is_session_expired_error(msg) {log::warn!("[jsonrpc] confirmed session expiry for method='{}' — publishing SessionExpired: {}",diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rsindex 6699a90040..29ef87049b 100644--- a/crates/openhuman-core/src/core/observability.rs+++ b/crates/openhuman-core/src/core/observability.rs@@ -648,7 +648,7 @@ pub fn expected_error_kind(message: &str) -> Option<ExpectedErrorKind> {if is_local_ai_capability_unavailable_message(&lower) {return Some(ExpectedErrorKind::LocalAiCapabilityUnavailable);}- if tinyinference::classification::is_budget_exhausted_message(message) {+ if tinyinference_core::classification::is_budget_exhausted_message(message) {return Some(ExpectedErrorKind::BudgetExhausted);}if is_prompt_injection_blocked_message(&lower) {@@ -3445,7 +3445,7 @@ fn event_contains_budget_exhausted_message(event: &sentry::protocol::Event<'_>)if event.message.as_deref()- .is_some_and(tinyinference::classification::is_budget_exhausted_message)+ .is_some_and(tinyinference_core::classification::is_budget_exhausted_message){return true;}@@ -3454,7 +3454,7 @@ fn event_contains_budget_exhausted_message(event: &sentry::protocol::Event<'_>)exception.value.as_deref()- .is_some_and(tinyinference::classification::is_budget_exhausted_message)+ .is_some_and(tinyinference_core::classification::is_budget_exhausted_message)})}diff --git a/crates/openhuman-core/src/cron/scheduler/failure_classification.rs b/crates/openhuman-core/src/cron/scheduler/failure_classification.rsindex 041e88eb9e..31b21d2a42 100644--- a/crates/openhuman-core/src/cron/scheduler/failure_classification.rs+++ b/crates/openhuman-core/src/cron/scheduler/failure_classification.rs@@ -193,7 +193,7 @@ pub(super) fn is_budget_exhausted_failure(return false;}let signal = last_agent_error.unwrap_or(last_output);- tinyinference::classification::is_budget_exhausted_message(signal)+ tinyinference_core::classification::is_budget_exhausted_message(signal)}/// TAURI-RUST-HCK — a cron **agent** job pinned to a provider with nodiff --git a/crates/openhuman-core/src/flows/tinyflows/caps/llm.rs b/crates/openhuman-core/src/flows/tinyflows/caps/llm.rsindex 7b02249afc..74b96ba75f 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/llm.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/llm.rs@@ -15,7 +15,7 @@ use tinyflows::error::{EngineError, Result};use super::*;use crate::config::Config;use crate::inference::provider::{create_chat_model_with_model_id, role_for_model_tier};-use tinyinference::model::ModelRequest;+use tinyinference_core::model::ModelRequest;/// [`LlmProvider`] adapter over OpenHuman's inference stack/// (`crates/openhuman-core/src/inference/provider/`).diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rsindex 4b426b7d1f..8ea45235d3 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs@@ -166,10 +166,10 @@ fn resolve_completion_model_leaves_managed_tier_and_hint_node_models_untouched()#[test]fn crate_model_response_preserves_flow_completion_contract() {- use tinyinference::message::{AssistantMessage, ContentBlock};- use tinyinference::model::ModelResponse;- use tinyinference::tool::ToolCall;- use tinyinference::usage::Usage;+ use tinyinference_core::message::{AssistantMessage, ContentBlock};+ use tinyinference_core::model::ModelResponse;+ use tinyinference_core::tool::ToolCall;+ use tinyinference_core::usage::Usage;let usage = Usage::new(11, 7);let response = ModelResponse {diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/prompt.rs b/crates/openhuman-core/src/flows/tinyflows/caps/prompt.rsindex 4696dee8fb..696d94b53c 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/prompt.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/prompt.rs@@ -38,7 +38,7 @@ pub(crate) fn usage_to_json(usage: &Option<UsageInfo>) -> Value {}pub(crate) fn model_response_to_completion_value(- response: &tinyinference::model::ModelResponse,+ response: &tinyinference_core::model::ModelResponse,) -> Value {json!({"text": response.text(),diff --git a/crates/openhuman-core/src/inference/README.md b/crates/openhuman-core/src/inference/README.mdindex 4146bc1c3f..4d13466fe1 100644--- a/crates/openhuman-core/src/inference/README.md+++ b/crates/openhuman-core/src/inference/README.md@@ -10,7 +10,7 @@ compatibility aliases in `crates/openhuman-core/src/core/legacy_aliases.rs`.## Responsibilities-- Resolve workload names (`chat`, `reasoning`, `agentic`, `coding`, `memory`, `embeddings`, `heartbeat`, `learning`, etc.) and provider strings (`openhuman`, `cloud`, `ollama:<model>`, `lmstudio:<model>`, `claude_agent_sdk:<model>`, `claude-code:<model>`, `<slug>:<model>[@<temp>]`) to a concrete `Arc<dyn tinyinference::ChatModel<()>>` + model id.+- Resolve workload names (`chat`, `reasoning`, `agentic`, `coding`, `memory`, `embeddings`, `heartbeat`, `learning`, etc.) and provider strings (`openhuman`, `cloud`, `ollama:<model>`, `lmstudio:<model>`, `claude_agent_sdk:<model>`, `claude-code:<model>`, `<slug>:<model>[@<temp>]`) to a concrete `Arc<dyn tinyinference_core::ChatModel<()>>` + model id.- Manage the local AI runtime: detect/spawn/adopt `ollama serve`, probe LM Studio over HTTP (never spawned), select OpenHuman-owned artifact paths, invoke TinyInference's Ollama/Piper installers, and enforce a minimum-context-window floor. Local STT (whisper.cpp) was retired; STT is now cloud/engine-configurable via `voice_server.stt_engine` (see `config/migrations/retire_local_whisper_stt.rs`).- Provide chat, vision (multimodal), summarization, embeddings, sentiment, and "should react" inference operations.- Preserve product-specific config-rejection, billing, and authentication policy while TinyInference owns provider-failure classification and TinyAgents owns model-call retry execution.@@ -29,31 +29,31 @@ compatibility aliases in `crates/openhuman-core/src/core/legacy_aliases.rs`.| `mod.rs` | Domain root; module decls + re-exports; wires `inference.*` controller schemas/controllers. || `ops.rs` | Canonical handler file — `inference_*` business logic returning `RpcOutcome<T>`; delegates to `local`, `provider`, `sentiment`, `device`, `presets`, `openai_oauth`. Includes Sentry-noise suppression for expected provider/user-config failures. || `schemas.rs` + `schemas/` (`catalog.rs`, `prompt_handlers.rs`, `oauth_handlers.rs`, `claude_code_handlers.rs`, `settings_handlers.rs`) | `inference.*` controller schemas + `handle_*` fns + param DTOs. |-| `tinyinference::{classification,completion,device,sanitize,sentiment}` | Reusable parsing, hardware detection, diagnostics, and error sanitization called directly by the host. |-| `tinyinference::model::model_id_supports_vision` | Upstream capability hint used directly for local model ids when the runtime cannot return an authoritative profile. |-| `tinyinference::model::effective_temperature` | Applies unsupported-model glob patterns and overrides before provider serialization. |+| `tinyinference_core::{classification,completion,device,sanitize,sentiment}` | Reusable parsing, hardware detection, diagnostics, and error sanitization called directly by the host. |+| `tinyinference_core::model::model_id_supports_vision` | Upstream capability hint used directly for local model ids when the runtime cannot return an authoritative profile. |+| `tinyinference_core::model::effective_temperature` | Applies unsupported-model glob patterns and overrides before provider serialization. || `types.rs` | Serde DTOs: `LocalAiStatus`, `LocalAiAssetsStatus`, `LocalAiDownloadsProgress`, `LocalAiEmbeddingResult`, `LocalAiSpeechResult`, `LocalAiTtsResult`, etc. || `model_context.rs` | Known model context-window sizes (`context_window_for_model`) for pre-dispatch budgeting. |-| `config/ops/local_ai_presets.rs` | OpenHuman `LocalAiConfig` mapping for `tinyinference::local::presets`; reusable tiers, recommendations, and preset data live upstream. |+| `config/ops/local_ai_presets.rs` | OpenHuman `LocalAiConfig` mapping for `tinyinference_local::presets`; reusable tiers, recommendations, and preset data live upstream. || `paths.rs` | Host-owned on-disk model artifact paths. Completion and sentiment parsing live in `tinyinference`. || `local/` | Local runtime manager (was `local_ai/`). See `local/README.md`. || `local/core.rs` | `LocalAiService` singleton (`global`/`try_global`), `model_artifact_path`. || `local/ops.rs` + `local/ops/` (`runtime_ops.rs`, `chat.rs`, `agent_chat.rs`, `reactions.rs`, `turn_guards.rs`) | Local RPC entrypoints (`local_ai_status/prompt/summarize/vision_prompt/embed/should_react`, `ReactionDecision`); re-exported as `local::rpc`. || `local/schemas.rs` | Local-runtime `inference.*` controller schemas + handlers. |-| `tinyinference::local` | Ollama/LM Studio wire types, URL handling, model requirements, runtime profiles, provider selection, process flags, spawn-marker persistence, Ollama installation, and Piper binary/voice installation. |+| `tinyinference_core::local` | Ollama/LM Studio wire types, URL handling, model requirements, runtime profiles, provider selection, process flags, spawn-marker persistence, Ollama installation, and Piper binary/voice installation. || `local/service/` | `LocalAiService` impl split: `bootstrap`, `assets`, `lm_studio`, `model_rpc`, `public_infer`, `speech`, `transcription`, `vision_embed`, `spawn_marker`, `ollama_admin/`. || `local/service/ollama_admin/` | Ollama daemon lifecycle split by concern: `binary`, `diagnostics`, `health`, `model_pull`, `server`, `util` (`test_ollama_connection`). || `provider/` | Native TinyAgents model construction plus host provider configuration, auth, error taxonomy, DTOs, and RPC helpers (was `providers/`). See `provider/README.md`. || `provider/types.rs` | Host request/response, streaming delta, tool-call, and usage DTOs retained at product/RPC boundaries. || `provider/factory.rs` + `provider/factory/` (`routing.rs`, `tiers.rs`, `turn_model.rs`, `subprocess_providers.rs`, `access_gates.rs`, `chat_model.rs`, `cloud_slug.rs`, `credentials.rs`, `local_runtime.rs`, `managed_backend.rs`, `primary_cloud.rs`) | `create_chat_model*`, `provider_for_role`, provider-string grammar, access gates, and local/cloud/CLI model construction; `BYOK_INCOMPLETE_SENTINEL`. |-| `tinyinference::providers::{openai,anthropic}` | OpenAI-compatible and Anthropic model builders, including Codex metadata and local-runtime construction. |+| `tinyinference_core::providers::{openai,anthropic}` | OpenAI-compatible and Anthropic model builders, including Codex metadata and local-runtime construction. || `provider/openhuman_backend_model.rs` | Managed OpenHuman backend `ChatModel` with session JWT, billing metadata, and thread context. || `provider/openai_codex.rs` | `pub(crate)` Codex routing metadata (`OpenAiCodexRouting`, `resolve_openai_codex_routing`): re-targets the `openai` slug at the ChatGPT Codex backend with account/originator headers when Codex OAuth tokens exist. Not a `ChatModel` itself. || `tinyagents_harness::providers::claude_agent_sdk` | Claude Agent SDK subprocess provider and prompt-guided tool adapter. || `tinyagents_harness::providers::claude_code` | Claude Code CLI provider (`claude-code:<model>`), stream-json parser/driver, auth probes, settings, and subprocess lifecycle. OpenHuman supplies only its MCP endpoint and product routing. |-| `provider/error_classify.rs` | OpenHuman policy layered on the reusable classifiers in `tinyinference::classification`. |-| `tinyinference::providers::openai::AuthStyle` | Wire auth style consumed directly by crate-native builders. |-| `provider/ops/` | Host HTTP policy, model catalog RPC, and provider configuration; reusable sanitization lives in `tinyinference::sanitize`. |+| `provider/error_classify.rs` | OpenHuman policy layered on the reusable classifiers in `tinyinference_core::classification`. |+| `tinyinference_core::providers::openai::AuthStyle` | Wire auth style consumed directly by crate-native builders. |+| `provider/ops/` | Host HTTP policy, model catalog RPC, and provider configuration; reusable sanitization lives in `tinyinference_core::sanitize`. || `provider/schemas.rs` | Defines a `providers.list_models` controller that is **not** wired into `core/all.rs`; the live method is `inference.list_models` (`openhuman.providers_list_models` survives only as a legacy alias). || `voice/` | Inference implementations imported by `crate::voice`. || `voice/cloud_transcribe.rs`, `voice/local_speech.rs` | Hosted STT and local Piper TTS. |@@ -94,7 +94,7 @@ Also exposes a non-RPC HTTP router (`http::router()`) nested at `/v1` by `crates- `openai_oauth/store.rs` persists OAuth tokens via the credentials auth-profile store (`AuthProfilesStore`, `auth-profiles.json`, encrypted at rest) under profile key `provider:openai` / profile `oauth`.- `LocalAiService` holds in-process runtime state (status, owned `ollama serve` child) via the `local::global` `OnceCell` singleton — process-lifetime, not durably persisted.-- Model artifacts live under `<root>/models/local-ai/` (`local/core.rs::model_artifact_path`); OpenHuman selects the Piper root and passes it to `tinyinference::local::piper::PiperInstall`.+- Model artifacts live under `<root>/models/local-ai/` (`local/core.rs::model_artifact_path`); OpenHuman selects the Piper root and passes it to `tinyinference_local::piper::PiperInstall`.- Routing/provider/local settings persisted through `config` (no dedicated `store.rs`).## Dependencies@@ -123,7 +123,7 @@ Widely depended on by the agent layer (`agent/harness`, `agent/harness/session`,- TinyInference owns effective chat, vision, embedding, STT, TTS, andquantization resolution; OpenHuman implements its configuration view and- calls `tinyinference::local::models` directly.+ calls `tinyinference_local::models` directly.- Provider strings carry an optional `@<temp>` suffix that pins a per-workload temperature; the suffix is stripped before the model id is sent upstream.- `update_model_settings` silently drops reserved cloud-provider slugs (`openhuman`/`cloud`/`pid` built-ins the frontend echoes back); `apply_model_settings` re-injects them from stored config so they aren't lost.- `ops.rs` deliberately demotes known provider/user-config failures (unknown cloud provider, 401/429, model-not-found) to `warn!` to keep them out of Sentry; only unclassified failures escalate to `error!`.diff --git a/crates/openhuman-core/src/inference/embeddings/README.md b/crates/openhuman-core/src/inference/embeddings/README.mdindex 4a758a42d2..e51f05b4be 100644--- a/crates/openhuman-core/src/inference/embeddings/README.md+++ b/crates/openhuman-core/src/inference/embeddings/README.md@@ -2,7 +2,7 @@Host policy and RPC surface for vector embeddings. Concrete OpenAI-compatible,Cohere, Voyage, Ollama, cloud-transport, retry, and rate-limit implementations-live in `tinyinference::embeddings` (vendored at+live in `tinyinference_core::embeddings` (vendored at`vendor/tinyagents/vendor/tinyinference`); this domain selects and adaptsthose models for OpenHuman.@@ -52,4 +52,4 @@ stores fixed 1024-dimension vectors (`EMBEDDING_DIM` in tinymemory-core's(`rpc/settings.rs`, `rpc/api_keys.rs`, `rpc/embed.rs`, `rpc/probe.rs`, `rpc/served_models.rs`).- See `mod.rs` for the current provider set (Managed default via the backend's`POST /openai/v1/embeddings`, Voyage, OpenAI, Cohere, Ollama, Custom, Noop)- and `tinyinference::embeddings` for their concrete implementations.+ and `tinyinference_core::embeddings` for their concrete implementations.diff --git a/crates/openhuman-core/src/inference/embeddings/cloud_adapter.rs b/crates/openhuman-core/src/inference/embeddings/cloud_adapter.rsindex 1ce51190cc..f658dc49ff 100644--- a/crates/openhuman-core/src/inference/embeddings/cloud_adapter.rs+++ b/crates/openhuman-core/src/inference/embeddings/cloud_adapter.rs@@ -4,7 +4,7 @@ use std::path::PathBuf;use std::sync::Arc;use async_trait::async_trait;-use tinyinference::embeddings::{+use tinyinference_core::embeddings::{BearerResolver, CloudEmbeddingModel, DEFAULT_CLOUD_DIMENSIONS, DEFAULT_CLOUD_MODEL,};@@ -32,10 +32,10 @@ impl OpenHumanCloudEmbedding {let bearer: BearerResolver = Arc::new(move || {let auth = AuthService::new(&state_dir, secrets_encrypt);auth.get_provider_bearer_token(APP_SESSION_PROVIDER, None)- .map_err(|error| tinyinference::Error::Embedding(error.to_string()))?+ .map_err(|error| tinyinference_core::Error::Embedding(error.to_string()))?.filter(|token| !token.trim().is_empty()).ok_or_else(|| {- tinyinference::Error::Validation(+ tinyinference_core::Error::Validation("No backend session for cloud embeddings: log in to OpenHuman".into(),)})diff --git a/crates/openhuman-core/src/inference/embeddings/factory.rs b/crates/openhuman-core/src/inference/embeddings/factory.rsindex ced922e007..192d6073ec 100644--- a/crates/openhuman-core/src/inference/embeddings/factory.rs+++ b/crates/openhuman-core/src/inference/embeddings/factory.rs@@ -8,7 +8,7 @@ use super::cloud::{};use super::provider_trait::{EmbeddingProvider, TinyAgentsEmbeddingProvider};use crate::config::Config;-use tinyinference::embeddings::{+use tinyinference_core::embeddings::{model_supports_dimensions, CohereEmbeddingModel, NoopEmbeddingModel, OllamaEmbeddingModel,OpenAiEmbeddingModel, VoyageEmbeddingModel,};@@ -105,11 +105,11 @@ pub fn create_embedding_provider("",model,dims,- tinyinference::embeddings::VOYAGE_API_BASE,+ tinyinference_core::embeddings::VOYAGE_API_BASE,),)),"ollama" => {- let base_url = tinyinference::local::ollama::ollama_base_url();+ let base_url = tinyinference_local::ollama::ollama_base_url();Ok(TinyAgentsEmbeddingProvider::boxed(OllamaEmbeddingModel::try_new(&base_url, model, dims)?,))@@ -159,11 +159,11 @@ pub fn create_embedding_provider_with_credentials(api_key,model,dims,- tinyinference::embeddings::VOYAGE_API_BASE,+ tinyinference_core::embeddings::VOYAGE_API_BASE,),)),"ollama" => {- let base_url = tinyinference::local::ollama::ollama_base_url();+ let base_url = tinyinference_local::ollama::ollama_base_url();Ok(TinyAgentsEmbeddingProvider::boxed(OllamaEmbeddingModel::try_new(&base_url, model, dims)?,))@@ -241,7 +241,7 @@ pub fn create_embedding_provider_with_config(// is honoured — the credential-store path calls `ollama_base_url()`// (env-only) and diverges when the setting is set (#6032)."ollama" => {- let base_url = tinyinference::local::ollama::ollama_base_url_from_override(+ let base_url = tinyinference_local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref(),);Ok(TinyAgentsEmbeddingProvider::boxed(diff --git a/crates/openhuman-core/src/inference/embeddings/mod.rs b/crates/openhuman-core/src/inference/embeddings/mod.rsindex dc38afb4f7..c03c7f73b1 100644--- a/crates/openhuman-core/src/inference/embeddings/mod.rs+++ b/crates/openhuman-core/src/inference/embeddings/mod.rs@@ -45,7 +45,7 @@ pub use schemas::{all_controller_schemas as all_embeddings_controller_schemas,all_registered_controllers as all_embeddings_registered_controllers,};-use tinyinference::embeddings::{DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL};+use tinyinference_core::embeddings::{DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL};/// The **intended** embedding selection — `(provider, model, dimensions)`.///diff --git a/crates/openhuman-core/src/inference/embeddings/mod_tests.rs b/crates/openhuman-core/src/inference/embeddings/mod_tests.rsindex 764cac902a..2d3dcb51e1 100644--- a/crates/openhuman-core/src/inference/embeddings/mod_tests.rs+++ b/crates/openhuman-core/src/inference/embeddings/mod_tests.rs@@ -5,7 +5,7 @@//! `embeddings` module.use super::*;-use tinyinference::embeddings::{DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL};+use tinyinference_core::embeddings::{DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL};// ── Trait default method ─────────────────────────────────diff --git a/crates/openhuman-core/src/inference/embeddings/provider_trait.rs b/crates/openhuman-core/src/inference/embeddings/provider_trait.rsindex 7cb92e0d18..478cc57b00 100644--- a/crates/openhuman-core/src/inference/embeddings/provider_trait.rs+++ b/crates/openhuman-core/src/inference/embeddings/provider_trait.rs@@ -27,7 +27,7 @@//!//! The engine keeps its own copy for its own factory. That is not duplication of//! *state*: the adapter is a stateless newtype over a boxed trait object, both-//! sides wrap the same `tinyinference::embeddings::EmbeddingModel` (one+//! sides wrap the same `tinyinference_core::embeddings::EmbeddingModel` (one//! crate — the root `[patch.crates-io]` points every consumer at//! `vendor/tinyagents`), and both produce the same//! `tinymemory_api::host::EmbeddingProvider`. Nothing reads the other's output,@@ -39,7 +39,7 @@//! before this move and one written after land in the same embedding space.use async_trait::async_trait;-use tinyinference::embeddings::EmbeddingModel;+use tinyinference_core::embeddings::EmbeddingModel;pub use tinymemory_api::host::{format_embedding_signature, EmbeddingProvider};diff --git a/crates/openhuman-core/src/inference/embeddings/rpc/probe.rs b/crates/openhuman-core/src/inference/embeddings/rpc/probe.rsindex 50dce7aab5..396b447101 100644--- a/crates/openhuman-core/src/inference/embeddings/rpc/probe.rs+++ b/crates/openhuman-core/src/inference/embeddings/rpc/probe.rs@@ -3,7 +3,7 @@use crate::rpc::RpcOutcome;-use tinyinference::embeddings::model_supports_dimensions;+use tinyinference_core::embeddings::model_supports_dimensions;/// Send one OpenAI-compatible embedding request without requesting or/// validating a vector width. This is intentionally separate from the livediff --git a/crates/openhuman-core/src/inference/embeddings/rpc/settings.rs b/crates/openhuman-core/src/inference/embeddings/rpc/settings.rsindex 7af8809e6b..ad440c8593 100644--- a/crates/openhuman-core/src/inference/embeddings/rpc/settings.rs+++ b/crates/openhuman-core/src/inference/embeddings/rpc/settings.rs@@ -8,7 +8,7 @@ use crate::security::credentials::AuthService;use super::probe::{classify_embed_probe, final_probe_dims, probe_custom_embeddings, EmbedProbe};use super::served_models::{check_requested_model_served, fetch_served_model_ids};use super::{resolve_api_key, LOG_PREFIX};-use tinyinference::embeddings::catalog;+use tinyinference_core::embeddings::catalog;/// Slug naming the embedder ingestion will actually use, resolved host-side/// from the `Config` fields the resolution ladder reads.diff --git a/crates/openhuman-core/src/inference/http/server.rs b/crates/openhuman-core/src/inference/http/server.rsindex 7a85d797c6..33063af0fc 100644--- a/crates/openhuman-core/src/inference/http/server.rs+++ b/crates/openhuman-core/src/inference/http/server.rs@@ -33,8 +33,8 @@ use serde_json::json;use std::collections::HashSet;use std::sync::atomic::{AtomicBool, Ordering};use std::sync::Arc;-use tinyinference::message::Message;-use tinyinference::model::{ModelRequest, ModelStreamItem};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ModelRequest, ModelStreamItem};use tracing::{debug, warn};use super::types::{@@ -130,7 +130,7 @@ async fn chat_completions_handler(// check on the outbound body, so this is belt-and-suspenders for logging.let temperature = {let raw = req.temperature.unwrap_or(config.default_temperature);- let suppressed = tinyinference::model::effective_temperature(+ let suppressed = tinyinference_core::model::effective_temperature(&model_id,Some(raw),None,diff --git a/crates/openhuman-core/src/inference/local/README.md b/crates/openhuman-core/src/inference/local/README.mdindex ede8589ee9..3f42795a0c 100644--- a/crates/openhuman-core/src/inference/local/README.md+++ b/crates/openhuman-core/src/inference/local/README.md@@ -9,12 +9,12 @@ single-crate layout); see `../README.md` for the wider `inference` domain.| File / dir | Role || --- | --- |-| `mod.rs` | Exposes the host service and RPC surface; reusable local-runtime APIs are consumed directly from `tinyinference::local`. |+| `mod.rs` | Exposes the host service and RPC surface; reusable local-runtime APIs are consumed directly from `tinyinference_core::local`. || `core.rs` | `LocalAiService` singleton (`global`/`try_global`), `model_artifact_path`. || `ops.rs` + `ops/` (`runtime_ops.rs`, `chat.rs`, `agent_chat.rs`, `reactions.rs`, `turn_guards.rs`) | RPC entry points: `local_ai_status/prompt/summarize/vision_prompt/embed/transcribe[_bytes]/tts/chat`, `agent_chat[_simple]`, `local_ai_should_react` (`ReactionDecision`), assets/downloads status. || `schemas.rs` | Local-runtime `inference.*` controller schemas + handlers (see RPC below); exported as `all_local_inference_controller_schemas` / `all_local_inference_registered_controllers`. || `install.rs`, `install_piper.rs`, `voice_install_common.rs` | Ollama/Piper download and install; shared download-progress plumbing. No Whisper install any more — local STT was retired (`config/migrations/retire_local_whisper_stt.rs`). |-| `tinyinference::local` | Ollama/LM Studio wire contracts, URL validation, model requirements, profiles, provider selection, subprocess flags, and spawn markers. |+| `tinyinference_core::local` | Ollama/LM Studio wire contracts, URL validation, model requirements, profiles, provider selection, subprocess flags, and spawn markers. || `service/` | `LocalAiService` impl, split by concern (below). |## `service/` split@@ -72,7 +72,7 @@ base-url resolution when routing into a local runtime), `inference/embeddings/fa`validate_ollama_url`), `agent/tinyagents/turn_models.rs` and `agent/triage/routing.rs`(`profile::is_local_provider_string`), `voice/ops.rs` (`model_ids`, `paths`), and`agent/host_runtime.rs`, `runtime/python/process.rs`, `runtime/python_server/{kompress,spacy}.rs`-(`tinyinference::local::process::apply_no_window`).+(`tinyinference_local::process::apply_no_window`).## Testsdiff --git a/crates/openhuman-core/src/inference/local/core.rs b/crates/openhuman-core/src/inference/local/core.rsindex 7488e2605f..29867127fc 100644--- a/crates/openhuman-core/src/inference/local/core.rs+++ b/crates/openhuman-core/src/inference/local/core.rs@@ -4,7 +4,7 @@ use std::sync::Arc;use crate::config::Config;use super::service::LocalAiService;-use tinyinference::local::models::effective_chat_model_id;+use tinyinference_local::models::effective_chat_model_id;static LOCAL_AI: once_cell::sync::OnceCell<Arc<LocalAiService>> = once_cell::sync::OnceCell::new();diff --git a/crates/openhuman-core/src/inference/local/ops/agent_chat.rs b/crates/openhuman-core/src/inference/local/ops/agent_chat.rsindex 0ff94130f1..c2984fae05 100644--- a/crates/openhuman-core/src/inference/local/ops/agent_chat.rs+++ b/crates/openhuman-core/src/inference/local/ops/agent_chat.rs@@ -283,9 +283,9 @@ pub async fn agent_chat_simple();let run = model.invoke(&(),- tinyinference::model::ModelRequest::new(vec![tinyinference::message::Message::user(- message.to_string(),- )])+ tinyinference_core::model::ModelRequest::new(vec![+ tinyinference_core::message::Message::user(message.to_string()),+ ]).with_model(default_model.clone()).with_temperature(effective.default_temperature),);diff --git a/crates/openhuman-core/src/inference/local/ops/chat.rs b/crates/openhuman-core/src/inference/local/ops/chat.rsindex b06c8d1e5d..594e295c66 100644--- a/crates/openhuman-core/src/inference/local/ops/chat.rs+++ b/crates/openhuman-core/src/inference/local/ops/chat.rs@@ -30,7 +30,7 @@ pub async fn local_ai_chat(return Err("messages must not be empty".to_string());}- let mut ollama_messages: Vec<tinyinference::local::ollama::OllamaChatMessage> =+ let mut ollama_messages: Vec<tinyinference_local::ollama::OllamaChatMessage> =Vec::with_capacity(messages.len());for msg in messages.into_iter() {@@ -48,7 +48,7 @@ pub async fn local_ai_chat(}}- ollama_messages.push(tinyinference::local::ollama::OllamaChatMessage {+ ollama_messages.push(tinyinference_local::ollama::OllamaChatMessage {role: normalized_role,content: msg.content,});diff --git a/crates/openhuman-core/src/inference/local/ops/runtime_ops.rs b/crates/openhuman-core/src/inference/local/ops/runtime_ops.rsindex 6f2e76ff31..f7bf8b6b63 100644--- a/crates/openhuman-core/src/inference/local/ops/runtime_ops.rs+++ b/crates/openhuman-core/src/inference/local/ops/runtime_ops.rs@@ -31,7 +31,7 @@ pub async fn local_ai_status(config: &Config) -> Result<RpcOutcome<LocalAiStatus// the current config's provider on the status snapshot before returning.let mut snapshot = service.status();snapshot.provider =- tinyinference::local::provider::provider_from_name(&config.local_ai.provider)+ tinyinference_local::provider::provider_from_name(&config.local_ai.provider).as_str().to_string();Ok(RpcOutcome::single_log(snapshot, "local ai status fetched"))diff --git a/crates/openhuman-core/src/inference/local/schemas.rs b/crates/openhuman-core/src/inference/local/schemas.rsindex 37b7dfe257..15218ad5e7 100644--- a/crates/openhuman-core/src/inference/local/schemas.rs+++ b/crates/openhuman-core/src/inference/local/schemas.rs@@ -419,10 +419,10 @@ fn handle_local_ai_install_piper(params: Map<String, Value>) -> ControllerFuturelet config = config_rpc::load_config_with_timeout().await?;let force = p.force.unwrap_or(false);- tinyinference::local::download::write_status(- tinyinference::local::download::VoiceInstallStatus {- engine: tinyinference::local::download::ENGINE_PIPER.to_string(),- state: tinyinference::local::download::VoiceInstallState::Installing,+ tinyinference_local::download::write_status(+ tinyinference_local::download::VoiceInstallStatus {+ engine: tinyinference_local::download::ENGINE_PIPER.to_string(),+ state: tinyinference_local::download::VoiceInstallState::Installing,progress: Some(0),downloaded_bytes: None,total_bytes: None,@@ -438,19 +438,18 @@ fn handle_local_ai_install_piper(params: Map<String, Value>) -> ControllerFuture);let voice_id = p.voice_id.clone();tokio::spawn(async move {- let install = tinyinference::local::piper::PiperInstall::new(+ let install = tinyinference_local::piper::PiperInstall::new(crate::inference::paths::workspace_piper_dir(&config),);if let Err(e) =- tinyinference::local::piper::install_piper(&install, voice_id, force).await+ tinyinference_local::piper::install_piper(&install, voice_id, force).await{log::warn!("[voice-install:piper] background install failed: {e}");}});- let status = tinyinference::local::download::read_status(- tinyinference::local::download::ENGINE_PIPER,- );+ let status =+ tinyinference_local::download::read_status(tinyinference_local::download::ENGINE_PIPER);serde_json::to_value(status).map_err(|e| format!("serialize piper status: {e}"))})}@@ -467,11 +466,11 @@ fn handle_local_ai_test_connection(params: Map<String, Value>) -> ControllerFutufn handle_local_ai_piper_install_status(_params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let config = config_rpc::load_config_with_timeout().await?;- let install = tinyinference::local::piper::PiperInstall::new(+ let install = tinyinference_local::piper::PiperInstall::new(crate::inference::paths::workspace_piper_dir(&config),);- let voice_id = tinyinference::local::models::effective_tts_voice_id(&config);- let status = tinyinference::local::piper::status(&install, &voice_id);+ let voice_id = tinyinference_local::models::effective_tts_voice_id(&config);+ let status = tinyinference_local::piper::status(&install, &voice_id);serde_json::to_value(status).map_err(|e| format!("serialize piper status: {e}"))})}diff --git a/crates/openhuman-core/src/inference/local/service/assets/download.rs b/crates/openhuman-core/src/inference/local/service/assets/download.rsindex ddb5afc61b..c5d5f995e7 100644--- a/crates/openhuman-core/src/inference/local/service/assets/download.rs+++ b/crates/openhuman-core/src/inference/local/service/assets/download.rs@@ -4,9 +4,9 @@ use crate::config::ops::local_ai_presets;use crate::config::Config;use crate::inference::local::service::LocalAiService;use crate::inference::types::LocalAiAssetsStatus;-use tinyinference::local::models as model_ids;-use tinyinference::local::presets::VisionMode;-use tinyinference::local::provider::{provider_from_name, LocalAiProvider};+use tinyinference_local::models as model_ids;+use tinyinference_local::presets::VisionMode;+use tinyinference_local::provider::{provider_from_name, LocalAiProvider};impl LocalAiService {pub async fn download_all_models(&self, config: &Config) -> Result<(), String> {diff --git a/crates/openhuman-core/src/inference/local/service/assets/status.rs b/crates/openhuman-core/src/inference/local/service/assets/status.rsindex b256cb9829..d6a56f1dac 100644--- a/crates/openhuman-core/src/inference/local/service/assets/status.rs+++ b/crates/openhuman-core/src/inference/local/service/assets/status.rs@@ -7,9 +7,9 @@ use crate::config::Config;use crate::inference::local::service::LocalAiService;use crate::inference::paths::resolve_tts_voice_path;use crate::inference::types::{LocalAiAssetStatus, LocalAiAssetsStatus};-use tinyinference::local::models as model_ids;-use tinyinference::local::presets::VisionMode;-use tinyinference::local::provider::{provider_from_name, LocalAiProvider};+use tinyinference_local::models as model_ids;+use tinyinference_local::presets::VisionMode;+use tinyinference_local::provider::{provider_from_name, LocalAiProvider};impl LocalAiService {pub async fn assets_status(&self, config: &Config) -> Result<LocalAiAssetsStatus, String> {@@ -38,7 +38,7 @@ impl LocalAiService {LocalAiProvider::Ollama | LocalAiProvider::LmStudio);let ollama_available = if uses_ollama_assets {- let base_url = tinyinference::local::ollama::ollama_base_url_from_override(+ let base_url = tinyinference_local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref(),);let present = self.ollama_healthy_at(&base_url).await;diff --git a/crates/openhuman-core/src/inference/local/service/bootstrap.rs b/crates/openhuman-core/src/inference/local/service/bootstrap.rsindex 0332ed9804..931d684f6d 100644--- a/crates/openhuman-core/src/inference/local/service/bootstrap.rs+++ b/crates/openhuman-core/src/inference/local/service/bootstrap.rs@@ -1,10 +1,10 @@use crate::config::ops::local_ai_presets;use crate::config::Config;use crate::inference::types::LocalAiStatus;-use tinyinference::device::DeviceProfile;-use tinyinference::local::models as model_ids;-use tinyinference::local::presets::VisionMode;-use tinyinference::local::provider::{provider_from_name, LocalAiProvider};+use tinyinference_local::device::DeviceProfile;+use tinyinference_local::models as model_ids;+use tinyinference_local::presets::VisionMode;+use tinyinference_local::provider::{provider_from_name, LocalAiProvider};use super::LocalAiService;@@ -128,7 +128,7 @@ impl LocalAiService {pub async fn bootstrap(&self, config: &Config) {let _guard = self.bootstrap_lock.lock().await;- let device = tinyinference::device::detect_device_profile();+ let device = tinyinference_local::device::detect_device_profile();let effective_config = config_with_recommended_tier_if_unselected(config, &device);if !effective_config.local_ai.runtime_enabled {@@ -358,7 +358,7 @@ fn config_with_recommended_tier_if_unselected(config: &Config, device: &DevicePrif !config.local_ai.opt_in_confirmed {tracing::debug!(total_ram_gb = device.total_ram_gb(),- min_required_gb = tinyinference::local::presets::MIN_RAM_GB_FOR_LOCAL_AI,+ min_required_gb = tinyinference_local::presets::MIN_RAM_GB_FOR_LOCAL_AI,?current_tier,selected_tier = ?config.local_ai.selected_tier,"[local_ai] bootstrap: opt_in_confirmed=false, hard-overriding to disabled (cloud fallback)"@@ -380,19 +380,19 @@ fn config_with_recommended_tier_if_unselected(config: &Config, device: &DevicePrfn format_degraded_warning(err: &str, config: &Config) -> String {let current = crate::config::ops::local_ai_presets::current_tier_from_config(&config.local_ai);match current {- tinyinference::local::presets::ModelTier::Ram16PlusGb => {+ tinyinference_local::presets::ModelTier::Ram16PlusGb => {format!("{err}. Hint: your device may not support the 16 GB+ tier model. \Try switching to the 8-16 GB or 4-8 GB tier in Settings > Local AI Model.")}- tinyinference::local::presets::ModelTier::Ram8To16Gb => {+ tinyinference_local::presets::ModelTier::Ram8To16Gb => {format!("{err}. Hint: your device may not support the 8-16 GB tier model. \Try switching to the 4-8 GB or 2-4 GB tier in Settings > Local AI Model.")}- tinyinference::local::presets::ModelTier::Ram4To8Gb => format!(+ tinyinference_local::presets::ModelTier::Ram4To8Gb => format!("{err}. Hint: your device may not support the 4-8 GB tier vision sidecar. \Try switching to the 2-4 GB tier for text-only local AI."),diff --git a/crates/openhuman-core/src/inference/local/service/bootstrap_tests.rs b/crates/openhuman-core/src/inference/local/service/bootstrap_tests.rsindex a28b509d7a..94ccc13b1a 100644--- a/crates/openhuman-core/src/inference/local/service/bootstrap_tests.rs+++ b/crates/openhuman-core/src/inference/local/service/bootstrap_tests.rs@@ -57,7 +57,7 @@ fn bootstrap_honors_opt_in_on_low_ram_device() {config.local_ai.opt_in_confirmed = true;crate::config::ops::local_ai_presets::apply_preset_to_config(&mut config.local_ai,- tinyinference::local::presets::ModelTier::Ram2To4Gb,+ tinyinference_local::presets::ModelTier::Ram2To4Gb,);let device = test_device(4);@@ -76,7 +76,7 @@ fn bootstrap_honors_opt_in_on_sufficient_ram_device() {config.local_ai.opt_in_confirmed = true;crate::config::ops::local_ai_presets::apply_preset_to_config(&mut config.local_ai,- tinyinference::local::presets::ModelTier::Ram2To4Gb,+ tinyinference_local::presets::ModelTier::Ram2To4Gb,);let device = test_device(16);diff --git a/crates/openhuman-core/src/inference/local/service/lm_studio.rs b/crates/openhuman-core/src/inference/local/service/lm_studio.rsindex fc7536c04f..33b4768022 100644--- a/crates/openhuman-core/src/inference/local/service/lm_studio.rs+++ b/crates/openhuman-core/src/inference/local/service/lm_studio.rs@@ -1,8 +1,8 @@use crate::config::Config;-use tinyinference::local::lm_studio::{+use tinyinference_local::lm_studio::{apply_lm_studio_auth, lm_studio_base_url, ollama_tags_fallback_url, LmStudioModelsResponse,};-use tinyinference::local::ollama::{OllamaModelTag, OllamaTagsResponse};+use tinyinference_local::ollama::{OllamaModelTag, OllamaTagsResponse};use super::LocalAiService;diff --git a/crates/openhuman-core/src/inference/local/service/model_rpc.rs b/crates/openhuman-core/src/inference/local/service/model_rpc.rsindex f723b93e03..dc7ed777ee 100644--- a/crates/openhuman-core/src/inference/local/service/model_rpc.rs+++ b/crates/openhuman-core/src/inference/local/service/model_rpc.rs@@ -5,13 +5,13 @@//! neutral `ChatModel` interface.use crate::config::Config;-use tinyinference::local::lm_studio::lm_studio_base_url;-use tinyinference::local::ollama::{ollama_base_url_from_override, redact_ollama_base_url};-use tinyinference::local::provider::{provider_from_name, LocalAiProvider};-use tinyinference::message::Message;-use tinyinference::model::{ChatModel, ModelRequest};-use tinyinference::providers::openai::OpenAiModel;-use tinyinference::providers::{ProviderKind, ProviderSpec};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelRequest};+use tinyinference_core::providers::openai::OpenAiModel;+use tinyinference_core::providers::{ProviderKind, ProviderSpec};+use tinyinference_local::lm_studio::lm_studio_base_url;+use tinyinference_local::ollama::{ollama_base_url_from_override, redact_ollama_base_url};+use tinyinference_local::provider::{provider_from_name, LocalAiProvider};pub(super) struct ModelRpcOutcome {pub reply: String,@@ -25,7 +25,7 @@ fn throughput(raw: Option<&serde_json::Value>, count: &str, duration: &str) -> Olet raw = raw?;let count = raw.get(count)?.as_u64()?;let duration = raw.get(duration)?.as_u64()?;- tinyinference::local::ollama::ns_to_tps(count as f32, duration)+ tinyinference_local::ollama::ns_to_tps(count as f32, duration)}fn local_model(config: &Config, model_id: &str) -> Result<OpenAiModel, String> {@@ -85,7 +85,7 @@ pub(super) async fn invoke(temperature: f32,allow_empty: bool,) -> Result<ModelRpcOutcome, String> {- let model_id = tinyinference::local::models::effective_chat_model_id(config);+ let model_id = tinyinference_local::models::effective_chat_model_id(config);// `OpenAiModel` no longer exposes `with_client`/injects an external// `reqwest::Client` — each model now builds and owns its own client// internally (`OpenAiModel::new`). This host no longer shares its app-wide@@ -140,7 +140,7 @@ pub(super) async fn invoke(}fn model_outcome(- response: tinyinference::model::ModelResponse,+ response: tinyinference_core::model::ModelResponse,allow_empty: bool,) -> Result<ModelRpcOutcome, String> {let mut reply = response.text();@@ -150,7 +150,9 @@ fn model_outcome(.content.iter().filter_map(|block| match block {- tinyinference::message::ContentBlock::Thinking { text, .. } => Some(text.as_str()),+ tinyinference_core::message::ContentBlock::Thinking { text, .. } => {+ Some(text.as_str())+ }_ => None,}).collect::<Vec<_>>()diff --git a/crates/openhuman-core/src/inference/local/service/model_rpc_tests.rs b/crates/openhuman-core/src/inference/local/service/model_rpc_tests.rsindex 7a2ffa7266..7a0aeb55cd 100644--- a/crates/openhuman-core/src/inference/local/service/model_rpc_tests.rs+++ b/crates/openhuman-core/src/inference/local/service/model_rpc_tests.rs@@ -1,8 +1,8 @@use super::{local_model, model_outcome, throughput};use crate::config::Config;-use tinyinference::message::{AssistantMessage, ContentBlock};-use tinyinference::model::ModelResponse;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock};+use tinyinference_core::model::ModelResponse;+use tinyinference_core::usage::Usage;#[test]fn throughput_reads_ollama_timing_metadata() {diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin/binary.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin/binary.rsindex 2cde3eda0e..2d9e90ceda 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin/binary.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin/binary.rs@@ -2,8 +2,8 @@ use std::path::{Path, PathBuf};use crate::config::Config;use crate::inference::paths::find_workspace_ollama_binary;-use tinyinference::local::install::{find_system_ollama_binary, run_ollama_install_script};-use tinyinference::local::process::apply_no_window;+use tinyinference_local::install::{find_system_ollama_binary, run_ollama_install_script};+use tinyinference_local::process::apply_no_window;use super::super::LocalAiService;@@ -99,7 +99,7 @@ impl LocalAiService {// OllamaSetup.exe running, wait for it instead of starting a// second one — two concurrent installers race on the same dir// and corrupt the install.- if tinyinference::local::install::is_ollama_installer_running() {+ if tinyinference_local::install::is_ollama_installer_running() {log::info!("[local_ai] detected in-flight OllamaSetup.exe — \waiting for it to finish before deciding whether to install"@@ -119,7 +119,7 @@ impl LocalAiService {const INSTALLER_WAIT_TIMEOUT: std::time::Duration =std::time::Duration::from_secs(5 * 60);let mut timed_out = false;- while tinyinference::local::install::is_ollama_installer_running() {+ while tinyinference_local::install::is_ollama_installer_running() {if wait_start.elapsed() >= INSTALLER_WAIT_TIMEOUT {timed_out = true;break;diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin/diagnostics.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin/diagnostics.rsindex e3da0e988b..27001d7c16 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin/diagnostics.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin/diagnostics.rs@@ -1,16 +1,16 @@use crate::config::ops::local_ai_presets;use crate::config::Config;-use tinyinference::local::lm_studio::lm_studio_base_url;-use tinyinference::local::model_requirements::{+use tinyinference_local::lm_studio::lm_studio_base_url;+use tinyinference_local::model_requirements::{evaluate_context, ContextEligibility, MIN_CONTEXT_TOKENS,};-use tinyinference::local::models as model_ids;-use tinyinference::local::ollama::{+use tinyinference_local::models as model_ids;+use tinyinference_local::ollama::{ollama_base_url_from_override, OllamaModelShow, OllamaModelTag, OllamaShowRequest,OllamaShowResponse, OllamaTagsResponse,};-use tinyinference::local::presets::VisionMode;-use tinyinference::local::provider::{+use tinyinference_local::presets::VisionMode;+use tinyinference_local::provider::{model_discovery_api, provider_from_name, LocalAiProvider, ModelDiscoveryApi,};diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin/health.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin/health.rsindex 2709332705..0b6d79f303 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin/health.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin/health.rs@@ -2,8 +2,8 @@ use std::path::PathBuf;use crate::config::Config;use crate::inference::paths::{find_workspace_ollama_binary, workspace_ollama_binary};-use tinyinference::local::install::find_system_ollama_binary;-use tinyinference::local::ollama::{ollama_base_url, ollama_base_url_from_override};+use tinyinference_local::install::find_system_ollama_binary;+use tinyinference_local::ollama::{ollama_base_url, ollama_base_url_from_override};use super::super::LocalAiService;@@ -214,7 +214,7 @@ impl LocalAiService {/// `RunEvent::ExitRequested` and window-close paths.pub async fn shutdown_owned_ollama(&self, config: &Config) {self.kill_ollama_server().await;- tinyinference::local::spawn_marker::clear_marker_at(+ tinyinference_local::spawn_marker::clear_marker_at(&crate::inference::paths::ollama_spawn_marker_path(config),);}@@ -280,7 +280,7 @@ impl LocalAiService {}// 5. Platform-specific well-known locations (macOS bundles, Windows, Linux).- tinyinference::local::install::find_system_ollama_binary().map(|p| p.display().to_string())+ tinyinference_local::install::find_system_ollama_binary().map(|p| p.display().to_string())}pub(in crate::inference::local::service) async fn has_model(@@ -307,7 +307,7 @@ impl LocalAiService {base_url: &str,model: &str,) -> Result<bool, String> {- use tinyinference::local::ollama::OllamaTagsResponse;+ use tinyinference_local::ollama::OllamaTagsResponse;// Issue the /api/tags GET directly. We previously short-circuited via// ollama_healthy(), but that doubled the number of /api/tags round-trips// on healthy polls (one probe + one tags fetch). With three has_model()diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin/model_pull.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin/model_pull.rsindex c54308d8df..524bacc2a0 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin/model_pull.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin/model_pull.rs@@ -2,11 +2,11 @@ use futures_util::StreamExt;use crate::config::ops::local_ai_presets;use crate::config::Config;-use tinyinference::local::models as model_ids;-use tinyinference::local::ollama::{+use tinyinference_local::models as model_ids;+use tinyinference_local::ollama::{ollama_base_url_from_override, OllamaPullEvent, OllamaPullProgress, OllamaPullRequest,};-use tinyinference::local::presets::VisionMode;+use tinyinference_local::presets::VisionMode;use super::super::LocalAiService;use super::util::interrupted_pull_settle_window_secs;diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin/server.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin/server.rsindex e93a160f9d..bc88130211 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin/server.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin/server.rs@@ -2,9 +2,9 @@ use std::path::Path;use crate::config::Config;use crate::inference::paths::ollama_spawn_marker_path;-use tinyinference::local::ollama::ollama_base_url_from_override;-use tinyinference::local::process::apply_no_window;-use tinyinference::local::spawn_marker::{self, OllamaSpawnMarker};+use tinyinference_local::ollama::ollama_base_url_from_override;+use tinyinference_local::process::apply_no_window;+use tinyinference_local::spawn_marker::{self, OllamaSpawnMarker};use super::super::LocalAiService;use super::util::kill_pid_by_id;diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin/util.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin/util.rsindex 97f4b049bf..9e207411cc 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin/util.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin/util.rs@@ -1,4 +1,4 @@-use tinyinference::local::ollama::{validate_ollama_url, OllamaTagsResponse};+use tinyinference_local::ollama::{validate_ollama_url, OllamaTagsResponse};pub(super) fn lm_studio_models_error_means_unreachable(error: &str) -> bool {error.starts_with("lm studio models request failed:")diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin_health_and_diagnostics_tests.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin_health_and_diagnostics_tests.rsindex a426ae9c4f..fd1a24cec7 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin_health_and_diagnostics_tests.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin_health_and_diagnostics_tests.rs@@ -364,8 +364,8 @@ async fn diagnostics_ok_when_expected_models_are_present() {let _guard = crate::inference::inference_test_guard();let config = Config::default();- let chat = tinyinference::local::models::effective_chat_model_id(&config);- let embedding = tinyinference::local::models::effective_embedding_model_id(&config);+ let chat = tinyinference_local::models::effective_chat_model_id(&config);+ let embedding = tinyinference_local::models::effective_embedding_model_id(&config);let chat_tag = format!("{}:latest", chat);let embed_tag = format!("{}:latest", embedding);let app = Router::new().route(@@ -419,8 +419,8 @@ async fn diagnostics_reports_broken_runner_even_when_models_are_present() {let _guard = crate::inference::inference_test_guard();let config = Config::default();- let chat = tinyinference::local::models::effective_chat_model_id(&config);- let embedding = tinyinference::local::models::effective_embedding_model_id(&config);+ let chat = tinyinference_local::models::effective_chat_model_id(&config);+ let embedding = tinyinference_local::models::effective_embedding_model_id(&config);let chat_tag = format!("{}:latest", chat);let embed_tag = format!("{}:latest", embedding);let app = Router::new()diff --git a/crates/openhuman-core/src/inference/local/service/ollama_admin_lm_studio_and_lifecycle_tests.rs b/crates/openhuman-core/src/inference/local/service/ollama_admin_lm_studio_and_lifecycle_tests.rsindex dd04968309..401c66441e 100644--- a/crates/openhuman-core/src/inference/local/service/ollama_admin_lm_studio_and_lifecycle_tests.rs+++ b/crates/openhuman-core/src/inference/local/service/ollama_admin_lm_studio_and_lifecycle_tests.rs@@ -309,7 +309,7 @@ async fn kill_ollama_server_kills_owned_child() {// Sanity: child should be alive immediately after spawn.assert!(- tinyinference::local::spawn_marker::pid_is_alive(pid),+ tinyinference_local::spawn_marker::pid_is_alive(pid),"child pid {pid} should be alive right after spawn");@@ -325,7 +325,7 @@ async fn kill_ollama_server_kills_owned_child() {// update its process table — the kill is signalled but reap is async.let mut still_alive = true;for _ in 0..40 {- if !tinyinference::local::spawn_marker::pid_is_alive(pid) {+ if !tinyinference_local::spawn_marker::pid_is_alive(pid) {still_alive = false;break;}@@ -380,9 +380,9 @@ async fn shutdown_owned_ollama_clears_marker_and_kills_child() {let marker_path = crate::inference::paths::ollama_spawn_marker_path(&config);let marker_writable = marker_path.starts_with(tmp.path());if marker_writable {- tinyinference::local::spawn_marker::write_marker_at(+ tinyinference_local::spawn_marker::write_marker_at(&marker_path,- &tinyinference::local::spawn_marker::OllamaSpawnMarker::new(+ &tinyinference_local::spawn_marker::OllamaSpawnMarker::new(pid,std::path::Path::new("test-stub"),),@@ -406,7 +406,7 @@ async fn shutdown_owned_ollama_clears_marker_and_kills_child() {// And the spawned process is dead.let mut still_alive = true;for _ in 0..40 {- if !tinyinference::local::spawn_marker::pid_is_alive(pid) {+ if !tinyinference_local::spawn_marker::pid_is_alive(pid) {still_alive = false;break;}diff --git a/crates/openhuman-core/src/inference/local/service/public_infer.rs b/crates/openhuman-core/src/inference/local/service/public_infer.rsindex 194a9e08eb..54ee87d730 100644--- a/crates/openhuman-core/src/inference/local/service/public_infer.rs+++ b/crates/openhuman-core/src/inference/local/service/public_infer.rs@@ -1,7 +1,7 @@use crate::config::Config;-use tinyinference::completion::sanitize_inline_completion;-use tinyinference::local::models as model_ids;-use tinyinference::message::Message;+use tinyinference_core::completion::sanitize_inline_completion;+use tinyinference_core::message::Message;+use tinyinference_local::models as model_ids;use super::LocalAiService;@@ -213,7 +213,7 @@ impl LocalAiService {pub(crate) async fn chat_with_history(&self,config: &Config,- messages: Vec<tinyinference::local::ollama::OllamaChatMessage>,+ messages: Vec<tinyinference_local::ollama::OllamaChatMessage>,max_tokens: Option<u32>,) -> Result<String, String> {self.chat_with_history_internal(config, messages, max_tokens, true)@@ -223,7 +223,7 @@ impl LocalAiService {pub(crate) async fn chat_with_history_interactive(&self,config: &Config,- messages: Vec<tinyinference::local::ollama::OllamaChatMessage>,+ messages: Vec<tinyinference_local::ollama::OllamaChatMessage>,max_tokens: Option<u32>,) -> Result<String, String> {log::trace!("[local_ai] chat_with_history_interactive bypasses scheduler_gate permit");@@ -234,7 +234,7 @@ impl LocalAiService {async fn chat_with_history_internal(&self,config: &Config,- messages: Vec<tinyinference::local::ollama::OllamaChatMessage>,+ messages: Vec<tinyinference_local::ollama::OllamaChatMessage>,max_tokens: Option<u32>,gated: bool,) -> Result<String, String> {diff --git a/crates/openhuman-core/src/inference/local/service/public_infer_tests.rs b/crates/openhuman-core/src/inference/local/service/public_infer_tests.rsindex 6312b55da2..6bf52b4556 100644--- a/crates/openhuman-core/src/inference/local/service/public_infer_tests.rs+++ b/crates/openhuman-core/src/inference/local/service/public_infer_tests.rs@@ -413,7 +413,7 @@ async fn chat_with_history_interactive_does_not_block_on_held_permit() {std::time::Duration::from_secs(2),service.chat_with_history_interactive(&config,- vec![tinyinference::local::ollama::OllamaChatMessage {+ vec![tinyinference_local::ollama::OllamaChatMessage {role: "user".to_string(),content: "hi".to_string(),}],diff --git a/crates/openhuman-core/src/inference/local/service/speech.rs b/crates/openhuman-core/src/inference/local/service/speech.rsindex db5d5790d4..377af8305c 100644--- a/crates/openhuman-core/src/inference/local/service/speech.rs+++ b/crates/openhuman-core/src/inference/local/service/speech.rs@@ -8,7 +8,7 @@ use crate::config::Config;use crate::inference::paths::{config_root_dir, resolve_piper_binary, resolve_tts_voice_path};use crate::inference::types::{LocalAiSpeechResult, LocalAiTtsResult};use crate::voice::{create_stt_provider, effective_stt_provider};-use tinyinference::local::models as model_ids;+use tinyinference_local::models as model_ids;use super::LocalAiService;diff --git a/crates/openhuman-core/src/inference/local/service/vision_embed.rs b/crates/openhuman-core/src/inference/local/service/vision_embed.rsindex ca21562cb1..11398faeff 100644--- a/crates/openhuman-core/src/inference/local/service/vision_embed.rs+++ b/crates/openhuman-core/src/inference/local/service/vision_embed.rs@@ -2,16 +2,16 @@ use crate::agent::multimodal;use crate::config::ops::local_ai_presets;use crate::config::Config;use crate::inference::types::LocalAiEmbeddingResult;-use tinyinference::embeddings::{+use tinyinference_core::embeddings::{EmbeddingModel, OllamaEmbeddingModel, DEFAULT_OLLAMA_DIMENSIONS,RECOMMENDED_OLLAMA_CONTEXT_TOKENS,};-use tinyinference::local::models as model_ids;-use tinyinference::local::ollama::{+use tinyinference_local::models as model_ids;+use tinyinference_local::ollama::{ollama_base_url_from_override, redact_ollama_base_url, OllamaGenerateOptions,OllamaGenerateRequest,};-use tinyinference::local::presets::VisionMode;+use tinyinference_local::presets::VisionMode;use super::LocalAiService;@@ -196,11 +196,10 @@ impl LocalAiService {));}- let payload: tinyinference::local::ollama::OllamaGenerateResponse =- response- .json()- .await- .map_err(|e| format!("ollama vision response parse failed: {e}"))?;+ let payload: tinyinference_local::ollama::OllamaGenerateResponse = response+ .json()+ .await+ .map_err(|e| format!("ollama vision response parse failed: {e}"))?;if payload.response.trim().is_empty() {return Err("ollama vision returned empty content".to_string());}diff --git a/crates/openhuman-core/src/inference/mod.rs b/crates/openhuman-core/src/inference/mod.rsindex 53634f5f42..d5e893b43a 100644--- a/crates/openhuman-core/src/inference/mod.rs+++ b/crates/openhuman-core/src/inference/mod.rs@@ -53,7 +53,7 @@ pub use types::{LocalAiEmbeddingResult, LocalAiSpeechResult, LocalAiStatus, LocalAiTtsResult,};-impl tinyinference::local::models::LocalModelConfig for crate::config::Config {+impl tinyinference_local::models::LocalModelConfig for crate::config::Config {fn local_provider_name(&self) -> &str {&self.local_ai.provider}diff --git a/crates/openhuman-core/src/inference/model_context.rs b/crates/openhuman-core/src/inference/model_context.rsindex 2bdcd7eb30..12ac2b5f5c 100644--- a/crates/openhuman-core/src/inference/model_context.rs+++ b/crates/openhuman-core/src/inference/model_context.rs@@ -51,7 +51,7 @@ pub fn context_window_for_model(model: &str) -> Option<u64> {return Some(u64::from(price.context_window));}- if let Some(window) = tinyinference::model::context_window_for_model_id(normalized) {+ if let Some(window) = tinyinference_core::model::context_window_for_model_id(normalized) {tracing::debug!(model = normalized,context_window = window,diff --git a/crates/openhuman-core/src/inference/ops.rs b/crates/openhuman-core/src/inference/ops.rsindex 273cdb6e98..f90297bfc8 100644--- a/crates/openhuman-core/src/inference/ops.rs+++ b/crates/openhuman-core/src/inference/ops.rs@@ -9,11 +9,11 @@ use crate::inference::provider as providers;use crate::inference::{LocalAiEmbeddingResult, LocalAiStatus};use crate::rpc::RpcOutcome;use serde_json::{json, Value};-use tinyinference::device::detect_device_profile;-use tinyinference::local::presets;-use tinyinference::message::Message;-use tinyinference::model::ModelRequest;-use tinyinference::sentiment::{parse_sentiment_response, SentimentResult};+use tinyinference_core::message::Message;+use tinyinference_core::model::ModelRequest;+use tinyinference_core::sentiment::{parse_sentiment_response, SentimentResult};+use tinyinference_local::device::detect_device_profile;+use tinyinference_local::presets;use tracing::{debug, error, warn};const LOG_PREFIX: &str = "[inference::ops]";diff --git a/crates/openhuman-core/src/inference/paths.rs b/crates/openhuman-core/src/inference/paths.rsindex 80f3a51ff2..2bbcbf4210 100644--- a/crates/openhuman-core/src/inference/paths.rs+++ b/crates/openhuman-core/src/inference/paths.rs@@ -4,7 +4,7 @@ use std::path::PathBuf;use crate::config::Config;-use tinyinference::local::models as model_ids;+use tinyinference_local::models as model_ids;/// Returns the per-user config directory (parent of config.toml).pub(crate) fn config_root_dir(config: &Config) -> PathBuf {@@ -186,8 +186,8 @@ pub(crate) fn resolve_piper_binary() -> Option<PathBuf> {/// Config-aware piper resolution: workspace install first, env second,/// PATH third.pub(crate) fn resolve_piper_binary_with_config(config: &Config) -> Option<PathBuf> {- let install = tinyinference::local::piper::PiperInstall::new(workspace_piper_dir(config));- if let Some(workspace) = tinyinference::local::piper::find_workspace_piper_binary(&install) {+ let install = tinyinference_local::piper::PiperInstall::new(workspace_piper_dir(config));+ if let Some(workspace) = tinyinference_local::piper::find_workspace_piper_binary(&install) {return Some(workspace);}resolve_piper_binary()diff --git a/crates/openhuman-core/src/inference/provider/README.md b/crates/openhuman-core/src/inference/provider/README.mdindex db59555f2b..37119775ff 100644--- a/crates/openhuman-core/src/inference/provider/README.md+++ b/crates/openhuman-core/src/inference/provider/README.md@@ -20,26 +20,26 @@ domain.gates before building a model.- **Models** — `OpenHumanBackendModel` + `PROVIDER_LABEL`(`openhuman_backend_model.rs`); OpenAI-compatible and Anthropic builders live- in `tinyinference::providers` and are called directly.+ in `tinyinference_core::providers` and are called directly.- **DTOs** (`types.rs`) — `ChatRequest`, `ChatResponse`, `ProviderDelta`,`ToolCall`, `UsageInfo`, `AGENT_TURN_MAX_OUTPUT_TOKENS`.- **Error classifiers** — reusable classifiers live in- `tinyinference::classification`; this directory retains OpenHuman managed-backend and telemetry policy.+ `tinyinference_core::classification`; this directory retains OpenHuman managed-backend and telemetry policy.## Transports| Transport | File | Provider-string prefix || --- | --- | --- || Managed OpenHuman backend | `openhuman_backend_model.rs` | `openhuman` / `cloud` (session JWT + billing metadata) |-| OpenAI-compatible (BYOK cloud slugs, local runtimes) | `tinyinference::providers::openai` | `<slug>:<model>`, `ollama:<model>`, `lmstudio:<model>`, `mlx:<model>`, `omlx:<model>`, `local-openai:<model>` |-| Anthropic Messages API (prompt caching) | `tinyinference::providers::anthropic` | `<slug>:<model>` whose endpoint is the first-party Messages API and native tool calling is on |-| Codex OAuth / Responses API | `openai_codex.rs` host OAuth selection plus `tinyinference::providers::openai::codex` metadata | the `openai` cloud slug once Codex OAuth tokens exist |+| OpenAI-compatible (BYOK cloud slugs, local runtimes) | `tinyinference_core::providers::openai` | `<slug>:<model>`, `ollama:<model>`, `lmstudio:<model>`, `mlx:<model>`, `omlx:<model>`, `local-openai:<model>` |+| Anthropic Messages API (prompt caching) | `tinyinference_core::providers::anthropic` | `<slug>:<model>` whose endpoint is the first-party Messages API and native tool calling is on |+| Codex OAuth / Responses API | `openai_codex.rs` host OAuth selection plus `tinyinference_core::providers::openai::codex` metadata | the `openai` cloud slug once Codex OAuth tokens exist || Claude Agent SDK subprocess | `tinyagents_harness::providers::claude_agent_sdk` | `claude_agent_sdk` / `claude_agent_sdk:<model>` || Claude Code CLI subprocess | `claude_code/` — see its own [README](claude_code/README.md) | `claude-code:<model>` |## Calls into-- `tinyinference::model::ChatModel` (`vendor/tinyagents/vendor/tinyinference`)+- `tinyinference_core::model::ChatModel` (`vendor/tinyagents/vendor/tinyinference`)— the trait every transport implements.- `crate::config` — cloud-provider schema (`AuthStyle`, slug reservation),`Config::claude_agent_sdk`, abstract tier model constants.diff --git a/crates/openhuman-core/src/inference/provider/error_classify.rs b/crates/openhuman-core/src/inference/provider/error_classify.rsindex c8fdedbc3c..26e6e59526 100644--- a/crates/openhuman-core/src/inference/provider/error_classify.rs+++ b/crates/openhuman-core/src/inference/provider/error_classify.rs@@ -1,6 +1,6 @@//! OpenHuman-specific policy layered on TinyInference's provider-neutral classifier.-use tinyinference::failure::{+use tinyinference_core::failure::{classify_provider_failure, parse_retry_after_ms as parse_inference_retry_after,ProviderFailureClass,};diff --git a/crates/openhuman-core/src/inference/provider/factory.rs b/crates/openhuman-core/src/inference/provider/factory.rsindex fdad5071ad..df507f9a00 100644--- a/crates/openhuman-core/src/inference/provider/factory.rs+++ b/crates/openhuman-core/src/inference/provider/factory.rs@@ -121,12 +121,12 @@ use crate::inference::provider::ProviderRuntimeOptions;use crate::security::credentials::AuthService;use std::sync::Arc;use tinyagents_harness::providers::claude_agent_sdk::ClaudeAgentSdkProvider;-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse, ModelStream};-use tinyinference::providers::openai::codex::{+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse, ModelStream};+use tinyinference_core::providers::openai::codex::{openai_codex_client_version, openai_codex_user_agent, OPENAI_CODEX_ACCOUNT_HEADER,OPENAI_CODEX_ORIGINATOR, OPENAI_CODEX_ORIGINATOR_HEADER,};-use tinyinference::providers::openai::AuthStyle as CompatAuthStyle;+use tinyinference_core::providers::openai::AuthStyle as CompatAuthStyle;/// Sentinel meaning "use the OpenHuman backend session JWT".pub const PROVIDER_OPENHUMAN: &str = "openhuman";diff --git a/crates/openhuman-core/src/inference/provider/factory/access_gates.rs b/crates/openhuman-core/src/inference/provider/factory/access_gates.rsindex ab64ee2be1..39b2a8c0ce 100644--- a/crates/openhuman-core/src/inference/provider/factory/access_gates.rs+++ b/crates/openhuman-core/src/inference/provider/factory/access_gates.rs@@ -49,7 +49,7 @@ pub(super) fn local_only_violation(// Deferred: re-resolves to a concrete string on the recursive call.return None;}- if tinyinference::local::profile::is_local_provider_string(p) {+ if tinyinference_local::profile::is_local_provider_string(p) {return None;}Some(external_provider_label(p))@@ -104,7 +104,7 @@ pub(super) fn emit_inference_egress(role: &str, provider: &str) {// duplicate descriptor.return;}- let is_local = tinyinference::local::profile::is_local_provider_string(p);+ let is_local = tinyinference_local::profile::is_local_provider_string(p);let (slug, model) = match p.split_once(':') {Some((s, m)) if !s.trim().is_empty() => (s.trim().to_string(), m.trim().to_string()),_ => (p.to_string(), String::new()),@@ -126,7 +126,7 @@ pub(super) fn emit_inference_egress(role: &str, provider: &str) {/// privacy gate; this exemption only concerns OpenHuman registration.pub(crate) fn provider_uses_independent_auth(provider: &str) -> bool {let p = provider.trim();- tinyinference::local::profile::is_local_provider_string(p)+ tinyinference_local::profile::is_local_provider_string(p)|| p.starts_with(tinyagents_harness::providers::claude_code::PROVIDER_PREFIX)|| p == CLAUDE_AGENT_SDK_PROVIDER|| p.starts_with(CLAUDE_AGENT_SDK_PREFIX)diff --git a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs b/crates/openhuman-core/src/inference/provider/factory/chat_model.rsindex da085aa025..3634d14c50 100644--- a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs+++ b/crates/openhuman-core/src/inference/provider/factory/chat_model.rs@@ -247,7 +247,7 @@ pub(super) struct DefaultTemperatureChatModel {#[async_trait::async_trait]impl ChatModel<()> for DefaultTemperatureChatModel {- fn profile(&self) -> Option<&tinyinference::model::ModelProfile> {+ fn profile(&self) -> Option<&tinyinference_core::model::ModelProfile> {self.inner.profile()}@@ -259,7 +259,7 @@ impl ChatModel<()> for DefaultTemperatureChatModel {&self,state: &(),mut request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {if request.temperature.is_none() {request.temperature = Some(self.temperature);}@@ -270,7 +270,7 @@ impl ChatModel<()> for DefaultTemperatureChatModel {&self,state: &(),mut request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {if request.temperature.is_none() {request.temperature = Some(self.temperature);}diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rsindex 744667b5b7..1c48cf13bd 100644--- a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs@@ -7,10 +7,12 @@ use crate::inference::provider::factory::access_gates::verify_backend_session_ac#[cfg(not(test))]use crate::inference::provider::factory::access_gates::verify_session_active;use crate::inference::provider::fallback_diagnostics;-use tinyinference::providers::anthropic::{+use tinyinference_core::providers::anthropic::{build_anthropic_model, endpoint_is_anthropic_messages, AnthropicConfig,};-use tinyinference::providers::openai::{build_openai_model, endpoint_is_openrouter, OpenAiConfig};+use tinyinference_core::providers::openai::{+ build_openai_model, endpoint_is_openrouter, OpenAiConfig,+};/// Look up a `cloud_providers` entry by slug and build the provider./// The shared resolution for a `<slug>:<model>` cloud provider — the cloud@@ -21,7 +23,7 @@ pub(super) struct CloudSlugResolution<'a> {entry: &'a crate::config::schema::cloud_providers::CloudProviderCreds,effective_model: String,key: String,- codex: tinyinference::providers::openai::codex::OpenAiCodexRouting,+ codex: tinyinference_core::providers::openai::codex::OpenAiCodexRouting,}pub(super) fn resolve_cloud_slug<'a>(@@ -132,7 +134,7 @@ pub(super) fn resolve_cloud_slug<'a>(config.chat_provider.as_deref()- .filter(|chat| tinyinference::local::profile::is_local_provider_string(chat))+ .filter(|chat| tinyinference_local::profile::is_local_provider_string(chat))} else {None};diff --git a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rsindex 24d170f8ed..5082362638 100644--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs@@ -3,7 +3,7 @@use super::*;use crate::inference::provider::factory::access_gates::verify_provider_session;-use tinyinference::providers::openai::build_local_runtime_chat_model;+use tinyinference_core::providers::openai::build_local_runtime_chat_model;/// Local OpenAI-compatible runtimes (Ollama / LM Studio / MLX / OMLX //// local-openai) as a crate-native [`ChatModel`] (issue #4727).@@ -37,12 +37,12 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(provider: &str,config: &Config,) -> OptionalChatModelResult {- use tinyinference::local::profile::{LOCAL_OPENAI_PROFILE, MLX_PROFILE, OMLX_PROFILE};+ use tinyinference_local::profile::{LOCAL_OPENAI_PROFILE, MLX_PROFILE, OMLX_PROFILE};// Use the same classifier as privacy and session policy. Canonicalize only// the provider prefix: model IDs (including tags and temperature suffixes)// remain case-sensitive and must reach the runtime unchanged.- let kind = tinyinference::local::profile::kind_from_provider_string(provider)?;+ let kind = tinyinference_local::profile::kind_from_provider_string(provider)?;let model = provider.trim().split_once(':')@@ -97,7 +97,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(return Some(Err(empty_model_err(&p, "ollama:<model-id>")));}// Ollama exposes the OpenAI-compatible endpoint at `/v1`.- let base_url = tinyinference::local::ollama::ollama_base_url_from_override(+ let base_url = tinyinference_local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref(),);let normalized = base_url.trim_end_matches('/').trim_end_matches("/v1");@@ -119,9 +119,8 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(if model.is_empty() {return Some(Err(empty_model_err(&p, "lmstudio:<model-id>")));}- let endpoint = tinyinference::local::lm_studio::lm_studio_base_url(- config.local_ai.base_url.as_deref(),- );+ let endpoint =+ tinyinference_local::lm_studio::lm_studio_base_url(config.local_ai.base_url.as_deref());let (api_key, auth) = keyed_auth();let chat = build_local_runtime_chat_model("lmstudio",diff --git a/crates/openhuman-core/src/inference/provider/factory/managed_backend.rs b/crates/openhuman-core/src/inference/provider/factory/managed_backend.rsindex 5aace09871..e9905d4f04 100644--- a/crates/openhuman-core/src/inference/provider/factory/managed_backend.rs+++ b/crates/openhuman-core/src/inference/provider/factory/managed_backend.rs@@ -233,11 +233,11 @@ pub(crate) fn make_openhuman_backend_model(role: &str,config: &Config,) -> anyhow::Result<(- std::sync::Arc<dyn tinyinference::model::ChatModel<()>>,+ std::sync::Arc<dyn tinyinference_core::model::ChatModel<()>>,String,)> {let (model_client, model) = resolve_managed_backend(role, config)?;- let chat: std::sync::Arc<dyn tinyinference::model::ChatModel<()>> =+ let chat: std::sync::Arc<dyn tinyinference_core::model::ChatModel<()>> =std::sync::Arc::new(model_client);Ok((chat, model))}diff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rsindex 82a3681bb7..96772e5666 100644--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs@@ -102,7 +102,7 @@ pub fn provider_for_role(role: &str, config: &Config) -> String {// visible in logs and support transcripts before anything goes wrong.if fallback_diagnostics::role_falls_back_to_cloud(role) {if let Some(chat) = config.chat_provider.as_deref() {- if tinyinference::local::profile::is_local_provider_string(chat) {+ if tinyinference_local::profile::is_local_provider_string(chat) {log::info!("[providers][local-fallback] role={} {}",role,@@ -155,7 +155,7 @@ pub(super) fn route_has_usable_credentials(resolved: &str, config: &Config) -> blet r = resolved.trim();// Local runtimes (ollama/lmstudio/mlx/local-openai) and the local CLI// delegates carry their own credentials / run on-device.- if tinyinference::local::profile::is_local_provider_string(r)+ if tinyinference_local::profile::is_local_provider_string(r)|| r.starts_with(tinyagents_harness::providers::claude_code::PROVIDER_PREFIX)|| r == CLAUDE_AGENT_SDK_PROVIDER|| r.starts_with(CLAUDE_AGENT_SDK_PREFIX)diff --git a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rsindex 779f36a3d6..9acd6a6184 100644--- a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs@@ -75,8 +75,8 @@ fn enforce_local_only_inference_errors_on_external_when_local_only() {async fn create_chat_model_uses_native_test_override() {use std::sync::Arc;use tinyagents_harness::testkit::ScriptedModel;- use tinyinference::message::Message;- use tinyinference::model::ModelRequest;+ use tinyinference_core::message::Message;+ use tinyinference_core::model::ModelRequest;let _guard = crate::inference::inference_test_guard();@@ -99,8 +99,8 @@ async fn create_chat_model_uses_native_test_override() {async fn one_shot_chat_models_preserve_factory_temperature_as_request_default() {use async_trait::async_trait;use std::sync::{Arc, Mutex};- use tinyinference::message::Message;- use tinyinference::model::{ModelRequest, ModelResponse};+ use tinyinference_core::message::Message;+ use tinyinference_core::model::{ModelRequest, ModelResponse};struct TemperatureProbe {seen: Arc<Mutex<Vec<Option<f64>>>>,@@ -112,7 +112,7 @@ async fn one_shot_chat_models_preserve_factory_temperature_as_request_default()&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.seen.lock().expect("probe lock")diff --git a/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs b/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rsindex 8a64994675..7943633e70 100644--- a/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs@@ -233,7 +233,7 @@ fn agentic_route_is_neither_donor_nor_beneficiary() {#[test]fn local_provider_string_detection() {- use tinyinference::local::profile::is_local_provider_string;+ use tinyinference_local::profile::is_local_provider_string;assert!(is_local_provider_string("ollama:phi3"));assert!(is_local_provider_string("lmstudio:model"));assert!(is_local_provider_string("mlx:llama"));diff --git a/crates/openhuman-core/src/inference/provider/factory_test_provider_override_tests.rs b/crates/openhuman-core/src/inference/provider/factory_test_provider_override_tests.rsindex 68964b5e9d..79e172e7fc 100644--- a/crates/openhuman-core/src/inference/provider/factory_test_provider_override_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_test_provider_override_tests.rs@@ -1,5 +1,5 @@use std::sync::{Arc, Mutex, OnceLock};-use tinyinference::model::ChatModel;+use tinyinference_core::model::ChatModel;static OVERRIDE: OnceLock<Mutex<Option<Arc<dyn ChatModel<()>>>>> = OnceLock::new();fn cell() -> &'static Mutex<Option<Arc<dyn ChatModel<()>>>> {diff --git a/crates/openhuman-core/src/inference/provider/openai_codex.rs b/crates/openhuman-core/src/inference/provider/openai_codex.rsindex 2e8b7d878f..897294aa1f 100644--- a/crates/openhuman-core/src/inference/provider/openai_codex.rs+++ b/crates/openhuman-core/src/inference/provider/openai_codex.rs@@ -1,5 +1,7 @@use crate::config::Config;-use tinyinference::providers::openai::codex::{OpenAiCodexRouting, OPENAI_CODEX_BACKEND_BASE_URL};+use tinyinference_core::providers::openai::codex::{+ OpenAiCodexRouting, OPENAI_CODEX_BACKEND_BASE_URL,+};pub(crate) fn resolve_openai_codex_routing(config: &Config,diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rsindex d8d40baedc..32a3d5e7a2 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs@@ -28,12 +28,12 @@ use serde_json::Value;use std::path::PathBuf;use std::time::Duration;-use tinyinference::message::Message;-use tinyinference::model::{+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, Modalities, ModelProfile, ModelRequest, ModelResponse, ModelStream, ProviderError,};-use tinyinference::providers::openai::OpenAiModel;-use tinyinference::Error as TiError;+use tinyinference_core::providers::openai::OpenAiModel;+use tinyinference_core::Error as TiError;use super::ProviderRuntimeOptions;use crate::agent::tinyagents::thread_context;@@ -211,7 +211,7 @@ impl OpenHumanBackendModel {/// Resolve the current JWT + base URL and build a fresh crate `OpenAiModel`/// (Bearer). Rebuilt per call because the session JWT rotates.- fn build_wire_model(&self) -> tinyinference::Result<OpenAiModel> {+ fn build_wire_model(&self) -> tinyinference_core::Result<OpenAiModel> {let token = self.resolve_bearer().map_err(|e| TiError::Model(e.to_string()))?;@@ -487,7 +487,7 @@ fn maybe_publish_local_session_expiry() {fn maybe_publish_session_expired(err: &TiError, operation: &str) {if let TiError::Provider(pe) = err {if pe.provider.as_str() == "OpenHuman" && matches!(pe.status, Some(401 | 403)) {- let reason = tinyinference::sanitize::sanitize_api_error(&pe.message);+ let reason = tinyinference_core::sanitize::sanitize_api_error(&pe.message);crate::core::bus::BUS.publish(crate::core::events::DomainEvent::SessionExpired {source: format!("openhuman_backend_model.{}({})",@@ -518,13 +518,13 @@ fn log_managed_dispatch_error(err: &TiError, operation: &str) {pe.code,pe.provider,pe.retryable,- tinyinference::sanitize::sanitize_api_error(&pe.message),+ tinyinference_core::sanitize::sanitize_api_error(&pe.message),);}other => {log::warn!("[providers][openhuman-backend] managed {operation} failed (non-provider error): {}",- tinyinference::sanitize::sanitize_api_error(&other.to_string()),+ tinyinference_core::sanitize::sanitize_api_error(&other.to_string()),);}}@@ -553,7 +553,7 @@ impl ChatModel<()> for OpenHumanBackendModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let model = self.build_wire_model()?;let response = match model.invoke(state, with_thread_id(request)).await {Ok(response) => response,@@ -570,7 +570,7 @@ impl ChatModel<()> for OpenHumanBackendModel {&self,state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let model = self.build_wire_model()?;// NOTE (streaming billing parity): the crate SSE parser sets `raw: None`// on the terminal `Completed` response, so the `openhuman.billing` envelopediff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rsindex 5907e5624e..c2348d4fd6 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::inference::provider::ProviderRuntimeOptions;-use tinyinference::message::Message;+use tinyinference_core::message::Message;fn backend() -> OpenHumanBackendModel {OpenHumanBackendModel::new(@@ -53,8 +53,8 @@ fn resolve_model_normalizes_blank_and_trims_non_empty_values() {#[test]fn project_managed_usage_recovers_charged_and_cached() {use crate::agent::tinyagents::model::usage_info_from_response;- use tinyinference::message::AssistantMessage;- use tinyinference::usage::Usage;+ use tinyinference_core::message::AssistantMessage;+ use tinyinference_core::usage::Usage;let raw = serde_json::json!({"openhuman": {@@ -99,8 +99,8 @@ fn project_managed_usage_recovers_charged_and_cached() {#[test]fn project_managed_usage_is_noop_without_envelope() {use crate::agent::tinyagents::model::usage_info_from_response;- use tinyinference::message::AssistantMessage;- use tinyinference::usage::Usage;+ use tinyinference_core::message::AssistantMessage;+ use tinyinference_core::usage::Usage;let response = ModelResponse {message: AssistantMessage {diff --git a/crates/openhuman-core/src/inference/provider/ops/http_error.rs b/crates/openhuman-core/src/inference/provider/ops/http_error.rsindex 85f84e7d03..7f7aab3fd6 100644--- a/crates/openhuman-core/src/inference/provider/ops/http_error.rs+++ b/crates/openhuman-core/src/inference/provider/ops/http_error.rs@@ -28,7 +28,7 @@ mod quota_and_credits;// Shared imports every classifier submodule reaches through `use super::*;`// (mirrors the pre-split `include!`-shared scope).use crate::inference::provider::openhuman_backend_model;-use tinyinference::sanitize::sanitize_api_error;+use tinyinference_core::sanitize::sanitize_api_error;pub use auth_failure::{is_backend_auth_failure, is_byo_provider_auth_failure_http,diff --git a/crates/openhuman-core/src/inference/provider/ops/http_error/quota_and_credits.rs b/crates/openhuman-core/src/inference/provider/ops/http_error/quota_and_credits.rsindex 801c3d09f4..267ae628c3 100644--- a/crates/openhuman-core/src/inference/provider/ops/http_error/quota_and_credits.rs+++ b/crates/openhuman-core/src/inference/provider/ops/http_error/quota_and_credits.rs@@ -5,7 +5,7 @@/// user-state error that should be demoted from Sentry to an info log.pub fn is_budget_exhausted_http_400(status: reqwest::StatusCode, body: &str) -> bool {status == reqwest::StatusCode::BAD_REQUEST- && tinyinference::classification::is_budget_exhausted_message(body)+ && tinyinference_core::classification::is_budget_exhausted_message(body)}pub fn log_budget_exhausted_http_400(diff --git a/crates/openhuman-core/src/inference/provider/ops/models.rs b/crates/openhuman-core/src/inference/provider/ops/models.rsindex e614918180..80fc0bd0e0 100644--- a/crates/openhuman-core/src/inference/provider/ops/models.rs+++ b/crates/openhuman-core/src/inference/provider/ops/models.rs@@ -14,17 +14,19 @@//! [`ModelInfo`] entries.use super::super::openai_codex::resolve_openai_codex_routing;-use tinyinference::providers::openai::codex::{+use tinyinference_core::providers::openai::codex::{openai_codex_client_version, openai_codex_user_agent, OpenAiCodexRouting,OPENAI_CODEX_ACCOUNT_HEADER, OPENAI_CODEX_ORIGINATOR, OPENAI_CODEX_ORIGINATOR_HEADER,};-use tinyinference::sanitize::sanitize_api_error;+use tinyinference_core::sanitize::sanitize_api_error;mod catalog_listing;mod local_runtime;mod managed_provider;mod openrouter;-use tinyinference::catalog::{merge_openai_codex_model_hints, parse_models_response, ModelInfo};+use tinyinference_core::catalog::{+ merge_openai_codex_model_hints, parse_models_response, ModelInfo,+};#[cfg(test)]use catalog_listing::resolve_local_runtime_key;diff --git a/crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rs b/crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rsindex 0456ad7acb..017927d0ea 100644--- a/crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rs+++ b/crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rs@@ -31,14 +31,14 @@ pub fn synthesize_local_runtime_entry(// the same `{"data": [...]}` shape the existing parser handles, so// we route through that rather than the native `/api/tags`."ollama" => {- let base = tinyinference::local::ollama::ollama_base_url_from_override(+ let base = tinyinference_local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref(),);format!("{}/v1", base.trim_end_matches('/'))}// `lm_studio_base_url` already ends in `/v1`."lmstudio" => {- tinyinference::local::lm_studio::lm_studio_base_url(config.local_ai.base_url.as_deref())+ tinyinference_local::lm_studio::lm_studio_base_url(config.local_ai.base_url.as_deref())}_ => return None,};diff --git a/crates/openhuman-core/src/inference/provider/ops_tests.rs b/crates/openhuman-core/src/inference/provider/ops_tests.rsindex bfb426f1a5..241ba082d5 100644--- a/crates/openhuman-core/src/inference/provider/ops_tests.rs+++ b/crates/openhuman-core/src/inference/provider/ops_tests.rs@@ -15,8 +15,8 @@ use std::sync::{Arc, Mutex,};use tempfile::TempDir;-use tinyinference::providers::openai::codex::openai_codex_client_version;-use tinyinference::sanitize::{sanitize_api_error, MAX_API_ERROR_CHARS};+use tinyinference_core::providers::openai::codex::openai_codex_client_version;+use tinyinference_core::sanitize::{sanitize_api_error, MAX_API_ERROR_CHARS};#[derive(Clone)]struct ModelProbeState {diff --git a/crates/openhuman-core/src/inference/provider/ops_tests_models_parsing_tests.rs b/crates/openhuman-core/src/inference/provider/ops_tests_models_parsing_tests.rsindex d3cf890274..d8fbc327db 100644--- a/crates/openhuman-core/src/inference/provider/ops_tests_models_parsing_tests.rs+++ b/crates/openhuman-core/src/inference/provider/ops_tests_models_parsing_tests.rs@@ -1,5 +1,7 @@use super::*;-use tinyinference::catalog::{merge_openai_codex_model_hints, parse_models_response, ModelInfo};+use tinyinference_core::catalog::{+ merge_openai_codex_model_hints, parse_models_response, ModelInfo,+};#[tokio::test]async fn list_models_empty_body_returns_diagnostic_error() {diff --git a/crates/openhuman-core/src/inference/types.rs b/crates/openhuman-core/src/inference/types.rsindex d7f947c20f..e10ca417bf 100644--- a/crates/openhuman-core/src/inference/types.rs+++ b/crates/openhuman-core/src/inference/types.rs@@ -4,8 +4,8 @@ use crate::config::Config;use serde::{Deserialize, Serialize};use crate::config::ops::local_ai_presets;-use tinyinference::local::models as model_ids;-use tinyinference::local::provider::provider_from_name;+use tinyinference_local::models as model_ids;+use tinyinference_local::provider::provider_from_name;#[derive(Debug, Clone, Serialize, Deserialize)]pub struct LocalAiStatus {diff --git a/crates/openhuman-core/src/inference/types_tests.rs b/crates/openhuman-core/src/inference/types_tests.rsindex 7ccfb9b3a4..15e8eb1e1a 100644--- a/crates/openhuman-core/src/inference/types_tests.rs+++ b/crates/openhuman-core/src/inference/types_tests.rs@@ -16,7 +16,7 @@ fn disabled_status_marks_all_capabilities_disabled() {#[test]fn disabled_status_reflects_lm_studio_provider() {- use tinyinference::local::provider::LocalAiProvider;+ use tinyinference_local::provider::LocalAiProvider;let mut config = Config::default();config.local_ai.provider = LocalAiProvider::LmStudio.as_str().to_string();diff --git a/crates/openhuman-core/src/integrations/client/errors.rs b/crates/openhuman-core/src/integrations/client/errors.rsindex 1e8a917e58..8013fca127 100644--- a/crates/openhuman-core/src/integrations/client/errors.rs+++ b/crates/openhuman-core/src/integrations/client/errors.rs@@ -137,7 +137,7 @@ fn handle_session_jwt_unauthorized(method: &str, path: &str, url: &str, detail:// subscriber's logs.crate::core::bus::BUS.publish(crate::core::events::DomainEvent::SessionExpired {source: format!("integrations.{method}:{path}"),- reason: tinyinference::sanitize::sanitize_api_error(&message),+ reason: tinyinference_core::sanitize::sanitize_api_error(&message),});messagediff --git a/crates/openhuman-core/src/memory/tree/health/taxonomy.rs b/crates/openhuman-core/src/memory/tree/health/taxonomy.rsindex 9b1fa6c7ba..486bae50ab 100644--- a/crates/openhuman-core/src/memory/tree/health/taxonomy.rs+++ b/crates/openhuman-core/src/memory/tree/health/taxonomy.rs@@ -37,7 +37,7 @@//! `classify_embed_error{,_str}` — the parser that turns an embed-stage error//! *string* into a [`PipelineFailure`]. It rode the same `pub use` and has no//! host caller: it reads the wording of `OpenAiEmbedding::embed`,-//! `OpenHumanCloudEmbedding::embed` and `tinyinference::embeddings::ollama`,+//! `OpenHumanCloudEmbedding::embed` and `tinyinference_core::embeddings::ollama`,//! all of which run inside whichever engine ran the embed stage. Classifying//! there is the point — the driver hands this host a code, not a message — so//! the classifier stays with the stage and a copy here would be a second tablediff --git a/crates/openhuman-core/src/memory/tree/tree_runtime/ops.rs b/crates/openhuman-core/src/memory/tree/tree_runtime/ops.rsindex b0a50b6b53..21bab2799f 100644--- a/crates/openhuman-core/src/memory/tree/tree_runtime/ops.rs+++ b/crates/openhuman-core/src/memory/tree/tree_runtime/ops.rs@@ -312,7 +312,7 @@ pub(crate) fn create_provider(config: &Config,) -> Result<(- std::sync::Arc<dyn tinyinference::model::ChatModel<()>>,+ std::sync::Arc<dyn tinyinference_core::model::ChatModel<()>>,String,),String,diff --git a/crates/openhuman-core/src/modules/memory_host.rs b/crates/openhuman-core/src/modules/memory_host.rsindex 6ff61b20b8..208802d71c 100644--- a/crates/openhuman-core/src/modules/memory_host.rs+++ b/crates/openhuman-core/src/modules/memory_host.rs@@ -39,7 +39,7 @@ use crate::core::bus::BUS;use std::sync::Arc;use tinybus::ObjectPath;use tinyconnectors_bus::{ComposioConnection, ComposioExecuteResponse};-use tinyinference::model::{ModelRequest, ModelResponse};+use tinyinference_core::model::{ModelRequest, ModelResponse};use tinymemory_api::host::{MemoryEvent, SpacyResponse};const EMBEDDING_NAME: &str = "ai.tinyhumans.tinymemory.EmbeddingHost";@@ -129,7 +129,7 @@ impl ChatCallbacks {fn resolve_chat_model(role: &str,config: &Config,-) -> anyhow::Result<std::sync::Arc<dyn tinyinference::model::ChatModel<()>>> {+) -> anyhow::Result<std::sync::Arc<dyn tinyinference_core::model::ChatModel<()>>> {if role == "summarization" {let (model, _) = crate::memory::tree::tree_runtime::ops::create_provider(config).map_err(anyhow::Error::msg)?;diff --git a/crates/openhuman-core/src/modules/memory_host_tests.rs b/crates/openhuman-core/src/modules/memory_host_tests.rsindex 805710bfe3..a0c088442a 100644--- a/crates/openhuman-core/src/modules/memory_host_tests.rs+++ b/crates/openhuman-core/src/modules/memory_host_tests.rs@@ -345,13 +345,13 @@ async fn embed_takes_its_four_arguments_in_the_order_the_module_sends_them() {struct StubModel;#[async_trait::async_trait]-impl tinyinference::model::ChatModel<()> for StubModel {+impl tinyinference_core::model::ChatModel<()> for StubModel {async fn invoke(&self,_state: &(),- _request: tinyinference::model::ModelRequest,- ) -> tinyinference::Result<tinyinference::model::ModelResponse> {- Ok(tinyinference::model::ModelResponse::assistant("stub"))+ _request: tinyinference_core::model::ModelRequest,+ ) -> tinyinference_core::Result<tinyinference_core::model::ModelResponse> {+ Ok(tinyinference_core::model::ModelResponse::assistant("stub"))}}diff --git a/crates/openhuman-core/src/modules/ops.rs b/crates/openhuman-core/src/modules/ops.rsindex 875c19ff19..588deb94a4 100644--- a/crates/openhuman-core/src/modules/ops.rs+++ b/crates/openhuman-core/src/modules/ops.rs@@ -495,7 +495,7 @@ fn module_config(config: &Config, id: &str) -> serde_json::Value {"memory_sources": config.memory_sources,"embedding_routes": config.embedding_routes,"storage_provider": config.storage.provider.config,- "ollama_base_url": tinyinference::local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref()),+ "ollama_base_url": tinyinference_local::ollama::ollama_base_url_from_override(config.local_ai.base_url.as_deref()),// The module's `EmbeddingHost::default_cloud_embedding_model`: what the// engine switches to when the opted-in local model is unreachable// (`store::factories`). That is the host's managed-cloud default, the@@ -509,7 +509,7 @@ fn module_config(config: &Config, id: &str) -> serde_json::Value {"cloud_embedding_dimensions":crate::inference::embeddings::DEFAULT_CLOUD_EMBEDDING_DIMENSIONS,"models_supporting_dimensions":- tinyinference::embeddings::MODELS_SUPPORTING_DIMENSIONS,+ tinyinference_core::embeddings::MODELS_SUPPORTING_DIMENSIONS,// The periodic composio and workspace-source sync loops run INSIDE the// module now (tinymemory#100), and these three are what let them run at// all. Without the cadence the module answers manual-only and skipsdiff --git a/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs b/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rsindex 02aa85d594..a57cb7aa80 100644--- a/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs+++ b/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs@@ -111,7 +111,7 @@ pub(super) fn check_embedding_model_health(config: &Config, items: &mut Vec<Diag}// Ollama path: probe reachability then model availability.- let base_url = tinyinference::local::ollama::ollama_base_url();+ let base_url = tinyinference_local::ollama::ollama_base_url();let tags_url = format!("{}/api/tags", base_url.trim_end_matches('/'));log::debug!("[doctor] probing ollama at {tags_url} for embedding model {model}");diff --git a/crates/openhuman-core/src/runtime/python/process.rs b/crates/openhuman-core/src/runtime/python/process.rsindex 26c978f317..69e1c3e5ba 100644--- a/crates/openhuman-core/src/runtime/python/process.rs+++ b/crates/openhuman-core/src/runtime/python/process.rs@@ -60,7 +60,7 @@ pub fn spawn_stdio_process(// Suppress the Windows conhost flash. This process is (re)spawned on every// launch to run the runtime python server, so without CREATE_NO_WINDOW a// CMD window blinks up each time the app starts (GH-4814).- tinyinference::local::process::apply_no_window(&mut cmd);+ tinyinference_local::process::apply_no_window(&mut cmd);let child = cmd.spawn().with_context(|| {format!(diff --git a/crates/openhuman-core/src/runtime/python_server/kompress.rs b/crates/openhuman-core/src/runtime/python_server/kompress.rsindex eb8ab006ad..8358a16bd1 100644--- a/crates/openhuman-core/src/runtime/python_server/kompress.rs+++ b/crates/openhuman-core/src/runtime/python_server/kompress.rs@@ -260,7 +260,7 @@ async fn run_step(cmd.kill_on_drop(true);// Re-provisioning can run mid-session if the venv is missing/corrupted, so// suppress the Windows conhost flash here too (GH-4814).- tinyinference::local::process::apply_no_window(&mut cmd);+ tinyinference_local::process::apply_no_window(&mut cmd);let output = match tokio::time::timeout(timeout, cmd.output()).await {Ok(Ok(o)) => o,diff --git a/crates/openhuman-core/src/runtime/python_server/spacy.rs b/crates/openhuman-core/src/runtime/python_server/spacy.rsindex 2dd65beeda..0741ad4f6d 100644--- a/crates/openhuman-core/src/runtime/python_server/spacy.rs+++ b/crates/openhuman-core/src/runtime/python_server/spacy.rs@@ -168,7 +168,7 @@ async fn run_step(python_bin: &Path, args: &[&str], timeout: Duration, label: &scmd.kill_on_drop(true);// spaCy venv provisioning can re-run mid-session if the venv is missing or// its ready marker is stale, so suppress the Windows conhost flash (GH-4814).- tinyinference::local::process::apply_no_window(&mut cmd);+ tinyinference_local::process::apply_no_window(&mut cmd);let output = match tokio::time::timeout(timeout, cmd.output()).await {Ok(Ok(output)) => output,diff --git a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rsindex db5a701947..f38ba7616c 100644--- a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs@@ -39,9 +39,9 @@ use crate::skills::registry::get_workflow;use crate::skills::run_log;use crate::skills::runtime::await_run_outcome;use crate::tools::traits::Tool;-use tinyinference::message::AssistantMessage;-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::AssistantMessage;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;// ── Mock LLM ─────────────────────────────────────────────────────────────// Minimal scripted model: pops queued ModelResponses in order. Mirrors the@@ -49,7 +49,7 @@ use tinyinference::tool::ToolCall;// `agent/harness/subagent_runner/ops_tests.rs`; kept local so this file is// self-contained).struct ScriptedModel {- responses: Mutex<Vec<tinyinference::Result<ModelResponse>>>,+ responses: Mutex<Vec<tinyinference_core::Result<ModelResponse>>>,}#[async_trait]@@ -58,7 +58,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.responses.lock().remove(0)}}diff --git a/crates/openhuman-core/src/skills/e2e_run_tests.rs b/crates/openhuman-core/src/skills/e2e_run_tests.rsindex a7f7e43500..caff79d3e2 100644--- a/crates/openhuman-core/src/skills/e2e_run_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_run_tests.rs@@ -41,9 +41,9 @@ use crate::skills::schemas::resolve_workspace_dir;use crate::threads::todos::ops as board_ops;use crate::threads::todos::ops::{BoardLocation, CardPatch};use crate::tools::traits::Tool;-use tinyinference::message::AssistantMessage;-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::AssistantMessage;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;/// Serialize this module's tests (each touches process-global state).fn serial() -> &'static tokio::sync::Mutex<()> {@@ -118,7 +118,7 @@ impl ChatModel<()> for MockLlm {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let convo: String = request.messages.iter()@@ -445,8 +445,8 @@ impl ChatModel<()> for FailingLlm {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {- Err(tinyinference::Error::Model(+ ) -> tinyinference_core::Result<ModelResponse> {+ Err(tinyinference_core::Error::Model("simulated provider failure: model unavailable".to_string(),))}diff --git a/crates/openhuman-core/src/threads/ops_conversion_tests.rs b/crates/openhuman-core/src/threads/ops_conversion_tests.rsindex 89e122bb20..e71482a5ce 100644--- a/crates/openhuman-core/src/threads/ops_conversion_tests.rs+++ b/crates/openhuman-core/src/threads/ops_conversion_tests.rs@@ -68,7 +68,7 @@ fn build_title_request_sends_no_per_request_model_override() {fn build_title_request_carries_the_system_prompt_and_rendered_user_prompt() {// Pins the rest of the request so the `model` assertion above cannot be// satisfied by an empty or malformed request.- use tinyinference::message::Message;+ use tinyinference_core::message::Message;let request = crate::threads::title::build_title_request("hi there", "hello back");diff --git a/crates/openhuman-core/src/threads/title.rs b/crates/openhuman-core/src/threads/title.rsindex 9d18f544d5..8f506ef4fd 100644--- a/crates/openhuman-core/src/threads/title.rs+++ b/crates/openhuman-core/src/threads/title.rs@@ -5,8 +5,8 @@use std::hash::{Hash, Hasher};-use tinyinference::message::Message;-use tinyinference::model::ModelRequest;+use tinyinference_core::message::Message;+use tinyinference_core::model::ModelRequest;pub const THREAD_TITLE_LOG_PREFIX: &str = "[threads:title]";pub const THREAD_TITLE_SYSTEM_PROMPT: &str = "You name chat threads from the first user message and the assistant reply. Return only the name: at most 3 words, like Fix session handoff or Gmail OAuth retry. Lead with the verb or the subject and drop filler words. No quotes. No markdown. No punctuation.";diff --git a/crates/openhuman-core/src/voice/ops.rs b/crates/openhuman-core/src/voice/ops.rsindex beebfd545c..03590e678f 100644--- a/crates/openhuman-core/src/voice/ops.rs+++ b/crates/openhuman-core/src/voice/ops.rs@@ -11,7 +11,7 @@ use crate::config::Config;use crate::inference::local as local_ai;use crate::inference::local::paths::{resolve_piper_binary, resolve_tts_voice_path};use crate::rpc::RpcOutcome;-use tinyinference::local::models as model_ids;+use tinyinference_local::models as model_ids;use super::factory::{create_stt_provider, effective_stt_provider};use super::postprocess;diff --git a/crates/openhuman-core/src/web_chat/web_errors/budget.rs b/crates/openhuman-core/src/web_chat/web_errors/budget.rsindex 75decfc38f..600c7f6337 100644--- a/crates/openhuman-core/src/web_chat/web_errors/budget.rs+++ b/crates/openhuman-core/src/web_chat/web_errors/budget.rs@@ -34,7 +34,7 @@ pub(crate) fn is_inference_budget_exceeded_error(message: &str) -> bool {// (issue #3088). Without this, an Ollama user with zero credits and// routing still on Managed sees an opaque "provider error" and has no// way to self-diagnose that they must top up or switch routing.- tinyinference::classification::is_budget_exhausted_message(message)+ tinyinference_core::classification::is_budget_exhausted_message(message)}pub(crate) fn inference_budget_exceeded_user_message() -> &'static str {diff --git a/crates/openhuman-core/src/web_chat/web_errors/classify.rs b/crates/openhuman-core/src/web_chat/web_errors/classify.rsindex a947c73550..c54850e1ce 100644--- a/crates/openhuman-core/src/web_chat/web_errors/classify.rs+++ b/crates/openhuman-core/src/web_chat/web_errors/classify.rs@@ -259,7 +259,7 @@ pub(crate) fn classify_inference_error(err: &str) -> ClassifiedError {provider: None,fallback_available: None,}- } else if tinyinference::providers::openai::is_chat_template_rejection_message(err) {+ } else if tinyinference_core::providers::openai::is_chat_template_rejection_message(err) {// #5291: a local runtime (LM Studio / llama.cpp / Ollama) rendered the// request through the model's OWN Jinja chat template and the template// raised — `No user query found in messages.` on Qwen 3, against thediff --git a/crates/openhuman-core/src/web_chat/web_errors/provider_detail.rs b/crates/openhuman-core/src/web_chat/web_errors/provider_detail.rsindex ee70d18655..8f8c298ea2 100644--- a/crates/openhuman-core/src/web_chat/web_errors/provider_detail.rs+++ b/crates/openhuman-core/src/web_chat/web_errors/provider_detail.rs@@ -37,7 +37,7 @@ pub(crate) fn extract_provider_error_detail(err: &str) -> Option<String> {if trimmed.is_empty() {return None;}- let sanitized = tinyinference::sanitize::sanitize_api_error(trimmed);+ let sanitized = tinyinference_core::sanitize::sanitize_api_error(trimmed);return Some(crate::util::truncate_with_ellipsis(&sanitized,MAX_DETAIL_CHARS,diff --git a/tests/agent_builder_public.rs b/tests/agent_builder_public.rsindex 6848b92ed2..9ed24dd669 100644--- a/tests/agent_builder_public.rs+++ b/tests/agent_builder_public.rs@@ -7,7 +7,7 @@ use openhuman_core::memory::{Memory, MemoryCategory, MemoryEntry};use openhuman_core::tools::{Tool, ToolResult};use std::collections::HashSet;use std::sync::Arc;-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelRequest, ModelResponse};struct StubModel;@@ -17,7 +17,7 @@ impl ChatModel<()> for StubModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant("ok"))}}diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex c3af0a8f2d..38d82570d1 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -2373,12 +2373,12 @@ mod streaming_support {use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use tempfile::TempDir;- use tinyinference::message::{AssistantMessage, ContentBlock};- use tinyinference::model::{+ use tinyinference_core::message::{AssistantMessage, ContentBlock};+ use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};- use tinyinference::tool::ToolCall;- use tinyinference::usage::Usage;+ use tinyinference_core::tool::ToolCall;+ use tinyinference_core::usage::Usage;// ── ScriptedProvider ────────────────────────────────────────────────────// Copied (minimal) from tests/agent_session_turn_raw_coverage_e2e.rs:76-152.@@ -2390,13 +2390,13 @@ mod streaming_support {}impl ScriptedProvider {- fn pop_response(&self) -> tinyinference::Result<ModelResponse> {+ fn pop_response(&self) -> tinyinference_core::Result<ModelResponse> {self.responses.lock().unwrap().pop_front().unwrap_or_else(|| Ok(text_response_s("default scripted final")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}@@ -2410,7 +2410,7 @@ mod streaming_support {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.pop_response()}@@ -2418,7 +2418,7 @@ mod streaming_support {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {let response = self.pop_response()?;let mut items = vec![ModelStreamItem::Started];items.extend(self.stream_events.iter().cloned());@@ -2678,8 +2678,8 @@ async fn streaming_tool_call_accumulation() {agent_with_s, native_tool_response_s, text_response_s, workspace_s, EchoTool,ScriptedProvider,};- use tinyinference::model::{ModelProfile, ModelStreamItem};- use tinyinference::tool::ToolDelta;+ use tinyinference_core::model::{ModelProfile, ModelStreamItem};+ use tinyinference_core::tool::ToolDelta;let _lock = env_lock();let (_temp, workspace_path) = workspace_s("stream-accum");@@ -3021,10 +3021,10 @@ fn sse_tool_args_router() -> Router {/// accumulation in its SSE transport is what assembles the final tool call.#[tokio::test(flavor = "multi_thread", worker_threads = 2)]async fn provider_sse_tool_args_accumulation() {- use tinyinference::message::Message;- use tinyinference::model::{ChatModel, ModelRequest, ModelStreamItem};- use tinyinference::providers::openai::{AuthStyle, OpenAiModel};- use tinyinference::tool::ToolSchema;+ use tinyinference_core::message::Message;+ use tinyinference_core::model::{ChatModel, ModelRequest, ModelStreamItem};+ use tinyinference_core::providers::openai::{AuthStyle, OpenAiModel};+ use tinyinference_core::tool::ToolSchema;let _lock = env_lock();@@ -4160,7 +4160,7 @@ mod tool_policy_boundary_placement {use std::sync::{Arc, Mutex};use super::streaming_support::ScriptedProvider;- use tinyinference::model::{ChatModel, ModelProfile};+ use tinyinference_core::model::{ChatModel, ModelProfile};struct StubMemory;diff --git a/tests/agent_turn_overrides_e2e.rs b/tests/agent_turn_overrides_e2e.rsindex 3ca9b75050..461a16e76c 100644--- a/tests/agent_turn_overrides_e2e.rs+++ b/tests/agent_turn_overrides_e2e.rs@@ -43,8 +43,8 @@ use openhuman_core::threads::goals::{runtime as goal_runtime, store as goal_storuse openhuman_core::tools::{PermissionLevel, Tool, ToolContent, ToolResult, ToolScope as RuntimeToolScope,};-use tinyinference::message::Message;-use tinyinference::model::{+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};@@ -164,7 +164,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.capture(&request);Ok(self.pop())}@@ -173,7 +173,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelStream> {+ ) -> tinyinference_core::Result<ModelStream> {self.capture(&request);let items = vec![ModelStreamItem::Started,diff --git a/tests/calendar_grounding_e2e.rs b/tests/calendar_grounding_e2e.rsindex be66c4bfb2..2cbf0367d6 100644--- a/tests/calendar_grounding_e2e.rs+++ b/tests/calendar_grounding_e2e.rs@@ -6,9 +6,9 @@ use openhuman_core::tools::{PermissionLevel, Tool, ToolResult};use parking_lot::Mutex;use serde_json::json;use std::sync::Arc;-use tinyinference::message::{AssistantMessage, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::{AssistantMessage, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;struct MockCalendarModel {captured_messages: Arc<Mutex<Vec<Message>>>,@@ -26,7 +26,7 @@ impl ChatModel<()> for MockCalendarModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let mut count = self.iter_count.lock();*count += 1;diff --git a/tests/composio_list_tools_stack_overflow_regression.rs b/tests/composio_list_tools_stack_overflow_regression.rsindex 4bcb1328d9..78a67b25d8 100644--- a/tests/composio_list_tools_stack_overflow_regression.rs+++ b/tests/composio_list_tools_stack_overflow_regression.rs@@ -119,9 +119,9 @@ use parking_lot::Mutex;use serde_json::json;use std::sync::Arc;use tempfile::tempdir;-use tinyinference::message::AssistantMessage;-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;+use tinyinference_core::message::AssistantMessage;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;// ── env serialisation (config-rs reads process env) ──────────────────@@ -204,7 +204,7 @@ impl ChatModel<()> for StubModel {&self,_state: &(),_request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {let mut count = self.iter.lock();*count += 1;if *count == 1 {diff --git a/tests/inference_provider_e2e.rs b/tests/inference_provider_e2e.rsindex 95ffdcfdf5..e604a8b899 100644--- a/tests/inference_provider_e2e.rs+++ b/tests/inference_provider_e2e.rs@@ -22,9 +22,9 @@ use wiremock::{Mock, MockServer, ResponseTemplate};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};use openhuman_core::core::jsonrpc::build_core_http_router;-use tinyinference::message::Message;-use tinyinference::model::{ChatModel, ModelRequest, ModelStreamItem};-use tinyinference::providers::openai::{AuthStyle, OpenAiModel};+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelRequest, ModelStreamItem};+use tinyinference_core::providers::openai::{AuthStyle, OpenAiModel};// ── Environment serialisation lock ───────────────────────────────────────────//diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 578e70d11e..0453970831 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -17,8 +17,8 @@ use futures_util::StreamExt;use serde_json::{json, Value};use sha2::{Digest, Sha256};use tempfile::tempdir;-use tinyinference::message::Message;-use tinyinference::model::ModelRequest;+use tinyinference_core::message::Message;+use tinyinference_core::model::ModelRequest;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};use openhuman_core::core::jsonrpc::build_core_http_router;diff --git a/tests/raw_coverage/agent_archivist_debug_round21_raw_coverage_e2e.rs b/tests/raw_coverage/agent_archivist_debug_round21_raw_coverage_e2e.rsindex 034d1353aa..6e299b0056 100644--- a/tests/raw_coverage/agent_archivist_debug_round21_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_archivist_debug_round21_raw_coverage_e2e.rs@@ -28,10 +28,10 @@ use std::collections::VecDeque;use std::path::{Path, PathBuf};use std::sync::{Arc, OnceLock};use tempfile::TempDir;-use tinyinference::message::{AssistantMessage, ContentBlock};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;struct ScriptedModel {responses: Mutex<VecDeque<anyhow::Result<ModelResponse>>>,@@ -67,7 +67,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(request.messages@@ -80,7 +80,7 @@ impl ChatModel<()> for ScriptedModel {.lock().pop_front().unwrap_or_else(|| Ok(text_response("fallback final")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_harness_leftovers_raw_coverage_e2e.rs b/tests/raw_coverage/agent_harness_leftovers_raw_coverage_e2e.rsindex d5a7b35304..6921c60391 100644--- a/tests/raw_coverage/agent_harness_leftovers_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_harness_leftovers_raw_coverage_e2e.rs@@ -25,10 +25,10 @@ use std::collections::{HashSet, VecDeque};use std::path::{Path, PathBuf};use std::sync::Arc;use tempfile::TempDir;-use tinyinference::message::{AssistantMessage, ContentBlock, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;struct ScriptedModel {responses: Mutex<VecDeque<anyhow::Result<ModelResponse>>>,@@ -70,7 +70,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(CapturedRequest {messages: request.messages,tool_names: request.tools.iter().map(|tool| tool.name.clone()).collect(),@@ -79,7 +79,7 @@ impl ChatModel<()> for ScriptedModel {.lock().pop_front().unwrap_or_else(|| Ok(text_response("fallback final")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_harness_raw_coverage_e2e.rs b/tests/raw_coverage/agent_harness_raw_coverage_e2e.rsindex ada2bd94d4..0fd3fa2585 100644--- a/tests/raw_coverage/agent_harness_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_harness_raw_coverage_e2e.rs@@ -18,10 +18,10 @@ use parking_lot::Mutex;use serde_json::json;use std::path::{Path, PathBuf};use std::sync::Arc;-use tinyinference::message::{AssistantMessage, ContentBlock, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;struct ScriptedModel {responses: Mutex<Vec<ModelResponse>>,@@ -57,7 +57,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(request.messages);let mut responses = self.responses.lock();Ok(if responses.is_empty() {diff --git a/tests/raw_coverage/agent_large_round25_raw_coverage_e2e.rs b/tests/raw_coverage/agent_large_round25_raw_coverage_e2e.rsindex e990b92782..78a988b893 100644--- a/tests/raw_coverage/agent_large_round25_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_large_round25_raw_coverage_e2e.rs@@ -18,10 +18,10 @@ use serde_json::json;use std::collections::VecDeque;use std::path::PathBuf;use std::sync::{Arc, OnceLock};-use tinyinference::message::{AssistantMessage, ContentBlock, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;struct EnvGuard {key: &'static str,@@ -105,7 +105,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {// Route extraction calls — identified// by the extraction system prompt — to the fixed extracted answer so they// do not consume the agent-turn response queue, and record them separatelydiff --git a/tests/raw_coverage/agent_prompts_subagent_raw_coverage_e2e.rs b/tests/raw_coverage/agent_prompts_subagent_raw_coverage_e2e.rsindex 781875ce96..1d20c16cc1 100644--- a/tests/raw_coverage/agent_prompts_subagent_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_prompts_subagent_raw_coverage_e2e.rs@@ -25,10 +25,10 @@ use std::collections::{HashSet, VecDeque};use std::path::{Path, PathBuf};use std::sync::Arc;use std::time::Duration;-use tinyinference::message::{AssistantMessage, ContentBlock};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;struct ScriptedModel {responses: Mutex<VecDeque<anyhow::Result<ModelResponse>>>,@@ -93,7 +93,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(request.messages@@ -106,13 +106,13 @@ impl ChatModel<()> for ScriptedModel {tokio::time::sleep(delay).await;}if let Some(message) = &self.always_fail {- return Err(tinyinference::Error::Model(message.clone()));+ return Err(tinyinference_core::Error::Model(message.clone()));}self.responses.lock().pop_front().unwrap_or_else(|| Ok(text_response("fallback final")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_round26_raw_coverage_e2e.rs b/tests/raw_coverage/agent_round26_raw_coverage_e2e.rsindex 3ad6c2d63e..cdaa76dd0f 100644--- a/tests/raw_coverage/agent_round26_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_round26_raw_coverage_e2e.rs@@ -22,9 +22,9 @@ use serde_json::json;use std::collections::{HashSet, VecDeque};use std::path::PathBuf;use std::sync::{Arc, OnceLock};-use tinyinference::message::Message;-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::usage::Usage;+use tinyinference_core::message::Message;+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::usage::Usage;struct EnvGuard {key: &'static str,@@ -95,7 +95,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(CapturedRequest {messages: request.messages,tool_names: request.tools.iter().map(|tool| tool.name.clone()).collect(),diff --git a/tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs b/tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rsindex 708a8a749f..6c49f813aa 100644--- a/tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs@@ -22,12 +22,12 @@ use std::path::{Path, PathBuf};use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, LazyLock};use tempfile::TempDir;-use tinyinference::message::{AssistantMessage, Message, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, Message, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;use tokio::time::{sleep, Duration, Instant};static NO_FILTER: LazyLock<HashSet<String>> = LazyLock::new(HashSet::new);@@ -110,12 +110,12 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.capture(&request, false);self.pop_response()}- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {+ async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference_core::Result<ModelStream> {self.capture(&request, true);let response = self.pop_response()?;let mut items = vec![ModelStreamItem::Started];@@ -134,12 +134,12 @@ impl ScriptedModel {});}- fn pop_response(&self) -> tinyinference::Result<ModelResponse> {+ fn pop_response(&self) -> tinyinference_core::Result<ModelResponse> {self.responses.lock().pop_front().unwrap_or_else(|| Ok(text_response("fallback final", None)))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_session_turn_raw_coverage_e2e.rs b/tests/raw_coverage/agent_session_turn_raw_coverage_e2e.rsindex 75b0155092..02c0906e48 100644--- a/tests/raw_coverage/agent_session_turn_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_session_turn_raw_coverage_e2e.rs@@ -31,12 +31,12 @@ use std::path::PathBuf;use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};use std::sync::{Arc, Mutex, OnceLock};use tempfile::TempDir;-use tinyinference::message::{AssistantMessage, ContentBlock, Message, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::{ToolCall, ToolDelta};-use tinyinference::usage::Usage;+use tinyinference_core::tool::{ToolCall, ToolDelta};+use tinyinference_core::usage::Usage;use tokio::sync::{Mutex as AsyncMutex, Notify};use tokio::time::{timeout, Duration};@@ -167,12 +167,12 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.capture(&request, false);self.pop_response()}- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {+ async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference_core::Result<ModelStream> {self.capture(&request, true);let response = self.pop_response()?;let mut items = vec![ModelStreamItem::Started];@@ -193,16 +193,16 @@ impl ScriptedModel {});}- fn pop_response(&self) -> tinyinference::Result<ModelResponse> {+ fn pop_response(&self) -> tinyinference_core::Result<ModelResponse> {if let Some(message) = self.always_fail {- return Err(tinyinference::Error::Model(message.to_string()));+ return Err(tinyinference_core::Error::Model(message.to_string()));}self.responses.lock().unwrap().pop_front().unwrap_or_else(|| Ok(text_response("default scripted final")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_tool_loop_raw_coverage_e2e.rs b/tests/raw_coverage/agent_tool_loop_raw_coverage_e2e.rsindex 2530b7b2ed..9377da0920 100644--- a/tests/raw_coverage/agent_tool_loop_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_tool_loop_raw_coverage_e2e.rs@@ -17,12 +17,12 @@ use serde_json::json;use std::collections::{HashSet, VecDeque};use std::path::PathBuf;use std::sync::{Arc, Mutex};-use tinyinference::message::{AssistantMessage, ContentBlock, Message, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::{ToolCall, ToolDelta};-use tinyinference::usage::Usage;+use tinyinference_core::tool::{ToolCall, ToolDelta};+use tinyinference_core::usage::Usage;#[derive(Clone, Debug)]struct CapturedTurn {@@ -80,12 +80,12 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.capture(request);self.pop_response()}- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {+ async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference_core::Result<ModelStream> {self.capture(request);let response = self.pop_response()?;let mut items = vec![ModelStreamItem::Started];@@ -103,16 +103,16 @@ impl ScriptedModel {});}- fn pop_response(&self) -> tinyinference::Result<ModelResponse> {+ fn pop_response(&self) -> tinyinference_core::Result<ModelResponse> {if let Some(message) = &self.always_fail {- return Err(tinyinference::Error::Model(message.clone()));+ return Err(tinyinference_core::Error::Model(message.clone()));}self.responses.lock().unwrap().pop_front().unwrap_or_else(|| Ok(ModelResponse::assistant("")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_turn_builder_leftovers_raw_coverage_e2e.rs b/tests/raw_coverage/agent_turn_builder_leftovers_raw_coverage_e2e.rsindex 954e224a64..7c6949286d 100644--- a/tests/raw_coverage/agent_turn_builder_leftovers_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_turn_builder_leftovers_raw_coverage_e2e.rs@@ -16,10 +16,10 @@ use std::path::{Path, PathBuf};use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::Arc;use tempfile::TempDir;-use tinyinference::message::{AssistantMessage, ContentBlock, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;use tokio::time::{sleep, Duration, Instant};struct EnvGuard {@@ -92,7 +92,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(CapturedRequest {messages: request.messages,tool_names: request.tools.iter().map(|tool| tool.name.clone()).collect(),@@ -101,7 +101,7 @@ impl ChatModel<()> for ScriptedModel {.lock().pop_front().unwrap_or_else(|| Ok(text_response("fallback final", None)))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/agent_turn_toolloop_round22_raw_coverage_e2e.rs b/tests/raw_coverage/agent_turn_toolloop_round22_raw_coverage_e2e.rsindex d125409a9a..c6b338f555 100644--- a/tests/raw_coverage/agent_turn_toolloop_round22_raw_coverage_e2e.rs+++ b/tests/raw_coverage/agent_turn_toolloop_round22_raw_coverage_e2e.rs@@ -11,12 +11,12 @@ use openhuman_core::tools::{PermissionLevel, Tool, ToolContent, ToolResult, Tooluse serde_json::json;use std::collections::VecDeque;use std::sync::{Arc, Mutex, OnceLock};-use tinyinference::message::{AssistantMessage, ContentBlock, Message, MessageDelta};-use tinyinference::model::{+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message, MessageDelta};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;#[derive(Clone, Debug)]struct CapturedRequest {@@ -61,12 +61,12 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.capture(&request, false);self.pop_response()}- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {+ async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference_core::Result<ModelStream> {self.capture(&request, true);let response = self.pop_response()?;let mut items = vec![ModelStreamItem::Started];@@ -85,13 +85,13 @@ impl ScriptedModel {});}- fn pop_response(&self) -> tinyinference::Result<ModelResponse> {+ fn pop_response(&self) -> tinyinference_core::Result<ModelResponse> {self.responses.lock().unwrap().pop_front().unwrap_or_else(|| Ok(text_response("script exhausted fallback")))- .map_err(|error| tinyinference::Error::Model(error.to_string()))+ .map_err(|error| tinyinference_core::Error::Model(error.to_string()))}}diff --git a/tests/raw_coverage/inference_agent_raw_coverage_e2e.rs b/tests/raw_coverage/inference_agent_raw_coverage_e2e.rsindex eefdaa6bb2..bf52155f17 100644--- a/tests/raw_coverage/inference_agent_raw_coverage_e2e.rs+++ b/tests/raw_coverage/inference_agent_raw_coverage_e2e.rs@@ -124,7 +124,7 @@ use openhuman_core::config::ops::local_ai_presets::{apply_preset_to_config, current_tier_from_config, supports_screen_summary,vision_mode_for_config,};-use tinyinference::local::presets::{+use tinyinference_local::presets::{all_presets, device_supports_local_ai, mvp_presets, preset_for_tier, recommend_tier,should_default_to_cloud_fallback, vision_mode_for_tier, ModelTier, VisionMode,MIN_RAM_GB_FOR_LOCAL_AI, MVP_MAX_TIER,@@ -173,7 +173,7 @@ use openhuman_core::agent::tinyagents::thread_context::{current_thread_id, with_use openhuman_core::threads::todos::ops::BoardLocation;use openhuman_core::inference::tokenjuice::AgentTokenjuiceCompression;use openhuman_core::tools::{Tool, ToolResult, ToolSpec};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};static ENV_LOCK: &std::sync::OnceLock<std::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;@@ -249,7 +249,7 @@ impl ChatModel<()> for EchoModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {Ok(ModelResponse::assistant(request.messages@@ -1970,8 +1970,8 @@ async fn inference_provider_factory_and_classifiers_cover_user_state_edges() {#[tokio::test]async fn inference_openhuman_backend_provider_covers_authless_and_streaming_edges() {- use tinyinference::message::Message;- use tinyinference::model::{ChatModel, ModelRequest};+ use tinyinference_core::message::Message;+ use tinyinference_core::model::{ChatModel, ModelRequest};let state_dir = tempdir().expect("openhuman provider state");let provider = OpenHumanBackendModel::new(diff --git a/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs b/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rsindex 54d47f1093..97788fdbcc 100644--- a/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs+++ b/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs@@ -15,8 +15,8 @@ use axum::routing::{get, post};use axum::{Json, Router};use serde_json::{json, Value};use tempfile::{tempdir, TempDir};-use tinyinference::message::Message;-use tinyinference::model::ModelRequest;+use tinyinference_core::message::Message;+use tinyinference_core::model::ModelRequest;use openhuman_core::config::schema::cloud_providers::{AuthStyle as CloudAuthStyle, CloudProviderCreds,diff --git a/tests/raw_coverage/tools_agent_credentials_state_raw_coverage_e2e.rs b/tests/raw_coverage/tools_agent_credentials_state_raw_coverage_e2e.rsindex 6468fce383..37197091da 100644--- a/tests/raw_coverage/tools_agent_credentials_state_raw_coverage_e2e.rs+++ b/tests/raw_coverage/tools_agent_credentials_state_raw_coverage_e2e.rs@@ -45,10 +45,10 @@ use openhuman_core::tools::{use parking_lot::Mutex as ParkingMutex;use serde_json::{json, Value};use tempfile::{Builder, TempDir};-use tinyinference::message::{AssistantMessage, ContentBlock, Message};-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};-use tinyinference::tool::ToolCall;-use tinyinference::usage::Usage;+use tinyinference_core::message::{AssistantMessage, ContentBlock, Message};+use tinyinference_core::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};+use tinyinference_core::tool::ToolCall;+use tinyinference_core::usage::Usage;static ROUND16_ENV_LOCK: &OnceLock<Mutex<()>> = &crate::SHARED_ENV_LOCK;@@ -139,7 +139,7 @@ impl ChatModel<()> for ScriptedModel {&self,_state: &(),request: ModelRequest,- ) -> tinyinference::Result<ModelResponse> {+ ) -> tinyinference_core::Result<ModelResponse> {self.requests.lock().push(request.messages);Ok(self.responses.lock().remove(0))}diff --git a/vendor/tinyagents b/vendor/tinyagentsindex bc97b3034a..ae9c9ad6e4 160000--- a/vendor/tinyagents+++ b/vendor/tinyagents@@ -1 +1 @@-Subproject commit bc97b3034a5978e68c0722b0ecf4ed402841af57+Subproject commit ae9c9ad6e451fa498ce924e976a25d82bf2f43c4diff --git a/vendor/tinymemory b/vendor/tinymemoryindex 74f2a529ce..14a817acf0 160000--- a/vendor/tinymemory+++ b/vendor/tinymemory@@ -1 +1 @@-Subproject commit 74f2a529cef2f168ed53fde8a4ab7ca06b67dc4e+Subproject commit 14a817acf02705471674ba9e8b6f6c15809461ef