ModelHubby scout badgeModelHubbyFIELD MANUAL · EST. 2026

← All recipes & kits

Vercel AI SDK kit

npm i ai @ai-sdk/openai-compatible

Through the gateway (recommended — cascade + cooldowns for free)

import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText, streamText } from "ai";

const modelhubby = createOpenAICompatible({
  name: "modelhubby",
  baseURL: "http://localhost:8787/v1",
  apiKey: "local",
});

const { text } = await generateText({
  model: modelhubby("auto"),
  prompt: "Summarize this in one line: ...",
});

// Streaming works — the gateway passes SSE through untouched
const stream = streamText({
  model: modelhubby("auto"),
  prompt: "Write a haiku",
});
Full kit — ModelHubby Indie

The rest of this kitthe full framework wiring, working code, and the edge cases it already survived — ships with the Indie field library. What you’ve read above is the real first section, not a blurred preview; the remainder simply isn’t in this page.