In my current setup, i have strongly typed tools (because they are linked to React components in my Gen UI). As such, they don't return JSON strings but plain old Javascript objects.
This is handled neatly in Vercel AI SDK, however the Literal client does not like it and will log the tool results as object Object :

Naively it seems to me like the issue stems from this line in the instrumentation :
for (const toolResult of result.toolResults as any[]) {
messages.push({
role: 'tool',
tool_call_id: toolResult.toolCallId,
content: String(toolResult.result)
});
}
However there might be some other implications that i have overlooked.
In my current setup, i have strongly typed tools (because they are linked to React components in my Gen UI). As such, they don't return JSON strings but plain old Javascript objects.
This is handled neatly in Vercel AI SDK, however the Literal client does not like it and will log the tool results as
object Object:Naively it seems to me like the issue stems from this line in the instrumentation :
However there might be some other implications that i have overlooked.