Skip to content

Provider OpenAI

Muhammet Şafak edited this page May 30, 2026 · 3 revisions

Home / Providers / OpenAI

Provider: OpenAI

Direct HTTPS API integration with api.openai.com.

Configuration

provider: openai
providers:
  openai:
    api_key: sk-...
    model: gpt-5.4-mini

Equivalent 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/.

Supported models

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.

Pricing (per 1M tokens)

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.

Context window

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

Structured findings

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.

See also

Clone this wiki locally