Providers
OpenAI
Uses the Ahena CLI (beta). Install it with npm install -g @ahena/cli, or prefix commands with npx @ahena/cli. See Installation. The dashboard covers projects, connections, Doctor, the Stack Graph, plans and approvals without it.
Overview
Ahena checks your OpenAI key and that your configured model is available (and not about to
be shut down), and generates an adapter behind the common ahena.ai interface using the
Responses API. Your app calls OpenAI directly. Ahena is never in the inference path, and
its checks never run a completion on your account.
Package: @ahena/provider-openai · Category: ai · Default model: gpt-5-mini
Connection
OPENAI_API_KEY (secret). Use a project key (sk-proj-…).
OPENAI_API_KEY=sk-proj-… ahena connect openai -e production
Permissions
Ahena only lists and reads models: a project key with Models: Read is enough. Give your app its own key with the permissions it needs, ideally in a separate project with a budget.
Capabilities
| Capability | What Ahena does |
|---|---|
text-generation |
Generates src/ahena/ai/providers/openai.ts behind ahena.ai.generate(); ahena.ai.raw is the openai client. |
model-availability |
Checks the configured ai.model exists for this key and warns before its shutdown date. |
Network: only api.openai.com (enforced).
Limitations
- The common interface covers text generation. Tools, structured outputs, streaming and
images use
ahena.ai.raw(that code is OpenAI-specific;ahena switchreports it). - Usage limits and billing are managed in OpenAI.
Manual steps
- Create a project and a project key at https://platform.openai.com/api-keys.
- Set a usage limit for the project.
- Set
OPENAI_API_KEY(andAI_PROVIDER=openaiif several adapters exist) where your app runs.
Doctor checks
| Id | Severity | Meaning |
|---|---|---|
openai.key |
PASS / FAIL | Key accepted. |
openai.key_kind |
INFO | Not a project-scoped key. |
openai.model |
PASS / WARNING / FAIL | Model available; WARNING over 30 days before its shutdown date, FAIL within 30 days or after. |
Disconnect behavior
Removes the connection and the key Ahena stored. Revoke the key at https://platform.openai.com/api-keys. Nothing in your OpenAI account is changed.