Skip to content

[DOCS] Rust SDK new chat-completion request parameters (schemas#71) #244

Closed

Description

What changed

The Rust SDK (inference-gateway/rust-sdk) was regenerated from openapi.yaml
(schemas#71), adding the remaining additive OpenAI-compatible request parameters
to CreateChatCompletionRequest. PR: inference-gateway/rust-sdk#64.

What needs documenting

New optional request fields now available to SDK users:
temperature, top_p, n, stop, frequency_penalty, presence_penalty,
seed, logprobs, top_logprobs, response_format, tool_choice,
logit_bias, user, reasoning_effort, max_completion_tokens,
parallel_tool_calls.

Notable points for the docs:

  • max_tokens is now deprecated in favor of max_completion_tokens.
  • The stop, tool_choice, and response_format fields are oneOf unions and
    surface in Rust as untagged enums (CreateChatCompletionRequestStop,
    ChatCompletionToolChoiceOption, CreateChatCompletionRequestResponseFormat).
  • Behavior change worth a note: seven fields with a schema default
    (temperature, top_p, n, frequency_penalty, presence_penalty,
    logprobs, parallel_tool_calls) are non-optional in the generated struct
    and are now always sent on the wire with their documented defaults.

Affected pages

  • Rust SDK reference / chat completion request parameters.

This is a tracking issue only; no action required from the SDK PR itself.

Activity

  1. added
    documentation
    on Jun 18, 2026
  2. added theissue type on Jun 18, 2026
  3. moved this to Todo in 2026on Jun 18, 2026
  4. edenreich commented on Jun 18, 2026

    @edenreich
    Contributor

    @claude Can you document it?

  5. inference-gateway-maintainer commented on Jun 18, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 12m 33s —— View job • docs/issue-244-20260618-2148 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-244-20260618-2148?quick_pull=1&title=Issue%20%23244%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23244%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documenting Rust SDK new chat-completion request parameters

    Done. Opened PR #256.

    Todo:

    • Gather context (verified against the regenerated rust-sdk source: lib.rs, ext/chat_request.rs, schemas.rs, tests.rs, chat example)
    • Understand the request
    • Add a "Request parameters" section to the Rust SDK in sdks.md
    • Run lint / format / build checks
    • Commit changes and open PR

    What changed

    Added a "Request parameters" section to the Rust SDK in sdks.md (it had none; Python and Go already did), placed between Tool calls and Vision to match the other languages. It covers every field the issue listed and the three notable points:

    • Field reference table with the real Rust types - f64, NonZeroU64, Option<...>, HashMap<String, i64>, and the union enums.
    • Wire-format change flagged prominently: the seven non-Option fields (temperature, top_p, n, frequency_penalty, presence_penalty, logprobs, parallel_tool_calls) now always serialize at their schema defaults - and that this differs from the Python/Go SDKs, which omit unset fields.
    • oneOf unions as #[serde(untagged)] enums (CreateChatCompletionRequestStop, ChatCompletionToolChoiceOption, CreateChatCompletionRequestResponseFormat) with construction snippets taken from the SDK's own round-trip tests, plus reasoning_effort, logprobs/logit_bias, and the max_tokens deprecation.
    • A note that the high-level client surfaces only with_tools and with_max_tokens today; the rest of the fields live on the public CreateChatCompletionRequest and ride on the request at their schema defaults.

    Every code snippet uses syntax/types verified against the regenerated rust-sdk (schemas.rs, tests.rs) - not guessed.

    Checks

    • bun run format - applied (prettier aligned the new table)
    • bun run lint:md - clean
    • bun run build - succeeds
      | Branch: docs/issue-244-20260618-2148 | PR #256
  6. moved this from Todo to In progress in 2026on Jun 18, 2026
  7. moved this from In progress to QA in 2026on Jun 18, 2026
  8. moved this from QA to Done in 2026on Jun 18, 2026
  9. inference-gateway-releaser commented on Jun 24, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.6.113 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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