From bf542233a93d2d637b58cb5c5d4c1ce39d6bd053 Mon Sep 17 00:00:00 2001 From: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com> Date: Wed, 16 Jul 2025 10:57:08 +0800 Subject: [PATCH] minor fix: using Pydantic model_validate instead of deprecated parse_obj (#22239) Signed-off-by: neatguycoding <15627489+NeatGuyCoding@users.noreply.github.com> --- api/core/mcp/auth/auth_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/mcp/auth/auth_flow.py b/api/core/mcp/auth/auth_flow.py index b63478e822..bcb31a816f 100644 --- a/api/core/mcp/auth/auth_flow.py +++ b/api/core/mcp/auth/auth_flow.py @@ -240,7 +240,7 @@ def refresh_authorization( response = requests.post(token_url, data=params) if not response.ok: raise ValueError(f"Token refresh failed: HTTP {response.status_code}") - return OAuthTokens.parse_obj(response.json()) + return OAuthTokens.model_validate(response.json()) def register_client(