New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@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
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
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

Related posts