🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@inferlane/adapters

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inferlane/adapters

Provider adapters for AI cost tracking — connects to Anthropic, OpenAI, Google, AWS Bedrock, Azure, and more

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@inferlane/adapters

Provider SDK adapters for InferLane. Wraps Anthropic, OpenAI, Google, and other SDKs with automatic cost tracking and routing.

Install

npm install @inferlane/adapters

Usage

import { createTrackedClient } from '@inferlane/adapters';

// Wraps Anthropic SDK with automatic cost logging
const anthropic = createTrackedClient('anthropic', {
  apiKey: process.env.ANTHROPIC_API_KEY,
  inferlaneKey: process.env.INFERLANE_API_KEY,
});

// Use as normal — costs are tracked automatically
const message = await anthropic.messages.create({
  model: 'claude-sonnet-4-20250514',
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello' }],
});

Subpath Imports

import { ... } from '@inferlane/adapters';            // All adapters
import { ... } from '@inferlane/adapters/anthropic';   // Anthropic only
import { ... } from '@inferlane/adapters/openai';      // OpenAI only

Supported Providers

  • Anthropic (Claude)
  • OpenAI (GPT)
  • Google (Gemini)
  • AWS Bedrock
  • Azure OpenAI
  • Together AI
  • Groq
  • More coming

License

Apache-2.0

Keywords

ai

FAQs

Package last updated on 02 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