# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Dict, Union, Optional
from typing_extensions import TypeAlias, TypedDict

__all__ = ["Context"]


class ContextTyped(TypedDict, total=False):
    """
    Optional context: identity (conversation scoping), attributes (injected into system prompt), and pass-through for tools
    """

    attributes: Dict[str, Optional[object]]
    """
    Attributes about the user/request that are injected into the system prompt
    (visible to the model)
    """

    identity: Dict[str, Optional[object]]
    """Identity fields for conversation scoping (e.g., user_id, tenant_id)"""


Context: TypeAlias = Union[ContextTyped, Dict[str, Optional[object]]]
