Skip to content

feat(profiles): drop the local MiniLM grouping and show when classification is not configured - #255

Merged
moe-berri merged 3 commits into
mainfrom
litellm_drop_local_profile_model
Nov 25, 2026
Merged

moe-berri merged 3 commits into
mainfrom
litellm_drop_local_profile_model

Conversation

@moe-berri

@moe-berri moe-berri commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #254. litellm-lens crashed with SIGILL before main on x86_64 hosts without AVX. The cause is that fastembed statically links ONNX Runtime, whose C++ static initializers use AVX. ORT was there only for the local "automatic grouping" worker, which embedded each run with quantized all-MiniLM-L6-v2 and assigned it to a keyword cluster. Task discovery already groups runs with gateway embeddings and a decision model, so this PR removes the local path entirely and drops fastembed/ort from the binary

Removed: lens_profiles::Classifier and its cluster assignment code (the crate now only holds the UMAP/HDBSCAN clustering discovery uses), the task-profile-worker subprocess and its memory supervisor, traces_clickhouse::profiles::project and its candidate/input queries, the build-time model download and resource_probe run in the Dockerfile, and LENS_TASK_PROFILES_ENABLED / LENS_PROFILE_MODEL_CACHE. The lens_task_profiles and lens_task_clusters tables are left alone. Nothing reads or writes them anymore, and their rows expire through the existing retention TTL

The Profiles tab no longer shows a run as Unclassified just because nobody has set up discovery. trace_profiles.sql now resolves a run with no recorded category to a new unconfigured profile ("Not configured") when no taxonomy is active. In ProfileSource, unconfigured replaces local and uncertain:

recorded category              -> recorded:<name>
no active taxonomy             -> unconfigured  ("Not configured")   // new
taxonomy assigned / unknown    -> task:<id> / unknown
inside a classification window -> pending
otherwise                      -> unclassified

When the overview contains unconfigured runs, the tab shows a "Task classification is not configured" notice. An admin whose gateway has no decision model is told to add one. An admin with a decision model is pointed at Task discovery. Both get a button that opens it. Readers are told a proxy admin needs to set it up. Callers who can't read every team never see the shared taxonomy, so load_runs maps unconfigured back to unclassified for them rather than claiming it isn't configured. The sample and finding-source filters in lens_sample.sql and lens_finding_source.sql treat Unclassified/unclassified as also matching unconfigured runs. That way those scoped callers, and investigations saved before this change, still resolve their runs

Tested with:

  • cargo clippy -D warnings
  • the lens-server profile unit and route tests, including a new admin vs scoped case
  • the traces-clickhouse profile sampling and finding-source tests against ClickHouse
  • npm run check:worker-contract and npm run typecheck:ui
  • the touched vitest files, with new cases for each notice variant
  • browser QA on a Docker-built image against a real local gateway

I haven't run it on a host without AVX

Details

Link to Devin session: https://app.devin.ai/sessions/76c11fe2cc2a453e863a72bbda70756b
Open in Devin Desktop: https://app.devin.ai/desktop/session/76c11fe2cc2a453e863a72bbda70756b?variant=devin
Requested by: @moe-berri


Note

Medium Risk
Removes background grouping and changes profile IDs/labels and investigation filters; existing cluster:* / uncertain assignments are no longer produced, though legacy DB rows are untouched.

Overview
Removes the local automatic task grouping path (MiniLM/fastembed/ort, the task-profile-worker subprocess, supervisor, Docker model probe/cache, and ClickHouse projection into lens_task_profiles / lens_task_clusters). Task profiles now depend on gateway-based Task discovery only; the lens-profiles crate is trimmed to clustering helpers used by discovery.

Profile resolution drops local / uncertain and adds unconfigured ("Not configured") when there is no active taxonomy and no recorded category. SQL filters and APIs align so unclassified filters can still match those runs where appropriate. Scoped callers who cannot see the shared taxonomy have unconfigured mapped back to Unclassified so the UI does not claim setup is missing.

The Profiles tab shows a “Task classification is not configured” banner (admin vs reader copy, optional Set up task discovery button) when overview data includes unconfigured runs. Docs are updated to describe gateway decision-model discovery instead of local embedding grouping.

Reviewed by Cursor Bugbot for commit 4cbff78. Bugbot is set up for automated code reviews on this repo. Configure here.

moe-berri and others added 2 commits November 25, 2026 17:24
…cation is not configured

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Runtime QA at 6987f7c passed for admin notices, setup button, recorded categories and the container build. Reader and team-scoped views untested

No decision model
Decision model available

Written by Devin

@moe-berri

Copy link
Copy Markdown
Collaborator Author

bugbot run

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

Stale Bugbot comment from a previous run.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@moe-berri

Copy link
Copy Markdown
Collaborator Author

bugbot run

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4cbff78. Configure here.

@moe-berri
moe-berri merged commit f8fbe8a into main Nov 25, 2026
13 checks passed
@moe-berri
moe-berri deleted the litellm_drop_local_profile_model branch November 25, 2026 17:54
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.

litellm-lens crashes with SIGILL on hosts without AVX (e.g. Celeron J4125)

1 participant