Skip to content

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

fix(model): move request-model cache key from RouteRecordingModel to ProfileOverrideModel

Steven Enamakel2151904d059f
diff --git a/src/openhuman/agent/tinyagents/model.rs b/src/openhuman/agent/tinyagents/model.rs
index 9a594ff036..a402b4147d 100644
--- a/src/openhuman/agent/tinyagents/model.rs
+++ b/src/openhuman/agent/tinyagents/model.rs
@@ -441,10 +441,7 @@ impl ChatModel<()> for RouteRecordingModel {
}
fn cache_identity(&self) -> Option<String> {
- self.inner.cache_identity().map(|identity| match &self.request_model {
- Some(model) => format!("{identity}:request-model={model}"),
- None => identity,
- })
+ self.inner.cache_identity()
}
async fn invoke(
@@ -504,7 +501,10 @@ impl ChatModel<()> for ProfileOverrideModel {
}
fn cache_identity(&self) -> Option<String> {
- self.inner.cache_identity()
+ self.inner.cache_identity().map(|identity| match &self.request_model {
+ Some(model) => format!("{identity}:request-model={model}"),
+ None => identity,
+ })
}
async fn invoke(