Skip to content

fix(missing_documentation): Def parser in src/openai/resources/chat/completions/comple - #3637

Open
nickhac wants to merge 1 commit into
openai:mainfrom
nickhac:fix/missing_documentation-332-def-parser-in-src-openai-resou
Open

fix(missing_documentation): Def parser in src/openai/resources/chat/completions/comple#3637
nickhac wants to merge 1 commit into
openai:mainfrom
nickhac:fix/missing_documentation-332-def-parser-in-src-openai-resou

Conversation

@nickhac

@nickhac nickhac commented Aug 17, 2026

Copy link
Copy Markdown

TLDR

Gap: Def parser in src/openai/resources/chat/completions/completions.py has no docstring — add parameter docs, return type, and example

Wedge type: missing_documentation

Issue: https://github.com/openai/openai-python/blob/main/src/openai/resources/chat/completions/completions.py#L186

Changes

  • src/openai/resources/chat/completions/completions.py

Diff size: 74 lines across 1 file(s)

Pre-submission checklist

  • Minimal change — touches at most 3 files
  • Tests updated (if test suite present)
  • No CI/CD, Dockerfile, or lock file modifications
  • Diff reviewed for secrets

AI Assistance Disclosure

This contribution was AI-assisted using Hermes Agent (Nous Research).

Co-authored-by: Hermes Agent hermes-agent@nousresearch.com

…/completions/comple

Gap ID: openai#332
Co-authored-by: Hermes Agent <hermes-agent@nousresearch.com>
@nickhac
nickhac requested a review from a team as a code owner August 17, 2026 09:11
@nickhac

nickhac commented Aug 17, 2026

Copy link
Copy Markdown
Author

Automated contribution summary (Hermes Agent / altitude-upstream)

This PR was generated by an AI agent. Please review carefully before merging.
Co-authored-by: Hermes Agent hermes-agent@nousresearch.com

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a22b91fb59

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +202 to +205
A ``ParsedChatCompletion[ResponseFormatT]`` whose
``choices[*].message.parsed`` field holds the decoded
``ResponseFormatT`` instance (when a ``response_format`` was
supplied), and whose tool-call ``function.parsed_arguments``

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document that refusals remain unparsed

When the API returns a refusal or a message without content, maybe_parse_content() leaves message.parsed as None even if response_format was supplied. The return documentation currently promises a decoded ResponseFormatT whenever the format is supplied, so it should state that parsing occurs only for non-refusal responses with content; the duplicated async documentation needs the same clarification.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant