"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .contextcompressionengine import ContextCompressionEngine
from openrouter.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict


ContextCompressionPluginID = Literal["context-compression",]


class ContextCompressionPluginTypedDict(TypedDict):
    id: ContextCompressionPluginID
    enabled: NotRequired[bool]
    r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
    engine: NotRequired[ContextCompressionEngine]
    r"""The compression engine to use. Defaults to \"middle-out\"."""


class ContextCompressionPlugin(BaseModel):
    id: ContextCompressionPluginID

    enabled: Optional[bool] = None
    r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""

    engine: Optional[ContextCompressionEngine] = None
    r"""The compression engine to use. Defaults to \"middle-out\"."""
