# Repository Briefing: karthink/gptel
> Source: https://repoforai.com/repo/karthink/gptel (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/karthink/gptel
- **Category**: Chat UI & AI Apps (聊天界面与 AI 应用)
- **Primary Language**: Emacs Lisp
- **License**: GPL-3.0
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 19/25 · Releases 17/20 · License 11/20)
- **Latest Release**: v0.9.9.6 (2026-09-06) — https://github.com/karthink/gptel/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: Local AI, API
- **Momentum**: 3,574 ★ total (+1 24h / +4 7d) · 455 forks
- **Topics**: `chatgpt`, `emacs`, `llms`, `org-mode`
- **When to Use**: Best for: Emacs-centric users who want chat and rewriting in the editor and are willing to validate their chosen backends. Skip if: You need an editor-independent chat client for a mixed team or a managed inference service rather than a client.

## Overview
```text
### Architecture & Core Mechanics
gptel is an Emacs Lisp client that keeps the interaction layer in Emacs and delegates model inference to the selected backend. The source tree separates the main client in gptel.el from request code in gptel-request.el and provider modules such as gptel-anthropic.el, gptel-gemini.el, and gptel-ollama.el. OpenAI and the OpenAI Responses API have distinct modules, so they should not be treated as interchangeable integration paths.

On the editor side, gptel-context.el, gptel-org.el, gptel-rewrite.el, and gptel-transient.el separate context, Org, rewriting, and interactive UI concerns. This layout gives maintainers a useful starting point when tracing an issue from the editor to request handling and then to a provider. File boundaries do not, by themselves, establish a stable backend API or hook contract.

### Key Capabilities & Differentiators
gptel supports chat and rewriting inside Emacs, with dedicated code for Org mode and context handling. The backend options span hosted APIs and local inference through Ollama. v0.9.9.6 expanded model coverage across OpenAI, Anthropic, Gemini, Copilot, DeepSeek, and xAI; that breadth does not establish feature parity across providers or models.

v0.9.9.5 added the OpenAI Responses API, token-usage display, and tool-call hooks, inspection, and interactive editing. v0.9.9.6 added steering messages and tool-call rejection, and improved structured JSON responses, presets, and Org support. If a workflow depends on tool approval, structured output, or usage reporting, test that feature against the exact backend and model you plan to use.

### Trade-offs & Limitations
Compared with a standalone web or desktop chat client, gptel avoids moving text between applications when chat and editing already happen in Emacs. The trade-off is that backend choices, presets, and provider-specific behavior become part of the editor configuration the team must maintain. A broader audience that does not use Emacs is likely better served by a standalone client.

Hosted APIs shift inference capacity off the workstation but introduce network dependence, provider pricing, and data-handling considerations. Ollama can keep inference local when requests are routed to a local instance, but the operator then owns model capacity and runtime availability. GPL-3.0 permits commercial use; teams distributing a customized package should review source and license obligations separately from the terms of the model or API.

### Hardware & Deployment Guide
Run gptel inside Emacs and explicitly select a model backend. For hosted inference, plan for network access and the provider's access requirements. For local inference, make an Ollama instance and the chosen model available; RAM and VRAM planning then belongs to the inference host and depends on model choice, context length, and concurrency. A minimum Emacs version and exact installation commands are not established here.

The main migration issue is v0.9.9.5's removal of the default ChatGPT backend. Check older configurations for implicit backend selection before upgrading. When validating v0.9.9.6, focus on the paths your configuration actually uses: preset selection, chat or rewriting in Org buffers, and tool-call or JSON behavior where applicable. For a local-only deployment, verify routing rather than assuming that an Emacs-local client implies local inference.
```

## Key Capabilities
```text
- Client structure: gptel.el and gptel-request.el separate the Emacs client and request code from provider-specific modules.
- Backend choice: gptel-ollama.el covers the local-model path, while OpenAI Responses has its own module.
- Editor workflow: gptel-context.el, gptel-rewrite.el, and gptel-org.el give context handling, rewriting, and Org integration distinct code paths.
- Tool controls: v0.9.9.5 added tool-call hooks, inspection, and interactive editing; v0.9.9.6 added tool-call rejection.
- Response handling: v0.9.9.6 added steering messages and improved structured JSON responses.
- Upgrade concern: v0.9.9.5 removed the default ChatGPT backend, so older configurations should be checked for implicit backend selection.
```

## Quick Start / Clone
```bash
git clone --depth 1 https://github.com/karthink/gptel.git
cd gptel
```
