Repository navigation
feat(organization): expose PATCH /v2/organization/{organization_id} in the OpenAPI schema - #39794
Merged
ryan-crabbe-berri merged 2 commits intoSep 4, 2026
Conversation
…n the OpenAPI schema
Contributor
Greptile SummaryThis PR exposes the existing authenticated
Confidence Score: 5/5The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues. The production change only exposes an already registered and authenticated route in OpenAPI, and the regression test now validates that behavior through the production schema generator. Both previous findings are resolved or withdrawn.
|
| Filename | Overview |
|---|---|
| litellm/proxy/management_endpoints/organization_endpoints.py | Makes the existing authenticated organization update route discoverable in OpenAPI without changing runtime behavior. |
| tests/test_litellm/proxy/management_endpoints/test_organization_endpoints.py | Verifies through the production schema generator that the v2 organization PATCH operation remains public. |
Reviews (3): Last reviewed commit: "test(organization): assert route publici..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
@greptile re review |
1 similar comment
Contributor
Author
|
@greptile re review |
yuneng-berri
approved these changes
Sep 4, 2026
ryan-crabbe-berri
merged commit Sep 4, 2026
189bd85
into
litellm_internal_staging
185 of 186 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
PATCH /v2/organization/{organization_id}exists but is hidden from OpenAPI/organization/updateHow it solves it:
include_in_schema=Falsefrom the v2 route/docs,openapi.json, and generated clientsUser Flow
Before: a developer scripting org management can't find a PATCH endpoint with merge-patch semantics
After: the v2 endpoint is documented and discoverable
{"organization_alias": "renamed"}and get HTTP 200 with the updated orgRelevant issues
Linear ticket
Resolves LIT-5769
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Shared setup: proxy running
litellm/proxy/dev_config.yamlon localhost:4187 against local Postgres, master keysk-1234Before (62087c5)
curl -s http://localhost:4187/openapi.json | jq '.paths | has("/v2/organization/{organization_id}")'printsfalseAfter (3e4a884, tip 0eb2363 only reroutes the test through the production OpenAPI generator)
curl -s http://localhost:4187/openapi.json | jq '.paths | has("/v2/organization/{organization_id}")'printstruecurl -s http://localhost:4187/openapi.json | jq -c '.paths["/v2/organization/{organization_id}"] | {ops: keys, summary: .patch.summary, tags: .patch.tags}'prints{"ops":["patch"],"summary":"Update Organization V2","tags":["organization management"]}curl -s -w '\nHTTP %{http_code}\n' -X PATCH "http://localhost:4187/v2/organization/$ORG_ID" -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"organization_alias":"v2-public-qa-renamed"}' | tail -1printsHTTP 200, andGET /organization/infoshows the new aliasType
🆕 New Feature
Caveats (if any)
Medium
Low
ui/litellm-dashboardschema.d.ts is unchanged: the UI type generator already includes hidden routesFinal Attestation