Skip to content

Add a custom endpoint and OpenCode Go key to Review settings, and lower Go traffic - #30

Merged
sc-frederick merged 3 commits into
mainfrom
feat/custom-endpoint-modernized
Nov 4, 2026
Merged

sc-frederick merged 3 commits into
mainfrom
feat/custom-endpoint-modernized

Conversation

@sc-frederick

@sc-frederick sc-frederick commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

MOKE could only reach a custom server or a new OpenCode Go key through a hand-made credential file, and Go traffic was far above what its owner wanted. "We don't want to violate their traffic policy," but main let one review run 16 sheet reviewers at up to 300 requests a minute. This adds both connections to Review settings and lowers Go's traffic. The work sat uncommitted while #28 landed a competing Go provider, so it was reworked onto #28's design rather than rebased.

Lower Go traffic

Before Now
Sheet reviewers at once 16 3
Requests a minute, shared per key 300 60
Usage-limit 429 resent never resent; the review pauses
Other 429s up to 40 sends at most 11 sends
Session header shared across sheet reviewers one per conversation, as OpenCode's docs ask
Identity moke-review/1.0 moke/<version> and x-opencode-client: moke

OpenCode publishes no request or concurrency limit, so 3 and 60 are our own ceilings. They do not establish that this use complies with its terms. Per-conversation sessions will likely change Go's prompt-cache share, which has not been re-measured.

In Review settings

  • OpenCode Go: paste a key, then Test and save. It sends one request, then saves and restarts.
  • Custom endpoint: for vLLM, Ollama, LM Studio or a gateway. It runs reviews on this computer only and its key never reaches the cloud. Count checks stay on Meta and Baseten. Text-only models get a notice instead of images.
  • Model for Initial Review and new conversations: an optional choice. Without one, the default is unchanged.

Kept from #28: unprefixed Go model ids, so stored reviews still decode. Muse Spark 1.3 Contributor stays the default and Go stays the only chat route once connected, except that a connected custom endpoint also stays on offer. Go reviews can still run in the cloud.

Worth checking in review

  • Keys pass through the renderer once. docs/deployment.md said renderer RPC excludes keys. Pasting needs this one exception, so the doc now states it: the key crosses once as a redacted value and never comes back.
  • Redirects are refused on custom endpoint requests, so drawings cannot be forwarded to a server the reviewer did not choose.
  • Credentials use Bring every dependency and CI runner up to date for the 0.2.0 release #26's async safeStorage and its v10 guard. A session-only launch still starts when the keyring is down, and Remove also clears a key imported through the File menu.

Not tried: a review on a real Go key, and the save-and-restart flow on Windows. The key test sends Chat Completions even for models Pi lists as Responses, so if OpenCode does not translate for them, a good key would show a warning though saving still works.

Proof: bun run check, bun run build and the full smoke suite pass, 585 of 585. Desktop and packaged-app tests, including the new custom endpoint flow, pass in CI on Linux, Windows and macOS; they could not run locally because this machine has no Xvfb.

Council review

Rounds: 3

Delegate Round 1 (design rulings) Round 2 Round 3
Claude Opus no score 8/10 9.5/10
GPT Sol no score 9/10 no score
Grok 4.7 no score 9/10 no score

Round 3 rechecked only the test fix Opus asked for; Sol and Grok had already approved and were not asked again.

Created with Claude Opus 5.5 in T3 Code through OpenCode, with Claude Opus, gpt-6.1-sol and Grok 4.7 reviewing.

Review settings can save an OpenCode Go key and one OpenAI-compatible endpoint,
and choose the model for Initial Review. A custom endpoint runs on this computer
only, its key never reaches the cloud, and redirects are refused so drawings go
only to the chosen server. Go now runs 3 sheet reviewers at 60 requests a minute,
never resends a usage-limit refusal, and sends one session per conversation.
@sc-frederick
sc-frederick merged commit 9f4e2fb into main Nov 4, 2026
3 checks passed
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.

1 participant