Skip to content

ChatMock

Connect TomoriBot to a local Chat Completions bridge using ChatMock.

  1. Install ChatMock using its repository instructions.
  2. If your account and access method permit this use, authenticate and start the server:
Terminal window
chatmock login
chatmock serve
  1. Confirm the local API is reachable at http://127.0.0.1:8000/v1.
  1. Run /providers or /personal providers and add an OpenAI-Compatible custom endpoint.
  2. Enter the connection settings:
FieldValue
Endpoint URLhttp://127.0.0.1:8000/v1 when the bot runs on this machine outside production
Auth tokenThe bridge’s client key if authentication is enabled
  1. Select the saved endpoint and add a Text Model with the exact API ID ChatMock exposes. Register more IDs under the same connection to switch models.
  • A bare http://127.0.0.1:8000 normalizes to /v1; do not append /chat/completions.
  • Allow 127.0.0.1:8000 in TomoriBot’s development ALLOW_PRIVATE_NETWORK setting. Docker’s loopback refers to the container.
  • Enable tools, images, or structured output only after testing the bridge and selected model. Keep video off.
  • For a separately hosted production bot, follow Cloudflare Tunnel. Production requires public HTTPS. Direct loopback/port-based ChatMock prompt detection does not apply to the tunnel’s public hostname, so validate system-instruction behavior separately. Account login authorizes ChatMock’s upstream requests; it does not authenticate clients of your public endpoint. Review the tunnel guide’s known risks before sharing.