-
-
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-5.4-miniEquivalent CLI / env:
commitbrief config set provider openai
commitbrief config set providers.openai.api_key sk-...
commitbrief config set providers.openai.model gpt-5.4-mini
export OPENAI_API_KEY=sk-...Get an API key from https://platform.openai.com/.
| Model ID | Default? |
|---|---|
gpt-5.4-mini |
✓ |
gpt-5.5 |
— |
gpt-5.5-pro |
— |
gpt-4o |
— |
gpt-4o-mini |
— |
The setup wizard offers the same list. The OpenAI client uses strict structured-output mode where supported.
gpt-5.5-pro is served through OpenAI's Responses API rather
than Chat Completions (it is not offered on Chat Completions). The
call is synchronous and can take several minutes per review;
plan timeouts accordingly. The other models use Chat Completions.
| Model | Input | Output | Cached input |
|---|---|---|---|
gpt-5.4-mini |
$0.75 | $4.50 | $0.075 |
gpt-5.5 |
$5.00 | $30.00 | $0.50 |
gpt-5.5-pro |
$30.00 | $180.00 | — |
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.
gpt-5.5 has tiered pricing — prompts above 272K input tokens
incur 2× input / 1.5× output for the whole session. The binary
snapshots the base (≤272K) tier, so the verbose cost footer may
under-report on very large inputs. gpt-5.5-pro offers no
cached-input discount.
Rates from https://openai.com/api/pricing; the binary's table is
in internal/provider/openai/pricing.go.
| Model | Input tokens |
|---|---|
gpt-5.4-mini |
400,000 |
gpt-5.5 |
1,050,000 |
gpt-5.5-pro |
1,050,000 |
gpt-4o / gpt-4o-mini
|
128,000 |
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 + comparison.
- Cost preflight — how the estimate is computed.
- JSON schema — the v1 findings schema.
Home · Installation · Quick start · Troubleshooting · GitHub repo · Issues
CommitBrief — local, LLM-powered code review for git diffs. This wiki documents only what ships in the binary.
Getting started
Commands · reviewing
Commands · summarizing
Commands · committing
Commands · setup
Commands · integration
Commands · inspect
Commands · maintenance
Configuration
Providers
Output
Operations
Reference