ModelHubby scout badgeModelHubbyFIELD MANUAL · EST. 2026

← All recipes & kits

OpenAI SDK kit

The catalog's openai-compatible base URLs work with the stock OpenAI SDKs — that's the selection criterion. Two patterns:

Pattern A — gateway (cascade, cooldowns, breakers handled for you)

import OpenAI from "openai";
const client = new OpenAI({
  baseURL: "http://localhost:8787/v1",
  apiKey: "local",
});
const res = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "hello" }],
});
console.log(res.choices[0].message.content);
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8787/v1", api_key="local")
res = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "hello"}],
)
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.