litellm/ui/litellm-dashboard
collieai-dev 208a5863a5
feat(guardrails): add the CollieAi guardrail integration (#49224)
* feat(guardrails): add the CollieAi guardrail integration

* refactor(guardrails): tighten the CollieAi wrapper and its tests

The loader takes its importer as a parameter, so a test covers the fallback for a package that is too old, and the install hint names the Python the package needs

The config model is frozen, the Garden preset's phases and default_on are pinned by a test, and comments the code already says are gone

* fix(guardrails): use the generated Collieai provider key in the dashboard

The dashboard builds provider keys from the proxy's provider list, so collieai becomes Collieai. The static CollieAi key came first in the provider map, which left saved CollieAi guardrails without their display name and logo. The map, the Garden preset and the card now use Collieai, and a test covers the lookup

The preset expectation is a named value now, which keeps the dashboard under its inline object lint budget

* refactor(guardrails): drop the CollieAi wrapper's function docstrings

AGENTS.md keeps comments to complex logic and tool input, and these only restated what each function returns

* fix(guardrails): declare CollieAi's phases, read COLLIEAI_API_KEY and plate its logo

The dashboard offered every mode for CollieAi, and a guardrail saved with a mode the package refuses was reported as created but never loaded. The wrapper now declares pre_call and post_call, so the form offers only those

api_key falls back to COLLIEAI_API_KEY as its description says, and the navy logo gets a plate in dark mode like DeepKeep's

The tests now also cover an entry's own name, phase and default_on, the key fallback, and the modes the dashboard offers

* fix(guardrails): reject CollieAi guardrails the package refuses and stop env-keyed rebuilds

A Garden create whose key or settings the package refuses now answers 400 and
saves nothing, instead of saving a guardrail that checks nothing. Every setting
on the entry now reaches the package, like the class-path route. DB guardrails
keyed with an os.environ/ reference are no longer rebuilt on every DB poll.
The Garden card says which calls CollieAi checks.

* fix(guardrails): load CollieAi stream_scope and import errors as setup errors, default the Garden card off

Pass stream_scope into the package constructor inside the setup-error wrap so a refused scope answers 400 on create and stops a config-file proxy at startup. Drop settings cleared to null so the package default applies. Say an installed package failed to load, with the error, instead of asking to install it, and keep any import-time exception from breaking the guardrail routes. Make api_key optional in the form since COLLIEAI_API_KEY is the fallback, and open the Garden card with Always On off like the other partner presets.

* fix(guardrails): leave CollieAi form fields empty and share one guardrail setup error

The Garden form no longer pre-fills api_base, deadline_ms or forward_conversation_id, so a
create saves only what the admin typed and the package keeps its own defaults. Setup failures
raise GuardrailSetupError from custom_guardrail, the missing-package hint covers the Docker
image, and the card copy no longer repeats the package's eligibility rules.

* test(guardrails): cover env-reference api_base in the DB poll comparison

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-12 01:05:12 +00:00
..
.agents/skills/url-state feat(skills): add a litellm-setup agent skill (#47731) 2026-10-28 15:44:43 -07:00
public feat(guardrails): add the CollieAi guardrail integration (#49224) 2026-11-12 01:05:12 +00:00
scripts feat(ui): share trace drawer as a closable SidePanel and polish Lens (#44473) 2026-10-04 02:20:14 +00:00
src feat(guardrails): add the CollieAi guardrail integration (#49224) 2026-11-12 01:05:12 +00:00
tests build(ui): fail lint on hardcoded English in dashboard JSX (#50593) 2026-11-09 12:40:40 -08:00
vendor refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -07:00
.env.development
.env.production
.npmrc
.nvmrc
.prettierignore
.prettierrc
AGENTS.md ci: run the dashboard API types and Terraform endpoint checks on every change that can alter the spec (#49022) 2026-10-29 07:19:06 -07:00
build_release_ui.sh
build_ui.sh
build_ui_custom_path.sh
components.json
eslint-budgets.json fix(ui): split the KeyActivityPanel condition chains to bring the lint budget back under its ceiling (#44114) 2026-10-01 18:42:12 -07:00
eslint-suppressions.json feat(skills)!: add portable submissions and admin review (#50160) 2026-11-05 00:56:51 -08:00
eslint.config.mjs build(ui): fail lint on hardcoded English in dashboard JSX (#50593) 2026-11-09 12:40:40 -08:00
knip.json fix(ui): register type-test files as knip entry points 2026-08-10 15:42:09 -07:00
next.config.mjs refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -07:00
package-lock.json build(ui): fail lint on hardcoded English in dashboard JSX (#50593) 2026-11-09 12:40:40 -08:00
package.json build(ui): fail lint on hardcoded English in dashboard JSX (#50593) 2026-11-09 12:40:40 -08:00
postcss.config.js
README.md
tsconfig.json
tsconfig.production.json feat(traces): tracing development seed (#44363) 2026-10-03 09:59:51 +00:00
vitest.config.ts test(ui): split the vitest suite into unit, component, integration and type projects (#37488) 2026-08-19 20:40:14 +00:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.