Skip to content

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

fix(inference): repair explicit context compilation

Steven Enamakelabeb2ad22f4d
diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs
index 28ce74f617..2e80d7c9c7 100644
--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs
+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs
@@ -467,7 +467,10 @@ fn with_thread_id(request: ModelRequest, thread_id: Option<&str>) -> ModelReques
options = Value::Object(serde_json::Map::new());
}
if let Some(map) = options.as_object_mut() {
- map.insert("thread_id".to_string(), Value::String(thread_id));
+ map.insert(
+ "thread_id".to_string(),
+ Value::String(thread_id.to_string()),
+ );
}
request.with_provider_options(options)
}
diff --git a/crates/openhuman-core/src/inference/tokenjuice/savings.rs b/crates/openhuman-core/src/inference/tokenjuice/savings.rs
index fcc1451633..7cb5728822 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/savings.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/savings.rs
@@ -130,8 +130,9 @@ pub fn record(
return;
}
let mut st = state().lock().unwrap_or_else(|p| p.into_inner());
+ let attribution_model = st.attribution_model.clone();
st.aggregate.record_saving(
- &st.attribution_model,
+ &attribution_model,
compressor.as_str(),
original_tokens,
compacted_tokens,