Skip to content

Consume focused TinyInference LLM and embeddings crates - #156

Open
senamakel wants to merge 6 commits into
mainfrom
migrate-inference-to-tinyinference
Open

senamakel wants to merge 6 commits into
mainfrom
migrate-inference-to-tinyinference

Conversation

@senamakel

@senamakel senamakel commented Sep 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the former monolithic TinyInference dependency with direct tinyinference-llm and tinyinference-embeddings dependencies.
  • Update core and native-module chat imports to the LLM crate and embedding adapters to the embeddings crate.
  • Advance the TinyInference and TinyCortex gitlinks to their split-crate branches.
  • Keep direct ownership with no compatibility alias or re-export shim.

Depends on tinyhumansai/tinyinference#12 and tinyhumansai/tinycortex#173. This PR remains draft until both dependencies land and the gitlinks are refreshed to merged commits.

Validation

  • cargo check --workspace --all-targets --all-features
  • cargo test --workspace --all-features
  • cargo check --manifest-path crates/tinymemory-module/Cargo.toml --all-targets --all-features
  • cargo test --manifest-path crates/tinymemory-module/Cargo.toml --all-features

Repository-wide strict Clippy reaches pre-existing tinymemory-documents test-policy lints; module strict Clippy reaches an existing unknown lint. Neither failure is in the migrated paths.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Warning

Review paused — included plan limit reached

Keep your review moving with free on-demand reviews.

  • Run this review for free

On-demand reviews are free for one more day.

Promotion and pricing details

On-demand reviews are free for one more day. After that, they cost $0.25 per reviewed file.

Review limit details

Or wait 2 minutes for your next included review.

Check out review usage here.

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ce8cf50e-e466-43c8-979f-88a8ed1e31fc

📥 Commits

Reviewing files that changed from the base of the PR and between 74f2a52 and 46f9220.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • crates/tinymemory-module/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • Cargo.toml
  • crates/tinymemory-core/Cargo.toml
  • crates/tinymemory-core/src/chat.rs
  • crates/tinymemory-core/src/chat_host.rs
  • crates/tinymemory-core/src/embedding_adapter.rs
  • crates/tinymemory-core/src/store/factories.rs
  • crates/tinymemory-core/src/store/factories_tests.rs
  • crates/tinymemory-core/src/test_seams.rs
  • crates/tinymemory-core/src/tree/score/embed/factory.rs
  • crates/tinymemory-core/src/tree/score/embed/mod.rs
  • crates/tinymemory-core/src/tree/tree_runtime/engine.rs
  • crates/tinymemory-core/src/tree/tree_runtime/engine_tests.rs
  • crates/tinymemory-module/Cargo.toml
  • crates/tinymemory-module/src/chat.rs
  • crates/tinymemory-module/src/chat_test.rs
  • crates/tinymemory-module/tests/module_e2e.rs
  • vendor/tinycortex
  • vendor/tinyinference

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

Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel and others added 4 commits September 18, 2026 16:40
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel senamakel changed the title Consume split TinyInference crates Consume focused TinyInference LLM and embeddings crates Sep 18, 2026
@senamakel
senamakel marked this pull request as ready for review September 19, 2026 17:21
@tinysweeper

tinysweeper Bot commented Sep 19, 2026

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 1 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Ready for maintainer review
Priority: medium
Reviewed head: 46f92206bcd8
Updated: 1789838670 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 8 Active findings 1
Tests 5 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 3 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

  • medium · critique · Update the module lockfile for the renamed dependency — Changing the direct dependency from the `tinyinference` package to `tinyinference-llm` changes the `tinymemory-module` package's dependency list in `crates/tinymemory-module/Cargo. (crates/tinymemory\-module/Cargo\.toml:56)

Before merge

None.

How this fits together

flowchart LR
  n0["...ng_settings_local_overrides_memory_config<br/>changed"]:::changed
  n1["...tings_local_with_empty_model_uses_default<br/>changed"]:::changed
  n2["start_mock_ollama<br/>changed"]:::changed
  n3["TestChatHost<br/>changed"]:::changed
  n4["effective_embedding_settings"]:::impacted
  n5["ChatHost"]:::impacted
  n6["Result"]:::impacted
  n7["effective_embedding_settings_probed"]:::impacted
  n8["...settings_keep_ollama_when_daemon_responds"]:::impacted
  n0 -->|calls| n4
  n0 -->|tests| n4
  n1 -->|calls| n4
  n1 -->|tests| n4
  n3 -->|implements| n5
  n5 -->|uses| n6
  n7 -->|calls| n4
  n8 -->|calls| n2
  n8 -->|tests| n2
  n8 -->|calls| n7
  n8 -->|tests| n7
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 16 files; 2 findings. _The code index is behind this pull request (indexed at `f12d7e3d94af`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer answered 502 Bad Gateway), so this review saw part of what the engine holds._
  • Evidence: crates/tinymemory\-module/Cargo\.toml — Update the module lockfile for the renamed dependency

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 16 files; 0 findings. _The code index is behind this pull request (indexed at `f12d7e3d94af`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer answered 502 Bad Gateway), so this review saw part of what the engine holds._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This PR mechanically splits the `tinyinference` crate into three sub-crates and updates all imports and dependency declarations. The change is consistent and appears correct. The only issue is a documentation comment that incorrectly names the crate containing the embedder implementations. _The code index is behind this pull request (indexed at `f12d7e3d94af`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer answered 502 Bad Gateway), so this review saw part of what the engine holds._

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This change migrates from the monolithic `tinyinference` crate to `tinyinference-llm` and `tinyinference-embeddings`, updating all imports and patches correctly. Two module doc comments incorrectly refer to `tinyinference-llm` where `tinyinference-embeddings` is meant; fix those for alignment. _The code index is behind this pull request (indexed at `f12d7e3d94af`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer answered 502 Bad Gateway), so this review saw part of what the engine holds._

e2e

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Mechanical rename of the single `tinyinference` dependency to three scoped crates (`tinyinference-embeddings`, `tinyinference-llm`, `tinyinference-core`). No external behaviour changes; all imports and patch entries are updated consistently. The end-to-end harness is updated to use the new crate paths, and the automated CI jobs pass. 2 end-to-end jobs passed on this head. _The code index is behind this pull request (indexed at `f12d7e3d94af`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer answered 502 Bad Gateway), so this review saw part of what the engine holds._
Evidence and run details
  • Models: ladder/vectors, gpt-5.6-luna, deepseek-v4-flash
  • Spend: $0.037770
  • Tokens: 748394 input · 25010 output · 44657 cached · 726 embedding
Head State Pass summary
46f92206bcd8 ready for maintainer review 1 active finding(s), 0 resolved finding(s) (at 1789838670)

tinysweeper 0.1.0

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-19T17:24:00.094337Z 46f9220 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tinysweeper tinysweeper 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.

tinysweeper found nothing blocking. Approving.

             $0.0378 · 748,394 in / 25,010 out · 44,657 cached (6%) · ladder/vectors, gpt-5.6-luna, deepseek-v4-flash · 726 embedded
critique:    $0.0195 · 367,722 in / 8,873 out  · 20,554 cached (6%) · gpt-5.6-luna, deepseek-v4-flash
security:    $0.0169 · 321,896 in / 5,663 out  · 20,007 cached (6%) · gpt-5.6-luna
tests:       $0.0004 · 20,365 in  / 2,387 out  · 1,536 cached (8%)  · deepseek-v4-flash
description: $0.0004 · 10,766 in  / 4,970 out  · 1,024 cached (10%) · deepseek-v4-flash
e2e:         $0.0004 · 20,892 in  / 839 out    · 1,536 cached (7%)  · deepseek-v4-flash

tinycortex = { version = "0.1", features = ["contacts"] }
# Provider-neutral chat request and response types carried over TinyBus.
tinyinference = "0.2"
tinyinference-llm = "0.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

priority medium critique confident

Update the module lockfile for the renamed dependency

Changing the direct dependency from the tinyinference package to tinyinference-llm changes the tinymemory-module package's dependency list in crates/tinymemory-module/Cargo.lock. That lockfile is committed for this standalone workspace, but it is absent from this pull request, so locked/reproducible builds will reject the manifest as inconsistent (and the lockfile will otherwise be silently rewritten). Regenerate and commit the module lockfile together with this manifest change.

[RULE] stale-lockfile ·

@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant