diff --git a/.claude/settings.local.json b/.claude/settings.local.json index b12585e..f5c4efb 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,7 +1,8 @@ { "permissions": { "allow": [ - "Bash(python3:*)" + "Bash(python3:*)", + "Bash(git push:*)" ], "deny": [], "ask": [] diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 104ccaa..f7030e5 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d management: - docChecksum: c70fe15adf85b7e7749bd16a443507da + docChecksum: 459a4007b7391a38a6e9c7249c84c3bf docVersion: 1.0.0 speakeasyVersion: 1.658.2 generationVersion: 2.755.9 - releaseVersion: 0.0.21 - configChecksum: fcf282e1f92a17d5f4a7b368adf40f1b + releaseVersion: 0.0.22 + configChecksum: dbd5388c5e9e39132e6f3418d4959462 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true @@ -74,6 +74,7 @@ generatedFiles: - docs/components/chatmessagecontentitemvideo.md - docs/components/chatmessagecontentitemvideoinputvideo.md - docs/components/chatmessagecontentitemvideovideourl.md + - docs/components/chatmessagecontentitemvideovideourlvideourl.md - docs/components/chatmessagetokenlogprob.md - docs/components/chatmessagetokenlogprobs.md - docs/components/chatmessagetoolcall.md @@ -418,8 +419,7 @@ generatedFiles: - docs/components/usermessage.md - docs/components/usermessagecontent.md - docs/components/variables.md - - docs/components/videourl1.md - - docs/components/videourl2.md + - docs/components/videourl.md - docs/components/websearchpreviewtooluserlocation.md - docs/components/websearchpreviewtooluserlocationtype.md - docs/components/websearchstatus.md @@ -687,6 +687,7 @@ generatedFiles: - src/openrouter/components/unprocessableentityresponseerrordata.py - src/openrouter/components/urlcitation.py - src/openrouter/components/usermessage.py + - src/openrouter/components/videourl.py - src/openrouter/components/websearchpreviewtooluserlocation.py - src/openrouter/components/websearchstatus.py - src/openrouter/credits.py diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4402450..05242cd 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false python: - version: 0.0.21 + version: 0.0.22 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index d85372e..ebd130c 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -4647,12 +4647,7 @@ components: type: string const: input_video video_url: - type: object - properties: - url: - type: string - required: - - url + $ref: '#/components/schemas/VideoURL' required: - type - video_url @@ -4672,6 +4667,13 @@ components: - type - video_url type: object + VideoURL: + type: object + properties: + url: + type: string + required: + - url ChatMessageContentItemFile: type: object properties: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index d977b81..d218d94 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -4669,12 +4669,7 @@ components: type: string const: input_video video_url: - type: object - properties: - url: - type: string - required: - - url + $ref: '#/components/schemas/VideoURL' required: - type - video_url @@ -4694,6 +4689,13 @@ components: - type - video_url type: object + VideoURL: + type: object + properties: + url: + type: string + required: + - url ChatMessageContentItemFile: type: object properties: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 62d825b..b571d6e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -8,8 +8,8 @@ sources: - latest OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:473a895aeef965d69f7d3c905f642ecedd8bceb4baf62b135b358ba92be4d451 - sourceBlobDigest: sha256:e3c8a0e4323c1b4b0795fc6b1c2cf7134c5909a7d126a0fa266ba7c8aa65ee18 + sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695 + sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553 tags: - latest - 1.0.0 @@ -22,8 +22,8 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:473a895aeef965d69f7d3c905f642ecedd8bceb4baf62b135b358ba92be4d451 - sourceBlobDigest: sha256:e3c8a0e4323c1b4b0795fc6b1c2cf7134c5909a7d126a0fa266ba7c8aa65ee18 + sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695 + sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/docs/components/chatmessagecontentitemvideoinputvideo.md b/docs/components/chatmessagecontentitemvideoinputvideo.md index 4d7dd0e..da28cf1 100644 --- a/docs/components/chatmessagecontentitemvideoinputvideo.md +++ b/docs/components/chatmessagecontentitemvideoinputvideo.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A | -| `video_url` | [components.VideoURL1](../components/videourl1.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A | +| `video_url` | [components.VideoURL](../components/videourl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemvideovideourl.md b/docs/components/chatmessagecontentitemvideovideourl.md index 0585b55..023d696 100644 --- a/docs/components/chatmessagecontentitemvideovideourl.md +++ b/docs/components/chatmessagecontentitemvideovideourl.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A | -| `video_url` | [components.VideoURL2](../components/videourl2.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A | +| `video_url` | [components.ChatMessageContentItemVideoVideoURLVideoURL](../components/chatmessagecontentitemvideovideourlvideourl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/videourl2.md b/docs/components/chatmessagecontentitemvideovideourlvideourl.md similarity index 85% rename from docs/components/videourl2.md rename to docs/components/chatmessagecontentitemvideovideourlvideourl.md index b7f2463..ee08920 100644 --- a/docs/components/videourl2.md +++ b/docs/components/chatmessagecontentitemvideovideourlvideourl.md @@ -1,4 +1,4 @@ -# VideoURL2 +# ChatMessageContentItemVideoVideoURLVideoURL ## Fields diff --git a/docs/components/videourl1.md b/docs/components/videourl.md similarity index 95% rename from docs/components/videourl1.md rename to docs/components/videourl.md index 505c186..5bd5dec 100644 --- a/docs/components/videourl1.md +++ b/docs/components/videourl.md @@ -1,4 +1,4 @@ -# VideoURL1 +# VideoURL ## Fields diff --git a/pyproject.toml b/pyproject.toml index 75da078..9ec2c59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "0.0.21" +version = "0.0.22" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 9ccbeed..4b094a9 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "0.0.21" +__version__: str = "0.0.22" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.755.9" -__user_agent__: str = "speakeasy-sdk/python 0.0.21 2.755.9 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 0.0.22 2.755.9 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py index a368b95..1554012 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -82,10 +82,8 @@ if TYPE_CHECKING: ChatMessageContentItemVideoTypedDict, ChatMessageContentItemVideoVideoURL, ChatMessageContentItemVideoVideoURLTypedDict, - VideoURL1, - VideoURL1TypedDict, - VideoURL2, - VideoURL2TypedDict, + ChatMessageContentItemVideoVideoURLVideoURL, + ChatMessageContentItemVideoVideoURLVideoURLTypedDict, ) from .chatmessagetokenlogprob import ( ChatMessageTokenLogprob, @@ -786,6 +784,7 @@ if TYPE_CHECKING: UserMessageContentTypedDict, UserMessageTypedDict, ) + from .videourl import VideoURL, VideoURLTypedDict from .websearchpreviewtooluserlocation import ( WebSearchPreviewToolUserLocation, WebSearchPreviewToolUserLocationType, @@ -844,6 +843,8 @@ __all__ = [ "ChatMessageContentItemVideoTypedDict", "ChatMessageContentItemVideoVideoURL", "ChatMessageContentItemVideoVideoURLTypedDict", + "ChatMessageContentItemVideoVideoURLVideoURL", + "ChatMessageContentItemVideoVideoURLVideoURLTypedDict", "ChatMessageTokenLogprob", "ChatMessageTokenLogprobTypedDict", "ChatMessageTokenLogprobs", @@ -1390,10 +1391,8 @@ __all__ = [ "UserMessageTypedDict", "Variables", "VariablesTypedDict", - "VideoURL1", - "VideoURL1TypedDict", - "VideoURL2", - "VideoURL2TypedDict", + "VideoURL", + "VideoURLTypedDict", "WebSearchPreviewToolUserLocation", "WebSearchPreviewToolUserLocationType", "WebSearchPreviewToolUserLocationTypedDict", @@ -1460,10 +1459,8 @@ _dynamic_imports: dict[str, str] = { "ChatMessageContentItemVideoTypedDict": ".chatmessagecontentitemvideo", "ChatMessageContentItemVideoVideoURL": ".chatmessagecontentitemvideo", "ChatMessageContentItemVideoVideoURLTypedDict": ".chatmessagecontentitemvideo", - "VideoURL1": ".chatmessagecontentitemvideo", - "VideoURL1TypedDict": ".chatmessagecontentitemvideo", - "VideoURL2": ".chatmessagecontentitemvideo", - "VideoURL2TypedDict": ".chatmessagecontentitemvideo", + "ChatMessageContentItemVideoVideoURLVideoURL": ".chatmessagecontentitemvideo", + "ChatMessageContentItemVideoVideoURLVideoURLTypedDict": ".chatmessagecontentitemvideo", "ChatMessageTokenLogprob": ".chatmessagetokenlogprob", "ChatMessageTokenLogprobTypedDict": ".chatmessagetokenlogprob", "TopLogprob": ".chatmessagetokenlogprob", @@ -2001,6 +1998,8 @@ _dynamic_imports: dict[str, str] = { "UserMessageContent": ".usermessage", "UserMessageContentTypedDict": ".usermessage", "UserMessageTypedDict": ".usermessage", + "VideoURL": ".videourl", + "VideoURLTypedDict": ".videourl", "WebSearchPreviewToolUserLocation": ".websearchpreviewtooluserlocation", "WebSearchPreviewToolUserLocationType": ".websearchpreviewtooluserlocation", "WebSearchPreviewToolUserLocationTypedDict": ".websearchpreviewtooluserlocation", diff --git a/src/openrouter/components/chatmessagecontentitemvideo.py b/src/openrouter/components/chatmessagecontentitemvideo.py index fccda91..46067ca 100644 --- a/src/openrouter/components/chatmessagecontentitemvideo.py +++ b/src/openrouter/components/chatmessagecontentitemvideo.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .videourl import VideoURL, VideoURLTypedDict from openrouter.types import BaseModel from openrouter.utils import validate_const import pydantic @@ -9,21 +10,21 @@ from typing import Literal, Union from typing_extensions import Annotated, TypeAliasType, TypedDict -class VideoURL2TypedDict(TypedDict): +class ChatMessageContentItemVideoVideoURLVideoURLTypedDict(TypedDict): url: str -class VideoURL2(BaseModel): +class ChatMessageContentItemVideoVideoURLVideoURL(BaseModel): url: str class ChatMessageContentItemVideoVideoURLTypedDict(TypedDict): - video_url: VideoURL2TypedDict + video_url: ChatMessageContentItemVideoVideoURLVideoURLTypedDict type: Literal["video_url"] class ChatMessageContentItemVideoVideoURL(BaseModel): - video_url: VideoURL2 + video_url: ChatMessageContentItemVideoVideoURLVideoURL TYPE: Annotated[ Annotated[Literal["video_url"], AfterValidator(validate_const("video_url"))], @@ -31,21 +32,13 @@ class ChatMessageContentItemVideoVideoURL(BaseModel): ] = "video_url" -class VideoURL1TypedDict(TypedDict): - url: str - - -class VideoURL1(BaseModel): - url: str - - class ChatMessageContentItemVideoInputVideoTypedDict(TypedDict): - video_url: VideoURL1TypedDict + video_url: VideoURLTypedDict type: Literal["input_video"] class ChatMessageContentItemVideoInputVideo(BaseModel): - video_url: VideoURL1 + video_url: VideoURL TYPE: Annotated[ Annotated[ diff --git a/src/openrouter/components/videourl.py b/src/openrouter/components/videourl.py new file mode 100644 index 0000000..e1ef80d --- /dev/null +++ b/src/openrouter/components/videourl.py @@ -0,0 +1,13 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class VideoURLTypedDict(TypedDict): + url: str + + +class VideoURL(BaseModel): + url: str