Repository navigation
fix(pubmed): handle missing summaries, normalize URL targets, and add test suite (#14552) - #14553
Merged
kodjima33 merged 2 commits intoSep 18, 2026
Conversation
kodjima33
approved these changes
Sep 18, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Verified on main: NCBI error-payload/Untitled-fallback bug still present, not already fixed. Confidence 4/5 (root cause stated, resolves #14552, CI clean, 22 hermetic tests added; diff slightly over the 300-line soft cap due to the new test file).
Contributor
Author
|
Thanks for reviewing and merging this PR! Following up on the bounty proposal outlined in #14552 ($25) per the repo contribution guidelines. I have sent an email to [email protected] with the claim details. Looking forward to hearing from you. Thanks again! |
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.
Summary
Resolves #14552.
Changes
Handle Missing / Error Summaries:
{"error": "cannot get document summary"}) returned when PMIDs do not exist or are deleted.ChatToolResponse(error="No PubMed record found for PMID <pmid>")instead of constructing an invalidTitle: Untitledrecord.search_pubmedandget_related_pubmed, silently skips error summary entries to maintain output integrity.Normalize PubMed URLs and Prefixes:
_normalize_pmidhelper supporting bare numeric PMIDs,PMID:/pmid:prefixes, and standardhttps://pubmed.ncbi.nlm.nih.gov/<pmid>URLs.Hermetic Test Suite (
test_main.py):/tools/get_pubmed_article,/tools/search_pubmed,/tools/get_related_pubmed,/.well-known/omi-tools.json,/health,/).test_abstract.pyandtest_related.pycontinue to pass.🎯 Bounty Reward Claim ($25)
@onlymrneo)bc1q3yjwx8s6mupuysh5p2ystvrtu8un5r0w9nxgn6