mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
feat: regenerate SDK with updated OpenAPI spec
Speakeasy regeneration with latest schema changes including type renames and new server tool models.
This commit is contained in:
@@ -50,6 +50,8 @@ class ModelTypedDict(TypedDict):
|
||||
r"""Hugging Face model identifier, if applicable"""
|
||||
description: NotRequired[str]
|
||||
r"""Description of the model"""
|
||||
knowledge_cutoff: NotRequired[Nullable[str]]
|
||||
r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
|
||||
expiration_date: NotRequired[Nullable[str]]
|
||||
r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."""
|
||||
|
||||
@@ -98,17 +100,26 @@ class Model(BaseModel):
|
||||
description: Optional[str] = None
|
||||
r"""Description of the model"""
|
||||
|
||||
knowledge_cutoff: OptionalNullable[str] = UNSET
|
||||
r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
|
||||
|
||||
expiration_date: OptionalNullable[str] = UNSET
|
||||
r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["hugging_face_id", "description", "expiration_date"]
|
||||
optional_fields = [
|
||||
"hugging_face_id",
|
||||
"description",
|
||||
"knowledge_cutoff",
|
||||
"expiration_date",
|
||||
]
|
||||
nullable_fields = [
|
||||
"hugging_face_id",
|
||||
"context_length",
|
||||
"per_request_limits",
|
||||
"default_parameters",
|
||||
"knowledge_cutoff",
|
||||
"expiration_date",
|
||||
]
|
||||
null_default_fields = []
|
||||
|
||||
Reference in New Issue
Block a user