Skip to content

fix(pi): support OMP RPC protocol v2 chunked frames and add model refresh button - #95

Merged
Fryuni merged 1 commit into
mainfrom
fryuni/fix-omp-capability-refresh
Nov 20, 2026
Merged

Fryuni merged 1 commit into
mainfrom
fryuni/fix-omp-capability-refresh

Conversation

@Fryuni

@Fryuni Fryuni commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Problem

  • On environments where omp v19+ exposes a large model catalog (for example via OPENROUTER_API_KEY, ~528 models / 1.42 MiB JSON), get_available_models exceeds omp's 1 MiB RPC protocol v1 frame limit and fails with "RPC response exceeded the transport limit", leaving the provider stuck with "Pi is available, but T3 Code could not refresh its models and commands".
  • The provider config page also had no per-provider button in the Models section to refresh just that provider's model list.

Fix

  • Negotiate RPC protocol v2 (negotiate_protocol) in packages/provider-pi/src/server/rpc.ts when ready advertises supportedProtocolVersions containing 2, reassemble rpc_chunk base64 frames up to 64 MiB, and retry a pre-ready request once if it fails with "RPC response exceeded the transport limit" before v2 completes.
  • Add a Refresh models button to the Models section header in ProviderInstanceCard / ProviderSettingsPanel that calls server.refreshProviders with { instanceId, refreshModels: true }, with translated copy across all web locales.
  • Document both fork decisions in docs/adr/0031-pi-rpc-protocol-v2-chunked-frames.md and docs/adr/0032-provider-models-refresh-button.md.

Verification

  • vp run check:changed: format, lint, knip, typecheck (9 packages), react compiler, and all 192 non-browser unit tests passed (browser tests rely on CI Playwright).
  • vp run i18n:check: passed across web, mobile, and desktop catalogs.
  • Verified checkPiProviderStatus against local omp v19.0.0: returned status: "ready", message: null, and 532 models.

Done with loem/gemini-4-neon in OpenCode.

…resh button

OMP v19+ caps RPC protocol v1 frames at 1 MiB, so environments with large model catalogs (such as OpenRouter) fail get_available_models with 'RPC response exceeded the transport limit'. Negotiate protocol v2 when advertised on ready, reassemble rpc_chunk frames, and retry pre-ready overflowed requests once v2 is active.

Also add a 'Refresh models' button to the Models section header on the provider config page, calling server.refreshProviders for that instance with refreshModels: true.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 17:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T17:24:35.382364Z d093ff4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Fryuni
Fryuni merged commit efd2848 into main Nov 20, 2026
16 of 18 checks passed
@Fryuni
Fryuni deleted the fryuni/fix-omp-capability-refresh branch November 20, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants