Repository navigation
Improve context provider functions in llm_context.py - #31
Merged
Merged
Conversation
Refactor context provider functions for clarity and type hints.
Reviewer's GuideThis refactor keeps ContextVar-based provider resolution unchanged while making the helper functions clearer through concise documentation, improved token typing, and minor formatting cleanup. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
👋 Thanks for opening this PR! A maintainer will review it soon. In the meantime, please make sure you've read CONTRIBUTING.md and filled out the PR template, including screenshots for any visual changes. |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="core/llm_context.py" line_range="1-24" />
<code_context>
-"""The ContextVar seam BYOK uses to reach get_llm_provider() (providers/llm/__init__.py)
</code_context>
<issue_to_address>
**nitpick:** Removing the module-level docstring makes `core.llm_context.__doc__` become `None`, so generated API documentation and introspection tools lose the ContextVar lifecycle and request-boundary guidance that this module previously exposed.
**Triggers:** When documentation tooling or runtime introspection reads `core.llm_context.__doc__`.
**Suggested fix:** Retain the module-level docstring while shortening or updating it as needed.
</issue_to_address>Sourcery assessment
Approved.
DevSidd2006
reviewed
Sep 30, 2026
DevSidd2006
left a comment
Owner
There was a problem hiding this comment.
How this will affect the codebase?
…_context_provider
|
🎉 Thanks for the contribution, @leenacags! This PR has been merged. We appreciate you helping improve OpenHire. |
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.
Refactor context provider functions for clarity and type hints.
Description
Please include a summary of the change and which issue it fixes. Include relevant motivation and context.
Fixes #30
Screenshots (if visual change)
For any UI/visual change, add before & after screenshots or a short GIF.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Include instructions so we can reproduce.
pytest tests/ -v)LLM_PROVIDER=mock)pages/(if applicable)Checklist:
Summary by Sourcery
Enhancements: