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
{{ message }}
Repository navigation
[DOCS] Document new OpenAI-compatible chat completion request parameters (python-sdk) #245
The Python SDK (inference-gateway/python-sdk) now supports the full set of OpenAI-compatible chat completion request parameters, regenerated from openapi.yaml (schemas#71). These are passed as keyword arguments to create_chat_completion / create_chat_completion_stream, or set on CreateChatCompletionRequest.
New / changed parameters:
temperature (number, 0-2)
top_p (number, 0-1)
n (integer, 1-128)
stop (string, or up to 4 strings)
frequency_penalty (number, -2..2)
presence_penalty (number, -2..2)
seed (integer)
logprobs (boolean)
top_logprobs (integer, 0-20)
response_format (text, json_object, or json_schema)
tool_choice (none/auto/required, or a named tool choice)
logit_bias (map of token id to integer bias)
user (string)
reasoning_effort (minimal/low/medium/high)
max_completion_tokens (integer; preferred over the now-deprecated max_tokens)
parallel_tool_calls (boolean)
Note: the SDK only sends parameters the caller sets explicitly; unset spec defaults are not forwarded.
Verified the actual Python SDK API surface against client.py, models.py, and tests/test_client.py on main
Added the "Request parameters" section (kwargs table + examples)
Added structured-outputs (response_format) and tool-choice guidance
bun run lint:md, format:check, and build all pass locally
Committed and opened the PR
What was added
A new ### Request parameters section under Python documenting every new field, passed as keyword arguments to create_chat_completion / create_chat_completion_stream:
Sampling / penalties: temperature, top_p, n, frequency_penalty, presence_penalty, seed
stop (string or up to 4 strings), logprobs, top_logprobs, logit_bias
response_format (text / json_object / json_schema, with Structured Outputs guidance)
tool_choice (none / auto / required / named) and parallel_tool_calls
user, reasoning_effort, max_completion_tokens (plus the max_tokens deprecation note)
A full parameter table plus subsections for stop sequences, response format, tool choice, and log probabilities. The section also documents that the SDK forwards only explicitly-set parameters (unset spec defaults are not sent), which I confirmed against the SDK's exclude_unset serialization and its schemas#71 regression test.
Notes for the reviewer
The docs version line still reads 0.6.2. I left it unchanged on purpose: these fields are merged to main but are not in the latest release (v0.7.1), so bumping to 0.7.1 would wrongly imply that tag has them. Worth bumping when the next release ships.
The json_schema Structured Outputs example uses the spec-standard schema key. The SDK's tests currently only exercise json_object; a quick check that a nested json_schema round-trips the schema key on the wire would be worthwhile (the generated model aliases it as schema_).
Activity
edenreich commentedon Jun 18, 2026
@claude Can you document it?
inference-gateway-maintainer commentedon Jun 18, 2026
Claude finished @edenreich's task in 12m 6s —— View job •
docs/issue-245-20260618-2135• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-245-20260618-2135?quick_pull=1&title=Issue%20%23245%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23245%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Documented the new Python SDK chat completion request parameters
Opened PR #255 adding a "Request parameters" section to the Python part of
sdks.md, mirroring the recently merged Go SDK section (#254).sdks.md, Go SDK PR docs: document new chat completion request params in Go SDK #254 as the pattern to mirror)client.py,models.py, andtests/test_client.pyonmainresponse_format) and tool-choice guidancebun run lint:md,format:check, andbuildall pass locallyWhat was added
A new
### Request parameterssection under Python documenting every new field, passed as keyword arguments tocreate_chat_completion/create_chat_completion_stream:temperature,top_p,n,frequency_penalty,presence_penalty,seedstop(string or up to 4 strings),logprobs,top_logprobs,logit_biasresponse_format(text / json_object / json_schema, with Structured Outputs guidance)tool_choice(none / auto / required / named) andparallel_tool_callsuser,reasoning_effort,max_completion_tokens(plus themax_tokensdeprecation note)A full parameter table plus subsections for stop sequences, response format, tool choice, and log probabilities. The section also documents that the SDK forwards only explicitly-set parameters (unset spec defaults are not sent), which I confirmed against the SDK's
exclude_unsetserialization and itsschemas#71regression test.Notes for the reviewer
0.6.2. I left it unchanged on purpose: these fields are merged tomainbut are not in the latest release (v0.7.1), so bumping to0.7.1would wrongly imply that tag has them. Worth bumping when the next release ships.json_schemaStructured Outputs example uses the spec-standardschemakey. The SDK's tests currently only exercisejson_object; a quick check that a nestedjson_schemaround-trips theschemakey on the wire would be worthwhile (the generated model aliases it asschema_).docs/issue-245-20260618-2135inference-gateway-releaser commentedon Jun 24, 2026
🎉 This issue has been resolved in version 0.6.113 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀