database-access

Installation
SKILL.md

Database access

Adding new database access

  • Put Python database access behind an operation in litellm/repositories
  • Give callers typed inputs and outputs, not Prisma clients, models, or query dictionaries
  • Keep query execution and backend selection inside the repository
  • Prisma is fine for the implementation, adding a query does not require a Rust port
  • Native Rust callers use litellm-rust/crates/db directly

Asked to move existing access behind a repository

  • Identify the calls being moved and their transaction boundary
  • Move the existing Prisma implementation into the relevant repository
  • Replace those direct database calls with repository operations
  • Preserve return values, errors, and transaction behavior, with focused regression tests
  • Keep this an extraction, not a backend migration or unrelated cleanup

An equivalent Rust or SQLx query already exists

Installs
2
Repository
berriai/litellm
GitHub Stars
62.7K
First Seen
7 days ago