RCWeb assistant with a local model server

Choose Custom AI server in Pick your assistant. The page talks directly to your model server using Chat Completions and runs its requested RCWeb tools through this RCWeb server. No chat backend, OpenAI account or model-server MCP configuration is needed.

LM Studio

  1. Download a model that supports function calling and load it in LM Studio.
  2. Start the server from LM Studio's Developer area. Enable CORS in its server settings.
  3. Set API base URL in RCWeb to http://localhost:1234/v1; adjust it if you changed the port.
  4. Select Refresh models, then choose a model from the dropdown or select Custom model ID to enter one.
  5. Leave the API token blank unless you enabled authentication in LM Studio. If enabled, enter a server token and select Use key.

See LM Studio server settings and function calling.

Ollama

  1. Install and start Ollama, and download a model that supports tools.
  2. Allow the origin of your RCWeb page with OLLAMA_ORIGINS, then restart Ollama. For the deployed assistant, the origin is https://rcweb.live (no /mcp/ path). For a local RCWeb server it might be http://localhost:8080.
  3. Set API base URL to http://localhost:11434/v1.
  4. Select Refresh models, then choose a model from the dropdown or select Custom model ID to enter its full ID, including its tag. Local Ollama normally needs no API token.

For a manually started server in PowerShell, quit any existing Ollama server first, then run:

$env:OLLAMA_ORIGINS = 'https://rcweb.live,http://localhost:8080'
$env:OLLAMA_CONTEXT_LENGTH = '16384'
ollama serve

These settings apply to that PowerShell process. For the Windows tray app, set user environment variables and restart the app instead. Use the origins you actually visit.

The assistant includes its RCWeb guide, tool schemas, examples and conversation in the prompt. Configure enough context in your model server: 16K tokens is a suggested starting point, if the model and your hardware support it. Longer conversations and generated code may need more. Start a new chat if you run out of context.

See Ollama's server configuration and browser access FAQ and OpenAI compatibility.

Custom servers and connection testing

Enter the API base URL, normally ending in /v1. Do not include /chat/completions, credentials, query parameters or fragments. The server must accept browser requests using CORS and support non-streaming Chat Completions with function tools and tool-result messages.

The model dropdown is shared by all providers. Models load automatically when you select a server, change its address or token, or return to the page. Your selected model is preserved when the list refreshes. Custom model ID remains available if discovery fails or the model is not listed.

Refresh models only calls GET <base URL>/models. It checks connectivity, any supplied token, and model discovery. It does not send a chat, run a screen command, or prove that a particular model can use tools. A server without model discovery can still be used by entering its exact model ID if it supports the chat protocol. A model that writes code in its answer without making tool calls will not change the screen.

Tokens are optional and are sent as bearer authorization only to the configured model API. The existing Use key dialog lets you choose whether to remember a token in this browser. Saved tokens and model IDs are separate for each API base URL. Changing the address selects that server's settings. Room ID, provider and server address are also restored on return; conversations remain in memory only.

Browser and screen setup

localhost always refers to the computer running the assistant's browser. On a phone, use the model server computer's network address and enable network access on that server. Keep the RCWeb MCP URL set to this assistant page's own server, ending in /api/mcp.

Allow local-network access if your browser prompts for it. Browser rules differ: CORS must be enabled, and an HTTPS page may block an HTTP server on your LAN. If necessary, serve the model API over trusted HTTPS or open this assistant on your local RCWeb server over HTTP. This page cannot override browser restrictions.

Enter the room code from your RCWeb viewer and send a message. The browser remembers verified clients for the conversation, executes requested screen commands in order, returns results to the model, and displays its reply. It refreshes the client list only when a requested ID is not cached or RCWeb reports that the client is not connected. Screenshot requests use the same bundled capture helper as the other providers; images are shown in chat, not sent to the model as vision input.

Each message allows up to 12 model-requested tool calls. A confirmed client_not_connected rejection means the command was never sent: the browser refreshes the list and may try the same command once if that exact client is connected again. It never substitutes a different screen. Unavailable screens or failed refreshes pause the request while keeping your chat available; any remaining commands in that batch are skipped. Room or connection-setting changes and New chat clear the cache.

Stop waiting prevents this page from making further calls, but cannot undo a command already sent. Timeouts, connection failures during execution and JavaScript errors are not automatically retried. Inspect the screen before repeating an uncertain change.