diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 47b869c8..dd69158f 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: 9ce928049e3e28d0a94005ba9f3feae0
+ docChecksum: 02b620e2b0d8bdd8549db51aca567f5f
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 0.11.4
- configChecksum: 4bdce4423724fbc3e27157c1593f7b74
+ releaseVersion: 0.11.5
+ configChecksum: f28e8188849380aa0a7f85e8f7a7b56b
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 050680d0-830b-4b43-af34-44a6c0807b04
- pristine_commit_hash: 7115aa4a60edab70391136ff35b553ee7d958e42
- pristine_tree_hash: 361cb3b699fe64a78518445b7184f4a488605777
+ generation_id: e2e043b1-62f4-438f-b245-7cab5d751e0c
+ pristine_commit_hash: 8dd3e23eae951172cfc444a51ce8d2d4a6f58c1d
+ pristine_tree_hash: cf3fe64dfa8a4412bd45a69bd3fe391c3b4f9b3e
features:
python:
acceptHeaders: 3.0.0
@@ -5678,12 +5678,12 @@ trackedFiles:
pristine_git_object: e6beafcf11154033e2951ae58103041a2af946b9
docs/operations/getmodelsrequest.mdx:
id: b2627beb1959
- last_write_checksum: sha1:d945628c6bc1fdad3b7732e0fbcefc241bd373c6
- pristine_git_object: 272e1449f6b0895e9311ba2f03c05edbf17dc225
+ last_write_checksum: sha1:f632f852d2575a081418c25c4ae1c5f8f4785ff2
+ pristine_git_object: 3cf889e3b06877fa5948f307c334468ed1832d3c
docs/operations/getmodelssort.mdx:
id: 3cfd33e60661
- last_write_checksum: sha1:0cc94491120ca9b9a92ac5d6181a51131d78b94c
- pristine_git_object: 9a5681eb1112bdb27c7c6677b74a17ff2fb0a574
+ last_write_checksum: sha1:6d75758523f8665ff617fe5d4e54385ad785c7ef
+ pristine_git_object: 537a70d3eb590cda229847689553607b46a3a5f7
docs/operations/getobservabilitydestinationglobals.mdx:
id: d7ba84a5b9dc
last_write_checksum: sha1:281603c38cce8aea9f289fc0d49a455b56196e2e
@@ -6350,8 +6350,8 @@ trackedFiles:
pristine_git_object: 77f3172dabafbaa192b258382074cb34cfd55a5e
docs/sdks/models/README.mdx:
id: 58f1ca464e0b
- last_write_checksum: sha1:13cd9e4631b4e19a7db5ad93ce63d66358ffb935
- pristine_git_object: cc84c8d7382e6cee53ceb625344dadeefbb48b5d
+ last_write_checksum: sha1:2a8e7baeb6586e3b46d4da14c1e4701e4625ee7d
+ pristine_git_object: 888dcaa7005c439f2c0e5e0736ba8f78fc42a8db
docs/sdks/oauth/README.mdx:
id: 42b5079343d2
last_write_checksum: sha1:60ecae1338bc4487fbb050b6044ddc08dd7d1685
@@ -6402,8 +6402,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:e63ee1edc31eba7748772e0f9d9f1239abe84b72
- pristine_git_object: 63126319baf5f2bd6c915b590f02eb5b4b8cb1e1
+ last_write_checksum: sha1:357cd9edeb39cbbbf958df143408cf75b672cb77
+ pristine_git_object: 042b3b370f33071d6b8b72919698f4c426d532d6
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6430,8 +6430,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:55bbac3c115b285a81d9826cc0f69c37e1195456
- pristine_git_object: 578264d267742981dc5c7268ff378621572831dd
+ last_write_checksum: sha1:23b5383ef6d4c88095f0bd2ffce66cdd0dad13e4
+ pristine_git_object: a9687477f7ab9961c862a708ec091f94182db944
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
@@ -8738,8 +8738,8 @@ trackedFiles:
pristine_git_object: 5b741456655ff48919d17ffd552a6410f0587966
src/openrouter/models_.py:
id: 4e1ae1fe5b98
- last_write_checksum: sha1:3c9aa7ec25ebd7cf7eb43a4d31cab845658fd484
- pristine_git_object: 02dd1c2072829766214cfdbcb9a3eb098f282e33
+ last_write_checksum: sha1:7b5b5454677f47a3a0fbfeff8c084ecd569a95b9
+ pristine_git_object: 0379827532be6069ef8a592771c01c1e44219636
src/openrouter/oauth.py:
id: 1948ce27255b
last_write_checksum: sha1:8d6ba30594d5674164f045d6655914b801268f72
@@ -8926,8 +8926,8 @@ trackedFiles:
pristine_git_object: d5a47b01285b12f05d46240e253a934be63f0a00
src/openrouter/operations/getmodels.py:
id: 5bd5dfcb0125
- last_write_checksum: sha1:6d13fdf573bd5a4ff65484e3358d36d5f5e17a7d
- pristine_git_object: af887b941b69db369b1623fd2a19abeef6ef967d
+ last_write_checksum: sha1:3501eb6dccdf4bf3dc52d2228b5906be95481470
+ pristine_git_object: dc16709a2472ddaf838eaa21ffda7be17f7dd0f2
src/openrouter/operations/getobservabilitydestination.py:
id: 15b49f22aca9
last_write_checksum: sha1:351b050b646c9e2dbffaf27633cbd38b30047169
@@ -10706,4 +10706,6 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
-releaseNotes: "## Python SDK Changes:\n* `open_router.stt.create_transcription_multipart()`: **Added**\n* `open_router.beta.responses.send()`: \n * `request.plugins[].union(pareto-router).price_source` **Added**\n* `open_router.chat.send()`: \n * `request.plugins[].union(pareto-router).price_source` **Added**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.plugins[].union(pareto-router).price_source` **Added**\n* `open_router.presets.create_presets_messages()`: \n * `request.plugins[].union(pareto-router).price_source` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.plugins[].union(pareto-router).price_source` **Added**\n"
+releaseNotes: |
+ ## Python SDK Changes:
+ * `open_router.models.list()`: `request` **Changed**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index abe3ec93..0ffe5f70 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 0.11.4
+ version: 0.11.5
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 47f2f0b0..a7062dae 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -30112,13 +30112,13 @@ paths:
example: text
type: string
- description: >-
- Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
+ Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
in: query
name: sort
required: false
schema:
description: >-
- Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
+ Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
enum:
- most-popular
- newest
@@ -30129,6 +30129,8 @@ paths:
- throughput-high-to-low
- latency-low-to-high
- intelligence-high-to-low
+ - coding-high-to-low
+ - agentic-high-to-low
- design-arena-elo-high-to-low
example: newest
type: string
@@ -30235,6 +30237,130 @@ paths:
- eu
example: eu
type: string
+ - description: Minimum completion (output) price in $/M tokens.
+ in: query
+ name: min_output_price
+ required: false
+ schema:
+ description: Minimum completion (output) price in $/M tokens.
+ example: 0
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Maximum completion (output) price in $/M tokens.
+ in: query
+ name: max_output_price
+ required: false
+ schema:
+ description: Maximum completion (output) price in $/M tokens.
+ example: 10
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Minimum model age in days since its creation date.
+ in: query
+ name: min_age_days
+ required: false
+ schema:
+ description: Minimum model age in days since its creation date.
+ example: 0
+ minimum: 0
+ nullable: true
+ type: integer
+ - description: Maximum model age in days since its creation date.
+ in: query
+ name: max_age_days
+ required: false
+ schema:
+ description: Maximum model age in days since its creation date.
+ example: 90
+ minimum: 0
+ nullable: true
+ type: integer
+ - description: Minimum Artificial Analysis intelligence index.
+ in: query
+ name: min_intelligence_index
+ required: false
+ schema:
+ description: Minimum Artificial Analysis intelligence index.
+ example: 50
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Maximum Artificial Analysis intelligence index.
+ in: query
+ name: max_intelligence_index
+ required: false
+ schema:
+ description: Maximum Artificial Analysis intelligence index.
+ example: 100
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Minimum Artificial Analysis coding index.
+ in: query
+ name: min_coding_index
+ required: false
+ schema:
+ description: Minimum Artificial Analysis coding index.
+ example: 50
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Maximum Artificial Analysis coding index.
+ in: query
+ name: max_coding_index
+ required: false
+ schema:
+ description: Maximum Artificial Analysis coding index.
+ example: 100
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Minimum Artificial Analysis agentic index.
+ in: query
+ name: min_agentic_index
+ required: false
+ schema:
+ description: Minimum Artificial Analysis agentic index.
+ example: 50
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Maximum Artificial Analysis agentic index.
+ in: query
+ name: max_agentic_index
+ required: false
+ schema:
+ description: Maximum Artificial Analysis agentic index.
+ example: 100
+ minimum: 0
+ nullable: true
+ type: number
+ - description: >-
+ Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).
+ in: query
+ name: min_tool_success_rate
+ required: false
+ schema:
+ description: >-
+ Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).
+ example: 0.9
+ maximum: 1
+ minimum: 0
+ nullable: true
+ type: number
+ - description: Maximum tool-calling success rate, as a fraction in [0, 1].
+ in: query
+ name: max_tool_success_rate
+ required: false
+ schema:
+ description: Maximum tool-calling success rate, as a fraction in [0, 1].
+ example: 1
+ maximum: 1
+ minimum: 0
+ nullable: true
+ type: number
responses:
'200':
content:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 38cf9a51..f85efa0f 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:d2c2c3e13ad669361c25f68fad9ec7eecb75ce8225fe04163163192c1c7fe1f6
- sourceBlobDigest: sha256:22a034c7168faf862dc49ec1eb11cabe3f7b5405fffae3881c02000a4f0ec55b
+ sourceRevisionDigest: sha256:aba0fa7083fc84520a6b33a28d83672fe37eaa65e185f219182d1c9a6d399fbf
+ sourceBlobDigest: sha256:00a46b5dabf8ed3c27462f8c598ec592f277efd014c855e45e76c3bde1910cf0
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:d2c2c3e13ad669361c25f68fad9ec7eecb75ce8225fe04163163192c1c7fe1f6
- sourceBlobDigest: sha256:22a034c7168faf862dc49ec1eb11cabe3f7b5405fffae3881c02000a4f0ec55b
+ sourceRevisionDigest: sha256:aba0fa7083fc84520a6b33a28d83672fe37eaa65e185f219182d1c9a6d399fbf
+ sourceBlobDigest: sha256:00a46b5dabf8ed3c27462f8c598ec592f277efd014c855e45e76c3bde1910cf0
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:9b19c83c1b20193106f585b755a4d639540a4884675a9336cdf199776093c4bc
+ codeSamplesRevisionDigest: sha256:abe985d8f0f446be27118dc7f14238c90bdbd3d5e5810729a114378554d481b5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index c2bff2d2..d3d9d463 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -148,4 +148,14 @@ Based on:
### Generated
- [python v0.11.4] .
### Releases
-- [PyPI v0.11.4] https://pypi.org/project/openrouter/0.11.4 - .
\ No newline at end of file
+- [PyPI v0.11.4] https://pypi.org/project/openrouter/0.11.4 - .
+
+## 2026-07-07 17:24:44
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.11.5] .
+### Releases
+- [PyPI v0.11.5] https://pypi.org/project/openrouter/0.11.5 - .
\ No newline at end of file
diff --git a/docs/operations/getmodelsrequest.mdx b/docs/operations/getmodelsrequest.mdx
index 272e1449..3cf889e3 100644
--- a/docs/operations/getmodelsrequest.mdx
+++ b/docs/operations/getmodelsrequest.mdx
@@ -4,23 +4,35 @@ title: "GetModelsRequest"
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `category` | [Optional[operations.GetModelsCategory]](../operations/getmodelscategory.mdx) | :heavy_minus_sign: | Filter models by use case category | programming |
-| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
-| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
-| `sort` | [Optional[operations.GetModelsSort]](../operations/getmodelssort.mdx) | :heavy_minus_sign: | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest |
-| `q` | *Optional[str]* | :heavy_minus_sign: | Free-text search by model name or slug. | gpt-4 |
-| `input_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image |
-| `context` | *Optional[int]* | :heavy_minus_sign: | Minimum context length (tokens). Models with smaller context are excluded. | 128000 |
-| `min_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum prompt price in $/M tokens. | 0 |
-| `max_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum prompt price in $/M tokens. | 10 |
-| `arch` | *Optional[str]* | :heavy_minus_sign: | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT |
-| `model_authors` | *Optional[str]* | :heavy_minus_sign: | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic |
-| `providers` | *Optional[str]* | :heavy_minus_sign: | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic |
-| `distillable` | [Optional[operations.Distillable]](../operations/distillable.mdx) | :heavy_minus_sign: | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true |
-| `zdr` | [Optional[operations.Zdr]](../operations/zdr.mdx) | :heavy_minus_sign: | When set to "true", return only models with zero data retention endpoints. | true |
-| `region` | [Optional[operations.Region]](../operations/region.mdx) | :heavy_minus_sign: | Filter to models with endpoints in the given data region. Currently only "eu" is supported. | eu |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `category` | [Optional[operations.GetModelsCategory]](../operations/getmodelscategory.mdx) | :heavy_minus_sign: | Filter models by use case category | programming |
+| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
+| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
+| `sort` | [Optional[operations.GetModelsSort]](../operations/getmodelssort.mdx) | :heavy_minus_sign: | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest |
+| `q` | *Optional[str]* | :heavy_minus_sign: | Free-text search by model name or slug. | gpt-4 |
+| `input_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image |
+| `context` | *Optional[int]* | :heavy_minus_sign: | Minimum context length (tokens). Models with smaller context are excluded. | 128000 |
+| `min_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum prompt price in $/M tokens. | 0 |
+| `max_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum prompt price in $/M tokens. | 10 |
+| `arch` | *Optional[str]* | :heavy_minus_sign: | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT |
+| `model_authors` | *Optional[str]* | :heavy_minus_sign: | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic |
+| `providers` | *Optional[str]* | :heavy_minus_sign: | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic |
+| `distillable` | [Optional[operations.Distillable]](../operations/distillable.mdx) | :heavy_minus_sign: | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true |
+| `zdr` | [Optional[operations.Zdr]](../operations/zdr.mdx) | :heavy_minus_sign: | When set to "true", return only models with zero data retention endpoints. | true |
+| `region` | [Optional[operations.Region]](../operations/region.mdx) | :heavy_minus_sign: | Filter to models with endpoints in the given data region. Currently only "eu" is supported. | eu |
+| `min_output_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum completion (output) price in $/M tokens. | 0 |
+| `max_output_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum completion (output) price in $/M tokens. | 10 |
+| `min_age_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Minimum model age in days since its creation date. | 0 |
+| `max_age_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum model age in days since its creation date. | 90 |
+| `min_intelligence_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum Artificial Analysis intelligence index. | 50 |
+| `max_intelligence_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum Artificial Analysis intelligence index. | 100 |
+| `min_coding_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum Artificial Analysis coding index. | 50 |
+| `max_coding_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum Artificial Analysis coding index. | 100 |
+| `min_agentic_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum Artificial Analysis agentic index. | 50 |
+| `max_agentic_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum Artificial Analysis agentic index. | 100 |
+| `min_tool_success_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). | 0.9 |
+| `max_tool_success_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tool-calling success rate, as a fraction in [0, 1]. | 1 |
\ No newline at end of file
diff --git a/docs/operations/getmodelssort.mdx b/docs/operations/getmodelssort.mdx
index 9a5681eb..537a70d3 100644
--- a/docs/operations/getmodelssort.mdx
+++ b/docs/operations/getmodelssort.mdx
@@ -2,7 +2,7 @@
title: "GetModelsSort"
---
-Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
+Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
## Example Usage
@@ -27,4 +27,6 @@ This is an open enum. Unrecognized values will not fail type checks.
- `"throughput-high-to-low"`
- `"latency-low-to-high"`
- `"intelligence-high-to-low"`
+- `"coding-high-to-low"`
+- `"agentic-high-to-low"`
- `"design-arena-elo-high-to-low"`
diff --git a/docs/sdks/models/README.mdx b/docs/sdks/models/README.mdx
index cc84c8d7..888dcaa7 100644
--- a/docs/sdks/models/README.mdx
+++ b/docs/sdks/models/README.mdx
@@ -89,27 +89,39 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `category` | [Optional[operations.GetModelsCategory]](../../operations/getmodelscategory.mdx) | :heavy_minus_sign: | Filter models by use case category | programming |
-| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
-| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
-| `sort` | [Optional[operations.GetModelsSort]](../../operations/getmodelssort.mdx) | :heavy_minus_sign: | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest |
-| `q` | *Optional[str]* | :heavy_minus_sign: | Free-text search by model name or slug. | gpt-4 |
-| `input_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image |
-| `context` | *Optional[int]* | :heavy_minus_sign: | Minimum context length (tokens). Models with smaller context are excluded. | 128000 |
-| `min_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum prompt price in $/M tokens. | 0 |
-| `max_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum prompt price in $/M tokens. | 10 |
-| `arch` | *Optional[str]* | :heavy_minus_sign: | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT |
-| `model_authors` | *Optional[str]* | :heavy_minus_sign: | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic |
-| `providers` | *Optional[str]* | :heavy_minus_sign: | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic |
-| `distillable` | [Optional[operations.Distillable]](../../operations/distillable.mdx) | :heavy_minus_sign: | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true |
-| `zdr` | [Optional[operations.Zdr]](../../operations/zdr.mdx) | :heavy_minus_sign: | When set to "true", return only models with zero data retention endpoints. | true |
-| `region` | [Optional[operations.Region]](../../operations/region.mdx) | :heavy_minus_sign: | Filter to models with endpoints in the given data region. Currently only "eu" is supported. | eu |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `category` | [Optional[operations.GetModelsCategory]](../../operations/getmodelscategory.mdx) | :heavy_minus_sign: | Filter models by use case category | programming |
+| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
+| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
+| `sort` | [Optional[operations.GetModelsSort]](../../operations/getmodelssort.mdx) | :heavy_minus_sign: | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved. | newest |
+| `q` | *Optional[str]* | :heavy_minus_sign: | Free-text search by model name or slug. | gpt-4 |
+| `input_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by input modality. Comma-separated list of: text, image, audio, file. | text,image |
+| `context` | *Optional[int]* | :heavy_minus_sign: | Minimum context length (tokens). Models with smaller context are excluded. | 128000 |
+| `min_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum prompt price in $/M tokens. | 0 |
+| `max_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum prompt price in $/M tokens. | 10 |
+| `arch` | *Optional[str]* | :heavy_minus_sign: | Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama). | GPT |
+| `model_authors` | *Optional[str]* | :heavy_minus_sign: | Filter models by the organization that created the model. Comma-separated list of author slugs. | openai,anthropic |
+| `providers` | *Optional[str]* | :heavy_minus_sign: | Filter models by hosting provider. Comma-separated list of provider names. | OpenAI,Anthropic |
+| `distillable` | [Optional[operations.Distillable]](../../operations/distillable.mdx) | :heavy_minus_sign: | Filter by distillation capability. "true" returns only distillable models, "false" excludes them. | true |
+| `zdr` | [Optional[operations.Zdr]](../../operations/zdr.mdx) | :heavy_minus_sign: | When set to "true", return only models with zero data retention endpoints. | true |
+| `region` | [Optional[operations.Region]](../../operations/region.mdx) | :heavy_minus_sign: | Filter to models with endpoints in the given data region. Currently only "eu" is supported. | eu |
+| `min_output_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum completion (output) price in $/M tokens. | 0 |
+| `max_output_price` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum completion (output) price in $/M tokens. | 10 |
+| `min_age_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Minimum model age in days since its creation date. | 0 |
+| `max_age_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum model age in days since its creation date. | 90 |
+| `min_intelligence_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum Artificial Analysis intelligence index. | 50 |
+| `max_intelligence_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum Artificial Analysis intelligence index. | 100 |
+| `min_coding_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum Artificial Analysis coding index. | 50 |
+| `max_coding_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum Artificial Analysis coding index. | 100 |
+| `min_agentic_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum Artificial Analysis agentic index. | 50 |
+| `max_agentic_index` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum Artificial Analysis agentic index. | 100 |
+| `min_tool_success_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason). | 0.9 |
+| `max_tool_success_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tool-calling success rate, as a fraction in [0, 1]. | 1 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/pyproject.toml b/pyproject.toml
index 63126319..042b3b37 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "0.11.4"
+version = "0.11.5"
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 578264d2..a9687477 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "0.11.4"
+__version__: str = "0.11.5"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 0.11.4 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 0.11.5 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/models_.py b/src/openrouter/models_.py
index 02dd1c20..03798275 100644
--- a/src/openrouter/models_.py
+++ b/src/openrouter/models_.py
@@ -285,6 +285,18 @@ def list(
distillable: Optional[operations.Distillable] = None,
zdr: Optional[operations.Zdr] = None,
region: Optional[operations.Region] = None,
+ min_output_price: OptionalNullable[float] = UNSET,
+ max_output_price: OptionalNullable[float] = UNSET,
+ min_age_days: OptionalNullable[int] = UNSET,
+ max_age_days: OptionalNullable[int] = UNSET,
+ min_intelligence_index: OptionalNullable[float] = UNSET,
+ max_intelligence_index: OptionalNullable[float] = UNSET,
+ min_coding_index: OptionalNullable[float] = UNSET,
+ max_coding_index: OptionalNullable[float] = UNSET,
+ min_agentic_index: OptionalNullable[float] = UNSET,
+ max_agentic_index: OptionalNullable[float] = UNSET,
+ min_tool_success_rate: OptionalNullable[float] = UNSET,
+ max_tool_success_rate: OptionalNullable[float] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -302,7 +314,7 @@ def list(
:param category: Filter models by use case category
:param supported_parameters: Filter models by supported parameter (comma-separated)
:param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
- :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
+ :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
:param q: Free-text search by model name or slug.
:param input_modalities: Filter models by input modality. Comma-separated list of: text, image, audio, file.
:param context: Minimum context length (tokens). Models with smaller context are excluded.
@@ -314,6 +326,18 @@ def list(
:param distillable: Filter by distillation capability. \"true\" returns only distillable models, \"false\" excludes them.
:param zdr: When set to \"true\", return only models with zero data retention endpoints.
:param region: Filter to models with endpoints in the given data region. Currently only \"eu\" is supported.
+ :param min_output_price: Minimum completion (output) price in $/M tokens.
+ :param max_output_price: Maximum completion (output) price in $/M tokens.
+ :param min_age_days: Minimum model age in days since its creation date.
+ :param max_age_days: Maximum model age in days since its creation date.
+ :param min_intelligence_index: Minimum Artificial Analysis intelligence index.
+ :param max_intelligence_index: Maximum Artificial Analysis intelligence index.
+ :param min_coding_index: Minimum Artificial Analysis coding index.
+ :param max_coding_index: Maximum Artificial Analysis coding index.
+ :param min_agentic_index: Minimum Artificial Analysis agentic index.
+ :param max_agentic_index: Maximum Artificial Analysis agentic index.
+ :param min_tool_success_rate: Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).
+ :param max_tool_success_rate: Maximum tool-calling success rate, as a fraction in [0, 1].
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -348,6 +372,18 @@ def list(
distillable=distillable,
zdr=zdr,
region=region,
+ min_output_price=min_output_price,
+ max_output_price=max_output_price,
+ min_age_days=min_age_days,
+ max_age_days=max_age_days,
+ min_intelligence_index=min_intelligence_index,
+ max_intelligence_index=max_intelligence_index,
+ min_coding_index=min_coding_index,
+ max_coding_index=max_coding_index,
+ min_agentic_index=min_agentic_index,
+ max_agentic_index=max_agentic_index,
+ min_tool_success_rate=min_tool_success_rate,
+ max_tool_success_rate=max_tool_success_rate,
)
req = self._build_request(
@@ -448,6 +484,18 @@ async def list_async(
distillable: Optional[operations.Distillable] = None,
zdr: Optional[operations.Zdr] = None,
region: Optional[operations.Region] = None,
+ min_output_price: OptionalNullable[float] = UNSET,
+ max_output_price: OptionalNullable[float] = UNSET,
+ min_age_days: OptionalNullable[int] = UNSET,
+ max_age_days: OptionalNullable[int] = UNSET,
+ min_intelligence_index: OptionalNullable[float] = UNSET,
+ max_intelligence_index: OptionalNullable[float] = UNSET,
+ min_coding_index: OptionalNullable[float] = UNSET,
+ max_coding_index: OptionalNullable[float] = UNSET,
+ min_agentic_index: OptionalNullable[float] = UNSET,
+ max_agentic_index: OptionalNullable[float] = UNSET,
+ min_tool_success_rate: OptionalNullable[float] = UNSET,
+ max_tool_success_rate: OptionalNullable[float] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -465,7 +513,7 @@ async def list_async(
:param category: Filter models by use case category
:param supported_parameters: Filter models by supported parameter (comma-separated)
:param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
- :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
+ :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
:param q: Free-text search by model name or slug.
:param input_modalities: Filter models by input modality. Comma-separated list of: text, image, audio, file.
:param context: Minimum context length (tokens). Models with smaller context are excluded.
@@ -477,6 +525,18 @@ async def list_async(
:param distillable: Filter by distillation capability. \"true\" returns only distillable models, \"false\" excludes them.
:param zdr: When set to \"true\", return only models with zero data retention endpoints.
:param region: Filter to models with endpoints in the given data region. Currently only \"eu\" is supported.
+ :param min_output_price: Minimum completion (output) price in $/M tokens.
+ :param max_output_price: Maximum completion (output) price in $/M tokens.
+ :param min_age_days: Minimum model age in days since its creation date.
+ :param max_age_days: Maximum model age in days since its creation date.
+ :param min_intelligence_index: Minimum Artificial Analysis intelligence index.
+ :param max_intelligence_index: Maximum Artificial Analysis intelligence index.
+ :param min_coding_index: Minimum Artificial Analysis coding index.
+ :param max_coding_index: Maximum Artificial Analysis coding index.
+ :param min_agentic_index: Minimum Artificial Analysis agentic index.
+ :param max_agentic_index: Maximum Artificial Analysis agentic index.
+ :param min_tool_success_rate: Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).
+ :param max_tool_success_rate: Maximum tool-calling success rate, as a fraction in [0, 1].
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -511,6 +571,18 @@ async def list_async(
distillable=distillable,
zdr=zdr,
region=region,
+ min_output_price=min_output_price,
+ max_output_price=max_output_price,
+ min_age_days=min_age_days,
+ max_age_days=max_age_days,
+ min_intelligence_index=min_intelligence_index,
+ max_intelligence_index=max_intelligence_index,
+ min_coding_index=min_coding_index,
+ max_coding_index=max_coding_index,
+ min_agentic_index=min_agentic_index,
+ max_agentic_index=max_agentic_index,
+ min_tool_success_rate=min_tool_success_rate,
+ max_tool_success_rate=max_tool_success_rate,
)
req = self._build_request_async(
diff --git a/src/openrouter/operations/getmodels.py b/src/openrouter/operations/getmodels.py
index af887b94..dc16709a 100644
--- a/src/openrouter/operations/getmodels.py
+++ b/src/openrouter/operations/getmodels.py
@@ -111,11 +111,13 @@ def serialize_model(self, handler):
"throughput-high-to-low",
"latency-low-to-high",
"intelligence-high-to-low",
+ "coding-high-to-low",
+ "agentic-high-to-low",
"design-arena-elo-high-to-low",
],
UnrecognizedStr,
]
-r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved."""
+r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved."""
Distillable = Union[
@@ -157,7 +159,7 @@ class GetModelsRequestTypedDict(TypedDict):
output_modalities: NotRequired[str]
r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."""
sort: NotRequired[GetModelsSort]
- r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved."""
+ r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved."""
q: NotRequired[str]
r"""Free-text search by model name or slug."""
input_modalities: NotRequired[str]
@@ -180,6 +182,30 @@ class GetModelsRequestTypedDict(TypedDict):
r"""When set to \"true\", return only models with zero data retention endpoints."""
region: NotRequired[Region]
r"""Filter to models with endpoints in the given data region. Currently only \"eu\" is supported."""
+ min_output_price: NotRequired[Nullable[float]]
+ r"""Minimum completion (output) price in $/M tokens."""
+ max_output_price: NotRequired[Nullable[float]]
+ r"""Maximum completion (output) price in $/M tokens."""
+ min_age_days: NotRequired[Nullable[int]]
+ r"""Minimum model age in days since its creation date."""
+ max_age_days: NotRequired[Nullable[int]]
+ r"""Maximum model age in days since its creation date."""
+ min_intelligence_index: NotRequired[Nullable[float]]
+ r"""Minimum Artificial Analysis intelligence index."""
+ max_intelligence_index: NotRequired[Nullable[float]]
+ r"""Maximum Artificial Analysis intelligence index."""
+ min_coding_index: NotRequired[Nullable[float]]
+ r"""Minimum Artificial Analysis coding index."""
+ max_coding_index: NotRequired[Nullable[float]]
+ r"""Maximum Artificial Analysis coding index."""
+ min_agentic_index: NotRequired[Nullable[float]]
+ r"""Minimum Artificial Analysis agentic index."""
+ max_agentic_index: NotRequired[Nullable[float]]
+ r"""Maximum Artificial Analysis agentic index."""
+ min_tool_success_rate: NotRequired[Nullable[float]]
+ r"""Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason)."""
+ max_tool_success_rate: NotRequired[Nullable[float]]
+ r"""Maximum tool-calling success rate, as a fraction in [0, 1]."""
class GetModelsRequest(BaseModel):
@@ -233,7 +259,7 @@ class GetModelsRequest(BaseModel):
Optional[GetModelsSort],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
- r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved."""
+ r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved."""
q: Annotated[
Optional[str],
@@ -301,6 +327,78 @@ class GetModelsRequest(BaseModel):
] = None
r"""Filter to models with endpoints in the given data region. Currently only \"eu\" is supported."""
+ min_output_price: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Minimum completion (output) price in $/M tokens."""
+
+ max_output_price: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Maximum completion (output) price in $/M tokens."""
+
+ min_age_days: Annotated[
+ OptionalNullable[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Minimum model age in days since its creation date."""
+
+ max_age_days: Annotated[
+ OptionalNullable[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Maximum model age in days since its creation date."""
+
+ min_intelligence_index: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Minimum Artificial Analysis intelligence index."""
+
+ max_intelligence_index: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Maximum Artificial Analysis intelligence index."""
+
+ min_coding_index: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Minimum Artificial Analysis coding index."""
+
+ max_coding_index: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Maximum Artificial Analysis coding index."""
+
+ min_agentic_index: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Minimum Artificial Analysis agentic index."""
+
+ max_agentic_index: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Maximum Artificial Analysis agentic index."""
+
+ min_tool_success_rate: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason)."""
+
+ max_tool_success_rate: Annotated[
+ OptionalNullable[float],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = UNSET
+ r"""Maximum tool-calling success rate, as a fraction in [0, 1]."""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(
@@ -323,9 +421,38 @@ def serialize_model(self, handler):
"distillable",
"zdr",
"region",
+ "min_output_price",
+ "max_output_price",
+ "min_age_days",
+ "max_age_days",
+ "min_intelligence_index",
+ "max_intelligence_index",
+ "min_coding_index",
+ "max_coding_index",
+ "min_agentic_index",
+ "max_agentic_index",
+ "min_tool_success_rate",
+ "max_tool_success_rate",
+ ]
+ )
+ nullable_fields = set(
+ [
+ "min_price",
+ "max_price",
+ "min_output_price",
+ "max_output_price",
+ "min_age_days",
+ "max_age_days",
+ "min_intelligence_index",
+ "max_intelligence_index",
+ "min_coding_index",
+ "max_coding_index",
+ "min_agentic_index",
+ "max_agentic_index",
+ "min_tool_success_rate",
+ "max_tool_success_rate",
]
)
- nullable_fields = set(["min_price", "max_price"])
serialized = handler(self)
m = {}
diff --git a/uv.lock b/uv.lock
index cae74d09..7bb25abb 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "0.11.4"
+version = "0.11.5"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },