@opencode/schema 2.4.0 → 2.4.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.
@@ -104,6 +104,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
104
104
  readonly home_memory: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
105
105
  readonly machines: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
106
106
  readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
107
+ readonly model_speeds: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
107
108
  readonly opencode_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
108
109
  readonly project_overlay: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
109
110
  readonly recommended_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
@@ -11,6 +11,7 @@ export declare const registry: {
11
11
  readonly artifacts: "Enable experimental artifacts backed by pluggable providers.";
12
12
  readonly console_watches: "Watch Slack threads, GitHub pull requests, issues, commits and Actions runs, and the workspace's MCP servers' events through OpenCode Console, and wake sessions when they change.";
13
13
  readonly recommended_api: "Use each model's recommended API from models.dev instead of the first API it lists.";
14
+ readonly model_speeds: "Offer a model's faster and slower service tiers (fast, flex…) as speeds of that model: one entry in the model picker with a speed selector, instead of a separate entry per tier such as gpt-5.5-fast.";
14
15
  readonly full_codemode: "Enable the full Code Mode work in progress.";
15
16
  readonly machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.";
16
17
  readonly home_memory: "Give sessions in the home folder a persistent memory/, docs/ and scripts/ workspace the agent can use freely, tidied by a daily maintenance session that reads the day's home-folder conversations.";
@@ -11,6 +11,7 @@ export const registry = {
11
11
  artifacts: "Enable experimental artifacts backed by pluggable providers.",
12
12
  console_watches: "Watch Slack threads, GitHub pull requests, issues, commits and Actions runs, and the workspace's MCP servers' events through OpenCode Console, and wake sessions when they change.",
13
13
  recommended_api: "Use each model's recommended API from models.dev instead of the first API it lists.",
14
+ model_speeds: "Offer a model's faster and slower service tiers (fast, flex…) as speeds of that model: one entry in the model picker with a speed selector, instead of a separate entry per tier such as gpt-5.5-fast.",
14
15
  full_codemode: "Enable the full Code Mode work in progress.",
15
16
  machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.",
16
17
  home_memory: "Give sessions in the home folder a persistent memory/, docs/ and scripts/ workspace the agent can use freely, tidied by a daily maintenance session that reads the day's home-folder conversations.",
package/dist/model.d.ts CHANGED
@@ -275,6 +275,20 @@ export declare const Variant: Schema.Struct<{
275
275
  readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
276
276
  }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
277
277
  }>;
278
+ /**
279
+ * Set on a model that is another model served faster or slower, such as "gpt-5.5-fast" for "gpt-5.5". Clients offer
280
+ * it as a speed of that model instead of listing it.
281
+ */
282
+ export interface Speed extends Schema.Schema.Type<typeof Speed> {
283
+ }
284
+ export declare const Speed: Schema.Struct<{
285
+ /** The same provider's model at its standard speed. */
286
+ readonly base: Schema.brand<Schema.String, "Model.ID">;
287
+ /** The speed's name, such as "fast" or "flex". */
288
+ readonly id: Schema.String;
289
+ /** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
290
+ readonly faster: Schema.Boolean;
291
+ }>;
278
292
  export interface Info extends Schema.Schema.Type<typeof Info> {
279
293
  }
280
294
  export declare const Info: Schema.Struct<{
@@ -456,6 +470,40 @@ export declare const Info: Schema.Struct<{
456
470
  readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
457
471
  }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
458
472
  }>>;
473
+ /** Experimental: may change without compatibility guarantees. */
474
+ readonly experimental: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
475
+ readonly speed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
476
+ /** The same provider's model at its standard speed. */
477
+ readonly base: Schema.brand<Schema.String, "Model.ID">;
478
+ /** The speed's name, such as "fast" or "flex". */
479
+ readonly id: Schema.String;
480
+ /** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
481
+ readonly faster: Schema.Boolean;
482
+ }>>>, Schema.optionalKey<Schema.Struct<{
483
+ /** The same provider's model at its standard speed. */
484
+ readonly base: Schema.brand<Schema.String, "Model.ID">;
485
+ /** The speed's name, such as "fast" or "flex". */
486
+ readonly id: Schema.String;
487
+ /** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
488
+ readonly faster: Schema.Boolean;
489
+ }>>, never, never>;
490
+ }>>>, Schema.optionalKey<Schema.Struct<{
491
+ readonly speed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
492
+ /** The same provider's model at its standard speed. */
493
+ readonly base: Schema.brand<Schema.String, "Model.ID">;
494
+ /** The speed's name, such as "fast" or "flex". */
495
+ readonly id: Schema.String;
496
+ /** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
497
+ readonly faster: Schema.Boolean;
498
+ }>>>, Schema.optionalKey<Schema.Struct<{
499
+ /** The same provider's model at its standard speed. */
500
+ readonly base: Schema.brand<Schema.String, "Model.ID">;
501
+ /** The speed's name, such as "fast" or "flex". */
502
+ readonly id: Schema.String;
503
+ /** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
504
+ readonly faster: Schema.Boolean;
505
+ }>>, never, never>;
506
+ }>>, never, never>;
459
507
  readonly time: Schema.Struct<{
460
508
  readonly released: Schema.Finite;
461
509
  }>;
package/dist/model.js CHANGED
@@ -80,6 +80,14 @@ export const Variant = Schema.Struct({
80
80
  ...Overlays,
81
81
  settings: VariantSettings.pipe(optional),
82
82
  }).annotate({ identifier: "Model.Variant" });
83
+ export const Speed = Schema.Struct({
84
+ /** The same provider's model at its standard speed. */
85
+ base: ID,
86
+ /** The speed's name, such as "fast" or "flex". */
87
+ id: Schema.String,
88
+ /** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
89
+ faster: Schema.Boolean,
90
+ }).annotate({ identifier: "Model.Speed" });
83
91
  export const Info = Schema.Struct({
84
92
  id: ID,
85
93
  modelID: ID,
@@ -93,6 +101,8 @@ export const Info = Schema.Struct({
93
101
  ...Overlays,
94
102
  capabilities: Capabilities,
95
103
  variants: Schema.Array(Variant),
104
+ /** Experimental: may change without compatibility guarantees. */
105
+ experimental: Schema.Struct({ speed: Speed.pipe(optional) }).pipe(optional),
96
106
  time: Schema.Struct({
97
107
  released: Schema.Finite,
98
108
  }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "2.4.0",
4
+ "version": "2.4.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {