mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 06:22:12 +00:00
feat(proxy): publish /v2/model/info in Swagger OpenAPI spec (#29900)
* feat(proxy): publish /v2/model/info in Swagger OpenAPI spec Expose the v2 model info endpoint in /docs by removing include_in_schema=False and documenting query parameters used by the admin UI and proxy CLI consumers. Co-authored-by: Cursor <cursoragent@cursor.com> * chore(ui): regenerate schema.d.ts for /v2/model/info OpenAPI docs Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,6 +60,15 @@ def test_v2_model_info_invalid_page_returns_422(client, auth_as, empty_router):
|
||||
assert "detail" in response.json()
|
||||
|
||||
|
||||
def test_v2_model_info_in_openapi_schema():
|
||||
"""``GET /v2/model/info`` is published in the proxy OpenAPI/Swagger spec."""
|
||||
from litellm.proxy.proxy_server import get_openapi_schema
|
||||
|
||||
schema = get_openapi_schema()
|
||||
assert "/v2/model/info" in schema["paths"]
|
||||
assert "get" in schema["paths"]["/v2/model/info"]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# GET /v1/model/info, GET /model/info
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user