mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix: clear oauth2_flow when client_credentials set without token_url
This commit is contained in:
parent
0c1739390b
commit
d58b0a9e06
1 changed files with 4 additions and 0 deletions
|
|
@ -910,6 +910,10 @@ if MCP_AVAILABLE:
|
|||
else None
|
||||
)
|
||||
)
|
||||
# client_credentials requires token_url to fetch a token; without it the
|
||||
# incoming auth header would be dropped with nothing to replace it.
|
||||
if _oauth2_flow == "client_credentials" and not request.token_url:
|
||||
_oauth2_flow = None
|
||||
|
||||
server_model = MCPServer(
|
||||
server_id=request.server_id or "",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue