Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

openai-like-llm-bridge

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openai-like-llm-bridge

OpenAI-compatible LLM bridge for vLLM and similar providers

latest
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

openai-like-llm-bridge

OpenAI-compatible LLM bridge that targets providers exposing the OpenAI Chat Completions API (e.g., vLLM, LM Studio, LocalAI, OpenRouter).

Install

pnpm add openai-like-llm-bridge llm-bridge-spec zod

Quick Start

import OpenaiLikeBridge from 'openai-like-llm-bridge';

const bridge = OpenaiLikeBridge.create({
  baseUrl: 'http://localhost:8000/v1',
  apiKey: process.env.OPENAI_API_KEY,
  model: 'gpt-3.5-turbo',
});

const res = await bridge.invoke({
  messages: [{ role: 'user', content: [{ contentType: 'text', value: 'Hello' }] }],
});

console.log(res.content);

Notes

  • Uses native fetch (Node 22+).
  • Streaming via SSE is supported when the backend supports stream: true.
  • Text modality supported in v1; multimodal can be extended later.

FAQs

Package last updated on 24 Aug 2025

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