npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deuz-sdk/core

v2.0.0

Published

Pure, web-first, multi-provider TypeScript AI SDK (Anthropic, OpenAI, xAI, Gemini, Azure, Bedrock, …).

Readme

@deuz-sdk/core

Pure, web-first, multi-provider TypeScript AI SDK — 28 chat provider ids across four wires, plus embeddings, images, speech, transcription and video — with zero runtime dependencies and a canonical streaming protocol of its own.

npm i @deuz-sdk/core
import { streamChat } from '@deuz-sdk/core';
import { createAnthropic } from '@deuz-sdk/core/anthropic';

const model = createAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY! })('claude-opus-4-8');
const result = streamChat({ model, messages: [{ role: 'user', content: 'Merhaba!' }] });
for await (const text of result.textStream) process.stdout.write(text);

streamChat returns synchronously and never throws: failures arrive as typed parts on the stream.

What is in the box

  • Edge-safe core — Web APIs only; everything stateful or non-deterministic (clock, randomness, fetch, keys, logging, tracing) is injected through one Dependencies seam.
  • Canonical stream — every provider's SSE is normalized to one typed delta stream before anything else touches it. Retries, timeouts, tool loops, fail-over and the UI wire all build on that one language.
  • Agentic loop — parallel tool execution, self-healing tool errors, runaway guards, budget/stop conditions, durable checkpoints, HMAC-signed human approvals, sub-agents and agent handoffs.
  • GuardrailsonInput / onToolCall / onOutput hooks, each returning pass / block / rewrite, reported on the stream.
  • Context management — layered compaction with a rolling summary, a manual compactMessages(), and automatic recovery from a provider's context-overflow rejection.
  • Persistence you can point at a database — SQLite, Redis and Postgres packs behind the MemoryStore / ChatStore / SessionStore / RunStore seams.
  • MCP — zero-config servers in the loop (mcp: [{ url }]), OAuth 2.0, sampling, roots, reconnect, and a cross-call connection pool.
  • Batteries — memory (mem0-style), RAG with hybrid retrieval, skills, structured output, middleware, pricing, observability and an OpenTelemetry bridge.
  • Modalities — text, images, speech, transcription and video.
  • React bindings@deuz-sdk/react (the @deuz-sdk/core/react subpath remains for compatibility).

Providers

28 chat provider ids, four wires, one call shape. A provider id is the string a descriptor carries and the key that resolves an API key and a base URL; a factory is the function that mints descriptors for it. The two do not count the same — createOpenAI and createOpenAIResponses are two factories over the one id openai, and createKimi is an alias of createMoonshot. A model descriptor is a plain { provider, modelId, surface } value — factory settings ride a non-enumerable symbol, so keys never leak through Object.keys or JSON.stringify.

| Group | Provider ids | Subpath | | --- | --- | --- | | Dedicated (9 ids) | anthropic, openai, xai, google, vertex-anthropic, vertex-google, azure, bedrock, yunwu | /anthropic, /openai, /xai, /google, /vertex, /azure, /bedrock, /yunwu | | OpenAI-compat cloud hosts (17 ids) | groq, mistral, deepseek, together, openrouter, cerebras, fireworks, moonshot (a.k.a. Kimi), qwen, glm, minimax, perplexity, cohere, deepinfra, nvidia, sambanova, hyperbolic | /providers | | Keyless local hosts (2 ids) | ollama, lmstudio | /providers |

voyage is deliberately absent: it is an embeddings provider, so it speaks none of the four chat wires and cannot be handed to streamChat.

Which of the four chat wires each one speaks — the exhaustive ModelSurface → adapter switch:

| Wire (surface) | Covers | | --- | --- | | Anthropic Messages (anthropic) | Anthropic, Claude on Vertex | | OpenAI Responses (responses) | OpenAI (GPT-5.x reasoning + tools) | | Gemini native (native, generateContent) | Google Gemini, Gemini on Vertex — reasoning, thought signatures, caching, native PDF | | OpenAI Chat Completions (chat_completions) | everything else, including Gemini-compat and Azure / Bedrock |

Embeddings, images, speech, transcription and video are separate model kinds with their own surfaces and their own adapters — not chat wires, and none of them can be handed to streamChat by accident. Embeddings ship for OpenAI, Google, Voyage and Yunwu; speech adds openai / elevenlabs, transcription adds openai / deepgram, video any OpenAI-Videos-shaped relay.

Ollama and LM Studio need no API key — they dial localhost and set the keyless escape for you. Any other OpenAI-shaped host gets a real provider id through createOpenAICompatible({ id, baseURL }), and createProviderRegistry resolves 'groq:llama-4-maverick' strings.

Unknown model slugs never throw: they fall back to a conservative capability row and report an unknown-model warning, so a model released this morning works without an SDK release. Correct the row per factory or per call with capabilities. This path is verified against live APIs, not only in theory — grok-4.5 and gemini-3.6-flash both postdate the pinned rows and both run end to end, tool loop included.

Where it fits

Deuz is not a framework and it is not a claim about ASI. It is a small runtime you can hold in your head, for the part of the problem that does not get easier as models improve: remembering across sessions, using tools safely, surviving a crash, asking a human before something risky, and staying observable while it does. Zero runtime dependencies, no ambient state, no vendor for durability, nothing phoning home.

Node ≥ 22, or any runtime with fetch. Optional peers only when you use them: zod (or any Standard Schema library), @modelcontextprotocol/sdk, react, unpdf / mammoth / xlsx, playwright, @opentelemetry/api, redis, pg.

Full documentation, architecture tour and the honest limitations list: github.com/Deuz-AI/Deuz-SDK.