mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
28 lines
1.3 KiB
Python
28 lines
1.3 KiB
Python
# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
|
|
# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
|
|
# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
|
|
# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
|
|
# - V1 application server (in this repo): openhands/app_server/
|
|
# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
|
|
# Tag: Legacy-V0
|
|
# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.
|
|
from types import MappingProxyType
|
|
|
|
from openhands.integrations.provider import (
|
|
PROVIDER_TOKEN_TYPE,
|
|
ProviderToken,
|
|
)
|
|
from openhands.integrations.service_types import ProviderType
|
|
|
|
|
|
def create_provider_tokens_object(
|
|
providers_set: list[ProviderType],
|
|
) -> PROVIDER_TOKEN_TYPE:
|
|
"""Create provider tokens object for the given providers."""
|
|
provider_information: dict[ProviderType, ProviderToken] = {}
|
|
|
|
for provider in providers_set:
|
|
provider_information[provider] = ProviderToken(token=None, user_id=None)
|
|
|
|
return MappingProxyType(provider_information)
|