@openrouter/ai-sdk-provider 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -21,6 +21,12 @@ type IdModeration = 'moderation';
21
21
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
22
22
  */
23
23
  type IdResponseHealing = 'response-healing';
24
+ /**
25
+ * Plugin identifier for auto-router model selection.
26
+ * Configures allowed models when using the openrouter/auto model.
27
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
28
+ */
29
+ type IdAutoRouter = 'auto-router';
24
30
  /**
25
31
  * Search engine options for web search.
26
32
  * Open enum - accepts known values or any string for forward compatibility.
@@ -112,6 +118,17 @@ type OpenRouterChatSettings = {
112
118
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
113
119
  */
114
120
  id: IdResponseHealing;
121
+ } | {
122
+ /**
123
+ * Auto-router plugin - configures allowed models when using `openrouter/auto`.
124
+ *
125
+ * Use wildcard patterns to restrict which models the auto router can select from.
126
+ * When no `allowed_models` are specified, the auto router uses all supported models.
127
+ *
128
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
129
+ */
130
+ id: IdAutoRouter;
131
+ allowed_models?: string[];
115
132
  }>;
116
133
  /**
117
134
  * Built-in web search options for models that support native web search
package/dist/index.d.ts CHANGED
@@ -21,6 +21,12 @@ type IdModeration = 'moderation';
21
21
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
22
22
  */
23
23
  type IdResponseHealing = 'response-healing';
24
+ /**
25
+ * Plugin identifier for auto-router model selection.
26
+ * Configures allowed models when using the openrouter/auto model.
27
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
28
+ */
29
+ type IdAutoRouter = 'auto-router';
24
30
  /**
25
31
  * Search engine options for web search.
26
32
  * Open enum - accepts known values or any string for forward compatibility.
@@ -112,6 +118,17 @@ type OpenRouterChatSettings = {
112
118
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
113
119
  */
114
120
  id: IdResponseHealing;
121
+ } | {
122
+ /**
123
+ * Auto-router plugin - configures allowed models when using `openrouter/auto`.
124
+ *
125
+ * Use wildcard patterns to restrict which models the auto router can select from.
126
+ * When no `allowed_models` are specified, the auto router uses all supported models.
127
+ *
128
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
129
+ */
130
+ id: IdAutoRouter;
131
+ allowed_models?: string[];
115
132
  }>;
116
133
  /**
117
134
  * Built-in web search options for models that support native web search
package/dist/index.js CHANGED
@@ -4526,7 +4526,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
4526
4526
  }
4527
4527
 
4528
4528
  // src/version.ts
4529
- var VERSION2 = false ? "0.0.0-test" : "2.2.0";
4529
+ var VERSION2 = false ? "0.0.0-test" : "2.2.1";
4530
4530
 
4531
4531
  // src/provider.ts
4532
4532
  function createOpenRouter(options = {}) {
package/dist/index.mjs CHANGED
@@ -4493,7 +4493,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
4493
4493
  }
4494
4494
 
4495
4495
  // src/version.ts
4496
- var VERSION2 = false ? "0.0.0-test" : "2.2.0";
4496
+ var VERSION2 = false ? "0.0.0-test" : "2.2.1";
4497
4497
 
4498
4498
  // src/provider.ts
4499
4499
  function createOpenRouter(options = {}) {
@@ -56,6 +56,12 @@ type IdModeration = 'moderation';
56
56
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
57
57
  */
58
58
  type IdResponseHealing = 'response-healing';
59
+ /**
60
+ * Plugin identifier for auto-router model selection.
61
+ * Configures allowed models when using the openrouter/auto model.
62
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
63
+ */
64
+ type IdAutoRouter = 'auto-router';
59
65
  /**
60
66
  * Search engine options for web search.
61
67
  * Open enum - accepts known values or any string for forward compatibility.
@@ -147,6 +153,17 @@ type OpenRouterChatSettings = {
147
153
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
148
154
  */
149
155
  id: IdResponseHealing;
156
+ } | {
157
+ /**
158
+ * Auto-router plugin - configures allowed models when using `openrouter/auto`.
159
+ *
160
+ * Use wildcard patterns to restrict which models the auto router can select from.
161
+ * When no `allowed_models` are specified, the auto router uses all supported models.
162
+ *
163
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
164
+ */
165
+ id: IdAutoRouter;
166
+ allowed_models?: string[];
150
167
  }>;
151
168
  /**
152
169
  * Built-in web search options for models that support native web search
@@ -56,6 +56,12 @@ type IdModeration = 'moderation';
56
56
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
57
57
  */
58
58
  type IdResponseHealing = 'response-healing';
59
+ /**
60
+ * Plugin identifier for auto-router model selection.
61
+ * Configures allowed models when using the openrouter/auto model.
62
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
63
+ */
64
+ type IdAutoRouter = 'auto-router';
59
65
  /**
60
66
  * Search engine options for web search.
61
67
  * Open enum - accepts known values or any string for forward compatibility.
@@ -147,6 +153,17 @@ type OpenRouterChatSettings = {
147
153
  * @see https://openrouter.ai/docs/guides/features/plugins/response-healing
148
154
  */
149
155
  id: IdResponseHealing;
156
+ } | {
157
+ /**
158
+ * Auto-router plugin - configures allowed models when using `openrouter/auto`.
159
+ *
160
+ * Use wildcard patterns to restrict which models the auto router can select from.
161
+ * When no `allowed_models` are specified, the auto router uses all supported models.
162
+ *
163
+ * @see https://openrouter.ai/docs/guides/routing/routers/auto-router
164
+ */
165
+ id: IdAutoRouter;
166
+ allowed_models?: string[];
150
167
  }>;
151
168
  /**
152
169
  * Built-in web search options for models that support native web search
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/ai-sdk-provider",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",