mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Fix V1 MCP services (Fix tavily search) (#11840)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -88,6 +88,9 @@ class DefaultUserAuth(UserAuth):
|
||||
return None
|
||||
return user_secrets.provider_tokens
|
||||
|
||||
async def get_mcp_api_key(self) -> str | None:
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
async def get_instance(cls, request: Request) -> UserAuth:
|
||||
user_auth = DefaultUserAuth()
|
||||
|
||||
@@ -75,6 +75,10 @@ class UserAuth(ABC):
|
||||
def get_auth_type(self) -> AuthType | None:
|
||||
return None
|
||||
|
||||
@abstractmethod
|
||||
async def get_mcp_api_key(self) -> str | None:
|
||||
"""Get an mcp api key for the user"""
|
||||
|
||||
@classmethod
|
||||
@abstractmethod
|
||||
async def get_instance(cls, request: Request) -> UserAuth:
|
||||
|
||||
Reference in New Issue
Block a user