Skip to content

v2.8.0 — OpenAI-Compatible API

Choose a tag to compare

@Enderfga Enderfga released this 04 Apr 16:11
· 557 commits to main since this release

[2.8.0] - 2026-04-04

Added

  • OpenAI-compatible /v1/chat/completions endpoint — drop-in backend for webchat apps (ChatGPT-Next-Web, Open WebUI, LobeChat, etc.). Stateful sessions maximize Anthropic prompt caching (90% discount on cached tokens). Supports streaming (SSE) and non-streaming responses
  • /v1/models endpoint — lists supported models for OpenAI client discovery
  • Auto session management — sessions created/reused per conversation via X-Session-Id header or user field. Auto-compact when context reaches 80%
  • Multi-engine model routing — OpenAI model field auto-routes to the correct engine (claude/codex/gemini)
  • Configurable CORS — /v1/ paths allow cross-origin requests for remote webchat frontends

Quick Start

claude-code-skill serve

# Non-streaming
curl http://127.0.0.1:18796/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"Hello!"}]}'

# Streaming
curl http://127.0.0.1:18796/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"Hello!"}],"stream":true}'

For webchat apps, set API Base URL to http://127.0.0.1:18796/v1.