Skip to content

fix(docs): correct budget_limits key names in OpenAPI docstrings - #33049

Open
gautamkishore wants to merge 2 commits into
BerriAI:mainfrom
gautamkishore:fix/32695-budget-limits-docs
Open

fix(docs): correct budget_limits key names in OpenAPI docstrings#33049
gautamkishore wants to merge 2 commits into
BerriAI:mainfrom
gautamkishore:fix/32695-budget-limits-docs

Conversation

@gautamkishore

Copy link
Copy Markdown

Fixes #32695

The OpenAPI docstrings for budget_limits in key, team, and user management endpoints used incorrect key names (budget_limit / time_period). The actual API expects max_budget and budget_duration.

Updated 6 occurrences across 3 files to match the actual API schema.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes incorrect key names in budget_limits docstring examples across the key, team, and user management endpoints. The old examples used budget_limit and time_period, but the actual BudgetLimitEntry model (confirmed in litellm/models/team.py) requires max_budget and budget_duration.

  • Corrects 6 docstring occurrences across 3 files (key_management_endpoints.py, team_endpoints.py, internal_user_endpoints.py), one each for the create and update endpoints.
  • The updated examples now align with the BudgetLimitEntry Pydantic model, which defines max_budget: float and budget_duration: str as required fields — no functional code is changed.

Confidence Score: 5/5

Documentation-only change correcting docstring examples to match the actual Pydantic model — no runtime behavior is modified.

All six changed lines are docstring prose. The replacement key names (max_budget, budget_duration) match the BudgetLimitEntry model exactly, and no logic, validation, or tests are touched.

No files require special attention.

Important Files Changed

Filename Overview
litellm/proxy/management_endpoints/internal_user_endpoints.py Corrects two budget_limits docstring examples (new_user and user_update) from budget_limit/time_period to max_budget/budget_duration, matching the BudgetLimitEntry model.
litellm/proxy/management_endpoints/key_management_endpoints.py Corrects two budget_limits docstring examples (generate_key_fn and update_key_fn) from budget_limit/time_period to max_budget/budget_duration.
litellm/proxy/management_endpoints/team_endpoints.py Corrects two budget_limits docstring examples (new_team and update_team) from budget_limit/time_period to max_budget/budget_duration.

Reviews (1): Last reviewed commit: "fix docs: correct budget_limits key name..." | Re-trigger Greptile

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing gautamkishore:fix/32695-budget-limits-docs (8f43369) with main (10d5804)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant