OpenHands/openhands/server/session/conversation_init_data.py
Rohit Malhotra 41efa100f0
[Fix]: Plumb provider tokens to runtime (#7247)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2025-03-20 22:43:27 +00:00

19 lines
633 B
Python

from types import MappingProxyType
from pydantic import Field
from openhands.integrations.provider import PROVIDER_TOKEN_TYPE
from openhands.server.settings import Settings
class ConversationInitData(Settings):
"""
Session initialization data for the web environment - a deep copy of the global config is made and then overridden with this data.
"""
git_provider_tokens: PROVIDER_TOKEN_TYPE | None = Field(default=None, frozen=True)
selected_repository: str | None = Field(default=None)
selected_branch: str | None = Field(default=None)
model_config = {
'arbitrary_types_allowed': True,
}