Project import generated by Copybara.

GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
This commit is contained in:
OpenRouter Team
2026-01-22 01:26:28 +00:00
parent 5832c0495b
commit 5f2c0ee2ea
130 changed files with 16948 additions and 1127 deletions
@@ -1,7 +1,6 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ._schema3 import Schema3, Schema3TypedDict
from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
from .chatcompletionfinishreason import ChatCompletionFinishReason
from .chatmessagetokenlogprobs import (
@@ -18,7 +17,6 @@ from openrouter.types import (
from openrouter.utils import validate_open_enum
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -26,7 +24,6 @@ class ChatResponseChoiceTypedDict(TypedDict):
finish_reason: Nullable[ChatCompletionFinishReason]
index: float
message: AssistantMessageTypedDict
reasoning_details: NotRequired[List[Schema3TypedDict]]
logprobs: NotRequired[Nullable[ChatMessageTokenLogprobsTypedDict]]
@@ -39,13 +36,11 @@ class ChatResponseChoice(BaseModel):
message: AssistantMessage
reasoning_details: Optional[List[Schema3]] = None
logprobs: OptionalNullable[ChatMessageTokenLogprobs] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["reasoning_details", "logprobs"]
optional_fields = ["logprobs"]
nullable_fields = ["finish_reason", "logprobs"]
null_default_fields = []