MCPcopy Index your code
hub / github.com/RayBytes/ChatMock

github.com/RayBytes/ChatMock @v1.39

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.39 ↗ · + Follow
266 symbols 972 edges 26 files 3 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ChatMock

Allows Codex to work in your favourite chat apps and coding tools.

PyPI Python License Stars Last Commit Issues

Install

Homebrew

brew tap RayBytes/chatmock
brew install chatmock

pipx / pip

pipx install chatmock

GUI

Download from releases (macOS & Windows)

Docker

See DOCKER.md

Getting Started

# 1. Sign in with your ChatGPT account
# If you are running this on a headless server, append --headless
chatmock login

# 2. Start the server
chatmock serve

The server runs at http://127.0.0.1:8000 by default. Use http://127.0.0.1:8000/v1 as your base URL for OpenAI-compatible apps.

Example usage

Raycast Integration

  1. Configure the Host URL
    Open your Raycast Extensions preferences, navigate to the Ollama settings section, and input the host URL (default is 127.0.0.1:8000).
    Raycast Ollama Host URL configuration

  2. Sync Your Models
    Click the Sync Models button, which will register all available models.

  3. Start Chatting
    Open the Raycast AI Chat interface. You will now see model slugs which you can chat with.

Terax (Agentic Terminal) Integration

  1. Configure the provider settings
    Open your Terax settings, and switch to the Models tab, add a new provider (OpenAI Compatible), and input the host URL (default is http://127.0.0.1:8000/v1), along with the model IDs you wish to use (API key may be anything).
    image

  2. Favourite, and start using it!

Go back to your main chat window, select the model by going to the OpenAI Compatible icon, and clicking the model there (you may favourite it here to quickly select it the next time if you switch between models) image

Supported Models

  • gpt-5.5
  • gpt-5.4
  • gpt-5.4-mini
  • gpt-5.3-codex-spark

Features

  • Tool / function calling
  • Vision / image input
  • Thinking summaries (via think tags)
  • Configurable thinking effort
  • Fast mode for supported models
  • Web search tool
  • OpenAI-compatible /v1/responses (HTTP + WebSocket)
  • Ollama-compatible endpoints
  • Reasoning effort exposed as separate models (optional)

Configuration

All flags go after chatmock serve. These can also be set as environment variables.

Flag Env var Options Default Description
--reasoning-effort CHATGPT_LOCAL_REASONING_EFFORT none, minimal, low, medium, high, xhigh medium How hard the model thinks
--reasoning-summary CHATGPT_LOCAL_REASONING_SUMMARY auto, concise, detailed, none auto Thinking summary verbosity
--reasoning-compat CHATGPT_LOCAL_REASONING_COMPAT legacy, o3, think-tags think-tags How reasoning is returned to the client
--fast-mode CHATGPT_LOCAL_FAST_MODE true/false false Priority processing for supported models
--enable-web-search CHATGPT_LOCAL_ENABLE_WEB_SEARCH true/false false Allow the model to search the web
--expose-reasoning-models CHATGPT_LOCAL_EXPOSE_REASONING_MODELS true/false false List each reasoning level as its own model

Web search in a request

{
  "model": "gpt-5.4",
  "messages": [{"role": "user", "content": "latest news on ..."}],
  "responses_tools": [{"type": "web_search"}],
  "responses_tool_choice": "auto"
}

Fast mode in a request

{
  "model": "gpt-5.4",
  "input": "summarize this",
  "fast_mode": true
}

Important notice

Use responsibly and at your own risk. This project is not affiliated with OpenAI.

Star History

Star History Chart

Core symbols most depended-on inside this repo

eprint
called by 27
chatmock/utils.py
build_cors_headers
called by 24
chatmock/http.py
_log_json
called by 22
chatmock/routes_openai.py
normalize_model_name
called by 20
chatmock/model_registry.py
_log_json
called by 13
chatmock/routes_ollama.py
parse_jwt_claims
called by 9
chatmock/utils.py
allowed_efforts_for_model
called by 9
chatmock/model_registry.py
_send_error
called by 8
chatmock/websocket_routes.py

Shape

Function 148
Method 70
Route 26
Class 22

Languages

Python100%

Modules by API surface

tests/test_routes.py47 symbols
gui.py26 symbols
chatmock/utils.py25 symbols
chatmock/oauth.py22 symbols
chatmock/session.py18 symbols
chatmock/routes_openai.py14 symbols
chatmock/limits.py14 symbols
chatmock/routes_ollama.py12 symbols
chatmock/responses_api.py11 symbols
chatmock/cli.py11 symbols
build.py11 symbols
chatmock/websocket_routes.py9 symbols

For agents

$ claude mcp add ChatMock \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact