Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@xberg-io/liter-llm

Latest version: v2.7.6

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
npm package Publisher: nhirschfeld
267 Stars
29 Forks
29 Versions
7.9K Downloads
Rust Repo language

Scan summary

@xberg-io/liter-llm was last scanned on 25 Nov 2026 at version 2.7.6. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 29 versions; the latest 4 were published within 7 days (19–25 Nov 2026).
  • Findings: No rules fired in version 2.7.6.
  • Downloads: 7,852 downloads.

Versions

29 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.7.6 LATEST 25 Nov 2026 No rules fired
2.7.5 24 Nov 2026 No rules fired
2.7.4 23 Nov 2026 No rules fired
2.7.3 19 Nov 2026 Not shown
2.7.2 15 Nov 2026 Not shown

No rules fired in 2.7.6

Findings

Findings for v2.7.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.7.6; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

TypeScript (Node.js)

Universal LLM API client for TypeScript and Node.js. Access 174 LLM providers through a single interface with native NAPI-RS bindings, async/await, streaming, tool calling, and full TypeScript type definitions.

What This Package Provides

  • One provider surface — chat, streaming, embeddings, images, audio, search, OCR, tools, and structured output across the provider registry.
  • Provider/model routing — call models with the provider/model convention and keep provider-specific request code out of application paths.
  • Production controls — retries, fallback, rate limits, cache layers, budgets, health checks, OpenTelemetry spans, and redacted secrets.
  • Same core as every binding — Rust, Python, Node.js, Go, Java, PHP, Ruby, .NET, Elixir, WASM, Kotlin Android, Swift, Dart, Zig, and C FFI use the same Rust implementation.
  • Node-first TypeScript API — NAPI-RS package with typed requests/responses and async iterables for streaming.

Installation

Package Installation

Install via one of the supported package managers:

npm:

pnpm add @xberg-io/liter-llm

pnpm:

pnpm add @xberg-io/liter-llm

yarn:

yarn add @xberg-io/liter-llm
System Requirements
  • Node.js 22+ required (NAPI-RS native bindings)
  • API keys via environment variables (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY)
Platform Support

Pre-built binaries available for:

  • macOS (arm64, x64)
  • Linux (x64)
  • Windows (x64)

Coding-agent plugin

Install the liter-llm plugin for product skills and runtime integrations, or install public skills independently:

npx skills add xberg-io/liter-llm

Select the skills and target agents interactively. Install the product CLI separately for executable operations; the skill installer adds instructions only.

Quick Start

Basic Chat

Send a message to any provider using the provider/model prefix:

import { createClient } from "@xberg-io/liter-llm";

const client = createClient(process.env.OPENAI_API_KEY!);
const response = await client.chat({
  model: "openai/gpt-4o",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
Common Use Cases
Streaming Responses

Stream tokens in real time:

import { createClient } from "@xberg-io/liter-llm";

const client = createClient(process.env.OPENAI_API_KEY!);
const chunks = await client.chatStream({
  model: "openai/gpt-4o",
  messages: [{ role: "user", content: "Tell me a story" }],
});

for await (const chunk of chunks) {
  process.stdout.write(chunk.choices?.[0]?.delta?.content ?? "");
}
console.log();
Tool Calling

Define and invoke tools:

import { createClient, ToolType } from "@xberg-io/liter-llm";

const client = createClient(process.env.OPENAI_API_KEY!);

const response = await client.chat({
  model: "openai/gpt-4o",
  messages: [{ role: "user", content: "What is the weather in Berlin?" }],
  tools: [
    {
      toolType: ToolType.Function,
      function: {
        name: "get_weather",
        description: "Get the current weather for a location",
        parameters: {
          type: "object",
          properties: { location: { type: "string" } },
          required: ["location"],
        },
      },
    },
  ],
});

for (const call of response.choices[0]?.message?.toolCalls ?? []) {
  console.log(`Tool: ${call.function.name}, Args: ${call.function.arguments}`);
}
Next Steps

NAPI-RS Implementation Details

Native Performance

This binding uses NAPI-RS to provide native Node.js bindings with:

  • Zero-copy data transfer between JavaScript and Rust layers
  • Async by default — all LLM calls return Promises backed by Tokio
  • Binary-compatible pre-built native modules across platforms
  • TypeScript definitions generated automatically from Rust types
Threading Model
  • LLM calls are non-blocking — Tokio async runtime handles concurrency
  • Streaming responses use Node.js async iterators backed by Tokio streams
  • CPU-bound work runs in spawn_blocking to avoid blocking the event loop
Memory Management
  • API keys are wrapped in secrecy::SecretString and never logged
  • Streaming buffers are released as soon as each chunk is consumed
  • Provider registry is compiled into the binary — no runtime disk access

Features

Supported Providers (174)

Route to any provider using the provider/model prefix convention:

Provider Example Model
OpenAI openai/gpt-4o, openai/gpt-4o-mini
Anthropic anthropic/claude-3-5-sonnet-20241022
Groq groq/llama-3.1-70b-versatile
Mistral mistral/mistral-large-latest
Cohere cohere/command-r-plus
Together AI together/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
Fireworks fireworks/accounts/fireworks/models/llama-v3p1-70b-instruct
Google Vertex vertexai/gemini-1.5-pro
Amazon Bedrock bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0

Complete Provider List

Key Capabilities
  • Provider Routing -- Single client for 174 LLM providers via provider/model prefix
  • Local LLMs — Connect to locally-hosted models via Ollama, LM Studio, vLLM, llama.cpp, and other local inference servers
  • Unified API -- Consistent chat, chat_stream, embeddings, list_models interface
  • Streaming -- Real-time token streaming via chat_stream
  • Tool Calling -- Function calling and tool use across all supporting providers
  • Type Safe -- Schema-driven types compiled from JSON schemas
  • Secure -- API keys never logged or serialized, managed via environment variables
  • Observability -- Built-in OpenTelemetry with GenAI semantic conventions
  • Error Handling -- Structured errors with provider context and retry hints
Performance

Built on a compiled Rust core for speed and safety:

  • Provider resolution at client construction -- zero per-request overhead
  • Configurable timeouts and connection pooling
  • Zero-copy streaming with SSE and AWS EventStream support
  • API keys wrapped in secure memory, zeroed on drop

Provider Routing

Route to 174 providers using the provider/model prefix convention:

openai/gpt-4o
anthropic/claude-3-5-sonnet-20241022
groq/llama-3.1-70b-versatile
mistral/mistral-large-latest

See the provider registry for the full list.

Proxy, MCP Server & Plugin

Beyond the SDK, the liter-llm CLI ships an OpenAI-compatible proxy and a Model Context Protocol (MCP) server:

brew install xberg-io/tap/liter-llm   # or: cargo install liter-llm-cli
# Windows: scoop bucket add xberg https://github.com/xberg-io/scoop-bucket && scoop install liter-llm
liter-llm api --config liter-llm-proxy.toml   # OpenAI-compatible proxy
liter-llm mcp --transport stdio               # MCP tool server

# or run the proxy without installing:
docker run -p 4000:4000 -e LITER_LLM_MASTER_KEY=sk-your-key ghcr.io/xberg-io/liter-llm

To use the MCP server inside a coding agent, install the liter-llm plugin from the xberg-io/liter-llm marketplace — it auto-registers the server. See the MCP server and proxy server guides for configuration, CLI usage, and agent integration.

Documentation

Part of Xberg.io

  • Xberg — document intelligence: text, tables, metadata from 101 formats with optional OCR.
  • Xberg Enterprise — managed extraction API with SDKs, dashboards, and observability.
  • crawlberg — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
  • html-to-markdown — fast, lossless HTML→Markdown engine.
  • liter-llm — universal LLM API client with native bindings for 14 languages and 174 providers.
  • tree-sitter-language-pack — tree-sitter grammars and code-intelligence primitives.
  • alef — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
  • Discord — community, roadmap, announcements.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Join our Discord community for questions and discussion.

License

MIT -- see LICENSE for details.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @xberg-io/liter-llm

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229