diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 786f26e9..ec4a3856 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: a1ed014346c4f16464ab5ecc262875cb + docChecksum: 4ec24ba93b3a397ecc159ac306a6bd8a docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.28 - configChecksum: 159e30e365bd518e9eea5cd75396f1d6 + releaseVersion: 1.3.29 + configChecksum: 82c5f834c7b9d556fb73ec8117d817a6 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 742d5c87-8e20-4e12-ab1e-a69ceb017371 - pristine_commit_hash: b7d1f00d41b7f010d81639d40dc384a64705f3c1 - pristine_tree_hash: 286d16e187346cc60f3ced032f9e9ca4498b24a3 + generation_id: b928df92-9cae-47af-9454-7d30c8053b5a + pristine_commit_hash: 09a11fd1f5dcfe408a96bb057ed8339698eddf31 + pristine_tree_hash: f9147190ea5e3cf564da92a88c2f35aa14314adc features: python: acceptHeaders: 3.0.0 @@ -7080,8 +7080,8 @@ trackedFiles: pristine_git_object: 7a513bd20c993f110b1fb306d9817cf049df27e4 docs/components/switchyardrouterplugin.mdx: id: 86509511f517 - last_write_checksum: sha1:e19d53ed8cf47cbbc53b397efcf92e5858501290 - pristine_git_object: ac32e6b38273286cd0d66c41230f3b2a311cebd9 + last_write_checksum: sha1:72a811fcbb48baea6071851820eb1bb2122be5ac + pristine_git_object: 7a3a09ce093e0451b2edd9d2b1f32e81860342ea docs/components/switchyardrouterpluginid.mdx: id: f96cf92c71dd last_write_checksum: sha1:8e997764c9daef8157d569caeb20f26694b1f05d @@ -9976,8 +9976,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:79a03a25a2956efbd3e42a1ca16e7836905a1174 - pristine_git_object: b93d38f21aa2598da457d1dad3df4be1778587f9 + last_write_checksum: sha1:a0a0e377dad68cf07ff46b62dc13b119f3d1f334 + pristine_git_object: c90d15d83489495c8e51cd6c4ab79e70d0348b0c scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -10004,8 +10004,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:34b48de79f405cabf4d9321e0dced5e487b67f04 - pristine_git_object: f8805030dd9c4d775b5958b00fd0efb2e3a08ee1 + last_write_checksum: sha1:2fac6475fda86b96345a2f0011083661ee2a9c9b + pristine_git_object: 3400c5d8b99dc456d96a8d06265bf6814af68eaa src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a @@ -13076,8 +13076,8 @@ trackedFiles: pristine_git_object: 703bf7deed21138fa64db63e6648be4cd2f3d09d src/openrouter/components/switchyardrouterplugin.py: id: abdcef77e2bb - last_write_checksum: sha1:fd7f6968c8c117e4f54b48390aafb73229453855 - pristine_git_object: 313ec57f291f2b80a84641158d5009dd63bdb856 + last_write_checksum: sha1:913d38596c2cbfe32aecf10033727d556f6bbb48 + pristine_git_object: 964d60a6656d9dadc3482f011c237160ee074d82 src/openrouter/components/taskclassificationitem.py: id: 86d4bab5ebf3 last_write_checksum: sha1:16176fda0ccd16b0be59bb5c4b74db78eae02f36 @@ -18280,4 +18280,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.batch.create_batches()`: `response.results[].response.body.union(OpenResponsesResult).output[]` **Changed**\n* `open_router.batch.get_batches()`: `response.results[].response.body.union(OpenResponsesResult).output[]` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[]` **Changed**\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[]` **Changed**\n * `response` **Changed**\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[]` **Changed**\n * `response` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 44fea072..7c57f6e1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.28 + version: 1.3.29 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index b7021131..989547af 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -30083,7 +30083,7 @@ components: - 'switchyard-router' type: 'string' judge_model: - description: 'The model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-2.5-flash-lite, and reports the reason in the routing metadata. The judge call is billed to you like any other request.' + description: 'The model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-3.5-flash-lite, or openai/gpt-4o-mini when the default does not fit either, and reports the reason in the routing metadata. The judge call is billed to you like any other request.' example: 'openai/gpt-5.4-nano' minLength: 1 type: 'string' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ee79d00b..94b1a860 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:aa391b8c4aad11822ac1ddc5404f21a901db665e30e4786cb92b3245658f6139 - sourceBlobDigest: sha256:fc70bf188a3a66c3b30d82f14c9cf9ab6b8db52c6a136a0626ac8a393fd32e3c + sourceRevisionDigest: sha256:bf7fda8c98a42027444954119bd5f58646b93dd9d55cc5f21378e37a95a4ce2f + sourceBlobDigest: sha256:4d40bc4e642a7f455fd9de4ca42f0af6bfb9e4ebc4b2cf2d489b7037f436b689 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:aa391b8c4aad11822ac1ddc5404f21a901db665e30e4786cb92b3245658f6139 - sourceBlobDigest: sha256:fc70bf188a3a66c3b30d82f14c9cf9ab6b8db52c6a136a0626ac8a393fd32e3c + sourceRevisionDigest: sha256:bf7fda8c98a42027444954119bd5f58646b93dd9d55cc5f21378e37a95a4ce2f + sourceBlobDigest: sha256:4d40bc4e642a7f455fd9de4ca42f0af6bfb9e4ebc4b2cf2d489b7037f436b689 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:ecc5d3ff536b62133fa6836014d93d36446d75603e10bb91c8181f9dbd030532 + codeSamplesRevisionDigest: sha256:a975166c914e7c2619de53cdb36eee13a913db00816de0f2c62fe993a339d118 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 39db1be9..b189d0cb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3049,4 +3049,14 @@ Based on: ### Generated - [python v1.3.28] . ### Releases -- [PyPI v1.3.28] https://pypi.org/project/openrouter/1.3.28 - . \ No newline at end of file +- [PyPI v1.3.28] https://pypi.org/project/openrouter/1.3.28 - . + +## 2026-10-07 05:49:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.29] . +### Releases +- [PyPI v1.3.29] https://pypi.org/project/openrouter/1.3.29 - . \ No newline at end of file diff --git a/docs/components/switchyardrouterplugin.mdx b/docs/components/switchyardrouterplugin.mdx index 62da4d64..46811609 100644 --- a/docs/components/switchyardrouterplugin.mdx +++ b/docs/components/switchyardrouterplugin.mdx @@ -8,4 +8,4 @@ title: "SwitchyardRouterPlugin" | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `algorithm` | [Optional[components.Algorithm]](../components/algorithm.mdx) | ➖ | Routing algorithm for this request. "capability" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. "stage" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge only when those signals are undecided. "auto" is "stage" without the judge call. "random" picks one candidate at random. "composite" keeps the tier chosen on the last human turn and re-evaluates tool turns with the stage signals. "passthrough" serves the eligible candidates in the order OpenRouter already ranked them, with no routing decision and no judge call. Omit this field to use the platform default, stage. | | | `id` | [components.SwitchyardRouterPluginID](../components/switchyardrouterpluginid.mdx) | ✅ | N/A | | -| `judge_model` | *Optional[str]* | ➖ | The model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-2.5-flash-lite, and reports the reason in the routing metadata. The judge call is billed to you like any other request. | openai/gpt-5.4-nano | \ No newline at end of file +| `judge_model` | *Optional[str]* | ➖ | The model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-3.5-flash-lite, or openai/gpt-4o-mini when the default does not fit either, and reports the reason in the routing metadata. The judge call is billed to you like any other request. | openai/gpt-5.4-nano | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b93d38f2..c90d15d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.28" +version = "1.3.29" 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 f8805030..3400c5d8 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.28" +__version__: str = "1.3.29" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.3.28 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.29 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/switchyardrouterplugin.py b/src/openrouter/components/switchyardrouterplugin.py index 313ec57f..964d60a6 100644 --- a/src/openrouter/components/switchyardrouterplugin.py +++ b/src/openrouter/components/switchyardrouterplugin.py @@ -29,7 +29,7 @@ class SwitchyardRouterPluginTypedDict(TypedDict): algorithm: NotRequired[Algorithm] r"""Routing algorithm for this request. \"capability\" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. \"stage\" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge only when those signals are undecided. \"auto\" is \"stage\" without the judge call. \"random\" picks one candidate at random. \"composite\" keeps the tier chosen on the last human turn and re-evaluates tool turns with the stage signals. \"passthrough\" serves the eligible candidates in the order OpenRouter already ranked them, with no routing decision and no judge call. Omit this field to use the platform default, stage.""" judge_model: NotRequired[str] - r"""The model that runs the judge call for the judge-backed algorithms (\"capability\", \"stage\", and \"composite\"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-2.5-flash-lite, and reports the reason in the routing metadata. The judge call is billed to you like any other request.""" + r"""The model that runs the judge call for the judge-backed algorithms (\"capability\", \"stage\", and \"composite\"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-3.5-flash-lite, or openai/gpt-4o-mini when the default does not fit either, and reports the reason in the routing metadata. The judge call is billed to you like any other request.""" class SwitchyardRouterPlugin(BaseModel): @@ -39,7 +39,7 @@ class SwitchyardRouterPlugin(BaseModel): r"""Routing algorithm for this request. \"capability\" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. \"stage\" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge only when those signals are undecided. \"auto\" is \"stage\" without the judge call. \"random\" picks one candidate at random. \"composite\" keeps the tier chosen on the last human turn and re-evaluates tool turns with the stage signals. \"passthrough\" serves the eligible candidates in the order OpenRouter already ranked them, with no routing decision and no judge call. Omit this field to use the platform default, stage.""" judge_model: Optional[str] = None - r"""The model that runs the judge call for the judge-backed algorithms (\"capability\", \"stage\", and \"composite\"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-2.5-flash-lite, and reports the reason in the routing metadata. The judge call is billed to you like any other request.""" + r"""The model that runs the judge call for the judge-backed algorithms (\"capability\", \"stage\", and \"composite\"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-3.5-flash-lite, or openai/gpt-4o-mini when the default does not fit either, and reports the reason in the routing metadata. The judge call is billed to you like any other request.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/uv.lock b/uv.lock index bf005517..df099717 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.28" +version = "1.3.29" source = { editable = "." } dependencies = [ { name = "httpcore" },