"""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


StopServerToolsWhenFinishReasonIsType = Literal["finish_reason_is",]


class StopServerToolsWhenFinishReasonIsTypedDict(TypedDict):
    r"""Stop when the upstream model emits this finish reason (e.g. `length`)."""

    reason: str
    type: StopServerToolsWhenFinishReasonIsType


class StopServerToolsWhenFinishReasonIs(BaseModel):
    r"""Stop when the upstream model emits this finish reason (e.g. `length`)."""

    reason: str

    type: StopServerToolsWhenFinishReasonIsType
