Skip to content

feat: Add Bland AI voice call tool node - #521

Merged
stepmikhaylov merged 7 commits into
rocketride-org:developfrom
SankarSubbayya:feat/tool-bland-ai
Apr 6, 2026
Merged

stepmikhaylov merged 7 commits into
rocketride-org:developfrom
SankarSubbayya:feat/tool-bland-ai

Conversation

@SankarSubbayya

@SankarSubbayya SankarSubbayya commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a new tool node tool_bland_ai that enables RocketRide agents to make and manage AI-powered phone calls via the Bland AI API.

Tools exposed for agent invocation:

  • make_call — initiate outbound AI voice calls with custom task instructions, voice selection, and webhook support
  • get_call — retrieve call details including transcript, recording URL, duration, and summary
  • analyze_call — run post-call AI analysis with custom goal and questions

Configuration (via services.json UI):

  • API key (required, from https://www.bland.ai)
  • Default voice: June, Josh, Nat, Paige, Derek, Florian
  • Max call duration (minutes)
  • Recording toggle
  • Language selection (6 languages)

Architecture

Follows the same pattern as tool_http_request:

  • services.json — node registration, UI config fields, and shape
  • BlandDriver extends ToolsBase with _tool_query / _tool_validate / _tool_invoke
  • bland_client.py — authenticated HTTP requests to api.bland.ai/v1
  • IGlobal reads config and creates driver; IInstance delegates invocation

Use cases

  • Customer outreach and follow-up calls
  • Appointment reminders and scheduling
  • Survey and feedback collection
  • Senior care check-ins (built for CareGraph)
  • Lead qualification calls

Files added

nodes/src/nodes/tool_bland_ai/
├── __init__.py
├── services.json       # Node registration + UI config
├── IGlobal.py          # Global state — reads config, creates driver
├── IInstance.py         # Instance — delegates to driver
├── bland_driver.py     # ToolsBase implementation (3 tools)
└── bland_client.py     # Bland AI HTTP client

API Reference

  • Bland AI docs: https://docs.bland.ai
  • Send Call: POST /v1/calls
  • Get Call: GET /v1/calls/{call_id}
  • Analyze Call: POST /v1/calls/{call_id}/analyze

Test plan

  • Verify services.json renders correctly in RocketRide VS Code extension
  • Test make_call with a real Bland AI API key and phone number
  • Test get_call returns transcript after call completes
  • Test analyze_call returns structured analysis
  • Verify agent can invoke all three tools in a pipeline
  • Test validation rejects missing API key, phone number, and call_id

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Bland AI integration: tools to initiate calls, retrieve call status/results, and analyze completed calls.
    • Configurable settings exposed in UI: API key, server name, voice, max call duration, recording preference, and language.
    • UI asset: Bland AI icon added for the service.
  • Validation

    • Configuration checks emit warnings for missing API key and invalid max-duration values.

Add a new tool node `tool_bland_ai` that enables agents to make and manage
AI-powered phone calls via the Bland AI API (https://www.bland.ai).

Three tools exposed for agent invocation:
- `make_call` — initiate outbound AI voice calls with custom task instructions
- `get_call` — retrieve call details, transcript, recording URL, and summary
- `analyze_call` — run post-call AI analysis with custom questions

Configuration:
- API key (required)
- Default voice (June, Josh, Nat, Paige, Derek, Florian)
- Max call duration, recording toggle, language selection

Use cases:
- Customer outreach and follow-up calls
- Appointment reminders and scheduling
- Survey and feedback collection
- Senior care check-ins (e.g., CareGraph)
- Lead qualification calls

Follows the same pattern as tool_http_request: services.json for UI config,
BlandDriver extends ToolsBase with _tool_query/_tool_validate/_tool_invoke,
bland_client.py handles authenticated HTTP requests to api.bland.ai/v1.

API docs: https://docs.bland.ai
@coderabbitai

coderabbitai Bot commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new Bland AI tool: package exports, global lifecycle, instance invoke handler, an HTTP client for Bland AI v1, a ToolsBase driver implementing call/get/analyze tools, a service configuration, and a bundled icon registration.

Changes

Cohort / File(s) Summary
Service Configuration
nodes/src/nodes/tool_bland_ai/services.json
New service entry registering the Bland AI tool (tool_bland_ai://), namespace bland, runtime mapping, UI metadata, bland_ai.* configurable fields, and a default preconfig.
Package Init
nodes/src/nodes/tool_bland_ai/__init__.py
Adds package initializer exporting IGlobal and IInstance and sets __all__.
Global lifecycle
nodes/src/nodes/tool_bland_ai/IGlobal.py
New IGlobal class: parses node config, validates apikey and maxDuration, parses booleans, constructs BlandDriver (or warns/raises), implements beginGlobal, validateConfig, and endGlobal (clears driver).
Instance runtime
nodes/src/nodes/tool_bland_ai/IInstance.py
New IInstance that reads IGlobal.driver in invoke, raises if uninitialized, and delegates to driver.handle_invoke.
HTTP client
nodes/src/nodes/tool_bland_ai/bland_client.py
New REST client for Bland AI v1: make_call, get_call, get_call_when_complete, and analyze_call with input validation (webhook HTTPS), timeouts, error propagation, polling for completion, and JSON responses.
Tool driver
nodes/src/nodes/tool_bland_ai/bland_driver.py
New BlandDriver (extends ToolsBase): exposes namespaced tools (serverName.tool), provides JSON input schemas, validates inputs (required fields, max_duration), and dispatches to bland_client endpoints, supporting wait-for-completion and per-call overrides.
Dependencies
nodes/src/nodes/tool_bland_ai/requirements.txt
Adds requests dependency for the Bland AI client.
UI icon mapping
packages/shared-ui/src/modules/flow/util/get-icon-path.ts
Registers new bundled icon key 'bland-ai' in the icon map and imports the asset.

Sequence Diagram

sequenceDiagram
    participant Client as Client/Workflow
    participant Instance as IInstance
    participant Global as IGlobal
    participant Driver as BlandDriver
    participant APIClient as bland_client
    participant BlandAPI as Bland API

    Client->>Instance: invoke(param)
    Instance->>Global: access driver
    Global-->>Instance: BlandDriver

    rect rgba(100,150,200,0.5)
    Instance->>Driver: handle_invoke(param)
    Driver->>Driver: _tool_validate(tool_name, input_obj)
    Driver->>Driver: _tool_invoke(tool_name, input_obj)
    end

    rect rgba(150,100,200,0.5)
    Driver->>APIClient: make_call/get_call/analyze_call(...)
    APIClient->>BlandAPI: HTTP request
    BlandAPI-->>APIClient: JSON response
    APIClient-->>Driver: parsed result
    end

    Driver-->>Instance: result
    Instance-->>Client: return result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

module:ui

Suggested reviewers

  • jmaionchi
  • stepmikhaylov
  • Rod-Christensen

Poem

🐰 I hopped through code to wire a call,
Bland voices wake when prompts do fall.
Drivers born, configs checked and bright,
HTTP hops through day and night.
Rabbit cheers—features take flight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Add Bland AI voice call tool node' accurately and concisely summarizes the main change: introducing a new Bland AI tool node for voice call integration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nodes/src/nodes/tool_bland_ai/bland_client.py`:
- Around line 71-72: The current code silently drops non-HTTPS webhook values
(the webhook variable) when building the payload dict (payload["webhook"]) —
instead validate the webhook when provided and explicitly reject non-HTTPS
input: if webhook is not None and not webhook.startswith("https://") raise a
clear exception (e.g., ValueError) or return an error to the caller with a
descriptive message so invalid webhook URLs are not silently ignored; keep
assigning payload["webhook"] only after the HTTPS check passes.
- Around line 37-140: The file uses double quotes for regular string literals
(e.g., BLAND_BASE_URL and all string values in make_call, get_call,
analyze_call, stop_call, list_calls), so update those to single-quoted literals
throughout while leaving triple-double-quoted docstrings unchanged; specifically
change the BLAND_BASE_URL value, all header values like "authorization" and
"Content-Type", URL strings built with f-strings, default parameter strings
(voice, language, goal), list/default question strings, and any other
non-docstring double-quoted literals in functions make_call, get_call,
analyze_call, stop_call, and list_calls to use single quotes to match the repo
convention.

In `@nodes/src/nodes/tool_bland_ai/bland_driver.py`:
- Around line 48-229: The file uses double-quoted regular string literals
throughout (in MAKE_CALL_SCHEMA, GET_CALL_SCHEMA, ANALYZE_CALL_SCHEMA, the
_tools descriptions, validation error messages in _tool_validate, and calls in
_tool_invoke) instead of the repo-standard single quotes; update all regular
string literals to use single quotes (leave triple-quoted docstring for class
BlandDriver as-is), e.g., change the schema property "type"/"description"
values, all description strings in self._tools, and error text like "Tool input
must be a JSON object" and "phone_number is required" to single-quoted versions,
ensuring consistency across MAKE_CALL_SCHEMA, GET_CALL_SCHEMA,
ANALYZE_CALL_SCHEMA, self._tools, _tool_validate, and _tool_invoke.
- Around line 187-196: Validate trimmed string values and enforce positive
duration bounds: when handling bare_name == "make_call" ensure
input_obj["phone_number"] and input_obj["task"] are present after stripping
whitespace (i.e., non-empty trimmed strings), parse/validate
input_obj.get("max_duration") (or similar) to ensure it is a number > 0 (raise
ValueError if missing/invalid/non-positive), and for bare_name in ("get_call",
"analyze_call") ensure input_obj["call_id"] is a non-empty trimmed string;
update the checks in bland_driver.py around bare_name, input_obj, make_call,
get_call, analyze_call and max_duration to perform trimming, type validation,
and raise clear ValueError messages for invalid inputs before invoking the API.

In `@nodes/src/nodes/tool_bland_ai/IGlobal.py`:
- Around line 59-60: The current boolean assignment for record (record =
bool(cfg.get("record", True))) misinterprets string values like "false"; replace
it with explicit parsing: retrieve raw = cfg.get("record", True) and then set
record by checking types—if raw is a bool use it, if raw is a str normalize and
compare against accepted truthy/falsey tokens (e.g.,
"true","false","1","0","yes","no"), otherwise coerce fallback values safely
(e.g., bool(raw)); implement this inline or as a small helper (e.g., parse_bool)
and use it where record is set in IGlobal.py to ensure correct boolean
semantics.
- Around line 51-83: Normalize regular string literals to single quotes in
IGlobal.py: replace double-quoted config keys and messages used in the
constructor and validateConfig (e.g., "apikey", "serverName", "voice",
"maxDuration", "record", "language", "bland", "June", the warning messages like
"Bland AI API key is required. Get one at https://www.bland.ai", "Bland AI API
key not configured", "API key is required", and any str(e) uses that are plain
strings) with single-quoted equivalents; keep any docstrings as triple-double
quotes; ensure changes touch the BlandDriver initialization block and the
validateConfig method so all regular literal strings follow the single-quote
convention.

In `@nodes/src/nodes/tool_bland_ai/IInstance.py`:
- Around line 43-45: In IInstance, normalize string quoting to single quotes:
change the double-quoted literals used as the getattr default and in the
RuntimeError message so that getattr(self.IGlobal, 'driver', None) and raise
RuntimeError('bland_ai: driver not initialized — check API key configuration')
use single quotes; update the lines referencing driver/getattr and the
RuntimeError in class IInstance accordingly for consistency with node string
conventions.

In `@nodes/src/nodes/tool_bland_ai/services.json`:
- Around line 35-40: The bland_ai.apikey property is defined as a plain string
and must be treated as a secret; update the services.json entry for
"bland_ai.apikey" (the API key field) to mark it as secure and specify the
API-key widget so it is rendered and stored as a secret (use the appropriate
"widget": "api-key" or framework-specific secret flag alongside "type":"string"
and preserve title/description/default). This change ensures the API key is
hidden in the UI and excluded from plain config exports.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d76b0946-f79e-4e88-8330-a75ddd136ddd

📥 Commits

Reviewing files that changed from the base of the PR and between b6b2dc1 and 40241af.

📒 Files selected for processing (6)
  • nodes/src/nodes/tool_bland_ai/IGlobal.py
  • nodes/src/nodes/tool_bland_ai/IInstance.py
  • nodes/src/nodes/tool_bland_ai/__init__.py
  • nodes/src/nodes/tool_bland_ai/bland_client.py
  • nodes/src/nodes/tool_bland_ai/bland_driver.py
  • nodes/src/nodes/tool_bland_ai/services.json

- Single-quote all regular string literals (repo convention)
- Webhook validation: raise ValueError for non-HTTPS URLs instead of silently dropping
- Input validation: trim whitespace on phone_number, task, call_id before checking
- Duration validation: enforce positive integer for max_duration
- Boolean parsing: handle string config values like "false" correctly via _parse_bool()
- API key security: mark apikey field as secure with ApiKeyWidget in services.json
- Use TypeError instead of ValueError for invalid input types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nodes/src/nodes/tool_bland_ai/bland_driver.py`:
- Around line 72-75: The invoke path is forwarding raw values instead of the
validated/normalized ones, so update _tool_invoke to use the cleaned parameters:
trim whitespace from phone_number and call_id, coerce/parse max_duration to a
number (use default 5 if missing/NaN) and pass those normalized values to the
API call (and any other call sites that currently forward raw inputs); ensure
the normalization logic used by the validator (the same helper you already have)
is applied right before the external request so only sanitized values are sent.

In `@nodes/src/nodes/tool_bland_ai/IGlobal.py`:
- Around line 67-69: Validate and sanitize the maxDuration value when loading
globals: instead of blindly doing max_duration = int(cfg.get('maxDuration') or
5), parse cfg.get('maxDuration') safely (try/except), treat
missing/invalid/non-int values as the default 5, and enforce bounds (e.g.,
minimum 1, optionally a reasonable maximum like 3600) so negative, zero, or
out-of-range values are replaced with the default or clamped; update the
assignment in the same block where max_duration is set (referencing the
max_duration variable) to perform this validation before using it elsewhere.

In `@nodes/src/nodes/tool_bland_ai/services.json`:
- Around line 59-64: The schema for bland_ai.maxDuration currently allows any
number; change its JSON Schema to require a positive integer by setting "type"
to "integer" and adding "minimum": 1 (keep "default": 5 and update the
"description" to indicate minutes must be a positive integer) so runtime
receives only valid positive-integer durations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e4f4ba37-d883-4afb-b3ac-e2660354f681

📥 Commits

Reviewing files that changed from the base of the PR and between 40241af and 232ccd7.

📒 Files selected for processing (5)
  • nodes/src/nodes/tool_bland_ai/IGlobal.py
  • nodes/src/nodes/tool_bland_ai/IInstance.py
  • nodes/src/nodes/tool_bland_ai/bland_client.py
  • nodes/src/nodes/tool_bland_ai/bland_driver.py
  • nodes/src/nodes/tool_bland_ai/services.json

- _tool_invoke now trims whitespace from phone_number, task, call_id before API calls
- max_duration parsed and normalized at invoke time (not just validation)
- Reject bool values for max_duration (bool is subclass of int in Python)
- IGlobal validates maxDuration bounds: must be positive integer, rejects 0/negative/bool
- services.json: maxDuration type changed from "number" to "integer" with "minimum": 1
- bland_driver schema: max_duration type changed to "integer" with "minimum": 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nodes/src/nodes/tool_bland_ai/IGlobal.py`:
- Around line 92-99: Extend validateConfig to also validate
cfg.get('maxDuration'): fetch maxDuration from cfg in validateConfig, ensure
it's not a boolean, parseable as an integer, and greater than zero; if it fails
any check call warning(...) with a clear message that maxDuration must be a
positive integer. Keep the existing apikey validation intact and mirror the same
try/except pattern (use validateConfig, cfg, apikey, maxDuration, and warning)
so beginGlobal will no longer be the first place to surface invalid maxDuration
errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6a52d1f8-70f4-48fe-a914-53ad05f3f208

📥 Commits

Reviewing files that changed from the base of the PR and between 232ccd7 and 75c2283.

📒 Files selected for processing (3)
  • nodes/src/nodes/tool_bland_ai/IGlobal.py
  • nodes/src/nodes/tool_bland_ai/bland_driver.py
  • nodes/src/nodes/tool_bland_ai/services.json

Extend validateConfig to check maxDuration: rejects booleans,
non-integer values, and non-positive integers with a clear warning
so invalid values surface in the config UI before beginGlobal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
nodes/src/nodes/tool_bland_ai/IGlobal.py (1)

107-108: ⚠️ Potential issue | 🟡 Minor

Add targeted Ruff suppression (or narrow exception) for validateConfig catch-all.

Line 107 currently uses a blind Exception catch, which triggers BLE001. Given this repo’s established monolithic validateConfig pattern, keep the flow but add a targeted suppression with justification.

♻️ Minimal fix
-        except Exception as e:
+        except Exception as e:  # noqa: BLE001 - validateConfig should not raise; surface probe failures as UI warnings
             warning(str(e))
Based on learnings, this codebase keeps the monolithic validation probe pattern and prefers targeted Ruff `noqa` (e.g., `BLE001`) with an explicit justification comment.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nodes/src/nodes/tool_bland_ai/IGlobal.py` around lines 107 - 108, The
catch-all in validateConfig currently uses "except Exception as e" which
triggers Ruff BLE001; keep the monolithic validation pattern but add a targeted
Ruff suppression and justification comment immediately on that except (e.g., "#
noqa: BLE001 - intentional monolithic validation probe; catching all exceptions
to surface validation warnings via warning()") so the linter is satisfied while
preserving the flow; locate the validateConfig function and the except block
that calls warning(str(e)) and add the noqa comment (or alternatively narrow to
a specific exception type if you prefer) with the justification.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@nodes/src/nodes/tool_bland_ai/IGlobal.py`:
- Around line 107-108: The catch-all in validateConfig currently uses "except
Exception as e" which triggers Ruff BLE001; keep the monolithic validation
pattern but add a targeted Ruff suppression and justification comment
immediately on that except (e.g., "# noqa: BLE001 - intentional monolithic
validation probe; catching all exceptions to surface validation warnings via
warning()") so the linter is satisfied while preserving the flow; locate the
validateConfig function and the except block that calls warning(str(e)) and add
the noqa comment (or alternatively narrow to a specific exception type if you
prefer) with the justification.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7f3b1659-1202-49ba-9ef6-042027f3d3d8

📥 Commits

Reviewing files that changed from the base of the PR and between 75c2283 and 682e998.

📒 Files selected for processing (1)
  • nodes/src/nodes/tool_bland_ai/IGlobal.py

@github-actions github-actions Bot added the module:ui Chat UI and Dropper UI label Apr 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
nodes/src/nodes/tool_bland_ai/bland_driver.py (1)

171-171: ⚠️ Potential issue | 🟡 Minor

Use single quotes for remaining regular string literals in error formatting.

Line 171 still mixes double-quoted regular string literals in the join(...) / f-string expression.

As per coding guidelines, nodes/**/*.py requires single quotes for regular string literals.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nodes/src/nodes/tool_bland_ai/bland_driver.py` at line 171, The error message
mixes double-quoted regular string literals; update the f-string expression so
regular strings use single quotes: change the separator to ', ' (instead of ",
") and the inner f-string to use f'{self._server_name}.{t}' (instead of
f"{self._server_name}.{t}"), leaving the outer raise ValueError(...) intact and
still referencing tool_name, self._server_name, and self._tools.
nodes/src/nodes/tool_bland_ai/bland_client.py (1)

112-112: ⚠️ Potential issue | 🟡 Minor

Normalize remaining regular string literals to single quotes.

There are still a couple of non-docstring double-quoted literals left (result.get("status"), first question string), which breaks the node Python quote convention.

As per coding guidelines, nodes/**/*.py should use single quotes for regular string literals while keeping PEP 257 docstrings in triple double quotes.

Also applies to: 125-125

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nodes/src/nodes/tool_bland_ai/bland_client.py` at line 112, Normalize the
remaining regular string literals in this block to single quotes: change
result.get("status") to result.get('status') in the TimeoutError raise and
update the other regular string literal (the first question string near line 125
in this function) from double quotes to single quotes; leave any docstrings
unchanged. Identify the surrounding function (the call polling/waiting function
that raises TimeoutError and references call_id) and make these replacements
where result.get("status") and the first question string are used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nodes/src/nodes/tool_bland_ai/bland_driver.py`:
- Around line 195-199: The code for the ('get_call','analyze_call') branches
reads input_obj.get('wait_for_completion') using truthiness which treats strings
like "false" as true; change the handling of wait_for_completion so it is
coerced to a strict boolean before any poll/wait logic: read value =
input_obj.get('wait_for_completion'), if it's a string normalize with
.strip().lower() and accept only explicit true tokens (e.g., 'true','1','yes')
as True otherwise False; if it's not a string convert with bool(value); then use
this boolean when deciding to enter poll mode. Apply the same coercion in the
other occurrence around lines 228-229 (same wait_for_completion usage) and
reference the input_obj and wait_for_completion variables when updating the
logic.

In `@nodes/src/nodes/tool_bland_ai/services.json`:
- Line 12: Update the "tile" entry so its label matches the actual exposed tool
names: replace the misleading suffix
`${parameters.bland_ai.serverName}.bland_ai` in the tile array with either the
base server name `${parameters.bland_ai.serverName}` or an explicit
representation of the available tools such as
`${parameters.bland_ai.serverName}.make_call |
${parameters.bland_ai.serverName}.get_call |
${parameters.bland_ai.serverName}.analyze_call`; edit the "tile" key that
currently references parameters.bland_ai.serverName to use one of these
alternatives so the UI label aligns with the real tool names.

---

Duplicate comments:
In `@nodes/src/nodes/tool_bland_ai/bland_client.py`:
- Line 112: Normalize the remaining regular string literals in this block to
single quotes: change result.get("status") to result.get('status') in the
TimeoutError raise and update the other regular string literal (the first
question string near line 125 in this function) from double quotes to single
quotes; leave any docstrings unchanged. Identify the surrounding function (the
call polling/waiting function that raises TimeoutError and references call_id)
and make these replacements where result.get("status") and the first question
string are used.

In `@nodes/src/nodes/tool_bland_ai/bland_driver.py`:
- Line 171: The error message mixes double-quoted regular string literals;
update the f-string expression so regular strings use single quotes: change the
separator to ', ' (instead of ", ") and the inner f-string to use
f'{self._server_name}.{t}' (instead of f"{self._server_name}.{t}"), leaving the
outer raise ValueError(...) intact and still referencing tool_name,
self._server_name, and self._tools.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 940403bb-9785-4a75-9101-d701c8288f86

📥 Commits

Reviewing files that changed from the base of the PR and between 682e998 and 058ddab.

⛔ Files ignored due to path filters (1)
  • packages/shared-ui/src/assets/nodes/bland-ai.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • nodes/src/nodes/tool_bland_ai/bland_client.py
  • nodes/src/nodes/tool_bland_ai/bland_driver.py
  • nodes/src/nodes/tool_bland_ai/requirements.txt
  • nodes/src/nodes/tool_bland_ai/services.json
  • packages/shared-ui/src/modules/flow/util/get-icon-path.ts

@ryan-t-christensen

Copy link
Copy Markdown
Collaborator

Was looking at this and testing @SankarSubbayya - had a lot of fun with it! Did a little bit of cleanup and fixed mappings during testing but it looks great. Will be merged soon!

@stepmikhaylov
stepmikhaylov merged commit 98b792d into rocketride-org:develop Apr 6, 2026
12 checks passed
shashidharbabu pushed a commit that referenced this pull request Apr 7, 2026
* feat: Add Bland AI voice call tool node

Add a new tool node `tool_bland_ai` that enables agents to make and manage
AI-powered phone calls via the Bland AI API (https://www.bland.ai).

Three tools exposed for agent invocation:
- `make_call` — initiate outbound AI voice calls with custom task instructions
- `get_call` — retrieve call details, transcript, recording URL, and summary
- `analyze_call` — run post-call AI analysis with custom questions

Configuration:
- API key (required)
- Default voice (June, Josh, Nat, Paige, Derek, Florian)
- Max call duration, recording toggle, language selection

Use cases:
- Customer outreach and follow-up calls
- Appointment reminders and scheduling
- Survey and feedback collection
- Senior care check-ins (e.g., CareGraph)
- Lead qualification calls

Follows the same pattern as tool_http_request: services.json for UI config,
BlandDriver extends ToolsBase with _tool_query/_tool_validate/_tool_invoke,
bland_client.py handles authenticated HTTP requests to api.bland.ai/v1.

API docs: https://docs.bland.ai

* fix: Address CodeRabbit review comments

- Single-quote all regular string literals (repo convention)
- Webhook validation: raise ValueError for non-HTTPS URLs instead of silently dropping
- Input validation: trim whitespace on phone_number, task, call_id before checking
- Duration validation: enforce positive integer for max_duration
- Boolean parsing: handle string config values like "false" correctly via _parse_bool()
- API key security: mark apikey field as secure with ApiKeyWidget in services.json
- Use TypeError instead of ValueError for invalid input types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: Normalize inputs at invoke time, validate maxDuration bounds

- _tool_invoke now trims whitespace from phone_number, task, call_id before API calls
- max_duration parsed and normalized at invoke time (not just validation)
- Reject bool values for max_duration (bool is subclass of int in Python)
- IGlobal validates maxDuration bounds: must be positive integer, rejects 0/negative/bool
- services.json: maxDuration type changed from "number" to "integer" with "minimum": 1
- bland_driver schema: max_duration type changed to "integer" with "minimum": 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: Validate maxDuration in validateConfig for early UI feedback

Extend validateConfig to check maxDuration: rejects booleans,
non-integer values, and non-positive integers with a clear warning
so invalid values surface in the config UI before beginGlobal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* cleanup and SVG mappings

* modify shape

* address CR comments

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ryan-t-christensen <ryan.christensen@rocketride.ai>
@SankarSubbayya

Copy link
Copy Markdown
Contributor Author

will I get the 50$ for the PR?

AviNormie pushed a commit to AviNormie/rocketride-server that referenced this pull request Nov 9, 2026
* feat: Add Bland AI voice call tool node

Add a new tool node `tool_bland_ai` that enables agents to make and manage
AI-powered phone calls via the Bland AI API (https://www.bland.ai).

Three tools exposed for agent invocation:
- `make_call` — initiate outbound AI voice calls with custom task instructions
- `get_call` — retrieve call details, transcript, recording URL, and summary
- `analyze_call` — run post-call AI analysis with custom questions

Configuration:
- API key (required)
- Default voice (June, Josh, Nat, Paige, Derek, Florian)
- Max call duration, recording toggle, language selection

Use cases:
- Customer outreach and follow-up calls
- Appointment reminders and scheduling
- Survey and feedback collection
- Senior care check-ins (e.g., CareGraph)
- Lead qualification calls

Follows the same pattern as tool_http_request: services.json for UI config,
BlandDriver extends ToolsBase with _tool_query/_tool_validate/_tool_invoke,
bland_client.py handles authenticated HTTP requests to api.bland.ai/v1.

API docs: https://docs.bland.ai

* fix: Address CodeRabbit review comments

- Single-quote all regular string literals (repo convention)
- Webhook validation: raise ValueError for non-HTTPS URLs instead of silently dropping
- Input validation: trim whitespace on phone_number, task, call_id before checking
- Duration validation: enforce positive integer for max_duration
- Boolean parsing: handle string config values like "false" correctly via _parse_bool()
- API key security: mark apikey field as secure with ApiKeyWidget in services.json
- Use TypeError instead of ValueError for invalid input types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: Normalize inputs at invoke time, validate maxDuration bounds

- _tool_invoke now trims whitespace from phone_number, task, call_id before API calls
- max_duration parsed and normalized at invoke time (not just validation)
- Reject bool values for max_duration (bool is subclass of int in Python)
- IGlobal validates maxDuration bounds: must be positive integer, rejects 0/negative/bool
- services.json: maxDuration type changed from "number" to "integer" with "minimum": 1
- bland_driver schema: max_duration type changed to "integer" with "minimum": 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: Validate maxDuration in validateConfig for early UI feedback

Extend validateConfig to check maxDuration: rejects booleans,
non-integer values, and non-positive integers with a clear warning
so invalid values surface in the config UI before beginGlobal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* cleanup and SVG mappings

* modify shape

* address CR comments

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ryan-t-christensen <ryan.christensen@rocketride.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:nodes Python pipeline nodes module:ui Chat UI and Dropper UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants