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.
What ChatMock does
Section titled “What ChatMock does”- ChatMock runs a local OpenAI-compatible API server
- TomoriBot can use that local server through the
customprovider
1. Start ChatMock
Section titled “1. Start ChatMock”Install and start ChatMock by following its instructions on GitHub:
After installing, run:
chatmock loginchatmock serveBy default, ChatMock listens on http://127.0.0.1:8000/v1
2. Configure TomoriBot to use ChatMock
Section titled “2. Configure TomoriBot to use ChatMock”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.4orgpt-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).