Repository navigation
[DOCS] Add missing OpenAI-compatible request fields to API Reference #203
Description
Summary
The API Reference documents only a subset of the OpenAI-compatible chat-completion fields the gateway supports. Document the remaining request fields (and a couple of response gaps) so users can see what parameters are available.
Current state (verified against the repo)
api-reference.md, theCreateChatCompletionRequesttable (lines 510-518), documents only:model,messages,stream,stream_options,max_tokens,tools,temperature.- Correction to the original report: the
ChatCompletionChoicetable (lines 585-590) already documentslogprobs(line 590,ChatCompletionTokenLogprob[]), so that field is not missing. The real gap is that theChatCompletionTokenLogprobtype it references is never defined as its own schema section.
Source of truth (read first)
The gateway's OpenAPI spec is the authority for which fields actually exist - it lives in inference-gateway/schemas (openapi.yaml) and is vendored into the gateway. Every field below must be confirmed present in that spec before being documented. Do not copy OpenAI's full parameter list verbatim; document only what the gateway supports.
What to add (candidates - verify each against openapi.yaml)
Request fields likely missing from CreateChatCompletionRequest:
| Field | Type | Description |
|---|---|---|
top_p |
number | Nucleus sampling (0-1) |
frequency_penalty |
number | Penalize tokens by frequency (-2 to 2) |
presence_penalty |
number | Penalize tokens by prior presence (-2 to 2) |
stop |
string / string[] | Up to 4 stop sequences |
n |
integer | Number of choices to generate |
logprobs |
boolean | Return token log probabilities |
top_logprobs |
integer | Most-likely tokens per position (0-20) |
response_format |
object | text, json_object, or json_schema |
seed |
integer | Deterministic sampling seed |
user |
string | End-user identifier |
tool_choice |
string / object | Control which tool is called |
parallel_tool_calls |
boolean | Execute tool calls in parallel |
reasoning_format |
string | raw or parsed for reasoning models |
metadata |
object | Custom metadata tags |
Verify-then-add only if supported: includes, store, service_tier, modalities, audio, prediction.
Other gaps:
- Define the
ChatCompletionTokenLogprobschema (referenced byChatCompletionChoice.logprobsbut never documented). - Document request-message fields where supported:
reasoning_content,reasoning,tool_call_id.
Affected files
api-reference.md- theCreateChatCompletionRequesttable (lines 510-518) and the response/token-logprob schema sections.
Acceptance criteria
- Every newly documented field exists in
inference-gateway/schemasopenapi.yamlwith a matching type; no fields are invented. -
ChatCompletionTokenLogprobhas its own schema section. -
npm run lint:md,npm run format:check, andnpm run buildpass.
Cross-repo note
This is a documentation-only change in inference-gateway/docs. The schema itself is owned by inference-gateway/schemas; if a genuinely supported field is missing from openapi.yaml, that is a separate issue in that repo, not here.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
inference-gateway-releaser commentedon Jun 10, 2026
🎉 This issue has been resolved in version 0.6.110 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀