You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix: change logprobs type from bool to int in Completions endpoint (#5343)
Fixes#5253
The `logprobs` field in `OpenAICompletionRequestWithExtraBody` was typed
as `bool` but the OpenAI Completions API expects an integer (0–5)
indicating how many top log probabilities to include per output token.
This caused a 400 error when callers passed an int:
```
openai.BadRequestError: ... 'Input should be a valid boolean, unable to interpret input'
```
Changes:
- `models.py`: `logprobs: bool | None` → `logprobs: int | None` with
`ge=0, le=5`
- `llama-stack-spec.yaml`: matching schema update (`boolean` → `integer`
with min/max)
The Chat Completions model (`OpenAIChatCompletionRequestWithExtraBody`)
is unchanged — its `logprobs` is correctly a boolean there.
---------
Signed-off-by: Extra Small <littleshuai.bot@gmail.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments