mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix(mcp): cast merged credentials dict to MCPCredentials for mypy compatibility
This commit is contained in:
parent
8dd8367cd0
commit
80b009411a
1 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import json
|
||||
from typing import Optional
|
||||
from typing import Optional, cast
|
||||
from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse
|
||||
|
||||
from fastapi import APIRouter, Form, HTTPException, Request
|
||||
|
|
@ -381,8 +381,10 @@ async def _persist_oauth_credentials(
|
|||
else:
|
||||
merged = new_credentials
|
||||
|
||||
from litellm.types.mcp import MCPCredentials
|
||||
|
||||
encrypted_credentials = encrypt_credentials(
|
||||
credentials=merged,
|
||||
credentials=cast(MCPCredentials, merged),
|
||||
encryption_key=_get_salt_key(),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue