Problem
When using LLM function calling with multi-parameter actions, only one parameter is preserved. All other parameters are silently dropped.
Root Cause
Two files contribute to this issue:
1. src/llm/function_schemas.py (line 154-168)
The convert_function_calls_to_actions function extracts only a single value:
action_value = args.get("action", "")
if not action_value:
for param in ["text", "message", "value", "command"]:
if param in args:
action_value = args[param]
break
if not action_value and args:
action_value = str(list(args.values())[0])
All other parameters are discarded.
2. src/actions/orchestrator.py (line 335)
The _promise_action function hardcodes a single parameter:
input_interface = T.get_type_hints(agent_action.interface)["input"](
**{"action": action.value}
)
Example
LLM returns:
{"name": "pay", "arguments": {"amount": "0.01", "currency": "ETH", "recipient": "0x..."}}
Expected: All 3 parameters passed to PaymentInput
Actual: Only one value extracted, others lost
Proposed Solution
- In
function_schemas.py: Store all arguments as JSON string in action.value
- In
orchestrator.py: Parse JSON and pass all fields to the interface
- Fallback to current behavior for backward compatibility
Context
Discovered while implementing Bounty #367 (Smart Assistant + Wallet Payments).
I have a working implementation ready to submit as PR if approved.
Problem
When using LLM function calling with multi-parameter actions, only one parameter is preserved. All other parameters are silently dropped.
Root Cause
Two files contribute to this issue:
1.
src/llm/function_schemas.py(line 154-168)The
convert_function_calls_to_actionsfunction extracts only a single value:All other parameters are discarded.
2.
src/actions/orchestrator.py(line 335)The
_promise_actionfunction hardcodes a single parameter:Example
LLM returns:
{"name": "pay", "arguments": {"amount": "0.01", "currency": "ETH", "recipient": "0x..."}}Expected: All 3 parameters passed to PaymentInput
Actual: Only one value extracted, others lost
Proposed Solution
function_schemas.py: Store all arguments as JSON string inaction.valueorchestrator.py: Parse JSON and pass all fields to the interfaceContext
Discovered while implementing Bounty #367 (Smart Assistant + Wallet Payments).
I have a working implementation ready to submit as PR if approved.