docs(litellm-rust): add provider coding standards - #33833
Conversation
Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
Greptile SummaryThis is a docs-only PR adding
Confidence Score: 3/5No production code changes, but the single added file is placed in this repo contrary to the team's stated policy for documentation. The coding standards document is well-structured and its content looks reasonable, but it is being added directly to this repo in violation of the rule that docs must go into the litellm-docs repo. The right location needs to be confirmed by a maintainer before merging. litellm-rust/crates/CODING_STANDARDS/PROVIDER_CODING_STANDARDS.md — confirm with maintainers whether this belongs here or in litellm-docs.
|
| Filename | Overview |
|---|---|
| litellm-rust/crates/CODING_STANDARDS/PROVIDER_CODING_STANDARDS.md | New markdown coding standards doc for litellm-rust provider development; violates the repo rule that documentation must live in the litellm-docs repo rather than this repository. |
Reviews (1): Last reviewed commit: "docs(litellm-rust): add provider coding ..." | Re-trigger Greptile
| @@ -0,0 +1,53 @@ | |||
| # Provider coding standards (litellm-rust) | |||
There was a problem hiding this comment.
Documentation should live in the litellm-docs repo
This repository has a rule that documentation additions must go into the litellm-docs repo, not this one. Adding PROVIDER_CODING_STANDARDS.md here adds prose docs directly to the main repo rather than the dedicated docs location. The file should be moved to the litellm-docs repo, or — if the intent is for it to serve as a machine-readable/tooling artifact for contributors working in this repo (similar to AGENTS.md / CLAUDE.md) — that distinction should be clarified in the PR description and confirmed by a maintainer.
Rule Used: Prevent documentation from being added - needs to ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…ist guard Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Linear ticket
Pre-Submission checklist
Type
📖 Documentation
Changes
Adds
litellm-rust/crates/CODING_STANDARDS/PROVIDER_CODING_STANDARDS.md, a numbered ruleset for adding or changing an LLM provider/route inlitellm-rust, derived from the existingAGENTS.md/CLAUDE.mdconventions and the OCR reference port.The rules are grouped so a contributor can follow them top-to-bottom:
get_custom_llm_provider, resolve once inprepare.rstransform_request/transform_response; each provider implements it as aconst <PROVIDER>_<ROUTE>_CONFIG, implementing only the transforms while inheriting shared trait defaults so future providers reuse existing logiccorepure,ai-gatewayI/O,python-bridgethin; no provider branches in generic files; thin entry point delegating toCallLifecycle::run_request; constants inconstants.rsserde_json::Value), failures as typedCoreErrorvalues, no panics, no mutation, early returns, intentional Python-parity output shape*_match_pythonparity, lifecycle/hook tests, off-by-default behind Python parity testscargo fmt/clippy/testcommands to keep greenDocs-only; no code paths change.
QA runbook
N/A (docs-only)
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/db90b4ee508f4e81b5c19568c03cd157
Requested by: @ishaan-berri