Skip to content

feat(build): delete local whisper STT, prediction-markets, and tokenjuice-treesitter - #5454

Merged
senamakel merged 11 commits into
tinyhumansai:mainfrom
senamakel:build-time-phase2
Aug 9, 2026
Merged

senamakel merged 11 commits into
tinyhumansai:mainfrom
senamakel:build-time-phase2

Conversation

@senamakel

Copy link
Copy Markdown
Member

Phase 2 of the build-time reduction program: three decided deletions. Stacked on #5453 — the first 3 commits are that PR; review the last 4 commits here (the diff shrinks to just them once #5453 merges).

Deletions

  1. Local whisper.cpp STT (feat(voice) commit) — removes whisper-rs/whisper-rs-sys (a CMake build of vendored whisper.cpp, the single largest wall-clock item in the build, compiled once per Cargo world) from both manifests including the [patch.crates-io] fork entries. STT now routes through the hosted provider path with a selectable engine; configs using the removed local engine migrate to the backend default instead of silently remapping (a leftover "whisper"/"local" slug errors by name rather than falling back). cpal stays — audio capture feeds hosted STT and the accessibility mic probe uses it — so the inference feature narrows to cpal only. Frontend: whisper install UI removed, i18n keys updated across all locales.
  2. prediction-markets (Polymarket) — feature, polymarket/clob_auth tool modules, tools.polymarket_execute controller, markets_agent built-in agent, about_app entries, and shell forwarding all deleted. The web3 gate stays and still sheds the ethers stack when off (verified: ethers-core absent from the web3-OFF graph).
  3. tokenjuice-treesitter — AST-aware context compression dropped; tinyjuice's non-AST path becomes the only mode. Sheds the tree-sitter native C build + 3 grammar crates. The canonical slim-build incantation moves from --features tokenjuice-treesitter to plain --no-default-features across scripts, CI, and docs.

The final commit repairs the test surface: --all-targets fixtures, runtime-only controller-name lookups, and an inverted stt_available e2e expectation (STT semantics changed from "local binary present" to "configured engine resolves"), keeping inverted assertions so a revert cannot silently re-register the deleted surface.

Measured (on the pre-rebase base)

Default profile: 577 pkgs / 10 native builds → 567 / 7 native — whisper-rs-sys, tree-sitter, and (from #5453) aws-lc-sys are gone. Remaining natives: bzip2/zstd (documents gate), libgit2/libz (memory-git, planned), lzma (runtimes gate, planned), sqlite + ring (kernel).

Notes for reviewers

  • Known follow-ups deliberately out of scope: the now-dead local-AI STT asset plumbing (stt_download_url still points at a GGML URL, assets.rs stt slot, ModelDownload UI), the reserved "whisper" slug in config.voice_providers, and ~20 translated READMEs still mentioning in-process whisper.
  • Offline transcription is intentionally removed — that is the decision this PR implements, not an oversight.

senamakel and others added 5 commits August 8, 2026 19:04
AST-aware context compression is dropped by decision; tinyjuice's non-AST
(brace-depth heuristic) compression path becomes the only mode. Sheds the
tree-sitter native C build plus the rust/python/typescript grammar crates
from the default graph, and repoints the canonical slim-build incantation
from '--features tokenjuice-treesitter' to plain '--no-default-features'
across scripts, CI, and docs. tinyjuice keeps its own feature; openhuman
just stops enabling it.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
…its surface

Removes the prediction-markets Cargo feature, the polymarket/clob_auth
tool modules, the tools.polymarket_execute RPC controller, the
markets_agent built-in agent, the about_app catalog entries, and the
shell forwarding entry. The web3 gate stays and now alone owns the
EVM/mnemonic dependency shed (ethers-core/ethers-signers/coins-bip39),
verified intact with the feature off.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
…able hosted engines

Deletes whisper-rs / whisper-rs-sys (a CMake build of vendored
whisper.cpp) from BOTH Cargo worlds, including the [patch.crates-io]
fork entries — the single largest wall-clock item in the build, and it
compiled twice. STT now routes through the hosted provider path with a
selectable engine; configs with the removed local engine migrate to the
backend default rather than silently remapping. cpal stays (audio
capture feeds hosted STT; the accessibility mic probe uses it), so the
inference feature narrows to cpal only.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removes Polymarket/whisper fixtures and assertions from the raw-coverage
and e2e suites (keeping inverted assertions so a revert cannot silently
re-register the deleted surface), corrects the stt_available e2e
expectation for the hosted-engine semantics, fixes the disabled-build
gate test to use the real microphone-permission API, and cleans up the
VoicePanel frontend and voice factory tests.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Collapse multi-line JSX and import statements to single lines, and remove a stray blank line, with no behavioural changes.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel requested a review from a team August 8, 2026 17:02
@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 190 files, which is 40 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to Pro+ to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca0cce18-243d-4567-974d-8363ad801156

📥 Commits

Reviewing files that changed from the base of the PR and between 102e3ff and ecc8f20.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (190)
  • .env.example
  • .github/workflows/ci-lite.yml
  • AGENTS.md
  • Cargo.toml
  • app/src-tauri/Cargo.toml
  • app/src-tauri/src/companion/audio.rs
  • app/src-tauri/src/meet_audio/caption_listener.rs
  • app/src/components/settings/panels/VoicePanel.tsx
  • app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
  • app/src/components/settings/panels/local-model/ModelDownloadSection.test.tsx
  • app/src/components/settings/panels/local-model/ModelDownloadSection.tsx
  • app/src/components/settings/panels/local-model/ModelStatusSection.test.tsx
  • app/src/features/conversations/Conversations.tsx
  • app/src/features/human/MicComposer.test.tsx
  • app/src/features/human/MicComposer.tsx
  • app/src/features/human/voice/sttClient.test.ts
  • app/src/features/human/voice/sttClient.ts
  • app/src/features/voice/pttAudio.ts
  • app/src/features/voice/pttTranscribe.ts
  • app/src/features/voice/useVoiceSkillStatus.ts
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/services/api/__tests__/voiceInstallApi.test.ts
  • app/src/services/api/voiceInstallApi.ts
  • app/src/services/api/voiceSettingsApi.test.ts
  • app/src/services/api/voiceSettingsApi.ts
  • app/src/services/rpcMethods.ts
  • app/src/utils/tauriCommands/localAi.ts
  • app/src/utils/tauriCommands/voice.ts
  • app/src/utils/toolTimelineFormatting.ts
  • app/test/e2e/specs/voice-mode.spec.ts
  • app/test/playwright/specs/voice-mode.spec.ts
  • docs/library-minimal-recipe.md
  • docs/plans/tui-chat-plan.md
  • docs/specs/2026-08-02-core-kernel-domain-reorg.md
  • docs/specs/kernel.md
  • docs/specs/plan-agents.md
  • docs/tinyagents-migration-plan-2026-07-22.md
  • docs/tinyagents-port-plan.md
  • docs/tinycortex-migration-plan-2026-07-22.md
  • scripts/assert-shed.sh
  • scripts/dep-sim.py
  • scripts/i18n-find-english.ts
  • scripts/kernel-floor.limits
  • scripts/kernel-floor.sh
  • scripts/live-flows-demo.sh
  • scripts/run-dev-win.sh
  • src/core/all_tests.rs
  • src/core/legacy_aliases.rs
  • src/core/observability.rs
  • src/openhuman/agent/harness/definition_tests.rs
  • src/openhuman/agent/harness/subagent_runner/tool_prep.rs
  • src/openhuman/agent/harness_init/registry.rs
  • src/openhuman/agent/registry/agents/loader.rs
  • src/openhuman/agent/registry/agents/markets_agent/agent.toml
  • src/openhuman/agent/registry/agents/markets_agent/mod.rs
  • src/openhuman/agent/registry/agents/markets_agent/prompt.md
  • src/openhuman/agent/registry/agents/markets_agent/prompt.rs
  • src/openhuman/agent/registry/agents/mod.rs
  • src/openhuman/agent/registry/agents/orchestrator/agent.toml
  • src/openhuman/agent/registry/agents/tools_agent/agent.toml
  • src/openhuman/agent/tinyagents/host/definition_registry.rs
  • src/openhuman/channels/host/adapters.rs
  • src/openhuman/config/migrations/mod.rs
  • src/openhuman/config/migrations/retire_local_whisper_stt.rs
  • src/openhuman/config/migrations/retire_local_whisper_stt_tests.rs
  • src/openhuman/config/mod.rs
  • src/openhuman/config/ops/ui.rs
  • src/openhuman/config/ops_tests.rs
  • src/openhuman/config/schema/local_ai.rs
  • src/openhuman/config/schema/mod.rs
  • src/openhuman/config/schema/tools/integrations.rs
  • src/openhuman/config/schema/tools/mod.rs
  • src/openhuman/config/schema/types.rs
  • src/openhuman/config/schema/voice_providers.rs
  • src/openhuman/config/schema/voice_server.rs
  • src/openhuman/config/schemas/controllers.rs
  • src/openhuman/config/schemas/helpers.rs
  • src/openhuman/config/schemas/schema_defs.rs
  • src/openhuman/desktop/accessibility/permissions.rs
  • src/openhuman/inference/README.md
  • src/openhuman/inference/device.rs
  • src/openhuman/inference/local/install_piper.rs
  • src/openhuman/inference/local/install_whisper.rs
  • src/openhuman/inference/local/mod.rs
  • src/openhuman/inference/local/ops_tests.rs
  • src/openhuman/inference/local/schemas.rs
  • src/openhuman/inference/local/schemas_tests.rs
  • src/openhuman/inference/local/service/assets.rs
  • src/openhuman/inference/local/service/bootstrap.rs
  • src/openhuman/inference/local/service/mod.rs
  • src/openhuman/inference/local/service/ollama_admin/model_pull.rs
  • src/openhuman/inference/local/service/speech.rs
  • src/openhuman/inference/local/service/transcription.rs
  • src/openhuman/inference/local/service/whisper_engine/mod.rs
  • src/openhuman/inference/local/service/whisper_engine/real.rs
  • src/openhuman/inference/local/service/whisper_engine/stub.rs
  • src/openhuman/inference/local/service/whisper_engine/types.rs
  • src/openhuman/inference/local/voice_install_common.rs
  • src/openhuman/inference/mod.rs
  • src/openhuman/inference/paths.rs
  • src/openhuman/inference/types.rs
  • src/openhuman/inference/voice/hallucination.rs
  • src/openhuman/inference/voice/local_speech.rs
  • src/openhuman/inference/voice/local_transcribe.rs
  • src/openhuman/inference/voice/mod.rs
  • src/openhuman/inference/voice/postprocess.rs
  • src/openhuman/inference/voice/streaming.rs
  • src/openhuman/inference/voice/wav.rs
  • src/openhuman/mcp/audit/stub.rs
  • src/openhuman/mcp/registry/stub.rs
  • src/openhuman/mcp/server/resources.rs
  • src/openhuman/mcp/server/stub.rs
  • src/openhuman/meet/agent/wav.rs
  • src/openhuman/platform/about_app/README.md
  • src/openhuman/platform/about_app/catalog_data.rs
  • src/openhuman/security/credentials/ops.rs
  • src/openhuman/skills/catalog/stub.rs
  • src/openhuman/skills/mod.rs
  • src/openhuman/skills/ops_tests.rs
  • src/openhuman/skills/runtime/stub.rs
  • src/openhuman/skills/stub.rs
  • src/openhuman/tools/README.md
  • src/openhuman/tools/impl/network/clob_auth.rs
  • src/openhuman/tools/impl/network/mod.rs
  • src/openhuman/tools/impl/network/polymarket.rs
  • src/openhuman/tools/impl/network/polymarket_orders.rs
  • src/openhuman/tools/impl/network/polymarket_tests.rs
  • src/openhuman/tools/ops.rs
  • src/openhuman/tools/ops_tests.rs
  • src/openhuman/tools/orchestrator_tools.rs
  • src/openhuman/tools/schemas.rs
  • src/openhuman/voice/README.md
  • src/openhuman/voice/always_on.rs
  • src/openhuman/voice/audio_capture.rs
  • src/openhuman/voice/factory/entry.rs
  • src/openhuman/voice/factory/helpers.rs
  • src/openhuman/voice/factory/mod.rs
  • src/openhuman/voice/factory/stt_providers.rs
  • src/openhuman/voice/factory/tests.rs
  • src/openhuman/voice/factory/traits.rs
  • src/openhuman/voice/mod.rs
  • src/openhuman/voice/ops.rs
  • src/openhuman/voice/schemas/handlers/provider_server.rs
  • src/openhuman/voice/schemas/handlers/transcribe_tts.rs
  • src/openhuman/voice/schemas/helpers.rs
  • src/openhuman/voice/schemas/params.rs
  • src/openhuman/voice/schemas/registry.rs
  • src/openhuman/voice/schemas_tests.rs
  • src/openhuman/voice/server.rs
  • src/openhuman/voice/stub.rs
  • src/openhuman/voice/types.rs
  • src/openhuman/web3/stub.rs
  • src/openhuman/web3/wallet/README.md
  • src/openhuman/web3/wallet/mod.rs
  • src/openhuman/web3/wallet/stub.rs
  • src/openhuman/web3/x402/stub.rs
  • src/openhuman/web_chat/web_errors.rs
  • tests/config_auth_app_state_connectivity_e2e.rs
  • tests/domain_modules_e2e.rs
  • tests/json_rpc_e2e.rs
  • tests/mcp_registry_e2e.rs
  • tests/mcp_registry_multi_server.rs
  • tests/mcp_setup_e2e.rs
  • tests/mcp_stdio_integration.rs
  • tests/raw_coverage/inference_agent_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_local_admin_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_local_services_round21_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_provider_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_round26_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_voice_http_round23_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_adapters_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_round24_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_round26_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_network_channels_raw_coverage_e2e.rs
  • tests/worker_b_domain_e2e.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5c7b83076

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/openhuman/inference/local/service/speech.rs Outdated
Comment thread src/openhuman/voice/types.rs
@senamakel senamakel self-assigned this Aug 8, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65a22b3bb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/openhuman/voice/factory/entry.rs Outdated
@senamakel

Copy link
Copy Markdown
Member Author

CI is failing before project commands run because ghcr.io/tinyhumansai/openhuman_ci:rust-1.96.1 does not exist. I confirmed the fork workflow builds the image successfully but cannot publish to the canonical package (permission_denied: The requested installation does not exist). A maintainer needs to dispatch Build CI Image from an upstream ref containing the rust-1.96.1 tag configuration (or publish that tag directly), then rerun the PR checks.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c31eb97cc0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/openhuman/config/schema/voice_server.rs
Comment thread src/openhuman/voice/factory/helpers.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c4697623f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +227 to +230
// Fallback: seed from voice_status, which already reports the
// resolved routing string for the selected STT engine.
if (voiceResponse.stt_engine) {
setSttProvider(prev => prev || voiceResponse.stt_engine);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bind the STT selector to the effective engine

When stt_provider contains the normal cloud sentinel while voice_server.stt_engine is elevenlabs or openai, loadVoiceSettings() succeeds and the earlier success branch seeds the selector as Cloud; this new resolved-engine logic runs only if that RPC fails. The core nevertheless dispatches to the third-party engine, and saving cloud still merely defers to that engine, so Settings both misreports the provider being billed and offers no way to switch it back to Backend. Seed sentinel values from voiceResponse.stt_engine, or bind and persist this selector through settings.stt_engine.

AGENTS.md reference: AGENTS.md:L420-L420

Useful? React with 👍 / 👎.

Comment on lines +37 to +40
let stt_error = create_stt_provider(&stt_engine, "", config)
.err()
.map(|e| e.to_string());
let stt_available = stt_error.is_none();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat missing provider credentials as unavailable

When a third-party provider entry exists but its credential is missing or has been cleared, create_stt_provider_by_slug converts the lookup to an empty key and still constructs the provider, so this check reports stt_available: true and no stt_error. Conversations and useVoiceSkillStatus consequently show Voice as ready even though every transcription sends an empty authorization value and fails; validate required credentials here or during provider construction before declaring the engine available.

Useful? React with 👍 / 👎.

Comment on lines 342 to 346
stt: LocalAiAssetStatus {
state: stt_state.to_string(),
id: stt_model,
provider: "whisper.cpp".to_string(),
provider: "ggml".to_string(),
path: stt_path,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the dead local STT asset download path

After deleting every local STT engine, retaining this GGML asset entry leaves the Local AI panel advertising an STT model and a Download button. That button still reaches download_asset("stt") and ensure_stt_asset_available, which downloads the default ggml-base-q5_1.bin from stt_download_url; download_all_models can do the same, yet transcription now always calls a hosted provider and never reads this file. Remove STT from the asset/download surface so users are not prompted to download hundreds of megabytes of unusable data.

AGENTS.md reference: AGENTS.md:L420-L420

Useful? React with 👍 / 👎.

Comment on lines +41 to +45
fn defers_to_engine(provider: &str) -> bool {
matches!(
provider.trim().to_ascii_lowercase().as_str(),
"" | "cloud" | "openhuman" | "backend" | "whisper" | "local"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Let removed STT slugs fail after migration

When an unmigrated or manually edited config contains stt_provider = "whisper" or "local", this helper silently converts that removed selection into the configured hosted engine instead of allowing provider construction to reject it. That can unexpectedly route audio to—and bill—a host the user did not select, while also hiding that migration did not run; only the 9→10 migration should rewrite persisted legacy values, and these slugs should otherwise fail by name.

AGENTS.md reference: AGENTS.md:L420-L420

Useful? React with 👍 / 👎.

senamakel added a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
…\n\nfeat(build): delete local whisper STT, prediction-markets, and tokenjuice-treesitter\n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant