Skip to content

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

fix(inference): skip model listing for non-http providers

Steven Enamakel1588a63d529b
diff --git a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs b/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs
index 5b8d7e2df2..c9f21983ba 100644
--- a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs
+++ b/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs
@@ -33,6 +33,22 @@ pub(super) fn resolve_local_runtime_key(
looked_up
}
+/// Whether a provider entry can be probed at `{endpoint}/models`.
+///
+/// Claude Code is a local CLI provider, and an endpoint with an explicit
+/// non-http(s) scheme (`cli://…`) is a placeholder rather than an API base.
+/// An endpoint that does not parse as `scheme://host` at all is left to the
+/// request path so a genuine misconfiguration still surfaces as an error.
+fn endpoint_hosts_models_listing(slug: &str, endpoint: &str) -> bool {
+ if slug == "claude-code" {
+ return false;
+ }
+ match reqwest::Url::parse(endpoint.trim()) {
+ Ok(url) if url.has_host() => matches!(url.scheme(), "http" | "https"),
+ _ => true,
+ }
+}
+
pub fn append_query_param(url: &str, key: &str, value: &str) -> String {
if let Ok(mut parsed) = reqwest::Url::parse(url) {
parsed.query_pairs_mut().append_pair(key, value);
@@ -76,6 +92,25 @@ pub async fn list_configured_models_from_config(
.or_else(|| synthesize_managed_entry(&provider_id))
.ok_or_else(|| format!("no cloud provider with id or slug '{}' found", provider_id))?;
+ // Sentry TAURI-RUST-114C/114D: the app stores Claude Code with the cosmetic
+ // endpoint `cli://claude-code`. It runs as a local CLI and has no `/models`
+ // listing, and reqwest cannot build a request for a non-http(s) URL, so the
+ // probe failed with "builder error" on every picker open. Such a provider
+ // has no remote catalog: answer with an empty one.
+ if !endpoint_hosts_models_listing(&entry.slug, &entry.endpoint) {
+ log::debug!(
+ "[providers][list_models] slug={} has no http(s) /models listing; returning an empty list",
+ entry.slug
+ );
+ return Ok(crate::core::Outcome::new(
+ serde_json::json!({ "models": Vec::<ModelInfo>::new() }),
+ vec![format!(
+ "provider '{}' has no remote model catalog",
+ entry.slug
+ )],
+ ));
+ }
+
let looked_up = crate::inference::provider::factory::lookup_key_for_slug(&entry.slug, config)
.unwrap_or_default();
let api_key = resolve_local_runtime_key(&entry.slug, looked_up, config);
diff --git a/vendor/tinybus b/vendor/tinybus
index b7271ea3e3..59f4bc6a8c 160000
--- a/vendor/tinybus
+++ b/vendor/tinybus
@@ -1 +1 @@
-Subproject commit b7271ea3e3718e1465efd319ef1129cc8e8c9d88
+Subproject commit 59f4bc6a8cc809d76d0cbe8a1f95a885a8ea6ed6