Security advisory — Malicious litellm versions 1.82.7 and 1.82.8 were removed from PyPI (potential API key exfiltration). Uninstall them, rotate exposed credentials, and upgrade to a safe release (e.g. 1.82.9+). Run pip show litellm to verify. PyPI · README

Web Portal API

Base URL: http://localhost:3000 (replace with the production domain)

Web Portal API

Source root: apps/web-portal/src/app/api/

Page root: apps/web-portal/src/app/

Base URL: http://localhost:3000 (replace with the production domain)


Page routes

PathDescription
/Session present → /workspace, otherwise → /auth
/authLogin / register / SSO
/workspaceMain chat workspace

Auth

MethodPathDescription
POST/api/auth/loginEmail-and-password login
POST/api/auth/registerRegister (if enabled)
POST/api/auth/logoutLog out
GET/api/auth/sessionCurrent session / claims

SSO — OIDC

MethodPathDescription
GET/api/auth/sso/oidc/start?provider=<id>302 redirect to the IdP
GET/api/auth/sso/oidc/callbackCallback: exchange token and write session

SSO — SAML

MethodPathDescription
GET/api/auth/sso/saml/start?provider=<id>Redirect to the IdP
POST/api/auth/sso/saml/callbackACS callback

SSO buttons are controlled by NEXT_PUBLIC_SSO_PROVIDERS=id:displayName. See runbooks/sso-oidc-setup.md for configuration.


Chat

MethodPathDescription
POST/api/chat/completionsProxy to Gateway; supports SSE
GET/api/chat/sessionsCurrent user's session list
POST/api/chat/sessionsCreate a session
PATCH/api/chat/sessions/:sessionIdUpdate title and similar fields
DELETE/api/chat/sessions/:sessionIdSoft delete
GET/api/chat/sessions/:sessionId/messagesMessage list
POST/api/chat/sessions/:sessionId/messagesAppend a message (persisted)

Completions request notes

  • Requires a valid portal session (workspace:chat scope)
  • Body: OpenAI chat completions format (model, messages, stream, and so on)
  • Env var GATEWAY_COMPLETIONS_URL defaults to http://127.0.0.1:8088/v1/chat/completions
  • On a policy block, the UI must be visually distinct from a normal model reply (compliance-block styling)

User models

MethodPathDescription
GET/api/me/modelsModels visible to the current user (after admin assignment)

Data source: enterprise_runtime_user_visible_models + provider configuration.


Admin helpers

MethodPathDescription
POST/api/admin/usersCreate a user in restricted cases (requires manage scope)

Key environment variables

VariablePurpose
DATABASE_URLPG
AUTH_JWT_PRIVATE_KEY / AUTH_JWT_PUBLIC_KEYJWT
AUTH_DEV_OWNER_PASSWORDDev owner password
ENABLE_DEV_BOOTSTRAPAuto-bootstrap outside production
DEFAULT_TENANT_ID / DEFAULT_DEPT_IDDefault tenant / department
GATEWAY_COMPLETIONS_URLGateway forward URL
NEXT_PUBLIC_SSO_PROVIDERSSSO button list

For the full list, see enterprise/.env.local.example and deployment/vercel-env-checklist.md.

Made-with: Damon Li