feat(vision): add optional hint param to VisionProvider port (0.7.1) - #83
Merged
Conversation
nullain-agent's Fase 3 vision-port migration needs a way to steer what describe_image/ocr/analyze_screenshot prioritize (the user's own question about the image) — the prior Groq-direct call passed this as a hint, and the Protocol had no equivalent lever. Adds hint: str | None = None, keyword-only, to all three VisionProvider methods and threads it through ModelRouterVisionProvider's internal prompt. Purely additive: no existing call site is affected, and VisionProvider isn't part of the top-level nullain.__all__ public surface (docs/api-stability.md) — 0.7.1, not a MINOR bump. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Aug 12, 2026
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
VisionProvider.describe_image/ocr/analyze_screenshotgain an optional, keyword-onlyhint: str | None = None— free-text guidance to steer what an adapter prioritizes (e.g. the end user's own question about the image).ModelRouterVisionProviderfoldshintinto its internal prompt when given; unchanged prompt when omitted. Not sanitized by the adapter — a caller feeding user-supplied text is responsible for sanitizing it first.nullain-sdk0.7.0→0.7.1. PATCH, not MINOR: purely additive, no existing call site affected, andVisionProviderisn't part of the top-levelnullain.__all__public surface (docs/api-stability.md).Driven by
nullain-agent's Fase 3 vision-port migration: the prior Groq-direct call passed the user's chat message as a hint to prioritize the image description, and the Protocol had no equivalent lever.Test plan
ruff check ./ruff format --check .— cleanpyright— 0 errorspytest tests/unit/test_vision_provider_contract.py tests/unit/test_chat_message_content_parts.py— 14/14 passed (2 new: hint used / hint omitted)test_tools_security.py, Windows sandboxechoPATH issue, reproduces identically onmaster)Not publishing to PyPI from here — per repo convention, that's a manual
workflow_dispatchwithtarget=pypiafter merge, gated by environment approval.🤖 Generated with Claude Code