Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(tests): update imports from tinyagents to tinyinference\n\nUpdate raw coverage e2e tests to use the tinyinference crate instead of tinyagents, reflecting the module restructuring. All type references and error types are updated accordingly.\n\nAuto-committed-on: dragonfly\n

Steven Enamakelcf8e539f3a49
diff --git a/tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs b/tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs
index 0404b4f470..c6eeac57f2 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 tinyagents::harness::message::{AssistantMessage, Message, MessageDelta};
-use tinyagents::harness::model::{
+use tinyinference::message::{AssistantMessage, Message, MessageDelta};
+use tinyinference::model::{
ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,
};
-use tinyagents::harness::tool::ToolCall;
-use tinyagents::harness::usage::Usage;
+use tinyinference::tool::ToolCall;
+use tinyinference::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,
- ) -> tinyagents::Result<ModelResponse> {
+ ) -> tinyinference::Result<ModelResponse> {
self.capture(&request, false);
self.pop_response()
}
- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyagents::Result<ModelStream> {
+ async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::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) -> tinyagents::Result<ModelResponse> {
+ fn pop_response(&self) -> tinyinference::Result<ModelResponse> {
self.responses
.lock()
.pop_front()
.unwrap_or_else(|| Ok(text_response("fallback final", None)))
- .map_err(|error| tinyagents::TinyAgentsError::Model(error.to_string()))
+ .map_err(|error| tinyinference::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.rs
index e265ae6c4d..946e535ff8 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::openhuman::tools::{PermissionLevel, Tool, ToolContent, ToolR
use serde_json::json;
use std::collections::VecDeque;
use std::sync::{Arc, Mutex, OnceLock};
-use tinyagents::harness::message::{AssistantMessage, ContentBlock, Message, MessageDelta};
-use tinyagents::harness::model::{
+use tinyinference::message::{AssistantMessage, ContentBlock, Message, MessageDelta};
+use tinyinference::model::{
ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,
};
-use tinyagents::harness::tool::ToolCall;
-use tinyagents::harness::usage::Usage;
+use tinyinference::tool::ToolCall;
+use tinyinference::usage::Usage;
#[derive(Clone, Debug)]
struct CapturedRequest {
@@ -61,12 +61,12 @@ impl ChatModel<()> for ScriptedModel {
&self,
_state: &(),
request: ModelRequest,
- ) -> tinyagents::Result<ModelResponse> {
+ ) -> tinyinference::Result<ModelResponse> {
self.capture(&request, false);
self.pop_response()
}
- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyagents::Result<ModelStream> {
+ async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::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) -> tinyagents::Result<ModelResponse> {
+ fn pop_response(&self) -> tinyinference::Result<ModelResponse> {
self.responses
.lock()
.unwrap()
.pop_front()
.unwrap_or_else(|| Ok(text_response("script exhausted fallback")))
- .map_err(|error| tinyagents::TinyAgentsError::Model(error.to_string()))
+ .map_err(|error| tinyinference::Error::Model(error.to_string()))
}
}