Skip to content

chore(format): ruff python files - #723

Merged
stepmikhaylov merged 1 commit into
developfrom
chore/ruff-format
May 4, 2026
Merged

stepmikhaylov merged 1 commit into
developfrom
chore/ruff-format

Conversation

@stepmikhaylov

@stepmikhaylov stepmikhaylov commented Apr 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Format Python files using Ruff to meet mandatory CI/CD checks

@coderabbitai

coderabbitai Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 255 files, which is 105 over the limit of 150.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 792e3008-8697-4b2c-8444-6aad29590290

📥 Commits

Reviewing files that changed from the base of the PR and between 2af529f and a632507.

📒 Files selected for processing (255)
  • nodes/src/nodes/accessibility_describe/accessibility_vision.py
  • nodes/src/nodes/agent_crewai/crewai_agent/IInstance.py
  • nodes/src/nodes/agent_crewai/crewai_agent/agent.py
  • nodes/src/nodes/agent_crewai/crewai_manager/IInstance.py
  • nodes/src/nodes/agent_crewai/crewai_manager/manager.py
  • nodes/src/nodes/agent_crewai/crewai_subagent/IInstance.py
  • nodes/src/nodes/agent_crewai/crewai_subagent/subagent.py
  • nodes/src/nodes/agent_deepagent/deepagent.py
  • nodes/src/nodes/agent_deepagent/deepagent_agent/IInstance.py
  • nodes/src/nodes/agent_deepagent/deepagent_subagent/IInstance.py
  • nodes/src/nodes/agent_deepagent/deepagent_subagent/subagent.py
  • nodes/src/nodes/agent_langchain/IInstance.py
  • nodes/src/nodes/agent_langchain/langchain.py
  • nodes/src/nodes/agent_rocketride/IGlobal.py
  • nodes/src/nodes/agent_rocketride/IInstance.py
  • nodes/src/nodes/agent_rocketride/planner.py
  • nodes/src/nodes/agent_rocketride/rocketride_agent.py
  • nodes/src/nodes/anonymize/IGlobal.py
  • nodes/src/nodes/anonymize/IInstance.py
  • nodes/src/nodes/anonymize/anonymize.py
  • nodes/src/nodes/anonymize/glinerRecognizer.py
  • nodes/src/nodes/astra_db/astra_db.py
  • nodes/src/nodes/atlas/atlas.py
  • nodes/src/nodes/audio_transcribe/IGlobal.py
  • nodes/src/nodes/audio_tts/IGlobal.py
  • nodes/src/nodes/audio_tts/IInstance.py
  • nodes/src/nodes/autopipe/IGlobal.py
  • nodes/src/nodes/chroma/chroma.py
  • nodes/src/nodes/db_mysql/IGlobal.py
  • nodes/src/nodes/db_neo4j/IGlobal.py
  • nodes/src/nodes/db_neo4j/IInstance.py
  • nodes/src/nodes/db_postgres/IGlobal.py
  • nodes/src/nodes/dictionary/IInstance.py
  • nodes/src/nodes/embedding_transformer/sentenceTransformer.py
  • nodes/src/nodes/extract_data/IInstance.py
  • nodes/src/nodes/frame_grabber/IInstance.py
  • nodes/src/nodes/guardrails/guardrails_engine.py
  • nodes/src/nodes/index_search/IEndpoint.py
  • nodes/src/nodes/index_search/IGlobal.py
  • nodes/src/nodes/index_search/IInstance.py
  • nodes/src/nodes/index_search/__init__.py
  • nodes/src/nodes/index_search/constants.py
  • nodes/src/nodes/index_search/elasticsearch_store.py
  • nodes/src/nodes/index_search/opensearch_client.py
  • nodes/src/nodes/library/englib_handler/__init__.py
  • nodes/src/nodes/library/msgraph/application_permissions.py
  • nodes/src/nodes/library/permissions/MSPermissions.py
  • nodes/src/nodes/library/permissions/utils.py
  • nodes/src/nodes/library/sac_requests/context/config.py
  • nodes/src/nodes/library/sac_requests/context/request.py
  • nodes/src/nodes/library/sac_requests/wrapper.py
  • nodes/src/nodes/llamaparse/IGlobal.py
  • nodes/src/nodes/llamaparse/IInstance.py
  • nodes/src/nodes/llamaparse/parser.py
  • nodes/src/nodes/llm_anthropic/IGlobal.py
  • nodes/src/nodes/llm_bedrock/IGlobal.py
  • nodes/src/nodes/llm_bedrock/bedrock.py
  • nodes/src/nodes/llm_deepseek/IGlobal.py
  • nodes/src/nodes/llm_deepseek/deepseek.py
  • nodes/src/nodes/llm_gemini/IGlobal.py
  • nodes/src/nodes/llm_gmi_cloud/IGlobal.py
  • nodes/src/nodes/llm_ibm_watson/ibm_watson.py
  • nodes/src/nodes/llm_mistral/mistral.py
  • nodes/src/nodes/llm_ollama/ollama.py
  • nodes/src/nodes/llm_openai/IGlobal.py
  • nodes/src/nodes/llm_openai_api/IGlobal.py
  • nodes/src/nodes/llm_openai_api/openai_client.py
  • nodes/src/nodes/llm_perplexity/perplexity.py
  • nodes/src/nodes/llm_qwen/IGlobal.py
  • nodes/src/nodes/llm_vertex/IGlobal.py
  • nodes/src/nodes/llm_vertex/vertex.py
  • nodes/src/nodes/llm_vision_mistral/mistral_vision.py
  • nodes/src/nodes/llm_vision_ollama/ollama_vision.py
  • nodes/src/nodes/local_text_output/IGlobal.py
  • nodes/src/nodes/memory_internal/memory.py
  • nodes/src/nodes/milvus/milvus.py
  • nodes/src/nodes/ner/IGlobal.py
  • nodes/src/nodes/ner/IInstance.py
  • nodes/src/nodes/ner/ner_recognizer.py
  • nodes/src/nodes/ocr/IGlobal.py
  • nodes/src/nodes/ocr/IInstance.py
  • nodes/src/nodes/pinecone/IGlobal.py
  • nodes/src/nodes/pinecone/pinecone.py
  • nodes/src/nodes/preprocessor_code/IInstance.py
  • nodes/src/nodes/preprocessor_code/code.py
  • nodes/src/nodes/preprocessor_langchain/langchain.py
  • nodes/src/nodes/preprocessor_llm/IInstance.py
  • nodes/src/nodes/prompt/IInstance.py
  • nodes/src/nodes/qdrant/qdrant.py
  • nodes/src/nodes/reducto/IGlobal.py
  • nodes/src/nodes/reducto/IInstance.py
  • nodes/src/nodes/reducto/parser.py
  • nodes/src/nodes/remote/client/IInstance.py
  • nodes/src/nodes/remote/client/prepare_pipeline.py
  • nodes/src/nodes/response/IInstance.py
  • nodes/src/nodes/search_exa/exa_search.py
  • nodes/src/nodes/summarization/IInstance.py
  • nodes/src/nodes/telegram/IEndpoint.py
  • nodes/src/nodes/text_output/endpoint.py
  • nodes/src/nodes/text_output/instance.py
  • nodes/src/nodes/tool_bland_ai/bland_client.py
  • nodes/src/nodes/tool_bland_ai/bland_driver.py
  • nodes/src/nodes/tool_chartjs/IInstance.py
  • nodes/src/nodes/tool_exa_search/IInstance.py
  • nodes/src/nodes/tool_firecrawl/IInstance.py
  • nodes/src/nodes/tool_firecrawl/utils.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/src/nodes/tool_http_request/IGlobal.py
  • nodes/src/nodes/tool_http_request/IInstance.py
  • nodes/src/nodes/tool_http_request/rate_limiter.py
  • nodes/src/nodes/tool_mcp_client/IGlobal.py
  • nodes/src/nodes/tool_mcp_client/mcp_sse_client.py
  • nodes/src/nodes/tool_pipe/IInstance.py
  • nodes/src/nodes/tool_python/IInstance.py
  • nodes/src/nodes/vectordb_postgres/IGlobal.py
  • nodes/src/nodes/vectordb_postgres/vectordb_postgres.py
  • nodes/src/nodes/vectorizer/IGlobal.py
  • nodes/src/nodes/weaviate/IGlobal.py
  • nodes/src/nodes/weaviate/weaviate.py
  • nodes/test/__init__.py
  • nodes/test/conftest.py
  • nodes/test/framework/__init__.py
  • nodes/test/framework/discovery.py
  • nodes/test/framework/expectations.py
  • nodes/test/framework/pipeline.py
  • nodes/test/framework/runner.py
  • nodes/test/guardrails/test_all.py
  • nodes/test/milvus/test_filter_injection.py
  • nodes/test/milvus/test_search_semantic.py
  • nodes/test/mocks/__init__.py
  • nodes/test/mocks/astrapy/__init__.py
  • nodes/test/mocks/astrapy/data_types.py
  • nodes/test/mocks/astrapy/info.py
  • nodes/test/mocks/chromadb/__init__.py
  • nodes/test/mocks/chromadb/config.py
  • nodes/test/mocks/elasticsearch/__init__.py
  • nodes/test/mocks/elasticsearch/helpers.py
  • nodes/test/mocks/langchain_anthropic/__init__.py
  • nodes/test/mocks/langchain_aws/__init__.py
  • nodes/test/mocks/langchain_google_vertexai/__init__.py
  • nodes/test/mocks/langchain_openai/__init__.py
  • nodes/test/mocks/langchain_xai/__init__.py
  • nodes/test/mocks/opensearchpy/__init__.py
  • nodes/test/mocks/opensearchpy/helpers.py
  • nodes/test/mocks/pgvector/__init__.py
  • nodes/test/mocks/pgvector/psycopg2.py
  • nodes/test/mocks/pinecone/__init__.py
  • nodes/test/mocks/pinecone/grpc.py
  • nodes/test/mocks/psycopg2/__init__.py
  • nodes/test/mocks/pymilvus/__init__.py
  • nodes/test/mocks/qdrant_client/__init__.py
  • nodes/test/mocks/qdrant_client/conversions/common_types.py
  • nodes/test/mocks/qdrant_client/http/__init__.py
  • nodes/test/mocks/qdrant_client/models.py
  • nodes/test/mocks/weaviate/__init__.py
  • nodes/test/mocks/weaviate/classes/__init__.py
  • nodes/test/mocks/weaviate/classes/config.py
  • nodes/test/mocks/weaviate/classes/init.py
  • nodes/test/mocks/weaviate/classes/query.py
  • nodes/test/mocks/weaviate/client.py
  • nodes/test/mocks/weaviate/collections/__init__.py
  • nodes/test/mocks/weaviate/collections/collection.py
  • nodes/test/mocks/weaviate/util.py
  • nodes/test/qdrant/test_mark_deleted.py
  • nodes/test/test_contracts.py
  • nodes/test/test_dynamic.py
  • nodes/test/test_dynamic_full.py
  • nodes/test/test_embedding_image.py
  • nodes/test/weaviate/test_record_updates.py
  • packages/ai/src/ai/__init__.py
  • packages/ai/src/ai/account/file_store.py
  • packages/ai/src/ai/account/oss/__init__.py
  • packages/ai/src/ai/account/store_providers/s3.py
  • packages/ai/src/ai/common/agent/_internal/utils.py
  • packages/ai/src/ai/common/agent/agent.py
  • packages/ai/src/ai/common/avi/reader.py
  • packages/ai/src/ai/common/chat.py
  • packages/ai/src/ai/common/context.py
  • packages/ai/src/ai/common/dap/transport_stdio.py
  • packages/ai/src/ai/common/dap/transport_tcpip.py
  • packages/ai/src/ai/common/database/db_global_base.py
  • packages/ai/src/ai/common/database/db_instance_base.py
  • packages/ai/src/ai/common/models/audio/kokoro_loader.py
  • packages/ai/src/ai/common/models/base.py
  • packages/ai/src/ai/common/models/gliner/__init__.py
  • packages/ai/src/ai/common/models/transformers/sentence_transformers.py
  • packages/ai/src/ai/common/models/vision/vision.py
  • packages/ai/src/ai/common/sandbox.py
  • packages/ai/src/ai/common/schema/autopipe.py
  • packages/ai/src/ai/common/store.py
  • packages/ai/src/ai/common/validation.py
  • packages/ai/src/ai/modules/clients/clients.py
  • packages/ai/src/ai/modules/data/data_conn.py
  • packages/ai/src/ai/modules/profiler/__init__.py
  • packages/ai/src/ai/modules/profiler/profile.py
  • packages/ai/src/ai/modules/remote/remote.py
  • packages/ai/src/ai/modules/remote/remote_delete.py
  • packages/ai/src/ai/modules/task/commands/cmd_debug.py
  • packages/ai/src/ai/modules/task/commands/cmd_misc.py
  • packages/ai/src/ai/modules/task/commands/cmd_monitor.py
  • packages/ai/src/ai/modules/task/commands/cmd_task.py
  • packages/ai/src/ai/modules/task/dbg_stdio.py
  • packages/ai/src/ai/modules/task/task_engine.py
  • packages/ai/src/ai/modules/task/task_metrics.py
  • packages/ai/src/ai/modules/task/task_server.py
  • packages/ai/src/ai/modules/task_http/task_data.py
  • packages/ai/src/ai/node.py
  • packages/ai/src/ai/web/server.py
  • packages/ai/tests/ai/modules/profiler/test_auth.py
  • packages/ai/tests/ai/modules/task/test_env_var_exfil.py
  • packages/ai/tests/ai/modules/task/test_temp_file_security.py
  • packages/ai/tests/ai/web/test_server.py
  • packages/client-mcp/src/rocketride_mcp/prompts.py
  • packages/client-mcp/tests/conftest.py
  • packages/client-mcp/tests/test_config.py
  • packages/client-mcp/tests/test_server.py
  • packages/client-mcp/tests/test_tools.py
  • packages/client-python/src/rocketride/cli/__init__.py
  • packages/client-python/src/rocketride/cli/commands/events.py
  • packages/client-python/src/rocketride/cli/main.py
  • packages/client-python/src/rocketride/cli/monitors/events.py
  • packages/client-python/src/rocketride/cli/monitors/status.py
  • packages/client-python/src/rocketride/cli/monitors/upload.py
  • packages/client-python/src/rocketride/client.py
  • packages/client-python/src/rocketride/core/dap_base.py
  • packages/client-python/src/rocketride/core/transport_websocket.py
  • packages/client-python/src/rocketride/mixins/connection.py
  • packages/client-python/src/rocketride/mixins/data.py
  • packages/client-python/src/rocketride/mixins/execution.py
  • packages/client-python/src/rocketride/mixins/store.py
  • packages/client-python/src/rocketride/schema/__init__.py
  • packages/client-python/src/rocketride/schema/doc.py
  • packages/client-python/src/rocketride/schema/doc_filter.py
  • packages/client-python/src/rocketride/schema/doc_group.py
  • packages/client-python/src/rocketride/schema/doc_metadata.py
  • packages/client-python/src/rocketride/schema/question.py
  • packages/client-python/src/rocketride/types/client.py
  • packages/client-python/src/rocketride/types/data.py
  • packages/client-python/src/rocketride/types/task.py
  • packages/client-python/tests/RocketRideClient_test.py
  • packages/client-python/tests/chat_pipeline.py
  • packages/client-python/tests/echo_pipeline.py
  • packages/client-python/tests/embedding_image_pipeline.py
  • packages/server/engine-lib/rocketlib-python/lib/depends.py
  • packages/server/engine-lib/rocketlib-python/lib/msauth.py
  • packages/server/engine-lib/rocketlib-python/lib/rocketlib/filters.py
  • scripts/check_gpu.py
  • test/testdata/tests/tasktest.py
  • testdata/images/generate_test_images.py
  • tools/src/core/merger.py
  • tools/src/core/reporter.py
  • tools/src/core/smoke.py
  • tools/src/providers/base.py
  • tools/src/sync_models.py
  • tools/test/test_sync_live.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ruff-format

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the builder Node builder tooling and ./builder workflows label Apr 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

No description provided.

@stepmikhaylov stepmikhaylov changed the title chore(format): ruff format python files chore(format): ruff python files Apr 29, 2026
@stepmikhaylov
stepmikhaylov force-pushed the chore/ci-ruff-check branch from 744816c to b4b5f3d Compare May 4, 2026 13:27
@stepmikhaylov
stepmikhaylov force-pushed the chore/ruff-format branch 3 times, most recently from aefdddd to 02c7267 Compare May 4, 2026 14:35
Base automatically changed from chore/ci-ruff-check to develop May 4, 2026 16:20
@github-actions github-actions Bot added the ci/cd CI/CD and build system label May 4, 2026
@github-actions github-actions Bot removed the ci/cd CI/CD and build system label May 4, 2026
@stepmikhaylov
stepmikhaylov marked this pull request as ready for review May 4, 2026 16:21
@stepmikhaylov
stepmikhaylov merged commit 86f0918 into develop May 4, 2026
18 checks passed
@stepmikhaylov
stepmikhaylov deleted the chore/ruff-format branch May 4, 2026 16:47
stepmikhaylov added a commit that referenced this pull request May 4, 2026
nihalnihalani added a commit to nihalnihalani/rocketride-server that referenced this pull request May 15, 2026
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>
nihalnihalani added a commit to nihalnihalani/rocketride-server that referenced this pull request May 15, 2026
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>
nihalnihalani added a commit to nihalnihalani/rocketride-server that referenced this pull request May 15, 2026
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>
stepmikhaylov pushed a commit that referenced this pull request May 20, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder Node builder tooling and ./builder workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant