-
Notifications
You must be signed in to change notification settings - Fork 0
Provider OpenAI
Direct HTTPS API integration with api.openai.com.
provider: openai
providers:
openai:
api_key: sk-...
model: gpt-4oEquivalent CLI / env:
commitbrief config set provider openai
commitbrief config set providers.openai.api_key sk-...
commitbrief config set providers.openai.model gpt-4o
export OPENAI_API_KEY=sk-...Get an API key from https://platform.openai.com/.
| Model ID | Default? |
|---|---|
gpt-4o |
✓ |
gpt-4o-mini |
— |
The setup wizard offers the same two. The OpenAI client uses strict structured-output mode where supported.
| Model | Input | Output | Cached input |
|---|---|---|---|
gpt-4o |
$2.50 | $10.00 | $1.25 |
gpt-4o-mini |
$0.15 | $0.60 | $0.075 |
OpenAI applies automatic prompt-caching at ≥1024-token repeated
prefixes; cached tokens are reported under
usage.prompt_tokens_details.cached_tokens and shown in the
verbose footer.
Rates from https://openai.com/api/pricing; the binary's table is
in internal/provider/openai/pricing.go.
Both models: 128,000 tokens.
OpenAI's strict JSON mode rejects optional properties, so the
required-vs-optional split for the v1 schema is enforced at the
provider boundary: severity, file, line, title,
description, and suggestion are required; line_end,
language, snippet are optional and prompt-driven. See
ADR-0014 §1 for the full contract.
- Providers — overview.
- Cost preflight
- JSON schema