Local-only privacy mode blocks a custom provider that runs on localhost because it judges by slug, not endpoint
Milestone: Nov 9 - Nov 13 · Parent: tinyhumansai/team#46
Sentry issues covered
3 Sentry issue(s), 3 events in total, up to 1 users on a single issue. Releases seen: 0.64.15.
| Sentry | Project | Events | Users | Releases | Last seen |
|---|---|---|---|---|---|
| TAURI-RUST-16AY | tauri-rust | 1 | 1 | 0.64.15 | 2026-10-29 |
| TAURI-RUST-162R | tauri-rust | 1 | 1 | 0.64.15 | 2026-10-27 |
| TAURI-RUST-162K | tauri-rust | 1 | 1 | 0.64.15 | 2026-10-27 |
What happens
TAURI-RUST-16AY (needs external provider llama-cpp) and 162R / 162K (needs external provider lemonade-2), 0.64.15, one user each. Both slugs are user-configured cloud_providers entries for local OpenAI-compatible servers (llama.cpp server, AMD Lemonade). With Local-only privacy mode on, chat refuses them as external, so the user cannot use a local model through a custom provider entry, which is exactly the setup the refusal message recommends.
local_only_violation treats a provider as local only if tinyinference_local::profile::is_local_provider_string recognises the slug: ollama, lmstudio, llamacpp, llama.cpp, vllm, etc. The hyphenated llama-cpp is not in the list, and any custom slug (lemonade-2) is external by definition. The configured entry's endpoint (loopback or not) is never consulted on this path, although enforce_local_only_endpoint already implements the loopback check for local-runtime endpoints.
Likely code path
crates/openhuman-core/src/inference/provider/factory/access_gates.rs:52local_only_violation(slug check viais_local_provider_string),:213enforce_local_only_inferencecrates/openhuman-core/src/inference/provider/factory/cloud_slug.rs:519-527: a configuredcloud_providersslug is gated byenforce_local_only_inference(role, &p)before the entry (and its endpoint) is resolvedcrates/openhuman-core/src/inference/provider/factory/access_gates.rs:197enforce_local_only_endpoint/:85is_loopback_endpoint(existing loopback logic)- Slug list: tinyinference
crates/tinyinference-local/src/profile.rsLocalProviderKind::from_str_loose/kind_from_provider_string(vendored via vendor/tinyagents/vendor/tinyinference)
Suggested fix
- For a configured
cloud_providersentry, decide local vs external from its endpoint: resolve the entry first and allow it under LocalOnly whenis_loopback_endpoint(entry.endpoint)is true (keep refusing LAN/remote hosts). - Add
llama-cpp(andllama_cpp) as aliases in tinyinference'sfrom_str_loose. - Tests: LocalOnly + custom slug at
http://127.0.0.1:8080/v1is permitted; same slug at a public host is refused;llama-cpp:modelis recognised as local.
Done when
- [ ] A regression test reproduces the failure (or the misreport) and passes with the fix
- [ ] The fix is merged to
main - [ ] The Sentry issues above are resolved in the next release, and stay quiet on builds that carry the fix
Local-only privacy mode rejects user-configured cloud_providers entries that point at loopback endpoints, because local vs external is decided by slug (is_local_provider_string) rather than by the entry's endpoint; hyphenated slugs like llama-cpp and custom slugs like lemonade-2 are treated as external. Fix: resolve the configured entry first and allow it under LocalOnly when is_loopback_endpoint(entry.endpoint) is true, plus add llama-cpp/llama_cpp aliases in tinyinference from_str_loose, with regression tests for loopback allowed, public host refused, and llama-cpp recognized local. Low user impact (1 user per Sentry issue, workaround exists by adding a recognized slug), so p2. No candidate issue covers this same problem.
Labelled priority: p2.