Integration

InferencePass with LangChain.

Connect LangChain chat models and agents through the OpenAI-compatible endpoint.

Configuration

Use the LangChain OpenAI chat integration, set model to auto, and pass https://api.inferencepass.com/v1 as the configuration base URL.

LangChain JavaScript
const model = new ChatOpenAI({
  model: "auto",
  apiKey: process.env.INFERENCEPASS_API_KEY,
  configuration: {
    baseURL: "https://api.inferencepass.com/v1",
  },
});

Tools

Tool-bound requests are routed only through providers with verified tool capability. Handle tool errors and validate arguments before executing side effects.

Structured output

For portable JSON output, request the supported JSON response format and validate the returned object in your application.