mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
JwtUser now carries a WithinModelBudgets or BudgetsSkipped, which only core/model_budgets.py builds, so a JWT path that skips the user model budget check no longer type-checks. A new check, check_core_proof_constructors.py, flags those proofs being built anywhere else, and in gateway-auth-core they have private fields. A user over budget on the JWT path is refused through the same denial projection as the key path. The skip decision is one pure rule, skips_model_budgets, shared by the key, JWT and common-checks paths and mirrored in Rust with the same cases. The user's model budget is now host answer data (OwnerFacts and JwtPolicy), and one attach_user_model_budgets() projection puts it on the token for the key and auto-registered paths. The last two AST tests on the JWT branch are removed. Recording-host cases in tests/unit/proxy/auth/core cover the same behavior, and both AGENTS.md files now say invariants are held by types and behavior tests, never by tests that parse source. |
||
|---|---|---|
| .. | ||
| .agents/skills | ||
| crates | ||
| docs/adrs | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||