Skip to content

Setup: Codex CLI via ChatMock

If you want TomoriBot to use your ChatGPT account through a local OpenAI-compatible bridge, you can run ChatMock and point TomoriBot’s custom provider at it.

  • ChatMock runs a local OpenAI-compatible API server
  • TomoriBot can use that local server through the custom provider

Install and start ChatMock by following its instructions on GitHub:

After installing, run:

Terminal window
chatmock login
chatmock serve

By default, ChatMock listens on http://127.0.0.1:8000/v1

In Discord, configure TomoriBot’s custom provider and use:

  • Endpoint URL: http://127.0.0.1:8000/v1
  • Model Name: the exact model string ChatMock should receive, such as gpt-5.4 or gpt-5.3-codex

Do not use bare http://127.0.0.1:8000 because TomoriBot appends /chat/completions to the configured base URL

Enable these capability flags for ChatMock:

  • Function Calling / Tools: Yes
  • Image Understanding: Yes
  • Video Understanding: No
  • Structured Output: Yes

Note: Codex CLI does not allow you to change its system prompt so TomoriBot’s system prompt is turned into a user turn in context as a workaround. Please configure the CHATMOCK_PORT .env variable to match your actual ChatMock port so this workaround works properly (defaults to 8000).