@tailored-ai/provider-openai
v0.1.9
Published
OpenAI model provider for Tailored AI agents. Ships as a register(ctx) plugin — install with `tai plugin install @tailored-ai/provider-openai`; supersedes the minimal built-in `openai` provider with reasoning-model handling, org/project headers, and extra
Downloads
297
Maintainers
Readme
@tailored-ai/provider-openai
OpenAI model provider for Tailored AI agents — GPT and o-series models with the request shaping current OpenAI models require.
This plugin provides the openai provider id (#236 moved it out of core). Existing providers.openai config keeps working, and gains:
- Reasoning-model handling — o-series and gpt-5 family models reject
temperatureand the deprecatedmax_tokens; the plugin omits temperature for them and always usesmax_completion_tokens. The built-in sends both, which errors on these models. - Org/project headers —
OpenAI-OrganizationandOpenAI-Projectfor multi-org accounts and usage attribution. params.extrapassthrough — e.g.reasoning_effort.- Streaming (
chatStream) and model discovery (listModels).
Install
tai plugin install @tailored-ai/provider-openaiConfigure
plugins:
- "@tailored-ai/provider-openai"
providers:
openai:
apiKey: "${OPENAI_API_KEY}" # https://platform.openai.com/api-keys
defaultModel: "gpt-5-mini"
agent:
defaultProvider: openai| Field | Required | Notes |
|---|---|---|
| apiKey | yes | Use ${OPENAI_API_KEY} to read from the environment. |
| defaultModel | yes | Any chat-completions model id. tai edit lists them via listModels. |
| organization | no | OpenAI-Organization header. |
| project | no | OpenAI-Project header. |
| reasoningModels | no | Extra model-id prefixes to treat as reasoning models (built-in heuristic covers o* and gpt-5*). |
| baseUrl | no | Default https://api.openai.com/v1. Override for proxies. |
Development
pnpm --filter @tailored-ai/provider-openai run build
pnpm --filter @tailored-ai/provider-openai run testLicense
MIT
