[UNTESTED] [jubinjacob03/glm-proxy] 2 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,250 characters
Status: [UNTESTED]
Endpoints found:
http://127.0.0.1:3007/v1/chat/completions
http://localhost:3007/v1/chat/completions
http://127.0.0.1:3007/v1/chat/completions`
http://localhost:3007/v1/messages
Source: https://github.com/jubinjacob03/glm-proxy
# GLM Bridge — Z.AI Proxy for Trae
An **OpenAI**- and **Anthropic-compatible** API proxy for [chat.z.ai](https://chat.z.ai), **purpose-built to run Z.AI's GLM models as a native agent inside [Trae](https://trae.ai)** (ByteDance's agentic IDE). It bridges Trae's native OpenAI function-calling to Z.AI's chat backend so GLM behaves like a first-class Trae model — real tool calls, multi-turn memory, and no re-answering of earlier messages — without browser automation or complex runtime setup.
> ### 🎯 Built for Trae
>
> This proxy is tuned and tested specifically for **Trae**. Agent mode defaults to a **native, role-preserving** transform: it preserves the `system`/`user`/`assistant`/`tool` conversation Trae sends, and converts GLM's textual tool calls back into the **native OpenAI `tool_calls`** Trae expects (both `<<<TOOL_CALL>>>` and Anthropic-style `<function_calls>` output are recognized). The endpoints remain generic OpenAI/Anthropic, so other clients still work, but Trae is the target.
>
> See [Using with Trae](#using-with-trae) for setup.
---
## Features
- **Dual protocol** — OpenAI `/v1/chat/completions` + Anthropic `/v1/messages` on the same server
- **No browser on the request path** — completions are pure HTTP; a headless Chromium runs only periodically, in the background, to replenish device tokens when the store runs low
- **Throwaway chat sessions (context-rot guard)** — Every stateless request runs on a chat session that is **deleted on Z.AI the moment its response is fully processed** (`DELETE /api/v1/chats/{chat_id}`), so no server-side history outlives a request and the account never accumulates dead sessions
- **Async session pool (default)** — A standing batch of pre-made sessions (`SESSION_POOL_SIZE`, default 5) is kept ready at all times; requests grab one instantly, and each consumed session is deleted upstream + replaced immediately, so the batch refills itself while the app runs. `--sync-mode` / `SYNC_MODE=true` restores th