Repository navigation
Open
Labels
config-workspaceConfig loading, env overrides, workspace storage, and app state.featureNet-new user-facing capability or product behavior.react-uiReact app work in app/src: pages, components, providers, store, and UX.rust-coreCore Rust runtime in src/: CLI, core_server, shared infrastructure.
Description
Summary
Add one place in the core and the UI where a user sets up decision models: Jev, OpenJev, Levanto Sage, a self-hosted Jev-compatible endpoint, and any later provider. Each feature that asks a decision model a question then picks from those profiles. Today three features each wire a decision model their own way, with separate config and separate credential rules, and only one of them has any UI.
Where decision models are used today
| Consumer | Config | Providers reachable | Client | UI |
|---|---|---|---|---|
| TinyComputer step decisions | [computer] decision_model (jev / open_jev / sage), sage_fast (config/schema/computer.rs); module config built in modules/computer_config.rs::jev |
Jev via TinyHumans or the OpenRouter key, OpenJev (openjev key / OPENJEV_API_KEY), Sage (sage key / SAGE_API_KEY) |
the module's own tinyinference-decisions |
Settings → Computer → Models (ComputerPanel.tsx::ComputerModelsSection), which stores the key with setCloudProviderKey |
tool_search ranker |
[agent.tool_search] ranker, jev_route (auto / tinyhumans / typesafe / openrouter), jev_base_url; OPENHUMAN_JEV_ROUTE, OPENHUMAN_JEV_BASE_URL (config/schema/agent.rs) |
Jev via TinyHumans, TypeSafe (TYPESAFE_API_KEY, env only), OpenRouter |
tinyjevclient (crates/openhuman-tinyhumans/src/jev/{route,ranker}.rs) |
none |
| TinyMemes evaluate callback | none, hard-wired | managed Jev via the TinyHumans session only (tinymemes/jev.rs::managed) |
tinyinference-decisions |
none |
What this costs:
- A user who enters an OpenJev or Sage key for Computer can't use it for tool search or TinyMemes.
- TypeSafe can only be set through an environment variable, and a self-hosted OpenJev only through the
tinyinference-decisionsAPI (Provider::SelfHosted,ClientConfig::self_hosted). Neither is in config or the UI. - The same provider has three spellings (
open_jev,openjev,OpenJev), and the credential is resolved by three different code paths. - The tool-search route lives in the tinyhumans crate, while the Computer route lives in core, which also resolves the hosted bearer (
resolve_backend_credential) itself.
Proposal
Core: a decisions config section and domain
[decisions]
default = "jev"
[[decisions.profiles]]
id = "jev" # stable, user-chosen
provider = "jev" # jev | open_jev | sage | typesafe | self_hosted
route = "auto" # jev only: auto | tinyhumans | openrouter | typesafe
# endpoint = "http://127.0.0.1:8080/v1/systemone" # self_hosted (and base-url overrides)
# model = "..." # self_hosted: required model id the endpoint must echo
# credential = "sage" # provider-key slug in the existing key store; never the secret itself
# options = { fast = true, reasoning = "...", latency = "..." } # provider-specific (Sage modes)
[decisions.assign]
computer = "jev" # TinyComputer step decisions
tool_search = "jev" # tool_search ranker (ranker = "bm25" still turns it off)
tinymemes = "jev"- Use the
tinyinference-decisionsProviderset as the vocabulary. Do not redeclare it. If something is missing there (TypeSafe/OpenRouter routes for the hosted path, Sage option types), add it upstream intinyinferencefirst. - A new
decisions/domain in core (types.rs,ops.rs,schemas.rs) resolves a profile into a client config. Credentials come from the existing provider-key store (lookup_key_for_slug), with the current env vars kept as fallbacks. - The hosted route stays out of core. The
tinyhumans/autoroute of a Jev profile resolves through a registry hook thatopenhuman-tinyhumansfills: a "decision route" registry keyed by route id, in the same style asinference::registry. This keepscheck-core-hosted-free.mjsgreen and movesjev/route.rsbehind it. - Consumers ask the domain instead of building their own client:
modules/computer_config.rs::jevbuilds the module'sjevblock fromassign.computer.- The tool_search ranker resolves
assign.tool_search.rankerkeeps its meaning (jev/auto/bm25/compare), and "jev" now means "the assigned decision profile". tinymemes/jev.rs::managedresolvesassign.tinymemes, and stops being managed-Jev-only.
- RPC (registered through
core/all.rs, namespacedecisions):decisions.list,decisions.upsert,decisions.delete(refuses a profile that is still assigned),decisions.assign,decisions.status(per profile: provider, route actually used, credential present), anddecisions.test(one minimal evaluate call: reports latency and the model echoed, never the payload). - Migration: a config migration turns
[computer] decision_model/sage_fastand[agent.tool_search] jev_route/jev_base_urlinto profiles plus assignments. The old keys andOPENHUMAN_JEV_ROUTE/OPENHUMAN_JEV_BASE_URLare read for one release with a deprecation warning, then removed.config_update_computer_settingskeeps working for the planner/rescue fields; itsdecision_modelfield writesassign.computer. - Logging:
[decisions]debug lines on profile resolution (profile id, provider, route, consumer). Never the key.
UI: Settings → AI → Decision models
- A list of profiles. Each shows a provider badge, the route in use (TinyHumans credits / own key / unavailable, reusing the
billing_routevocabulary), and a Test button. - An add/edit dialog (
ModalShell+NativeSelect+TextField, password input for keys). The fields follow the provider: Jev shows the route, OpenJev and Sage show the key, Sage shows fast/reasoning/latency, self-hosted shows endpoint, model and optional key. - An "Used by" section that picks a profile for Computer, Tool search and TinyMemes.
ComputerModelsSectiondrops its own model select and key input in favour of the "Used by → Computer" picker plus a link to this page. Planner and rescue models stay where they are, since they are LLMs and not decision models.ComputerStatusCardreads fromdecisions.status.- All strings go through
useT()with real translations in every locale. Shared buttons get ananalyticsId, and success is tracked withtrackAnalyticsEvent(provider kind only, no ids or keys).
Out of scope
- Planner, rescue and output models for TinyComputer, which are chat LLMs configured under inference.
- Adding new decision providers to
tinyinference-decisions. This issue configures what the crate already supports. - Per-agent decision-model overrides in
AgentSpec. This could be a follow-up once profiles exist.
Acceptance
- One key entered in Decision models is usable by Computer, tool search and TinyMemes, each switchable independently.
- OpenJev, Sage, TypeSafe and a self-hosted endpoint can be configured without environment variables.
- An existing config with
[computer] decision_model = "sage"andjev_route = "openrouter"migrates to equivalent profiles and assignments, with no change in behaviour (migration test). - No hosted route literal or TinyHumans hostname lands in core (
pnpm rust:layoutgreen). The hosted route resolves through the tinyhumans registry hook. -
decisions.testworks against the mock backend (scripts/mock-api-core.mjsgains a System One route) in atests/json_rpc_e2e.rscase. - Vitest coverage for the settings page and the Computer panel change. An E2E spec under
app/test/e2e/specs/adds a Sage profile and assigns it to Computer. -
about_appcatalog updated, and docs updated indocs/gitbooks/en/(config reference + a Decision models page).
Pointers
crates/openhuman-core/src/config/schema/computer.rs,config/ops/computer.rs,modules/computer_config.rscrates/openhuman-core/src/config/schema/agent.rs(ToolSearchConfig),config/schema/load/env_overlay.rscrates/openhuman-tinyhumans/src/jev/{route,ranker}.rscrates/openhuman-core/src/tinymemes/jev.rsvendor/tinyagents/vendor/tinyinference/crates/tinyinference-decisions/src/client/types.rs(Provider,ClientConfig::{openrouter, tinyhumans_openrouter, self_hosted}),src/sage/app/src/components/settings/panels/ComputerPanel.tsx,ComputerStatusCard.tsx,app/src/utils/tauriCommands/config.ts
Metadata
Metadata
Assignees
Labels
config-workspaceConfig loading, env overrides, workspace storage, and app state.featureNet-new user-facing capability or product behavior.react-uiReact app work in app/src: pages, components, providers, store, and UX.rust-coreCore Rust runtime in src/: CLI, core_server, shared infrastructure.
Type
Projects
- StatusShow more project fieldsTodo
Activity
M3gA-Mind commentedon Nov 16, 2026
Re-checked on current main by reading the code: still separate. TinyComputer has its own
decision_model/sage_fastsettings, and tool search has its ownranker/jev_route. There's no shared decision-model section yet. One update to the table: TinyMemes has been removed (#8371), so there are two consumers to unify, not three. Keeping this open.