RCWeb assistant with a local model server
Choose Custom AI server in Pick your assistant. By default, 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 for this mode.
Choosing the AI API
Open More settings → AI API to choose Chat Completions or Responses. The choice is remembered separately for each provider or custom server. Changing it starts a new chat while keeping your model, token and draft.
Chat Completions runs tools in the browser. Responses asks the AI server to connect to RCWeb MCP and run the tools itself. Responses requires support for remote MCP tools, not just a /responses endpoint. Both choices remain available even when a server does not support them; errors are displayed without automatically switching API. Claude also retains its native Messages option.
For LM Studio Responses, enable Remote MCP in Developer → Settings and use a tool-capable model. See LM Studio Responses. Ollama's Responses support does not currently include native remote MCP execution; use Chat Completions for RCWeb tools.
LM Studio
- Download a model that supports function calling and load it in LM Studio.
- Start the server from LM Studio's Developer area. Enable CORS in its server settings.
- Set API base URL in RCWeb to
http://localhost:1234/v1; adjust it if you changed the port. - Select Refresh models, then choose a model from the dropdown.
- 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
- Install and start Ollama, and download a model that supports tools.
- Allow the origin of your RCWeb page with
OLLAMA_ORIGINS, then restart Ollama. For the deployed assistant, the origin ishttps://rcweb.live(no/mcp/path). For a local RCWeb server it might behttp://localhost:8080. - Set API base URL to
http://localhost:11434/v1. - Select Refresh models, then choose a model from the dropdown, 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 or /responses, credentials, query parameters or fragments. The server must accept browser requests using CORS and support the selected API: non-streaming Chat Completions with function tools and tool-result messages, or Responses with remote MCP tools. Responses requests enable streaming so text and tool progress appear as they arrive. Servers that return a complete JSON response instead are also supported. Interrupted streams show an error and are never automatically retried.
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 while it remains available. If it is no longer listed, choose another model. A failed refresh keeps the previous list; if no models are available, check the server and refresh again.
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. The server must support model discovery so you can select an available model. 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
In the API base URL, localhost 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. For Chat Completions, keep the RCWeb MCP URL set to this assistant page's own server, ending in /api/mcp. For Responses, that MCP URL must be reachable from the AI server; localhost there refers to the AI server's machine. Custom servers can use local HTTP MCP addresses. Keep the same-origin MCP URL for the page's client picker and screenshot downloads.
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. In Chat Completions mode, 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.
In Chat Completions mode, 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. Responses mode delegates the tool loop to the AI server.
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.