@opencode-ai/models 0.0.1 → 0.0.2

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.
@@ -0,0 +1,248 @@
1
+ export type { ModelFamily } from "./generated.js";
2
+ import type { ModelFamily } from "./generated.js";
3
+ /** Any JSON-serializable value. */
4
+ export type JsonValue = string | number | boolean | null | {
5
+ [key: string]: JsonValue;
6
+ } | JsonValue[];
7
+ /**
8
+ * Reasoning effort levels accepted by a model's `effort` reasoning option.
9
+ * `null` means the provider accepts disabling reasoning explicitly.
10
+ */
11
+ export type ReasoningEffort = null | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
12
+ /** Reasoning enabled/disabled via a simple boolean toggle. */
13
+ export interface ReasoningOptionToggle {
14
+ type: "toggle";
15
+ }
16
+ /** Reasoning controlled by a named effort level. */
17
+ export interface ReasoningOptionEffort {
18
+ type: "effort";
19
+ /** Effort values the provider accepts for this model. */
20
+ values: ReasoningEffort[];
21
+ }
22
+ /** Reasoning controlled by a token budget. */
23
+ export interface ReasoningOptionBudgetTokens {
24
+ type: "budget_tokens";
25
+ /** Minimum reasoning budget in tokens. `-1` means dynamic/unbounded. */
26
+ min?: number;
27
+ /** Maximum reasoning budget in tokens. */
28
+ max?: number;
29
+ }
30
+ /** How reasoning can be configured for a model. */
31
+ export type ReasoningOption = ReasoningOptionToggle | ReasoningOptionEffort | ReasoningOptionBudgetTokens;
32
+ /** Pricing in USD per million tokens. */
33
+ export interface Cost {
34
+ /** Input (prompt) price, USD per 1M tokens. */
35
+ input: number;
36
+ /** Output (completion) price, USD per 1M tokens. */
37
+ output: number;
38
+ /** Reasoning token price, USD per 1M tokens. */
39
+ reasoning?: number;
40
+ /** Cache read price, USD per 1M tokens. */
41
+ cache_read?: number;
42
+ /** Cache write price, USD per 1M tokens. */
43
+ cache_write?: number;
44
+ /** Audio input price, USD per 1M tokens. */
45
+ input_audio?: number;
46
+ /** Audio output price, USD per 1M tokens. */
47
+ output_audio?: number;
48
+ }
49
+ /** Pricing that applies from a given context size upward. */
50
+ export interface CostTier extends Cost {
51
+ tier: {
52
+ type: "context";
53
+ /** Context size (in tokens) at which this tier starts to apply. */
54
+ size: number;
55
+ };
56
+ }
57
+ /** Pricing for a provider's model, including context-size tiers. */
58
+ export interface ModelCost extends Cost {
59
+ /** Legacy compatibility field: pricing applied beyond 200K context. Prefer `tiers`. */
60
+ context_over_200k?: Cost;
61
+ /** Context-size-based pricing tiers. */
62
+ tiers?: CostTier[];
63
+ }
64
+ /** Input/output data types a model supports. */
65
+ export type Modality = "text" | "audio" | "image" | "video" | "pdf";
66
+ export interface Modalities {
67
+ input: Modality[];
68
+ output: Modality[];
69
+ }
70
+ /** Token limits for a provider's model. */
71
+ export interface Limit {
72
+ /** Context window size in tokens. */
73
+ context: number;
74
+ /** Maximum input tokens. */
75
+ input?: number;
76
+ /** Maximum output tokens. */
77
+ output: number;
78
+ }
79
+ /** Token limits in provider-agnostic model metadata. */
80
+ export interface MetadataLimit {
81
+ /** Context window size in tokens. */
82
+ context: number;
83
+ /** Maximum input tokens. */
84
+ input?: number;
85
+ /** Maximum output tokens. */
86
+ output?: number;
87
+ }
88
+ /** A link related to a model (announcement, paper, weights, ...). */
89
+ export interface ModelLink {
90
+ label?: string;
91
+ url: string;
92
+ type?: "announcement" | "blog" | "docs" | "license" | "model_card" | "paper" | "weights" | "other";
93
+ }
94
+ /** Downloadable weights for an open-weights model. */
95
+ export interface ModelWeights {
96
+ label?: string;
97
+ url: string;
98
+ /** Weights format, e.g. "safetensors" or "gguf". */
99
+ format?: string;
100
+ quantization?: string;
101
+ }
102
+ /** A reported benchmark result. */
103
+ export interface BenchmarkResult {
104
+ name: string;
105
+ score: number | string;
106
+ metric?: string;
107
+ harness?: string;
108
+ variant?: string;
109
+ dataset?: string;
110
+ version?: string;
111
+ source?: string;
112
+ /** YYYY-MM or YYYY-MM-DD. */
113
+ date?: string;
114
+ }
115
+ /**
116
+ * Provider-agnostic model metadata as published by the lab.
117
+ * Served by `GET https://models.dev/models.json`, keyed by `<lab>/<model>` ID.
118
+ * Carries no provider-specific pricing or limits; see {@link Model} for those.
119
+ */
120
+ export interface ModelMetadata {
121
+ /** Canonical model ID, e.g. "anthropic/claude-opus-4-6". */
122
+ id: string;
123
+ name: string;
124
+ description: string;
125
+ family?: ModelFamily;
126
+ /** Supports file attachments. */
127
+ attachment?: boolean;
128
+ /** Is a reasoning model. */
129
+ reasoning?: boolean;
130
+ /** Supports tool/function calling. */
131
+ tool_call?: boolean;
132
+ /** Supports structured output (JSON schema). */
133
+ structured_output?: boolean;
134
+ /** Supports the temperature parameter. */
135
+ temperature?: boolean;
136
+ /** Knowledge cutoff, YYYY-MM or YYYY-MM-DD. */
137
+ knowledge?: string;
138
+ /** YYYY-MM or YYYY-MM-DD. */
139
+ release_date?: string;
140
+ /** YYYY-MM or YYYY-MM-DD. */
141
+ last_updated?: string;
142
+ modalities?: Modalities;
143
+ open_weights?: boolean;
144
+ limit?: MetadataLimit;
145
+ /** License identifier for open-weights models. */
146
+ license?: string;
147
+ links?: ModelLink[];
148
+ weights?: ModelWeights[];
149
+ benchmarks?: BenchmarkResult[];
150
+ }
151
+ /** Per-mode overrides for experimental model modes. */
152
+ export interface ExperimentalMode {
153
+ cost?: Cost;
154
+ provider?: {
155
+ /** Extra request body fields enabling this mode. */
156
+ body?: Record<string, JsonValue>;
157
+ /** Extra request headers enabling this mode. */
158
+ headers?: Record<string, string>;
159
+ };
160
+ }
161
+ export interface ModelExperimental {
162
+ modes?: Record<string, ExperimentalMode>;
163
+ }
164
+ /** Provider-specific wiring for SDK routing. */
165
+ export interface ModelProviderConfig {
166
+ /** Override of the provider-level npm package for this model. */
167
+ npm?: string;
168
+ /** Override of the API endpoint for this model. */
169
+ api?: string;
170
+ /** API shape when the npm package supports multiple. */
171
+ shape?: "responses" | "completions";
172
+ /** Extra request body fields required by this model. */
173
+ body?: Record<string, JsonValue>;
174
+ /** Extra request headers required by this model. */
175
+ headers?: Record<string, string>;
176
+ }
177
+ /**
178
+ * A model as offered by a specific provider, including that provider's
179
+ * pricing and limits. Part of `GET https://models.dev/api.json`.
180
+ */
181
+ export interface Model {
182
+ /** Provider-scoped model ID, e.g. "claude-opus-4-6". */
183
+ id: string;
184
+ name: string;
185
+ description: string;
186
+ family?: ModelFamily;
187
+ /** Supports file attachments. */
188
+ attachment: boolean;
189
+ /** Is a reasoning model. */
190
+ reasoning: boolean;
191
+ /** Present exactly when `reasoning` is true. */
192
+ reasoning_options?: ReasoningOption[];
193
+ /** Supports tool/function calling. */
194
+ tool_call: boolean;
195
+ /** Supports interleaved thinking between tool calls. */
196
+ interleaved?: true | {
197
+ field: "reasoning_content" | "reasoning_details";
198
+ };
199
+ /** Supports structured output (JSON schema). */
200
+ structured_output?: boolean;
201
+ /** Supports the temperature parameter. */
202
+ temperature?: boolean;
203
+ /** Knowledge cutoff, YYYY-MM or YYYY-MM-DD. */
204
+ knowledge?: string;
205
+ /** YYYY-MM or YYYY-MM-DD. */
206
+ release_date: string;
207
+ /** YYYY-MM or YYYY-MM-DD. */
208
+ last_updated: string;
209
+ modalities: Modalities;
210
+ open_weights: boolean;
211
+ limit: Limit;
212
+ /** Lifecycle status; absent means generally available. */
213
+ status?: "alpha" | "beta" | "deprecated";
214
+ experimental?: ModelExperimental;
215
+ provider?: ModelProviderConfig;
216
+ /** Absent for models with no published pricing (e.g. subscription-only). */
217
+ cost?: ModelCost;
218
+ }
219
+ /**
220
+ * An inference provider and the models it offers.
221
+ * Served by `GET https://models.dev/api.json`, keyed by provider ID.
222
+ */
223
+ export interface Provider {
224
+ /** Provider ID, e.g. "anthropic". */
225
+ id: string;
226
+ /** Environment variables used for authentication, e.g. ["ANTHROPIC_API_KEY"]. */
227
+ env: string[];
228
+ /** AI SDK npm package implementing this provider. */
229
+ npm: string;
230
+ /** Base API URL for openai-compatible providers. */
231
+ api?: string;
232
+ /** Human-readable provider name. */
233
+ name: string;
234
+ /** URL of the provider's model documentation. */
235
+ doc: string;
236
+ /** Models offered by this provider, keyed by provider-scoped model ID. */
237
+ models: Record<string, Model>;
238
+ }
239
+ /** Response of `GET https://models.dev/api.json`: all providers keyed by provider ID. */
240
+ export type ProviderMap = Record<string, Provider>;
241
+ /** Response of `GET https://models.dev/models.json`: provider-agnostic metadata keyed by canonical model ID. */
242
+ export type ModelMetadataMap = Record<string, ModelMetadata>;
243
+ /** Response of `GET https://models.dev/catalog.json`: providers and model metadata in one payload. */
244
+ export interface Catalog {
245
+ providers: ProviderMap;
246
+ models: ModelMetadataMap;
247
+ }
248
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,mCAAmC;AACnC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,EAAE,CAAA;AAErG;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;AAEjH,8DAA8D;AAC9D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAA;IACd,yDAAyD;IACzD,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1B;AAED,8CAA8C;AAC9C,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,eAAe,CAAA;IACrB,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAA;IAC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AAM,WAAW,QAAQ;IACvB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,iFAAiF;IACjF,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAA;IACX,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAA;IACX,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAC9B;AAED,yFAAyF;AACzF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAElD,gHAAgH;AAChH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;AAE5D,sGAAsG;AACtG,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,WAAW,CAAA;IACtB,MAAM,EAAE,gBAAgB,CAAA;CACzB"}
package/dist/types.js ADDED
@@ -0,0 +1,6 @@
1
+ // Hand-written mirrors of the Zod schemas in @models.dev/core (src/schema.ts).
2
+ // Kept intentionally free of zod so the published .d.ts has zero dependencies.
3
+ // Drift against the schemas is caught by test/types.ts, which asserts
4
+ // exact mutual assignability with the z.infer types from @models.dev/core.
5
+ export {};
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,+EAA+E;AAC/E,sEAAsE;AACtE,2EAA2E"}
package/package.json CHANGED
@@ -1,31 +1,68 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/models",
4
- "version": "0.0.1",
5
- "description": "Placeholder package for opencode model metadata",
4
+ "version": "0.0.2",
5
+ "description": "Official typed client for the models.dev API — an open database of AI model capabilities, pricing, and limits",
6
6
  "type": "module",
7
+ "sideEffects": false,
7
8
  "license": "MIT",
9
+ "homepage": "https://models.dev",
8
10
  "repository": {
9
11
  "type": "git",
10
- "url": "git+https://github.com/anomalyco/opencode.git",
11
- "directory": "packages/models"
12
+ "url": "git+https://github.com/anomalyco/models.dev.git",
13
+ "directory": "packages/sdk"
12
14
  },
13
- "publishConfig": {
14
- "access": "public"
15
+ "keywords": [
16
+ "ai",
17
+ "llm",
18
+ "models",
19
+ "pricing",
20
+ "context-window",
21
+ "openai",
22
+ "anthropic",
23
+ "effect"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
15
27
  },
16
28
  "exports": {
17
- ".": "./src/index.ts"
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist/index.js"
32
+ },
33
+ "./effect": {
34
+ "types": "./dist/effect.d.ts",
35
+ "default": "./dist/effect.js"
36
+ },
37
+ "./snapshot": {
38
+ "types": "./dist/snapshot.d.ts",
39
+ "default": "./dist/snapshot.js"
40
+ }
18
41
  },
19
42
  "files": [
20
- "src"
43
+ "dist"
21
44
  ],
22
45
  "scripts": {
23
- "typecheck": "tsgo --noEmit"
46
+ "generate": "bun script/generate.ts",
47
+ "build": "bun script/build.ts",
48
+ "prepack": "bun run build",
49
+ "typecheck": "tsc --noEmit",
50
+ "test": "bun run generate && bun run typecheck && bun test"
51
+ },
52
+ "peerDependencies": {
53
+ "effect": "4.0.0-beta.83"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "effect": {
57
+ "optional": true
58
+ }
24
59
  },
25
60
  "devDependencies": {
61
+ "@models.dev/core": "workspace:*",
26
62
  "@tsconfig/bun": "catalog:",
27
63
  "@types/bun": "catalog:",
28
- "@typescript/native-preview": "catalog:",
29
- "typescript": "catalog:"
64
+ "effect": "4.0.0-beta.83",
65
+ "typescript": "catalog:",
66
+ "zod": "catalog:"
30
67
  }
31
68
  }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export const placeholder = true