Skip to content

[DOCS] Add missing OpenAI-compatible request fields to API Reference #203

Closed

Description

@inference-gateway-maintainer

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, the CreateChatCompletionRequest table (lines 510-518), documents only: model, messages, stream, stream_options, max_tokens, tools, temperature.
  • Correction to the original report: the ChatCompletionChoice table (lines 585-590) already documents logprobs (line 590, ChatCompletionTokenLogprob[]), so that field is not missing. The real gap is that the ChatCompletionTokenLogprob type 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 ChatCompletionTokenLogprob schema (referenced by ChatCompletionChoice.logprobs but never documented).
  • Document request-message fields where supported: reasoning_content, reasoning, tool_call_id.

Affected files

  • api-reference.md - the CreateChatCompletionRequest table (lines 510-518) and the response/token-logprob schema sections.

Acceptance criteria

  • Every newly documented field exists in inference-gateway/schemas openapi.yaml with a matching type; no fields are invented.
  • ChatCompletionTokenLogprob has its own schema section.
  • npm run lint:md, npm run format:check, and npm run build pass.

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.

Activity

  1. added
    documentation
    on Jun 8, 2026
  2. added theissue type on Jun 8, 2026
  3. moved this to Todo in 2026on Jun 8, 2026
  4. inference-gateway-releaser commented on Jun 10, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.6.110 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  5. moved this from Todo to Done in 2026on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions