OpenRouterToolCallDeserializer

org.llm4s.llmconnect.serialization.OpenRouterToolCallDeserializer

OpenRouter-specific tool call deserializer.

Handles OpenRouter's double-nested array structure where tool calls are encoded as an array of arrays, rather than the flat array used by most providers.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def deserializeToolCalls(toolCallsJson: Value): Vector[ToolCall]

Parse a JSON value containing tool calls into a uniform sequence.

Parse a JSON value containing tool calls into a uniform sequence.

Value parameters

toolCallsJson

the raw JSON value from the provider's response

Attributes

Returns

parsed tool calls with id, function name, and arguments