{"_id":"@arno-mirendil/models","_rev":"2-4138099cdc1154da868e41cdcf2bae51","name":"@arno-mirendil/models","dist-tags":{"latest":"0.0.1"},"versions":{"0.1.0":{"name":"@arno-mirendil/models","version":"0.1.0","keywords":["ai","llm","models","pricing","context-window","openai","anthropic","effect"],"license":"MIT","_id":"@arno-mirendil/models@0.1.0","maintainers":[{"name":"arno-mirendil","email":"arno@mirendil.com"}],"homepage":"https://models.dev","bugs":{"url":"https://github.com/tetranoir/models.dev/issues"},"dist":{"shasum":"c8e13452f0a34e799dbcef13b383ea91a1cf985f","tarball":"https://registry.npmjs.org/@arno-mirendil/models/-/models-0.1.0.tgz","fileCount":33,"integrity":"sha512-kBjMUDQyEACN90U00X778l9I4ZarGF7wbKV5qrBmtORBCF9wZAeVaaVTCjd5Epwb8wKS37buWDdtNBjFKYKdhg==","signatures":[{"sig":"MEUCICHNbo0AoGdXGy4dEJh3i7RFLvVoXjE4rDzz6U8tadJBAiEAkPDxT8OO4rMpZ7zbEtcZmSLFnuGjyve7rpAm7smYlrg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4547773},"type":"module","$schema":"https://json.schemastore.org/package.json","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./effect":{"types":"./dist/effect.d.ts","default":"./dist/effect.js"},"./snapshot":{"types":"./dist/snapshot.d.ts","default":"./dist/snapshot.js"}},"gitHead":"966a5a1fc6159b853797562c8583c67fd4cf497a","scripts":{"test":"bun run generate && bun run typecheck && bun test","build":"bun script/build.ts","prepack":"bun run build","generate":"bun script/generate.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"arno-mirendil","email":"arno@mirendil.com"},"repository":{"url":"git+https://github.com/tetranoir/models.dev.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.12.1","description":"Official typed client for the models.dev API — an open database of AI model capabilities, pricing, and limits","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"devDependencies":{"zod":"catalog:","effect":"4.0.0-beta.83","@types/bun":"catalog:","typescript":"catalog:","@tsconfig/bun":"catalog:","@models.dev/core":"workspace:*"},"peerDependencies":{"effect":"4.0.0-beta.83"},"peerDependenciesMeta":{"effect":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/models_0.1.0_1786417753672_0.6025927784444827","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"$schema":"https://json.schemastore.org/package.json","name":"@arno-mirendil/models","version":"0.0.1","description":"Official typed client for the models.dev API — an open database of AI model capabilities, pricing, and limits","type":"module","sideEffects":false,"license":"MIT","homepage":"https://models.dev","repository":{"type":"git","url":"git+https://github.com/tetranoir/models.dev.git","directory":"packages/sdk"},"keywords":["ai","llm","models","pricing","context-window","openai","anthropic","effect"],"engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./effect":{"types":"./dist/effect.d.ts","default":"./dist/effect.js"},"./snapshot":{"types":"./dist/snapshot.d.ts","default":"./dist/snapshot.js"}},"scripts":{"generate":"bun script/generate.ts","build":"bun script/build.ts","prepack":"bun run build","typecheck":"tsc --noEmit","test":"bun run generate && bun run typecheck && bun test"},"peerDependencies":{"effect":"4.0.0-beta.83"},"peerDependenciesMeta":{"effect":{"optional":true}},"devDependencies":{"@models.dev/core":"workspace:*","@tsconfig/bun":"catalog:","@types/bun":"catalog:","effect":"4.0.0-beta.83","typescript":"catalog:","zod":"catalog:"},"gitHead":"966a5a1fc6159b853797562c8583c67fd4cf497a","_id":"@arno-mirendil/models@0.0.1","bugs":{"url":"https://github.com/tetranoir/models.dev/issues"},"_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-myxnru8wHv1SbT1y9H07bEVvQZdD0qRnoEJEAhYu8aoaSLPqziypHa6zmrlr0nWKmwy1Q7CWlGJxoxvw+RtZaw==","shasum":"cd82ba5b1dc79681f51e02254a23b6f3de8d684c","tarball":"https://registry.npmjs.org/@arno-mirendil/models/-/models-0.0.1.tgz","fileCount":33,"unpackedSize":4547773,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHTBUt2L7q52qgeIiuC+qN8uV7FVZoJbwIWm+WkpUmsnAiBHhCBf4BY798SyUPLEXmQK5iHAJGUNwett8iU9xRMjNA=="}]},"_npmUser":{"name":"arno-mirendil","email":"arno@mirendil.com"},"directories":{},"maintainers":[{"name":"arno-mirendil","email":"arno@mirendil.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/models_0.0.1_1786417775127_0.5124785415116944"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-11T03:09:13.573Z","modified":"2026-08-11T03:09:35.490Z","0.1.0":"2026-08-11T03:09:13.868Z","0.0.1":"2026-08-11T03:09:35.320Z"},"bugs":{"url":"https://github.com/tetranoir/models.dev/issues"},"license":"MIT","homepage":"https://models.dev","keywords":["ai","llm","models","pricing","context-window","openai","anthropic","effect"],"repository":{"type":"git","url":"git+https://github.com/tetranoir/models.dev.git","directory":"packages/sdk"},"description":"Official typed client for the models.dev API — an open database of AI model capabilities, pricing, and limits","maintainers":[{"name":"arno-mirendil","email":"arno@mirendil.com"}],"readme":"# @arno-mirendil/models\n\nMirendil distribution of the [Models.dev](https://models.dev) catalog with explicit provider-to-canonical `base_model` mappings.\n\n```sh\nnpm install @arno-mirendil/models\n```\n\n## Usage\n\n```ts\nimport { Models } from \"@arno-mirendil/models\"\n\nconst client = Models.make()\n\nconst providers = await client.providers() // GET /api.json\nproviders[\"anthropic\"]?.models[\"claude-opus-4-6\"]?.cost?.input // USD per 1M tokens\n\nconst models = await client.models() // GET /models.json\nmodels[\"anthropic/claude-opus-4-6\"]?.knowledge // provider-agnostic metadata\n\nconst catalog = await client.catalog() // GET /catalog.json — both in one request\n```\n\nOptions:\n\n```ts\nconst client = Models.make({\n  baseUrl: \"https://models.dev\", // default\n  fetch: myFetch,                // proxies, polyfills, test doubles\n  headers: { \"x-extra\": \"1\" },   // sent with every request\n})\n\nawait client.providers({ signal: AbortSignal.timeout(5000) })\n```\n\nErrors are a single `ModelsDevError` with `reason: \"Transport\" | \"UnexpectedStatus\" | \"MalformedResponse\"` and the underlying `cause`.\n\n### Snapshot\n\nA full copy of the database ships inside the package as a separate, tree-shakable entrypoint:\n\n```ts\nimport snapshot, { providers, models, generatedAt } from \"@arno-mirendil/models/snapshot\"\n\nproviders[\"anthropic\"]?.models[\"claude-opus-4-6\"]?.limit.context\n```\n\nUse it for no-network runtimes, tests, cold-start-sensitive paths, or as an explicit fallback:\n\n```ts\nconst providers = await client.providers().catch(async () => (await import(\"@arno-mirendil/models/snapshot\")).providers)\n```\n\nThe published snapshot is at most ~24h behind the live API (data releases are automated).\n\n### Effect\n\nAn Effect-native client lives at `@arno-mirendil/models/effect` (requires the optional peer dependency `effect`):\n\n```ts\nimport { Models } from \"@arno-mirendil/models/effect\"\nimport { FetchHttpClient } from \"effect/unstable/http\"\nimport { Effect } from \"effect\"\n\nconst program = Effect.gen(function* () {\n  const client = yield* Models.make()\n  return yield* client.providers() // Effect<ProviderMap, ModelsDevError>\n})\n\nawait program.pipe(Effect.provide(FetchHttpClient.layer), Effect.runPromise)\n```\n\nTransport comes from the environment's `HttpClient` service, so proxies, retries, tracing, and test transports compose the usual Effect way. For DI, `Models.Service` and `Models.layer(options?)` are provided:\n\n```ts\nconst program = Effect.gen(function* () {\n  const client = yield* Models.Service\n  return yield* client.models()\n})\n\nprogram.pipe(Effect.provide(Models.layer().pipe(Layer.provide(FetchHttpClient.layer))))\n```\n","readmeFilename":"README.md"}