Files
BrowserOS/apps/agent/lib/browseros
Nikhil 6d736e9158 fix: gate previousConversation array format for older servers (#400)
* fix: gate previousConversation array format behind BrowserOS 0.41.0.0

Older servers reject the array format for previousConversation with a
ZodError ("Expected string, received array"). Gate the feature behind
BrowserOS >= 0.41.0.0 which bundles server >= 0.0.64 that accepts both
array and string formats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use minServerVersion 0.0.64 for previousConversation gate

Server version is the direct indicator of schema support, more accurate
than using BrowserOS version as a proxy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: fall back to string format for previousConversation on old servers

Instead of omitting previousConversation entirely on servers < 0.0.64,
serialize the conversation history as a "role: content" string which
old servers accept via their z.string() schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 15:58:59 -08:00
..