Fix RPC v2 negotiation for large model catalogs
Merged
KA
3mo ago+14+14+01234567890123456789-2-2-0123456789
Fixes #1.\n\nThe utility RPC process now negotiates protocol v2 after the ready frame and before requesting the model catalog. This enables chunk reassembly for responses larger than the protocol v1 1 MiB limit. The isolated model-provider test process follows the same startup sequence.\n\nIncludes focused regression coverage for both utility startup paths.\n\nVerification:\n- npm test (337 passed, 4 skipped)\n- node_modules/.bin/tsc --noEmit\n- ESLint on the changed files
Summary by cubic
Negotiate RPC protocol v2 immediately after the ready frame in utility processes and the isolated test process. Previously we stayed on v1, so model catalog responses over 1 MiB could fail; with v2, chunk reassembly supports large catalogs.
- Inserts
proc.negotiateProtocol(ready)right afterwaitReady(...)in bothstartProcessandrunIsolatedUtilityCommand, before any commands; no caller-facing API changes. - Adds a focused test that verifies both startup paths negotiate v2 before sending commands; existing tests, typecheck, and lint pass.
Summary by CodeRabbit
- Bug Fixes
- Improved utility RPC startup reliability by completing protocol negotiation before sending commands.
- Preserved existing timeout and disposal error handling.