Requests

Call the model through your local endpoint and check its reply.

While a session is active, the consumer’s weftd listens on a local TCP port and forwards connections to the provider’s backend. Run weft sessions inspect '<session ID>' and look for Endpoint. Any application that speaks the offer’s Interface protocol can connect directly to that address on the consumer host.

Configuration examples

Run the Open WebUI server on the consumer host so it can reach the session’s loopback port. To chat in your browser:

  1. In Admin Panel → Settings → Connections, add an OpenAI API connection.
  2. Set URL to http://127.0.0.1:PORT/v1, using the port from your session. If the model isn’t discovered automatically, enter the backend’s chat model name under Model IDs.
  3. Save the connection, open a new chat, select the model, and send a message.

Choose a chat model that supports tool calls. In your project’s opencode.jsonc, configure it as a custom provider. Use your session port for PORT and the backend’s model name for CHAT_MODEL:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "weft/coder",
  "providers": {
    "weft": {
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": { "baseURL": "http://127.0.0.1:PORT/v1" },
      "models": {
        "coder": {
          "modelID": "CHAT_MODEL",
          "capabilities": { "tools": true }
        }
      }
    }
  }
}

Open opencode in the project and ask it to find the entry point or edit a file.

From your repository, start Aider with the session port and the backend’s chat model name. Keep the openai/ prefix so Aider uses the Chat Completions API. For a backend that needs no client key:

OPENAI_API_BASE=http://127.0.0.1:PORT/v1 OPENAI_API_KEY=unused \
  aider --model openai/CHAT_MODEL

Use /add to select a file, then describe the edit you want.

Register the session’s URL and the backend’s chat model under the local name weft-chat, then pipe in a log for a summary:

llm openai endpoint add http://127.0.0.1:PORT/v1 -m CHAT_MODEL --id weft-chat
tail -n 100 app.log | llm -m weft-chat 'Summarize the errors in this log.'

If a later session uses a different port, rerun the first command with the new port and --replace.

  1. In Obsidian, go to Settings → Copilot → BYOK → Add a provider and choose Add a custom provider.
  2. Set Base URL to http://127.0.0.1:PORT/v1 with your session port. Select or enter the backend’s chat model name, then click Test and Save.
  3. Select that model in Quick Chat, attach a note as context, and ask a question about it.

Start a session for a vector-embeddings offer with the openai-embeddings-v1 interface. In AnythingLLM Desktop on the consumer host:

  1. Open the embedding settings and choose Generic OpenAI as the embedding provider.
  2. Set Base URL to http://127.0.0.1:PORT/v1 with the embedding session’s port. Set Embedding Model to the backend’s embedding model name and save.
  3. Add a document to a workspace and embed it. Use the same embedding model when searching those documents. AnythingLLM’s chat model is configured separately.

If the request fails, troubleshoot it while the session is active. When you’re finished, shut down the session to release the lease.