fix: add overlay to remove nullable from pagination offset params (#121)

This commit is contained in:
Matt Apperson
2026-04-14 12:48:15 -04:00
committed by GitHub
parent 2bba049182
commit b2386114cd
440 changed files with 36150 additions and 32168 deletions
+27 -11
View File
@@ -5,15 +5,23 @@ from .chatcontentcachecontrol import (
ChatContentCacheControl,
ChatContentCacheControlTypedDict,
)
from .chatwebsearchservertool import (
ChatWebSearchServerTool,
ChatWebSearchServerToolTypedDict,
from .chatsearchmodelsservertool import (
ChatSearchModelsServerTool,
ChatSearchModelsServerToolTypedDict,
)
from .chatwebsearchshorthand import (
ChatWebSearchShorthand,
ChatWebSearchShorthandTypedDict,
)
from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict
from .imagegenerationservertool_openrouter import (
ImageGenerationServerToolOpenRouter,
ImageGenerationServerToolOpenRouterTypedDict,
)
from .openrouterwebsearchservertool import (
OpenRouterWebSearchServerTool,
OpenRouterWebSearchServerToolTypedDict,
)
from openrouter.types import (
BaseModel,
Nullable,
@@ -27,9 +35,6 @@ from typing import Any, Dict, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
ChatFunctionToolType = Literal["function",]
class ChatFunctionToolFunctionFunctionTypedDict(TypedDict):
r"""Function definition for tool calling"""
@@ -89,20 +94,23 @@ class ChatFunctionToolFunctionFunction(BaseModel):
return m
ChatFunctionToolType = Literal["function",]
class ChatFunctionToolFunctionTypedDict(TypedDict):
type: ChatFunctionToolType
function: ChatFunctionToolFunctionFunctionTypedDict
r"""Function definition for tool calling"""
type: ChatFunctionToolType
cache_control: NotRequired[ChatContentCacheControlTypedDict]
r"""Cache control for the content part"""
class ChatFunctionToolFunction(BaseModel):
type: ChatFunctionToolType
function: ChatFunctionToolFunctionFunction
r"""Function definition for tool calling"""
type: ChatFunctionToolType
cache_control: Optional[ChatContentCacheControl] = None
r"""Cache control for the content part"""
@@ -111,7 +119,9 @@ ChatFunctionToolTypedDict = TypeAliasType(
"ChatFunctionToolTypedDict",
Union[
DatetimeServerToolTypedDict,
ChatWebSearchServerToolTypedDict,
ImageGenerationServerToolOpenRouterTypedDict,
ChatSearchModelsServerToolTypedDict,
OpenRouterWebSearchServerToolTypedDict,
ChatFunctionToolFunctionTypedDict,
ChatWebSearchShorthandTypedDict,
],
@@ -123,7 +133,13 @@ ChatFunctionTool = Annotated[
Union[
Annotated[ChatFunctionToolFunction, Tag("function")],
Annotated[DatetimeServerTool, Tag("openrouter:datetime")],
Annotated[ChatWebSearchServerTool, Tag("openrouter:web_search")],
Annotated[
ImageGenerationServerToolOpenRouter, Tag("openrouter:image_generation")
],
Annotated[
ChatSearchModelsServerTool, Tag("openrouter:experimental__search_models")
],
Annotated[OpenRouterWebSearchServerTool, Tag("openrouter:web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview_2025_03_11")],