tinyhumansai/openhuman · error
{} (underlying error: {e})
Error message
{} (underlying error: {e}) What it means
Wraps the underlying credential-retrieval error into a user-facing 'missing provider credentials' message (via fallback_diagnostics). The underlying error is appended but deliberately excludes any API key material; a warn log records role, slug, auth style and whether implicit cloud fallback was in play.
Source
Thrown at src/openhuman/inference/provider/factory.rs:2265
})
} else {
None
};
let missing_credentials = || {
// Safe fields only: role, slug, and the routing shape. Never the
// underlying error (it can echo a key) and never the key itself.
log::warn!(
"[providers][chat-factory] credential lookup failed role={} slug={} auth_style={} implicit_cloud_fallback={}",
role,
slug,
entry.auth_style.as_str(),
implicit_fallback
);
super::fallback_diagnostics::missing_provider_credentials_message(role, slug, local_chat)
};
let key = lookup_key_for_slug(slug, config)
.map_err(|e| anyhow::anyhow!("{} (underlying error: {e})", missing_credentials()))?;
// A readable auth profile with no key for this slug returns `Ok("")`, which
// would otherwise build a client with an empty bearer and surface as a raw
// 401 from the provider several layers later — exactly the baffling error
// this diagnostic exists to replace.
//
// Scoped to the *implicit fallback* path deliberately. That is the case the
// diagnostic is for: a local-chat user whose background role landed on a
// BYOK slug they never configured. An explicitly routed provider keeps its
// existing behaviour and is allowed to build without a stored key — callers
// construct such models to probe or describe a provider before a key is
// saved, and failing that at construction time would be a behaviour change
// well beyond this diagnostic.
//
// Styles that carry no stored key (`OpenhumanJwt` injects a session JWT
// downstream, `None` sends no auth header at all) are legitimately blank and
// never trip this.
if implicit_fallbackView on GitHub (pinned to 7491200858)
Solutions
- Add credentials for the slug via the settings UI, keyring, or the appropriate environment variable
- If implicit fallback picked the wrong provider, set an explicit provider string for the role
- Check the warn log line for the auth_style to see which credential mechanism failed
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/openhuman/inference/provider/factory.rs:2265 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/62a893de86d5c62a.
Report an issue: GitHub.