BluetOpen source

What agents should know before contributing

BerriAI/litellm

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Read by Bluet from 2 files written for agents and 300 merged pull requests on 2026-09-25. Not reviewed by the maintainers.

Rules its files tell agents (12)

  • mustNever use pytest commands or the like as "Screenshots / Proof of Fix".

    Never use pytest commands or the like as "Screenshots / Proof of Fix". We prefer curl'ing a live proxy instance running on localhost:4000 (I like to run it with python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload --use_v2_migration_resolver 2>&1 | tee litellm.log; the Admin UI dev server is npm run dev in ui/litellm-dashboard, served on port 3000) and showing both the command run and the output. Also, it should hit real LLM provider APIs, not mocks, and cost real $$$ because that is the most realistic test. The proof of fix should be exactly what

    AGENTS.md
  • mustNever test structure of code only function of it
    AGENTS.md
  • mustNever pin facts we don't own (a vendor's price, a third party's field, an upstream default, today's date) as l…

    A test must only fail when litellm code changes. Never pin facts we don't own (a vendor's price, a third party's field, an upstream default, today's date) as literals or as "X must be absent"; assert the invariant our code guarantees instead, e.g. two rows agree, a value is within range, a field is derived from another. If an outside fact is truly load-bearing, cite its source and date next to the assertion so a reader can tell stale from broken

    AGENTS.md
  • mustA section you have nothing to put in (Relevant issues, Affected release, Linear ticket, Caveats, QA runbook, a…

    When writing a PR body, treat the comments and imperative instructions inside .github/pull_request_template.md as rules to follow, not just layout. Agent harnesses may strip HTML comments from copies of that file injected into context, so read .github/pull_request_template.md from disk before writing a PR body to make sure you see every comment rule. A section you have nothing to put in (Relevant issues, Affected release, Linear ticket, Caveats, QA runbook, and so on) is removed entirely, heading included, never left as an empty title

    AGENTS.md
  • mustThe tests should make it so that this specific bug can never happen again without failing tests (i.e., regress…

    Same thing for bug fixes. The tests should make it so that this specific bug can never happen again without failing tests (i.e., regression)

    AGENTS.md
  • shouldTest edge cases: Don't just test the happy path
    CONTRIBUTING.md
  • shoulddon't use "—".

    don't use "—". Instead, reach for ",", ".", conjunction words, ":", ";", etc. in descending order of preference: vary among them, weighted toward the front of the list, and skip "," where it would cause a comma splice or the sentence is getting long. Overusing any one of them, ";" especially, also feels AI-y. A word cap does not penalize you for adding more sentences: when writing under tight word budgets, prefer a period split or a conjunction over ";", and keep to at most one ";" per message

    AGENTS.md
  • shouldunless explicitly asked, don't use bulleted or numbered lists unless it would be nonsensical not to.

    unless explicitly asked, don't use bulleted or numbered lists unless it would be nonsensical not to. Instead, prefer prose

    AGENTS.md
  • shoulddon't use the pattern "It's not X, it's Y", "You're not X, you're Y", etc.
    AGENTS.md
  • shouldIf you don't have the ticket id, don't make one up or search for it.

    If you're resolving a linear ticket, in the "## Linear ticket" section of the PR, say "Resolves LIT-1234", replacing "LIT-1234" with the actual ticket id that you're resolving. If you don't have the ticket id, don't make one up or search for it. Just drop the section

    AGENTS.md
  • shouldDon't add tests that don't check anything substantial and is there just to make the code coverage pass.

    When adding new features, add meaningful tests. Don't add tests that don't check anything substantial and is there just to make the code coverage pass. Yes, code coverage is important, but I'd rather have no signal whether the code is working than tests that don't fail when code is broken. The goal is to have tests that would fail before the feature was added/if the code was mutated in a way that breaks the feature and succeed only when the feature is fully working. I should run mutation testing and see 90% kill rate

    AGENTS.md
  • shouldDon't assume that the existing code is correct or the right way of doing things / good coding patterns.

    Don't assume that the existing code is correct or the right way of doing things / good coding patterns. In fact, there are a lot of bad coding practices, overly complex code, code smells, etc. If something doesn't look right, speak up. Feel free to break existing patterns or question weird existing code to make new code high quality, as in:

    AGENTS.md

Decisions its pull requests settled (40)

  • #42431record the GenAI exception event through the Logs API on both OpenTelemetry lines
  • #42452forward non-enum reasoning_effort through the Responses bridge instead of dropping it
  • #42454restore secret scheduled for deletion instead of failing CreateSecret
  • #42478cap an agent key's tools at what the invoking user and team may call
  • #42497return 400 from /spend/calculate for a model with no pricing row
  • #42492stop a nested additional_drop_params entry from crashing openai-compatible calls
  • #42506route credential, cost map, and UI login calls to the control plane
  • #42512honour global api_base for image generation and reject non-string reasoning_effort with 400
  • #42516share model rate-limit buckets between a model_group_alias and its target
  • #42518run the memory cell alone on the shared stack
  • #42540one request lands the same spend on every surface
  • #42528treat blank AWS_S3_* env vars as unset for batch jobs
  • #42548keep inherited parent guardrails when a child policy condition misses
  • #42552hold every worker under an idle RSS budget before any traffic
  • #42556honor DATABASE_DISABLE_PREPARED_STATEMENTS in the litellm CLI
  • #42553configurable key_alias_pattern for key generate, update, and regenerate
  • #42572expose /api/event_logging/batch on the gateway allowlist
  • #42574keep config-defined vector stores listed and read-only
  • #42581make two proxy-infra tests independent of sibling-test state
  • #42593keep the in-flight daily spend batch when shutdown cancels the flush
  • #42584import proxy_server once on script-style boot
  • #42621regression tests for August provider translation and streaming bugs
  • #42622regression tests for August cost tracking and budgeting bugs
  • #42644send json_schema as a forced tool on Claude Opus 4.7 and 4.8 Converse
  • #42692add read-replica routing harness to the CircleCI integration suite
  • #42654fail parked DB lookups at a deadline and flip readiness while they stall
  • #42695log upstream 4xx/5xx error bodies and carry them into the failure hook
  • #42699gate disable_global_guardrails on keys and teams to proxy admins
  • #42713route unmapped openai family model ids to converse
  • #42722replace Any with proven types in 5 files
  • #42767serve the OpenAI models on bedrock-runtime's native Responses API (internal copy of #38489)
  • #42777stream non-Anthropic raw SSE through the post_call hook unbuffered
  • #42782return 401 challenge for REST token-exchange tool calls without a subject token
  • #42783preserve MCP tool results in the non-Anthropic Messages bridge
  • #42786do not requeue a daily spend batch whose commit already left for postgres
  • #42796apply user_api_key_cache_max_size to the key object partition
  • #42810native batch JSONL passthrough with cost tracking
  • #42814route firerouter short names and bill pass-through legs at the routed model's rates
  • #42825honor model_info.discoverable on the model listing endpoints
  • #42826root post-response service spans in their own trace linked to the request
Your agents can be told this before they touch the code. Get it for your repository: npx bluet-mcp init. What Bluet is.
BerriAI/litellm: what agents should know before contributing · Bluet