← All integrations

Integration · @namzu/http

Namzu × HTTP.Any OpenAI- or Anthropic-compatible endpoint.

A zero-dependency driver for any endpoint that speaks the OpenAI or Anthropic wire.

@namzu/httpv5.0.3FSL-1.1-MITnpm

Install.

pnpm add @namzu/sdk @namzu/http

@namzu/sdk is a peer dependency, so install both. The SDK needs zod@^3 too.

Why pair the kernel with HTTP.

The LLMProvider interface is deliberately small so that one HTTP-shaped driver can cover the long tail of inference servers. The package has no dependencies. If your stack needs a model that has no dedicated package, this is the one to try first.

  • It speaks two wire dialects, openai (the default; the key goes in Authorization: Bearer) and anthropic (x-api-key). It refuses a mismatch with a DialectMismatchError rather than guessing which one a gateway meant.
  • The package describes itself as working with vLLM, TGI, llama-server, Groq, DeepInfra, Together.ai and any custom inference server behind a compatible endpoint.
  • Custom headers, a default model and a request timeout (60 seconds by default) are configuration. Streaming, tool calls and JSON-schema responses are forwarded.
  • Diagnostics keep only the endpoint origin and the status; query parameters and response bodies are redacted because both can carry credentials.

Beyond the two dialects.For an endpoint that matches neither, implement LLMProvider yourself and register it with ProviderRegistry.register, the way every driver in this list does.

Example.

import { ProviderRegistry, runAgent } from '@namzu/sdk'
import { registerHttp } from '@namzu/http'

registerHttp() // once, at startup

// Point at any OpenAI-compatible endpoint: vLLM, a gateway of your own, and so on.
const { provider } = ProviderRegistry.create({
  type: 'http',
  baseURL: 'http://localhost:8000/v1',
  apiKey: process.env.INFERENCE_TOKEN ?? '',
  dialect: 'openai',
})

const { output } = await runAgent({ provider, model: 'my-served-model', prompt: 'Hello' })
console.log(output)

Configure.

Configuration (type: 'http')

baseURLstring
Required. The endpoint's base URL, for example http://localhost:8000/v1.
apiKeystring
Sent as Authorization: Bearer in the openai dialect and as x-api-key in the anthropic dialect.
dialect'openai' | 'anthropic'
Wire shape of requests and responses. Default openai.
headersRecord<string, string>
Extra headers. You keep the last word on every key.
modelstring
Default model when a call names none.
strictToolUse'auto' | 'on' | 'off'
Anthropic dialect: constrained tool input. Default auto.
timeoutnumber (ms)
Request timeout. Default 60000.

What the driver declares.

  • StreamingYes
  • Tool callsYes
  • Image attachmentsNot mapped
  • Document attachmentsNot mapped
  • Native JSON-schema outputYes

Ship HTTP agents on a runtime you can own.

Your endpoint owns the model. Namzu owns the runtime. The package is a thin adapter, not a wrapper, so you keep everything HTTP ships and add the kernel concerns you do not get from the model API alone.