[META] all hero apps consume LLM/voice via hero_lib AI client → hero_aibroker #219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
The Hero AI architecture is set:
hero_libexposes the SDK (one client, one API for chat/voice/embeddings),hero_aibrokeris the only thing that talks to providers (Groq, OpenRouter, Anthropic, Kokoro, parakeet, …) and the only thing that downloads models. Apps never touch providers directly. The architecture exists and works — this META tracks adoption + tightening.Why
Meeting 2026-05-06: "any app using latest ai client / hero_lib / has ai client / that ai client talks to ai broker / now ai broker download models / need to do it everywhere / all apps use ai client in hero_lib / make sure skills around that are optimal".
Sub-tasks
Acceptance
lhumina_code/*instantiates a non-hero_lib LLM clientChildren
Related
Source: meeting notes 2026-05-06.
Adding another offender surfaced during session 65 of the home#212 build-binaries arc:
hero_lib_rhai/crates/ai_rhai— Rhai bindings that wrapherolib_ai. Bound to the pre-rewrite client API; 39cargo checkerrors against currenthero_libdevelopment. Filed: lhumina_code/hero_lib_rhai#16Worked around in session 65 by rev-pinning all 14
herolib_*deps inhero_lib_rhai/Cargo.tomlto the merge point of the deleteddevelopment_casperbranch (commitab985c9) so v0.1.0-rc2 could ship CI binaries — see lhumina_code/hero_lib_rhai#15. The rev-pin gets lifted when the modernization in #16 lands.Updated offender list (relative to the META as of today):
herolib_aiintohero_aibroker_sdk(single AI client) #63Direction update — single-SDK consolidation (cc @timur)
The active direction has shifted since this META was filed. Per hero_aibroker#63 (filed 2026-05-08), the plan is no longer "apps use
hero_libAI client" — it's "hero_aibroker_sdkbecomes the only Rust AI client;herolib_aiis retired".Why: two parallel clients (
herolib_ai::AiClient::from_env()reads provider env vars directly;hero_aibroker_sdk::HeroAibrokerClienttalks to the broker over UDS) drift apart on model catalogs, cost tracking, and provider auth. We just hit this inhero_books(broker had keys in~/hero/var/hero_aibroker/.env,herolib_airead process env → assistant dies with "model not available").Status against the original acceptance criteria
herolib_aias of #64 + #70.PromptBuilder, model constants,connect_default(), migration recipes all in the SDK.hero_researcher(15) is the heaviest user. Migration starts withhero_books(3 files, has refactor branch already).Updated acceptance
lhumina_code/*depends onherolib_ai(was: "instantiates a non-hero_lib LLM client")herolib_aicrate is removed fromhero_libThe work itself is largely the same — apps still consume LLM/voice through one Rust client that talks to the broker. The crate name changes from
herolib_aitohero_aibroker_sdk, andherolib_airetires rather than evolving.