Skip to content

fix(llm-router): gate the console UI behind a default-on feature; sync stale worker locks - #697

Merged
ytallo merged 2 commits into
mainfrom
chore/llm-router-ui-feature-gate
Aug 4, 2026
Merged

fix(llm-router): gate the console UI behind a default-on feature; sync stale worker locks#697
ytallo merged 2 commits into
mainfrom
chore/llm-router-ui-feature-gate

Conversation

@ytallo

@ytallo ytallo commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Supersedes #696 (the lock regeneration alone exposed a deeper break).

Problem

llm-router 1.4.1's build.rs shells out to pnpm to bundle the injectable console UI. Every provider worker path-depends on the router for llm_router::types, so compiling any provider now demands a Node toolchain — breaking all nine providers' rust lint + test and interface boot smoke jobs (their runners only carry Rust, by design):

pnpm not found on PATH — install Node + pnpm, or set SKIP_UI_BUILD=1 ...

SKIP_UI_BUILD=1 is no escape: it requires a prebuilt ui/dist/, which is not committed.

Fix

Default-on console-ui feature on llm-router carrying ui.rs, the iii-console-ui dependency, and the build.rs bundle step; the nine providers depend on the router with default-features = false. Their builds no longer touch Node anywhere — CI, local, or user machines. The router's own binary keeps the UI (default features).

Validated locally: provider-deepseek compiles with no pnpm on PATH and no ui/dist; llm-router compiles both with default features (UI bundled) and with --no-default-features.

Lock sync (versions deployed today)

  • Nine provider Cargo.locks → llm-router 1.4.1 (were 1.4.0; llamacpp/xai at 1.3.2)
  • approval-gate/Cargo.lock → harness 1.7.0

Known pre-existing break (out of scope)

eval cannot resolve at all on main since the harness 1.7.0 bump: harness pins iii-sdk =0.21.8 while crates/console-ui (also in eval's graph) pins =0.21.6 — and the rest of the repo is on 0.21.6. Aligning it means propagating the 0.21.8 migration beyond harness; left untouched here so this PR stays green and scoped. Its CI job only fires when eval/ changes.

Follow-up worth considering

Bump tooling never regenerates dependents' lock files (llamacpp/xai were stale across two bumps). A bump-time cargo update -p <worker> across path dependents would prevent recurrence.

Summary by CodeRabbit

  • New Features

    • Added an optional console UI feature, enabled by default.
    • Applications can now disable the console UI and its build tools when using library-only functionality.
  • Improvements

    • Library-only builds now skip unnecessary UI asset validation and frontend build steps.
    • Provider integrations use a leaner configuration by disabling the console UI by default.

ytallo added 2 commits August 4, 2026 20:08
The llm-router 1.4.1 bump (531b140) updated only the router's own
manifest, leaving every provider worker's Cargo.lock pinning a stale
llm-router path-dependency version (1.4.0, and 1.3.2 for llamacpp/xai).
The Harness E2E build compiles providers with --locked, so the first
E2E run on main after the bump failed before any scenario started:
'cannot update the lock file provider-deepseek/Cargo.lock'.

Sync all nine provider locks; each resolves cleanly under --locked.
llm-router 1.4.1's build.rs shells out to pnpm to bundle the injectable
console UI, so every worker that path-depends on the router library
(all nine providers) started requiring a Node toolchain just to compile
llm_router::types — which broke their CI lint/test and boot-smoke jobs,
whose runners only carry Rust.

Introduce a default-on 'console-ui' feature carrying ui.rs, the
iii-console-ui dependency, and the build.rs bundle step. Providers
depend on the router with default-features = false, dropping pnpm from
their build graphs entirely. The router's own binary is unaffected.

Also sync the lock files left stale by today's version bumps:
the nine provider locks (llm-router 1.4.1) and approval-gate
(harness 1.7.0).
@ytallo ytallo added the no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only) label Aug 4, 2026
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 4, 2026 11:19pm
workers-tech-spec Ready Ready Preview Aug 4, 2026 11:19pm

Request Review

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 54 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 83435588-3e2b-4c75-abb1-6127dbb95ba1

📥 Commits

Reviewing files that changed from the base of the PR and between 20c75c9 and e7abb08.

⛔ Files ignored due to path filters (10)
  • approval-gate/Cargo.lock is excluded by !**/*.lock
  • provider-anthropic/Cargo.lock is excluded by !**/*.lock
  • provider-claude-code/Cargo.lock is excluded by !**/*.lock
  • provider-deepseek/Cargo.lock is excluded by !**/*.lock
  • provider-kimi/Cargo.lock is excluded by !**/*.lock
  • provider-llamacpp/Cargo.lock is excluded by !**/*.lock
  • provider-openai-codex/Cargo.lock is excluded by !**/*.lock
  • provider-openai/Cargo.lock is excluded by !**/*.lock
  • provider-xai/Cargo.lock is excluded by !**/*.lock
  • provider-zai/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • llm-router/Cargo.toml
  • llm-router/build.rs
  • llm-router/src/lib.rs
  • llm-router/src/main.rs
  • provider-anthropic/Cargo.toml
  • provider-claude-code/Cargo.toml
  • provider-deepseek/Cargo.toml
  • provider-kimi/Cargo.toml
  • provider-llamacpp/Cargo.toml
  • provider-openai-codex/Cargo.toml
  • provider-openai/Cargo.toml
  • provider-xai/Cargo.toml
  • provider-zai/Cargo.toml

📝 Walkthrough

Walkthrough

llm-router now makes its console UI optional through the console-ui feature. The build script and UI code respect this feature. Provider crates disable llm-router default features.

Changes

Optional console UI

Layer / File(s) Summary
Console UI feature contract
llm-router/Cargo.toml
iii-console-ui is optional. The default-enabled console-ui feature activates it.
Conditional UI build and registration
llm-router/build.rs, llm-router/src/lib.rs, llm-router/src/main.rs
The build script skips UI asset processing when console-ui is disabled. The UI module and registration are feature-gated.
Provider dependency feature wiring
provider-*/Cargo.toml
Provider crates disable default features for their local llm-router dependencies.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: andersonleal, sergiofilhowz

Poem

A rabbit trims the feature tree,
“No UI build,” it hops with glee.
Cargo gates the console bright,
Providers run without its flight.
Small flags keep the path just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary feature-gating change and the related lock-file synchronization.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/llm-router-ui-feature-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ytallo
ytallo merged commit 8d053c2 into main Aug 4, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant