Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@gameonop/infera

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gameonop/infera

A lightweight, zero-dependency Node.js/TypeScript package that unifies multiple LLM inference providers under a single, standardized interface.

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Infera

A lightweight, zero-dependency TypeScript/Node.js package that unifies multiple LLM providers under a single, standardized interface.

npm version License TypeScript

Website · npm

Install

npm install @gameonop/infera

Quick Start

import { openai, setKey } from '@gameonop/infera';

setKey('openai', 'sk-your-key');

const response = await openai.call({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'Hello!' }],
});

console.log(response.text);

Features

FeatureDescription
6 ProvidersOpenAI, Groq, NVIDIA NIM, Cerebras, Gemini, OpenRouter
Token CountingAutomatic fallback estimation when providers don't return usage
Auto RetryExponential backoff with multi-provider fallback chains
Chat SessionsStateful conversation history with context window guard
Cost EstimatorPer-request cost estimates for all providers
BatchingParallel execution with concurrency control
TemplatesType-safe prompt templates with {{variable}} interpolation
Output ParserExtract JSON from any LLM response format
SubAgentsScoped task agents with parallel pool support
Health ChecksVerify provider connectivity and API key validity
StreamingSSE streaming for all supported providers
Zero DependenciesPure Node.js — no axios, no SDKs

Supported Providers

ProviderKeyDefault Model
OpenAIOPENAI_API_KEYgpt-4o-mini
GroqGROQ_API_KEYllama-3.3-70b-versatile
NVIDIA NIMNVIDIA_API_KEYmeta/llama-3.1-8b-instruct
CerebrasCEREBRAS_API_KEYllama3.1-8b
Google GeminiGEMINI_API_KEYgemini-2.5-flash
OpenRouterOPENROUTER_API_KEYopenai/gpt-4o-mini

Documentation

For detailed documentation, examples, and the full API reference, visit:

infera.netcanvas.live

License

Apache License 2.0 — see LICENSE for details.

Keywords

llm

FAQs

Package last updated on 20 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts