Skip to content

[TASK] Refactor sync vendored openapi.yaml with schemas #6

Closed

Description

@inference-gateway-releaser

Summary

The vendored openapi.yaml committed at the root of inference-gateway/python-sdk is out of sync with the canonical OpenAPI spec at inference-gateway/schemas SHA 97599d4a90188fc73bb41be1d580993415ffe06f. Re-running task oas-download against the canonical spec produces a non-empty diff against the committed copy, which means downstream codegen and validation are running against a stale schema.

Pre-existing drift surfaced by task oas-download:

  • components.schemas.ChatCompletionChoice: the canonical spec adds a structured logprobs object (with content and refusal arrays of ChatCompletionTokenLogprob) and removes logprobs from the required list, while the vendored copy still lists logprobs as a bare required field.
  • components.schemas.FunctionObject.parameters.description: trailing-whitespace-only drift on the description text.
  • components.schemas.CreateChatCompletionRequest.reasoning_format.description: trailing-whitespace-only drift on the description text.

Acceptance Criteria

  • Run task oas-download so the local openapi.yaml matches the canonical spec at SHA 97599d4a90188fc73bb41be1d580993415ffe06f.
  • Regenerate inference_gateway/models.py from the refreshed spec (in particular, update ChatCompletionChoice.logprobs to the new structured object referencing ChatCompletionTokenLogprob, and stop treating logprobs as required).
  • Verify git diff openapi.yaml is empty after the refresh.
  • PR passes the target repo's existing CI workflow.
  • PR description links this issue.

Filed automatically by the inference-gateway sync orchestrator. Re-runs refresh this body in place. A maintainer should review and decide on next steps.

Activity

  1. added
    refactor
    sdk-drift
    on May 6, 2026
  2. edenreich commented on May 7, 2026

    @edenreich
    Contributor

    @claude Can you work on this?

  3. moved this from Todo to In progress in 2026on May 7, 2026
  4. claude commented on May 7, 2026

    @claude
    Contributor

    Claude finished @edenreich's task in 2m 6s —— View job • claude/issue-6-20260507-0029 • Create PR ➔


    Task Progress

    • Explore repository structure & read Taskfile.yml
    • Run task oas-download to refresh openapi.yaml
    • Regenerate inference_gateway/models.py via task generate
    • Verify the canonical drift is captured (structured logprobs + whitespace fixes)
    • Run task lint and task test (all green)
    • Commit changes to branch

    Summary

    Ran task generate (which deps oas-download → oas-validate), refreshing openapi.yaml from the canonical schema and regenerating inference_gateway/models.py. Resulting diff:

    • openapi.yaml — picks up the three drift items called out in the issue:
      • ChatCompletionChoice.logprobs is now the structured object (content + refusal arrays of ChatCompletionTokenLogprob) and logprobs is removed from required.
      • Trailing-whitespace fixes on FunctionObject.parameters.description and CreateChatCompletionRequest.reasoning_format.description.
    • inference_gateway/models.py — ChatCompletionChoice.logprobs is now Logprobs | None = None (no longer required), and a new Logprobs model wraps Sequence[ChatCompletionTokenLogprob] for both content and refusal.

    CI checks locally:

    • task lint ✅ (black, isort, mypy)
    • task test ✅ (22/22 passed)

    PR

    Branch: claude/issue-6-20260507-0029 ·

  5. moved this from In progress to Done in 2026on May 7, 2026
  6. added a commit that references this issue on May 30, 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

    refactorsdk-drift

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions