mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
fix: set oauth2_flow when building MCPServer in _execute_with_mcp_client
This commit is contained in:
parent
2405e0d400
commit
feee689e87
1 changed files with 5 additions and 3 deletions
|
|
@ -906,9 +906,11 @@ if MCP_AVAILABLE:
|
|||
client_id, client_secret, scopes = _extract_credentials(request)
|
||||
|
||||
_oauth2_flow: Optional[Literal["client_credentials", "authorization_code"]] = (
|
||||
"client_credentials"
|
||||
if client_id and client_secret and request.token_url
|
||||
else None
|
||||
request.oauth2_flow or (
|
||||
"client_credentials"
|
||||
if client_id and client_secret and request.token_url
|
||||
else None
|
||||
)
|
||||
)
|
||||
|
||||
server_model = MCPServer(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue