Skip to content

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

chore(agent): remove unused `run_agent_turn_request_via_default_graph` function

Steven Enamakel0e978b6a1d04
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests.rs
index 6ba32090fa..e21f16a419 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests.rs
@@ -2,7 +2,6 @@ use super::*;
use crate::agent::harness::definition::{
ModelSpec, SandboxMode, SubagentEntry, ToolScope, TriggerMemoryAgent,
};
-use crate::inference::tokenjuice::AgentTokenjuiceCompression;
fn find(id: &str) -> AgentDefinition {
load_builtins()
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs
index 32b265170b..5e99e1e078 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs
@@ -45,7 +45,6 @@ mod worker_mirror;
// unaffected by the responsibility split.
#[cfg(test)]
pub(super) use dispatch::inherited_thread_id;
-pub(crate) use dispatch::run_agent_turn_request_via_default_graph;
pub(super) use dispatch::{run_subagent_via_graph, AggregatedUsage};
// Only what `graph_tests.rs`'s `use super::*` still needs directly (the rest
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
index 167006d9bd..02e1d5e314 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
@@ -28,88 +28,6 @@ pub(in super::super) struct AggregatedUsage {
pub(in super::super) charged_amount_usd: f64,
}
-/// Run an assembled custom per-agent turn through the shared default sub-agent
-/// leaf. Bespoke `AgentGraph::Custom` graphs use this after their own routing
-/// nodes so transcript persistence, worker-thread mirroring, progress events,
-/// cap summaries, and usage aggregation stay byte-for-byte
-/// on the default path.
-pub(crate) async fn run_agent_turn_request_via_default_graph(
- req: AgentTurnRequest,
-) -> Result<AgentTurnResult, SubagentRunError> {
- let AgentTurnRequest {
- turn_model_source,
- model,
- temperature,
- mut history,
- parent_tools,
- dynamic_tools,
- specs,
- allowed_names,
- max_iterations,
- run_queue,
- on_progress,
- agent_id,
- task_id,
- extended_policy,
- thread_id,
- run_context,
- worker_thread_id,
- workspace_dir,
- workspace_descriptor,
- max_output_tokens,
- model_vision,
- transcript_stem,
- provider_label,
- tokenjuice_compression,
- config,
- } = req;
-
- let (output, iterations, usage, early_exit_tool, hit_cap, breaker_halt) =
- run_subagent_via_graph(
- turn_model_source,
- &model,
- temperature,
- &mut history,
- parent_tools,
- dynamic_tools,
- specs,
- allowed_names,
- max_iterations,
- run_queue,
- on_progress,
- &agent_id,
- &task_id,
- extended_policy,
- thread_id,
- run_context,
- worker_thread_id,
- workspace_dir,
- workspace_descriptor,
- max_output_tokens,
- model_vision,
- &transcript_stem,
- &provider_label,
- tokenjuice_compression,
- config.as_deref(),
- )
- .await?;
-
- Ok(AgentTurnResult {
- history,
- output,
- iterations,
- usage: AgentTurnUsage {
- input_tokens: usage.input_tokens,
- output_tokens: usage.output_tokens,
- cached_input_tokens: usage.cached_input_tokens,
- charged_amount_usd: usage.charged_amount_usd,
- },
- early_exit_tool,
- hit_cap,
- breaker_halt,
- })
-}
-
/// Drive a sub-agent turn on the tinyagents harness. Returns
/// `(text, model_calls, AggregatedUsage, early_exit_tool, hit_cap)` — `hit_cap`
/// is `true` when the run stopped at the model-call cap with work still pending
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs b/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs
index 0cc943e656..e38ee6410a 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs
@@ -24,7 +24,6 @@ mod pause_checkpoint;
// The checkpoint filename validator, shared with `continue_subagent`: the
// model-authored `task_id` must be rejected at the tool boundary as well as at
// the write, so the read path cannot traverse either.
-pub(crate) use graph::run_agent_turn_request_via_default_graph;
pub(crate) use pause_checkpoint::is_safe_task_id;
mod prompt;
mod provider;