@nativeharness/adapter-openai
v0.1.0
Published
A nativeharness ModelAdapter for OpenAI and every service that speaks its chat-completions shape.
Readme
@nativeharness/adapter-openai
OpenAI, xAI, DeepSeek, Moonshot, MiniMax, Zhipu, Groq and Mistral, behind the ModelAdapter interface.
npm install @nativeharness/adapter-openaiimport { OpenAIAdapter } from "@nativeharness/adapter-openai";
import { Harness } from "nativeharness";
const harness = new Harness({ root: "./data", model: new OpenAIAdapter() });Reads OPENAI_API_KEY.
One adapter for every service whose own API is chat-completions, plus the compatibility endpoints of Groq and Mistral, which lose nothing that matters. providerIds() lists them; keyFromEnvironment() finds the key.
Adapters are the only packages that know a vendor. Swapping one changes no line of the harness.
Part of nativeharness — the agent harness native to your app. Apache-2.0 · docs · source
