Repository navigation
chore(format): apply ruff format to llm_vision_* files - #900
nihalnihalani wants to merge 2 commits into
Conversation
Pure `ruff format` output — line-break reformatting only, no semantic changes. These three files drifted out of format after the repo-wide cleanup in PR rocketride-org#723 merged on 2026-05-04, causing `ruff format --check` in the `ruff-check` CI job to fail on every PR that branches from develop. The `CI OK` gatekeeper depends on `ruff-check`, so the drift blocks merges. Restores `ruff format --check` green so PRs (rocketride-org#897, rocketride-org#898, rocketride-org#899 and any others currently open) stop inheriting this failure. Verified locally with `ruff 0.15.0`: - `ruff format --check .` → 787 files already formatted, 0 to reformat - `ruff check nodes/src/nodes/llm_vision_*/` → all checks passed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR reformats error handling and validation messages across three LLM vision modules. Exception imports, catch clauses, error messages, retry condition lists, and timeout warnings are split from single-line statements into multi-line formats. All logic and behavior remain unchanged. ChangesVision LLM exception handling and message formatting
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No description provided. |
Mirrors rocketride-org#900. These three pre-existing files on develop drifted out of `ruff format --check` after PR rocketride-org#723's cleanup; including the fix here so this PR's CI `ruff-check` (and the `CI OK` gatekeeper that depends on it) goes green without waiting for rocketride-org#900 to merge first. Pure mechanical `ruff format` output — line-break reformatting only, no semantic changes. If rocketride-org#900 merges first, this commit becomes a no-op on rebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors rocketride-org#900. These three pre-existing files on develop drifted out of `ruff format --check` after PR rocketride-org#723's cleanup; including the fix here so this PR's CI `ruff-check` (and the `CI OK` gatekeeper that depends on it) goes green without waiting for rocketride-org#900 to merge first. Pure mechanical `ruff format` output — line-break reformatting only, no semantic changes. If rocketride-org#900 merges first, this commit becomes a no-op on rebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors rocketride-org#900. These three pre-existing files on develop drifted out of `ruff format --check` after PR rocketride-org#723's cleanup; including the fix here so this PR's CI `ruff-check` (and the `CI OK` gatekeeper that depends on it) goes green without waiting for rocketride-org#900 to merge first. Pure mechanical `ruff format` output — line-break reformatting only, no semantic changes. If rocketride-org#900 merges first, this commit becomes a no-op on rebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prior run failed on `from rocketlib import normalize_tool_input` — the symbol IS exported from rocketlib/__init__.py line 63/141 on this branch (identical to develop). Same import passes on companion PRs rocketride-org#897/rocketride-org#898/rocketride-org#899/rocketride-org#900 with the same merge of develop, so this is a stale build-cache flake. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Could you please review the new commit? |
|
It looks not relevant, there are no changes for merge. |
|
This is a low-risk formatting-only change: ran ruff format on llm_vision_gemini and llm_vision_openai with no behavior changes (whitespace/line-break adjustments only). CI is green across Ruff, gitleaks, and all platform builds. @Rod-Christensen @jmaionchi @stepmikhaylov could one of you take a quick look so we can land it? Happy to rebase if anything else needs to be folded in. |
* feat(nodes): add Cohere Rerank pipeline node Adds a `rerank_cohere` pipeline node that slots between vector search and the LLM in RAG pipelines, improving answer quality by reranking retrieved documents by relevance to the query. Components: - RerankClient — wraps Cohere ClientV2 with top_n/min_score validation and an exception hierarchy (RerankAuthenticationError, RerankRateLimitError, RerankBadRequestError, RerankServerError) named for circuit-breaker substring heuristics. - IGlobal — standard validateConfig (no live API call) and beginGlobal lifecycle, with depends() for SDK auto-install. - IInstance — deep-copies question (fan-out safe), maps rerank result indices back through original document positions so metadata stays aligned when min_score filters blank docs, always emits an answer. - services.json — rerank-v3.5 (default), rerank-english-v3.0, custom profiles; top_n and min_score exposed in all preset shapes. Resubmission of the rerank portion of closed PR #499 per maintainer feedback: one PR per node, clean branch from develop, no unrelated file changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(format): apply ruff format to llm_vision_* files Mirrors #900. These three pre-existing files on develop drifted out of `ruff format --check` after PR #723's cleanup; including the fix here so this PR's CI `ruff-check` (and the `CI OK` gatekeeper that depends on it) goes green without waiting for #900 to merge first. Pure mechanical `ruff format` output — line-break reformatting only, no semantic changes. If #900 merges first, this commit becomes a no-op on rebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(rerank_cohere): harden validation, mark experimental, default to v3.0 - services.json: mark capabilities=["experimental"] (stepmikhaylov CR-1) - services.json: default preset rerank-english-v3.0 (CodeRabbit nit) - services.json: add requires=["ROCKETRIDE_RERANK_COHERE_KEY"] on test block so missing keys skip dynamic tests cleanly (stepmikhaylov CR-6) - rerank_client.py: accept int|float for top_n (excluding bool) and coerce JSON 5.0 -> 5; same bool-exclusion for min_score; centralized in _coerce_top_n / _validate_min_score helpers (stepmikhaylov CR-7 + CodeRabbit non-bool int check) - IGlobal.py: validateConfig rejects non-str/whitespace-only apikey and model before .strip() (CodeRabbit) - IInstance.py: trim query/document strings before emptiness checks so whitespace-only payloads are rejected (CodeRabbit) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(rerank_cohere): relocate to nodes/test/rerank_cohere/test_all.py Per repo convention for node-specific unit tests. Stops mocking engine-level modules (rocketlib, ai.*, depends) and drops the sys.path.insert hack — IGlobal/IInstance are imported through the build interpreter that already provides them, matching guardrails and astra_db. The external cohere SDK is the only dependency mocked, sourced from the canonical nodes/test/mocks/cohere/ package. The mock is loaded via a scoped sys.path so other tests are not contaminated. Additional coverage: - top_n: accepts JSON float 5.0 (coerced to int), rejects 2.5 and bool - min_score: rejects bool (subclass of int) at init and override - validateConfig: rejects non-string apikey/model before .strip() - IInstance: whitespace-only query and whitespace-only page_content raise ValueError Addresses stepmikhaylov CR-2..CR-5 and CodeRabbit nit re patch.dict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(rerank_cohere): supply required DocMetadata fields in IInstance tests Three IInstance tests (test_write_questions_preserves_metadata, test_write_questions_metadata_alignment_after_filter, test_write_questions_does_not_mutate_original) constructed Doc objects with metadata dicts missing the required chunkId (and in one case objectId) fields. The build interpreter's real pydantic DocMetadata schema requires both, so the tests failed with ValidationError under builder nodes:test even though they passed locally with the cohere mock. Also tighten the dict-equality assertion to attribute-level since DocMetadata is a pydantic model, not a dict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(rerank_cohere): harden runtime input validation in RerankClient.rerank Reject non-string and whitespace-only query/documents/model values before calling the Cohere SDK, so callers get a deterministic local ValueError instead of RerankBadRequestError/RerankServerError from the network. This keeps the wrapper's stable validation contract aligned with the existing validateConfig hardening. Addresses CodeRabbit review on PR #898. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Summary
Pure mechanical
ruff formatpass on three files that drifted out of format after PR #723's repo-wide cleanup (merged 2026-05-04):nodes/src/nodes/llm_vision_gemini/IGlobal.pynodes/src/nodes/llm_vision_gemini/gemini_vision.pynodes/src/nodes/llm_vision_openai/openai_vision.py48 insertions / 9 deletions, all line-break reformatting (long
except (...)tuples and chained assignments wrapped onto multiple lines). Zero semantic changes.Why
.github/workflows/ci.yml'sruff-checkjob runsruff format --checkagainst the full repo. These three files currently fail it, which fails theCI OKgatekeeper that depends onruff-check. Every PR branched from develop inherits this failure — including currently open PRs #897, #898, #899 (and likely others).Develop's own most recent CI run (sha
5362aad1) is inconclusion: failurefor exactly this reason.Pattern precedent
Follows the same pattern as merged PR #723 (
chore(format): ruff python files, merged 2026-05-04 by @stepmikhaylov). This is a much smaller scoped follow-up — just the 3 files that drifted since then.Validation
Merging this unblocks
ruff-checkon every currently open PR.🤖 Generated with Claude Code
Summary by CodeRabbit