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

from __future__ import annotations
from openrouter.types import BaseModel
from typing import Literal
from typing_extensions import TypedDict


StopServerToolsWhenMaxTokensUsedType = Literal["max_tokens_used",]


class StopServerToolsWhenMaxTokensUsedTypedDict(TypedDict):
    r"""Stop once cumulative token usage across the loop exceeds this threshold."""

    max_tokens: int
    type: StopServerToolsWhenMaxTokensUsedType


class StopServerToolsWhenMaxTokensUsed(BaseModel):
    r"""Stop once cumulative token usage across the loop exceeds this threshold."""

    max_tokens: int

    type: StopServerToolsWhenMaxTokensUsedType
