Skip to content

[DOCS] Document new chat completion request params in TypeScript SDK #243

Closed

Description

What changed

The TypeScript SDK (@inference-gateway/sdk) regenerated its types from inference-gateway/schemas#71, adding the additive OpenAI-compatible request parameters to the chat completion request surface. These are now part of the public API that users can pass to createChatCompletion and streamChatCompletion.

New optional request parameters:

  • temperature, top_p, n
  • stop (string or up to 4 strings)
  • frequency_penalty, presence_penalty
  • seed
  • logprobs, top_logprobs
  • response_format (text, json_schema, or json_object)
  • tool_choice (none/auto/required, or a named tool choice)
  • parallel_tool_calls
  • logit_bias
  • user
  • reasoning_effort (minimal/low/medium/high)
  • max_completion_tokens

Also: max_tokens is now deprecated in favor of max_completion_tokens.

Docs to update

  • TypeScript SDK reference / usage examples for chat completions: show the new sampling, penalty, logprobs, response_format, and tool_choice options.
  • Note the max_tokens deprecation and point readers to max_completion_tokens.

Refs

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 11m 52s —— View job • docs/issue-243-20260618-2257 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-243-20260618-2257?quick_pull=1&title=Issue%20%23243%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23243%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documenting new chat completion request params in the TypeScript SDK

    Done. I added a Request parameters section to the TypeScript SDK docs in sdks.md, mirroring the existing Python, Go, and Rust sections.

    • Read the issue and gather context
    • Review existing TypeScript SDK docs in sdks.md
    • Verify exact TS type names/conventions against the SDK source (SchemaCreateChatCompletionRequest, snake_case fields, tool_choice / response_format / reasoning_effort types)
    • Add a "Request parameters" section to the TypeScript SDK (mirroring Python/Go/Rust)
    • Document max_tokens deprecation -> max_completion_tokens
    • Run lint:md, format:check, and build
    • Commit and open a PR

    What the new section covers

    • Sampling / penalties: temperature, top_p, n, frequency_penalty, presence_penalty, seed
    • stop sequences (string or up to 4 strings)
    • logprobs / top_logprobs and logit_bias
    • response_format (text / json_object / json_schema, with a Structured Outputs example)
    • tool_choice (none / auto / required, or a named function) and parallel_tool_calls
    • reasoning_effort, user, max_completion_tokens
    • A table of every optional field with its TypeScript type, and a dedicated max_tokens deprecation note pointing at max_completion_tokens

    Verification

    • Field names, TypeScript types, and the SchemaCreateChatCompletionRequest request type were cross-checked against the published SDK source (src/types/generated/index.ts, src/client.ts) - including that the client serializes only the fields you set and manages stream / stream_options itself.
    • bun run lint:md, bun run format:check, and bun run build all pass; the new section is server-side rendered into dist/sdks/index.html.

    Pull request: #257

    • branch: docs/issue-243-20260618-2257
  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