Skip to content

Regenerate Python SDK from updated openapi.yaml (schemas#71) #49

@inference-gateway-maintainer

Description

Context

Source-of-truth schema change: inference-gateway/schemas#71 (merged) added the
remaining additive OpenAI-compatible request parameters to
CreateChatCompletionRequest in openapi.yaml. This Python SDK generates from that
schema, so it needs a regenerate pass.

Upstream tracking issue: inference-gateway/schemas#72.

Work

  • Pull / re-vendor the updated openapi.yaml from inference-gateway/schemas.
  • Regenerate the Python SDK models.
  • Verify the oneOf unions (stop, tool_choice, response_format) generate cleanly (these usually become Union[...] types).
  • Sanity-check the public API surface for the new optional fields.

New / changed request fields

Field Change
temperature number 0-2, default 1 (polish)
top_p number 0-1, default 1 (polish)
n integer 1-128, default 1 (polish)
stop oneOf [string, array of 1-4 strings] (polish)
max_tokens now deprecated (use max_completion_tokens)
frequency_penalty number -2..2, default 0
presence_penalty number -2..2, default 0
seed integer
logprobs boolean, default false
top_logprobs integer 0-20
response_format oneOf [text, json_schema, json_object]
tool_choice oneOf [string enum none/auto/required, named tool choice]
logit_bias object mapping token id -> integer bias
user string
reasoning_effort enum minimal/low/medium/high

Codegen note

stop, tool_choice, and response_format are oneOf unions. Verify the generator
emits them cleanly (no dropped or flattened variants). This is exactly the class of
codegen quirk that scripts/check-reachable.js guards against upstream (schemas issue #31).

Refs inference-gateway/schemas#70, inference-gateway/schemas#71, inference-gateway/schemas#72.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdk-driftDrift between SDK and canonical spec

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions