@byokey/openai
v0.2.0
Published
OpenAI provider adapter for the BYOK Infrastructure Toolkit
Maintainers
Readme
@byokey/openai
OpenAI provider adapter for the BYOK Infrastructure Toolkit.
Supports all OpenAI chat completion models including GPT-5.4, GPT-4.1, o3-mini, and o1.
Installation
npm install @byokey/core @byokey/openaiUsage
import { createClient } from '@byokey/core';
import { openai } from '@byokey/openai';
const client = createClient({ adapters: [openai()] });
const response = await client.execute({
provider: 'openai',
model: 'gpt-5.4',
credential: 'sk-...',
messages: [{ role: 'user', content: 'Hello!' }]
});Configuration
openai({
baseUrl: 'https://api.openai.com/v1/chat/completions', // Custom endpoint
timeoutMs: 30000, // Request timeout
});