docs(groq): remove duplicate method block from with_structured_output docstring - #39978
Merged
Mason Daugherty (mdrxy) merged 2 commits intoAug 27, 2026
Conversation
…ut` docstring the docstring documented `method` twice. the second block was stale and listed only `function_calling` and `json_mode` so it contradicted the first block which also documents `json_schema` kept the streaming warning from the stale block because it was the only line not already covered above
Huzaifa Iftikhar (HuzaifaChaudary)
requested review from
ccurme (ccurme) and
Mason Daugherty (mdrxy)
as code owners
August 27, 2026 22:55
This comment has been minimized.
This comment has been minimized.
Copilot started reviewing on behalf of
Huzaifa Iftikhar (HuzaifaChaudary)
August 27, 2026 22:56
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a duplicate/stale method parameter block from ChatGroq.with_structured_output’s docstring in langchain-groq to fix broken/incorrect API reference rendering, and adds a regression test to prevent the duplication from reappearing.
Changes:
- Delete the older duplicated
method:docstring block that omittedjson_schema. - Keep the
json_modelimitation warning in the remaining docstring content. - Add a unit test asserting the docstring documents
method:exactly once and still mentionsjson_schema.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/partners/groq/langchain_groq/chat_models.py | Removes the duplicate method docstring block and retains a json_mode warning in the remaining documentation. |
| libs/partners/groq/tests/unit_tests/test_chat_models.py | Adds a regression unit test to ensure the docstring no longer duplicates method: and still references json_schema. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mason Daugherty <github@mdrxy.com>
method block from with_structured_output docstringmethod block from with_structured_output docstring
Mason Daugherty (mdrxy)
merged commit Aug 27, 2026
67fa96f
into
langchain-ai:master
53 checks passed
Huzaifa Iftikhar (HuzaifaChaudary)
added a commit
to HuzaifaChaudary/huzaifa-portfolio
that referenced
this pull request
Aug 29, 2026
Two upstream PRs, both merged in Aug 2026: - microsoft/playwright#42449 — UI Mode filter summary as a real button - langchain-ai/langchain#39978 — stale duplicate block in Groq docstring Reuses the existing .cols layout, reveal, and parallax language; new rows are picked up by the generic [data-reveal]/[data-plx] queries. Nav gains an Open Source link in third position so the mobile nth-child(n+3) rule keeps hiding the same items as before. Favicon set is cropped from the hero photo, circular-masked, with a touch of unsharp so the face still reads at 32px: favicon.ico (16/32/48), 16 and 32 PNGs, and a full-bleed apple-touch-icon on the paper ground since iOS drops alpha. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QyQQvrZTAJ7tSpEUFMrm8r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #39977
Anyone reading the
ChatGroq.with_structured_outputreference sees themethodargument documented twice, and the two blocks disagree with each other.The first block is the current one. It lists three options and matches how the sibling
langchain-openaipackage documents the same argument. The second block is older. It says the argument is'function_calling'or'json_mode', which stopped being true when'json_schema'support was added. A reader who stops at the second block will not know'json_schema'exists, and the duplicate key also breaks API reference rendering.This removes the stale block. The one thing it said that the surviving block did not was the warning that
'json_mode'does not support streaming responses or stop sequences, so that warning moves up rather than being dropped. Everything else in it was already covered above.No behaviour changes, docstring only.
The added unit test asserts
methodappears once and thatjson_schemais still described. It fails on the currentmasterand passes with this change.Disclaimer: this contribution was prepared with the assistance of an AI agent. I reviewed the change, verified the reproduction from the issue against
master, and ran the package unit tests andrufflocally before opening it.