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

from __future__ import annotations
from .subagentservertoolconfig import (
    SubagentServerToolConfig,
    SubagentServerToolConfigTypedDict,
)
from openrouter.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict


SubagentServerToolOpenRouterType = Literal["openrouter:subagent",]


class SubagentServerToolOpenRouterTypedDict(TypedDict):
    r"""OpenRouter built-in server tool: delegates self-contained tasks to a smaller, cheaper, faster worker model (any OpenRouter model) mid-generation and returns its outcome. The worker may run as a sub-agent with its own tools."""

    type: SubagentServerToolOpenRouterType
    parameters: NotRequired[SubagentServerToolConfigTypedDict]
    r"""Configuration for the openrouter:subagent server tool."""


class SubagentServerToolOpenRouter(BaseModel):
    r"""OpenRouter built-in server tool: delegates self-contained tasks to a smaller, cheaper, faster worker model (any OpenRouter model) mid-generation and returns its outcome. The worker may run as a sub-agent with its own tools."""

    type: SubagentServerToolOpenRouterType

    parameters: Optional[SubagentServerToolConfig] = None
    r"""Configuration for the openrouter:subagent server tool."""
