Skip to content

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

refactor(attachments): remove external channel attachment check

Steven Enamakel8a3aeffcacd5
diff --git a/crates/openhuman-core/src/agent/attachments/provider.rs b/crates/openhuman-core/src/agent/attachments/provider.rs
index ad271ef555..c03cd0ce41 100644
--- a/crates/openhuman-core/src/agent/attachments/provider.rs
+++ b/crates/openhuman-core/src/agent/attachments/provider.rs
@@ -250,15 +250,6 @@ impl AttachmentModel {
}
}
}
- if scope.external_channel
- && request.messages.iter().any(|message| {
- matches!(message, Message::User(user) if user.content.iter().any(is_media_block))
- })
- {
- return Err(tinyinference_llm::Error::Model(
- "attachment resolution is disabled for external channel input".into(),
- ));
- }
for (message_index, message) in request.messages.iter_mut().enumerate() {
let Message::User(user) = message else {
continue;
diff --git a/crates/openhuman-core/src/agent/attachments/provider_source.rs b/crates/openhuman-core/src/agent/attachments/provider_source.rs
index 52e8925ba2..dd46c04669 100644
--- a/crates/openhuman-core/src/agent/attachments/provider_source.rs
+++ b/crates/openhuman-core/src/agent/attachments/provider_source.rs
@@ -32,7 +32,7 @@ impl AttachmentModel {
tinyinference_llm::Error::Model("native attachment session is unavailable".into())
})?;
let resolved = crate::threads::attachments::read_authorized_native_attachment(
- &crate::core::runtime::DispatchCtx::ambient(),
+ &self.dispatch_ctx(),
&self.config,
thread_id,
opaque_id,