- antd Form/Input/Select/Tabs/Typography/Button + @tremor/react Card/
Grid/Badge/Text/TextInput/Title/Button + @heroicons/react ArrowLeftIcon
\u2192 shadcn Card/Input/Select/Tabs/Badge/Button + lucide ArrowLeft +
react-hook-form for the edit form (FormProvider + Controller +
register).
- Replaces the antd Tabs items[] config with TabsList + TabsContent.
- Replaces grid-via-Tremor-Grid with plain Tailwind grid.
- Member table extra columns now use plain JSX cells (the MemberTable
consumer renders them as antd ColumnsType internally; will be migrated
in its own commit later).
- NumericalInput onChange callbacks are explicitly typed (number | null
| undefined) to satisfy strict noImplicitAny in this file.
Gates: TS \u2713 | Lint \u2713 | Vitest 4/4 \u2713 | Build pending (next batch).
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
Captures the end-of-run state:
- Foundation (Tasks 1\u20139): all complete and green.
- Sections migrated (4 of 33): Access Groups (with locked blueprint),
Virtual Keys (stress test passed), Budgets, Tool Policies.
- Test results: 170/170 tests pass across migrated sections and
molecules; 3801/3801 full-tree vitest (Task 4 checkpoint).
- Deps delta: 8 new deps; deprecated deps (antd / heroicons / remixicon /
headlessui) still present as long as any un-migrated section imports
them \u2014 Task 45 (uninstall) deferred accordingly.
- Baseline bundle: 15425508 bytes JS, 21 MB out/.
- 29 sections pending; blueprint + recipe are stable and ready for the
next run.
Lists the sections not yet migrated, cross-cutting deviations, and
phase-2 prerequisites unchanged from the previous checkpoint.
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
Replaces the old '### UI Component Library' section (which advised using
antd) with a new '### UI' section describing the post-migration stack:
- shadcn/ui primitives in src/components/ui/
- lucide-react icons (no @ant-design/icons, @heroicons/react, @remixicon/react)
- react-hook-form + zod + shadcn <Form>
- sonner via MessageManager/NotificationManager wrappers
- @tanstack/react-table + shadcn Table
- @tremor/react charts-only
Adds sections on style rules (semantic Tailwind tokens only), lint
enforcement (the two custom litellm-ui rules), a migration-in-progress
note pointing at MIGRATION_REPORT.md and BLUEPRINT.md, and a phase-2
deferral list.
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
- New 'parity' project in playwright.config.ts. testDir=./parity,
testMatch=**/*.spec.ts, 1440x900 viewport locked for stable snapshots.
Default baseURL=http://localhost:3000; overridable via PARITY_BASE_URL
(e.g. set to http://localhost:4000 when the section needs the proxy).
- webServer auto-starts 'npm run dev' unless PARITY_BASE_URL is set.
- expect.toHaveScreenshot defaults: maxDiffPixelRatio=0.01,
animations=disabled, caret=hide.
- e2e_tests/parity/README.md documents spec conventions, snapshot
baselining, and the two auth strategies (route interception vs. proxy).
- chromium project now explicitly ignores parity/** so it keeps its
existing scope (full proxy-backed e2e suite).
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
Add a local ESLint plugin that enforces the phase-1 shadcn migration
constraints:
- **no-banned-ui-imports**: flags imports from antd, @ant-design/icons,
@heroicons/react, @remixicon/react. Flags @tremor/react imports except
in files under a /charts/ directory or whose basename contains 'chart'.
- **no-raw-tailwind-colors**: flags raw Tailwind color utilities such as
bg-slate-500 / text-blue-600 inside className strings, className
template literals, and string arguments to cn / clsx / twMerge / cva / cx.
Semantic tokens (bg-primary, text-foreground, bg-muted, ...) are allowed.
Plugin lives at ./eslint-plugin-litellm-ui, installed as a "file:" dep
so it is picked up transparently by ESLint's plugin resolution.
Wire both rules into .eslintrc.json with an overrides block that exempts:
- shadcn primitives under src/components/ui/
- the notification/message manager bridges (still reference sonner)
- tailwind.config.ts (the palette intentionally uses raw color imports)
- test files and fixtures (out of phase-1 scope)
Replace the broken `next lint` script with a direct eslint invocation
(ESLINT_USE_FLAT_CONFIG=false to honor the legacy .eslintrc.json during
phase 1; migration to flat config is phase 2).
Initial sweep reports 921 banned-import violations and 3497 raw-color
violations in non-migrated code \u2014 expected, these will be resolved
section-by-section.
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
- Rewrite MessageManager (message_manager.tsx) to delegate to toast.* from
sonner. Public API preserved (success/error/warning/info/loading/destroy).
setMessageInstance() is now a no-op back-compat shim.
- Rewrite NotificationManager (notifications_manager.tsx) to delegate to
sonner. Same classification logic (titleFor/classifyGeneralMessage) and
same public API (error/warning/info/success/fromBackend/clear) preserved.
setNotificationInstance() is now a no-op back-compat shim.
- antd duration (seconds) \u2192 sonner duration (ms) conversion at each call site.
- Gut AntdGlobalProvider to a children passthrough (antd message/notification
provider is no longer needed). Will be deleted in the final cleanup task
after antd is uninstalled.
- Add <Toaster richColors position="top-right" /> to the root layout.
- Rewrite message_manager and notifications_manager unit tests to mock
sonner's toast.* rather than antd.message/notification. Use vi.unmock in
notifications_manager test to bypass the global setupTests.ts mock.
- Fix stale antd.message.error assertion in AddFallbacks.test.tsx: mock
@/components/molecules/message_manager directly so the assertion is
agnostic to the underlying toast library.
Build and targeted vitest suites pass. Full vitest suite: 3801/3801 pass
after these fixes (2 pre-existing failures were caused by the migration
and are now fixed via the updated AddFallbacks test mock).
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Waiting to run
Two changes, both test-only:
- Configure the aiohttp session with TCPConnector(force_close=True) and an
explicit ClientTimeout(total=30, connect=10). Prevents reuse of idle TCP
connections that the proxy/kernel may have closed during the long window
between setup POSTs and the later poll loop, and surfaces a blocked proxy
event loop quickly instead of hanging on aiohttp's 5-minute default.
- In poll_key_spend_until, catch aiohttp.ClientError and asyncio.TimeoutError
around the single /key/info call. A transient transport hiccup now logs and
retries on the next tick instead of failing the entire polling loop.
Addresses the ConnectionTimeoutError observed on the first /key/info call
after the 20 chat completions.
The daily queue parameter types on _restore_spend_updates_to_in_memory_queues
were narrowed to specific subtypes (DailyUserSpendTransaction, etc), but
the caller passes Dict[str, BaseDailySpendTransaction] — the return type
of flush_and_get_aggregated_daily_spend_update_transactions. Widen the
parameters to the base type.
Also replace dynamic TypedDict key lookup (which returned object) with
explicit literal-keyed get() calls so mypy can type-narrow each field.
Replace recursive `_walk` helper with a stack-based traversal so the
recursive_detector CI check passes without adding to the ignore list,
and avoid Python recursion limits on deeply nested payloads.
Made-with: Cursor
store_in_memory_spend_updates_in_redis drained the in-memory queues
into local variables before the rpush pipeline. If rpush raised (cloud
Redis hiccup, timeout, connection blip), those already-drained
transactions were garbage-collected with the scheduler job, silently
losing all spend aggregated during that tick.
Wrap the rpush in try/except. On failure, re-enqueue the aggregated
transactions into their respective in-memory queues so the next
scheduler tick retries.
Add a unit test that seeds real queues, simulates an rpush failure,
and asserts the transactions land back in-memory.
Replace the calibration step (one request + 10-minute poll) with an
independent ground truth computed from response usage via
litellm.cost_per_token. All N requests are made up front, so a single
dropped Redis write no longer kills the test.
Add /health/readiness checks at test start and on poll timeout so the
failure message surfaces proxy state (db, cache) instead of "calibration
timed out".
Set PROXY_BATCH_WRITE_AT=2 in the spend tracking CI job to shorten the
scheduler flush window.
Principle: GHA handles work that doesn't need external API keys; CCI
stays for integration tests that hit real API endpoints.
Four CCI jobs moved to new or extended GHA workflows:
1. check_code_and_doc_quality (was 25 runs: ruff + import-safety +
21 code_coverage_tests + 3 documentation_tests + circular-imports).
- The 21 tests/code_coverage_tests/*.py scripts and the 3
tests/documentation_tests/*.py scripts run in the new
.github/workflows/test-code-quality.yml workflow.
- ruff, import-safety, and circular-imports were already run by
.github/workflows/test-linting.yml — no new migration needed.
- The 3 documentation_tests scripts read
docs/my-website/docs/proxy/config_settings.md. Since docs have
moved to BerriAI/litellm-docs, the GHA workflow checks out that
repo and symlinks docs/my-website -> the checkout so the
existing hardcoded paths resolve without touching the scripts.
The stale local docs/my-website/ copy in this repo will be
removed in a separate PR.
2. semgrep (custom-rule SAST against .semgrep/rules).
- New .github/workflows/test-semgrep.yml.
3. installing_litellm_on_python + installing_litellm_on_python_3_13
(pip install compat checks on Python 3.12 and 3.13).
- New .github/workflows/test-install-litellm.yml as a matrix job.
- 3.12 run also verifies litellm_enterprise import; 3.13 run
skips that check (matches previous CCI behavior).
- installing_litellm_on_python_v2_migration_resolver stays in CCI
because it requires a postgres service.
CCI .circleci/config.yml: -112 lines, 4 jobs and their workflow refs
removed.
Restore guardrail spend/UI event_type wiring, request_data on streaming
OUTPUT paths, and centralized match redaction after the upstream revert.
Made-with: Cursor
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Has been cancelled
Follow-up cleanup after an independent review pass surfaced a few
loose ends:
- Delete a 6x-duplicated filter block in litellm_mapped_tests_proxy_part2
(same kind of copy-paste residue we fixed earlier in
langfuse_logging_unit_tests).
- Delete the empty "Install Semgrep" run step in the semgrep job — the
command body was empty because semgrep is installed on-demand via
uv tool run in the next step.
- Standardize machine-executor image: one job was on ubuntu-2204:2023.10.1
while build_docker_database_image was already on ubuntu-2204:2024.04.1.
Bumped everything to 2024.04.1.
- Remove the legacy "version: 2" inside the workflows: block — CircleCI
2.1 top-level already declares the version.
- Drop `{{ checksum ".circleci/config.yml" }}` from cache keys (13 sites).
It was busting the cache on every unrelated config edit; the uv.lock
checksum alone is the right dependency cache key.
- Add partial-restore fallbacks to every restore_cache with a single
templated key (10 sites). Jobs now fall back to the latest cache with
a matching prefix if the exact uv.lock hash isn't cached yet.
Net: -14 lines.
Docker-executor jobs:
- Consolidate base images on cimg/python:3.12. Jobs previously on
3.11 (26 jobs), 3.9 (1 historical: upload-coverage), and an
incidental 3.13.1 (litellm_assistants_api_testing) now use 3.12.
- installing_litellm_on_python_3_13 keeps cimg/python:3.13.1 as its
explicit "latest Python supported" install-check matrix job.
Machine-executor jobs:
- Delete the miniconda install step from 10 jobs. uv now manages
Python directly: uv sync --python 3.12 auto-downloads a
python-build-standalone interpreter if the ubuntu-2204 base
image's default python doesn't match.
- Remove 37 "if [ -f conda.sh ]; then conda activate myenv" wrappers
and 2 unconditional conda activate blocks left behind from the
conda days.
- proxy_build_from_pip_tests keeps its 3.13 target (it was
conda create -n myenv python=3.13) via uv sync --python 3.13.
Net: -301 lines.
Add a start_postgres command parameterized on db_name (default
circle_test) that runs the postgres-db container and waits for port
5432 to accept connections. Replace all 11 inline docker run /
wait_for_service blocks with a single - start_postgres call.
The helm chart test overrides db_name to litellm_test; everything
else uses the default.
One of the 11 sites previously used a bespoke pg_isready loop instead
of wait_for_service; it now goes through the same TCP-probe path
everyone else uses, which is sufficient for test ordering purposes.
Net: -112 lines.
Add a single install_uv command in the commands: section that encodes
the uv version (0.10.9) and its SHA256 in one place, then replace all
42 inline curl|sha256|install blocks across every job that needs uv.
setup_litellm_test_deps now calls install_uv too, so the shared
test-dep bootstrap goes through the same path.
Bumping uv version or SHA is now a one-line change instead of 43.
Net: -203 lines.
- Remove mypy_linting job (GHA test-linting.yml already runs this)
- Remove three redundant "Install curl" apt-get steps (curl is
already present on the ubuntu-2204 machine image and used
successfully earlier in each affected job)
- Dedupe langfuse_logging_unit_tests filter block (6x copy of the
same two branch filters collapsed to 1)
- Pin all docker image references by @sha256 digest so builds stay
reproducible when upstream tags are updated:
cimg/python:3.9, 3.11, 3.12, 3.12-browsers, 3.13.1, cimg/node:20.19,
cimg/postgres:16.0, and postgres:14 used via docker run
Net: -62 lines, 49 image references pinned.
* add moonshot/kimi-k2.6 to model registry
* add moonshot/kimi-k2.6 to backup model registry
* add tests for moonshot/kimi-k2.6 model registry
* fix moonshot/kimi-k2.6 pricing and add reasoning support
* fix moonshot/kimi-k2.6 pricing and add reasoning support in backup
* update kimi-k2.6 tests: fix pricing, add tool_choice and reasoning checks
* fix: load kimi-k2.6 registry tests from local backup instead of remote cost map
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Has been cancelled