Skip to content

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

feat(inference): add provider label for managed error classification

Steven Enamakelc3a2bf9ffb03
diff --git a/crates/openhuman-tinyhumans/src/inference/managed_model.rs b/crates/openhuman-tinyhumans/src/inference/managed_model.rs
index 5180c37e8c..8dc13a438a 100644
--- a/crates/openhuman-tinyhumans/src/inference/managed_model.rs
+++ b/crates/openhuman-tinyhumans/src/inference/managed_model.rs
@@ -13,6 +13,11 @@ use super::managed_session::{publish_managed_auth_failure, resolve_session_beare
use crate::backend::url::effective_api_url;
use crate::client::endpoint::is_managed_endpoint_for_api_key;
+/// Provider label used by the hosted-backend error-code classifier. This is
+/// diagnostic classification only; managed-auth ownership uses the owner's
+/// typed provenance callback below.
+pub const PROVIDER_LABEL: &str = "tinyhumans";
+
/// Where the managed model reads its credentials from.
#[derive(Debug, Clone, Default)]
pub struct ManagedOptions {
diff --git a/crates/openhuman-tinyhumans/src/inference/managed_session.rs b/crates/openhuman-tinyhumans/src/inference/managed_session.rs
index 7a0da46230..f0183b5d47 100644
--- a/crates/openhuman-tinyhumans/src/inference/managed_session.rs
+++ b/crates/openhuman-tinyhumans/src/inference/managed_session.rs
@@ -29,7 +29,7 @@ pub(super) fn resolve_session_bearer(
/// The bearer a classified app-session token yields for managed inference.
///
-/// Separate from `OpenHumanBackendModel::resolve_bearer` so the decision is
+/// Separate from the model factory's bearer resolver so the decision is
/// testable without an on-disk auth profile.
///
/// `exp`-less tokens carry no recorded expiry, so `classify_session_token`
@@ -68,7 +68,7 @@ pub(super) fn managed_bearer(
}
/// Publish a `SessionExpired` event when the local `exp` precheck in
-/// `OpenHumanBackendModel::resolve_bearer` rejects an expired
+/// the managed-model bearer resolver rejects an expired
/// managed session token before a request is ever sent — mirroring
/// `require_live_session_token`'s
/// pre-flight publish so the credentials subscriber clears state and the UI