22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
|
|
---
|
||
|
|
name: OpenAI gpt-5 series rejects non-default temperature
|
||
|
|
description: gpt-5* models error on temperature != 1; omit temperature in OpenAI-compatible clients for cross-model compatibility
|
||
|
|
---
|
||
|
|
|
||
|
|
# OpenAI-compatible client: do not send a non-default `temperature`
|
||
|
|
|
||
|
|
When calling OpenAI-compatible `chat/completions`, the gpt-5 series (e.g. gpt-5-mini,
|
||
|
|
the Replit AI Integrations modelfarm default) returns `HTTP 400 unsupported_value`:
|
||
|
|
"`temperature` does not support 0.1 with this model. Only the default (1) value is
|
||
|
|
supported." This silently disables AI analysis (`aiUsed:false`, `aiError` set).
|
||
|
|
|
||
|
|
**Rule:** omit `temperature` from the request body for broad model compatibility,
|
||
|
|
rather than hardcoding a low value for determinism.
|
||
|
|
|
||
|
|
**Why:** older models accepted `temperature: 0.1` but gpt-5* only accept the default.
|
||
|
|
A hardcoded low temperature breaks every scan against modern models.
|
||
|
|
|
||
|
|
**How to apply:** in `artifacts/api-server/src/lib/aiAnalysis.ts` the OpenAI-compatible
|
||
|
|
path no longer sends `temperature`. If reintroducing sampling controls, gate them per
|
||
|
|
model or make them optional.
|