Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 19 additions & 26 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: d3929b9d897993d513d38a3eac8a1b75
docChecksum: 6f77441e1dc1069bd78afe09c4afd9ee
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.0.0
configChecksum: a98327d105a9b554ecf6667b75c4cdea
releaseVersion: 1.0.1
configChecksum: 1b090d450f85b5839d5e85b8a9893a46
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 74fd2ac6-6c50-461a-a4b1-e19b17e2a3a8
pristine_commit_hash: 3fa8e4be1b64c4b1583d3ed8189a0d0445662b96
pristine_tree_hash: c5060714752fb4359cb3ba4720314b1e636045e6
generation_id: bb16be7e-6101-41da-9f5f-e2d606ded138
pristine_commit_hash: 45f1542f3a6501272c994912c277397a616a62af
pristine_tree_hash: 1d11119251e962d7c1de4f86f1d51a7e9cbb2374
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -3386,8 +3386,8 @@ trackedFiles:
pristine_git_object: ad79a325e74efc6cc08ad7ffc794cecd0e7eaa15
docs/components/outputbashservertoolitem.mdx:
id: c17c44c991b5
last_write_checksum: sha1:7d04159d7f2b51c2df50eddd58362d71dc0ec3a5
pristine_git_object: c039dfa53c36c853fbbb8bff1b6a5bb02be00f84
last_write_checksum: sha1:6f0a1d504dca563629c30d3ba3a00794758e1444
pristine_git_object: cf5ee887723a1081f1f12b22e8d6cbb478cbfe35
docs/components/outputbashservertoolitemtype.mdx:
id: 584dd317e6ab
last_write_checksum: sha1:558e35bae6619f511da32758b7642bc6f000c95e
Expand Down Expand Up @@ -6694,8 +6694,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:c41413e7a2ae6e64d9db26537a3d18596a1bed2d
pristine_git_object: f2fa4d79ce479d6b96b4ab31cb1f3af6b6a003ee
last_write_checksum: sha1:a627791ecc75c207e1643dab39d8ad491f424832
pristine_git_object: 53b3f25e3364095a735ec5b2233d1321fbd07394
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -6722,8 +6722,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:c751b0e79fc1c294fff4315b95fd82b8f315bb0e
pristine_git_object: ee5610f97e1cfc810acc9175fabf21f10b897b84
last_write_checksum: sha1:3a798d815c15fc62000f76deeef005e219cfc85f
pristine_git_object: 5f2bcfd4ae8cca81345346effd5141ed7aaa154e
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
Expand Down Expand Up @@ -7830,8 +7830,8 @@ trackedFiles:
pristine_git_object: a3d84a96f4553a320f5eee5d63f6bc5c244ab446
src/openrouter/components/inputs_union.py:
id: 17d6239cb6a7
last_write_checksum: sha1:bc4c9ad744a2bc44a02084031ddbf3b4fcade904
pristine_git_object: e0fac2909e5ae6fbe8ea043244b99cd0eb32a73d
last_write_checksum: sha1:a860c3512d4159191d30833c88d47a19110b9cc3
pristine_git_object: 5b4249f3fa464b7a8a499789415ebaa533ce3775
src/openrouter/components/inputtext.py:
id: a995ae96be99
last_write_checksum: sha1:2da9ff645acc96772701908830151c5a707ed021
Expand Down Expand Up @@ -8186,8 +8186,8 @@ trackedFiles:
pristine_git_object: 919f2bb6ec91d62dcb223c15e2a25d2830b75ac9
src/openrouter/components/outputbashservertoolitem.py:
id: 39d03767e214
last_write_checksum: sha1:4bec4680ba72e28bbf8d64abc72cd876222fd9fc
pristine_git_object: daa5bcc66591a1ecbc0328d25a8039cc0d70fe14
last_write_checksum: sha1:4131ffc72dc8453a69519123865251149ff61a2c
pristine_git_object: 6a1f46ff0c467c6fffdb24aa58d45067e521f3f3
src/openrouter/components/outputbrowseruseservertoolitem.py:
id: 73bff94d7284
last_write_checksum: sha1:6835f17b73a909e8a49ce9ba1257d43c62eeb690
Expand Down Expand Up @@ -8246,8 +8246,8 @@ trackedFiles:
pristine_git_object: 94af810bbdb87fb8c6800645354f7ec4dd067e7f
src/openrouter/components/outputitems.py:
id: 90f107de3116
last_write_checksum: sha1:278d94da113ba85ced7ae5e84b4c8b3c36a7d2c5
pristine_git_object: f828fba44f1de7265e267d2201dbd3043fc5cfa1
last_write_checksum: sha1:fac534b977b1ec4fc578d30158f6775be1ef338c
pristine_git_object: 435d6ec832782df70a815222db371ebfb29998a4
src/openrouter/components/outputmcpservertoolitem.py:
id: bb8c2536a58e
last_write_checksum: sha1:28d33c9226ff4ce6871457fa1fae384b590f676c
Expand Down Expand Up @@ -11201,11 +11201,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.endpoints.list_zdr_endpoints()`: `error.status[403]` **Added**
* `open_router.endpoints.list()`: `error.status[403]` **Added**
* `open_router.models.get()`: `error.status[403]` **Added**
* `open_router.models.list()`: `error.status[403]` **Added**
* `open_router.models.count()`: `error.status[403]` **Added**
* `open_router.models.list_for_user()`: `error.status[403]` **Added**
releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[].union(OutputBashServerToolItem)` **Changed**\n * `response` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(OutputBashServerToolItem)` **Changed**\n"
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.0.0
version: 1.0.1
additionalDependencies:
dev: {}
main: {}
Expand Down
6 changes: 6 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16738,6 +16738,12 @@ components:
stdout: "total 0\n"
type: 'openrouter:bash'
properties:
arguments:
description: 'The raw tool-call arguments string as emitted by the model.'
type: 'string'
call_id:
description: 'The model-generated tool call id from the originating turn.'
type: 'string'
command:
type: 'string'
exitCode:
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:2fb7c6c4af553f2758d67c2b54408be8b95fddfcbb9f9afd8dd24740edc9ecfe
sourceBlobDigest: sha256:616610478ee4486d26a055db3a10ad8e83ffad10f7b318ffe8a3f890cfd510f8
sourceRevisionDigest: sha256:51717059b037e72dd6fba46e7fce6df49aa5db317f8aded34632048927c7af9f
sourceBlobDigest: sha256:f0b915cb0addae38ea63264fe44482976fb9f9d997bf6b1e4c6d0f93254e42bb
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:2fb7c6c4af553f2758d67c2b54408be8b95fddfcbb9f9afd8dd24740edc9ecfe
sourceBlobDigest: sha256:616610478ee4486d26a055db3a10ad8e83ffad10f7b318ffe8a3f890cfd510f8
sourceRevisionDigest: sha256:51717059b037e72dd6fba46e7fce6df49aa5db317f8aded34632048927c7af9f
sourceBlobDigest: sha256:f0b915cb0addae38ea63264fe44482976fb9f9d997bf6b1e4c6d0f93254e42bb
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:e2114610d847592f214bc006ddc25448fde09a771f9278f476d8bb50e370437c
codeSamplesRevisionDigest: sha256:aa4362de8cc0c46cfedb92b2042a4bdaa4a9087aef96179f984fdb38c8ff06cf
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,3 +579,14 @@ Based on:
- [python v1.0.0] .
### Releases
- [PyPI v1.0.0] https://pypi.org/project/openrouter/1.0.0 - .


## 2026-07-20 22:08:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.0.1] .
### Releases
- [PyPI v1.0.1] https://pypi.org/project/openrouter/1.0.1 - .
2 changes: 2 additions & 0 deletions docs/components/outputbashservertoolitem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ An openrouter:bash server tool output item

| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `arguments` | *Optional[str]* | :heavy_minus_sign: | The raw tool-call arguments string as emitted by the model. | |
| `call_id` | *Optional[str]* | :heavy_minus_sign: | The model-generated tool call id from the originating turn. | |
| `command` | *Optional[str]* | :heavy_minus_sign: | N/A | |
| `exit_code` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | |
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
version = "1.0.0"
version = "1.0.1"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
Expand Down Expand Up @@ -52,3 +52,4 @@ ignore_missing_imports = true
venvPath = "."
venv = ".venv"


4 changes: 2 additions & 2 deletions src/openrouter/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "openrouter"
__version__: str = "1.0.0"
__version__: str = "1.0.1"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 1.0.0 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.0.1 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
40 changes: 20 additions & 20 deletions src/openrouter/components/inputs_union.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,26 +403,26 @@ def serialize_model(self, handler):
OutputSearchModelsServerToolItemTypedDict,
OutputMcpServerToolItemTypedDict,
CustomToolCallItemTypedDict,
OutputComputerCallItemTypedDict,
OutputCodeInterpreterCallItemTypedDict,
OutputCustomToolCallItemTypedDict,
ShellCallOutputItemTypedDict,
InputsMessageTypedDict,
OutputMemoryServerToolItemTypedDict,
OutputComputerCallItemTypedDict,
ShellCallItemTypedDict,
ShellCallOutputItemTypedDict,
OutputBashServerToolItemTypedDict,
McpCallItemTypedDict,
OutputFunctionCallItemTypedDict,
OutputImageGenerationServerToolItemTypedDict,
AgentMessageItemTypedDict,
FunctionCallItemTypedDict,
OutputImageGenerationServerToolItemTypedDict,
OutputSubagentServerToolItemTypedDict,
OutputFunctionCallItemTypedDict,
McpCallItemTypedDict,
OutputFilesServerToolItemTypedDict,
InputsReasoningTypedDict,
OutputAdvisorServerToolItemTypedDict,
ReasoningItemTypedDict,
OutputSubagentServerToolItemTypedDict,
OutputCodeInterpreterServerToolItemTypedDict,
OutputAdvisorServerToolItemTypedDict,
OutputWebFetchServerToolItemTypedDict,
OutputFilesServerToolItemTypedDict,
ReasoningItemTypedDict,
OutputBashServerToolItemTypedDict,
OutputFusionServerToolItemTypedDict,
],
)
Expand Down Expand Up @@ -459,26 +459,26 @@ def serialize_model(self, handler):
OutputSearchModelsServerToolItem,
OutputMcpServerToolItem,
CustomToolCallItem,
OutputComputerCallItem,
OutputCodeInterpreterCallItem,
OutputCustomToolCallItem,
ShellCallOutputItem,
InputsMessage,
OutputMemoryServerToolItem,
OutputComputerCallItem,
ShellCallItem,
ShellCallOutputItem,
OutputBashServerToolItem,
McpCallItem,
OutputFunctionCallItem,
OutputImageGenerationServerToolItem,
AgentMessageItem,
FunctionCallItem,
OutputImageGenerationServerToolItem,
OutputSubagentServerToolItem,
OutputFunctionCallItem,
McpCallItem,
OutputFilesServerToolItem,
InputsReasoning,
OutputAdvisorServerToolItem,
ReasoningItem,
OutputSubagentServerToolItem,
OutputCodeInterpreterServerToolItem,
OutputAdvisorServerToolItem,
OutputWebFetchServerToolItem,
OutputFilesServerToolItem,
ReasoningItem,
OutputBashServerToolItem,
OutputFusionServerToolItem,
],
)
Expand Down
14 changes: 13 additions & 1 deletion src/openrouter/components/outputbashservertoolitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class OutputBashServerToolItemTypedDict(TypedDict):

status: ToolCallStatus
type: OutputBashServerToolItemType
arguments: NotRequired[str]
r"""The raw tool-call arguments string as emitted by the model."""
call_id: NotRequired[str]
r"""The model-generated tool call id from the originating turn."""
command: NotRequired[str]
exit_code: NotRequired[int]
id: NotRequired[str]
Expand All @@ -31,6 +35,12 @@ class OutputBashServerToolItem(BaseModel):

type: OutputBashServerToolItemType

arguments: Optional[str] = None
r"""The raw tool-call arguments string as emitted by the model."""

call_id: Optional[str] = None
r"""The model-generated tool call id from the originating turn."""

command: Optional[str] = None

exit_code: Annotated[Optional[int], pydantic.Field(alias="exitCode")] = None
Expand All @@ -43,7 +53,9 @@ class OutputBashServerToolItem(BaseModel):

@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["command", "exitCode", "id", "stderr", "stdout"])
optional_fields = set(
["arguments", "call_id", "command", "exitCode", "id", "stderr", "stdout"]
)
serialized = handler(self)
m = {}

Expand Down
2 changes: 1 addition & 1 deletion src/openrouter/components/outputitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
OutputMemoryServerToolItemTypedDict,
OutputMessageItemTypedDict,
OutputShellCallOutputItemTypedDict,
OutputBashServerToolItemTypedDict,
OutputFunctionCallItemTypedDict,
OutputImageGenerationServerToolItemTypedDict,
OutputWebFetchServerToolItemTypedDict,
Expand All @@ -150,6 +149,7 @@
OutputAdvisorServerToolItemTypedDict,
OutputSubagentServerToolItemTypedDict,
OutputFilesServerToolItemTypedDict,
OutputBashServerToolItemTypedDict,
OutputFusionServerToolItemTypedDict,
],
)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading