LongCat makes its own models (LongCat-2.5, launched 11-02) and serves them
at api.longcat.chat. magpie had LongCat's icon but no preset for it.
The new preset is longcat ("LongCat", KindVendor, icon longcat, catalog
models.dev's longcat). It uses:
- chat completions and Responses at https://api.longcat.chat/openai/v1;
- Anthropic messages at https://api.longcat.chat/anthropic;
- docs at longcat.chat/platform/docs/zh/api-docs, keys at
longcat.chat/platform/api_keys.
The key goes as a Bearer. magpie sends both headers, and the docs ask for
Bearer on both endpoints; x-api-key alone gets "missing_api_key". The model
list is /openai/v1/models. longcat.chat's and longcat.ai's accounts use the
same API host (both sites' api-docs pages name api.longcat.chat).
An entry at those endpoints imports as the preset, for example CC Switch's
Claude Code and Codex entries from LongCat's cc-switch page. OpenCode's
auth.json "longcat" (models.dev's id) maps to the preset too. The README
(en, zh), docs/reference.md and the site's import pages (en, zh, ja, and
import.html, with the icon) list it.
Sources, read 11-02: api-docs, api/models, api/model, api/model-params,
api/chat, api/messages, image-video-understanding, cc-switch, pricing/
longcat-2.5, change-log, faq.
Probed without a key, from this machine: /openai/v1/models and
/anthropic/v1/models answer 401 authentication_error "missing_api_key".
/openai/v1/chat/completions, /openai/v1/responses and
/anthropic/v1/messages with a bad Bearer answer 401 "incorrect api key".
Run at this head (base d24be3c25, origin/main at push), on mote:
- TestLongCatPreset and TestLongCatList (the docs' literal /models
example) pass. TestLongCatPreset goes red with the OpenCode mapping taken
out ("OpenCode import: … Skip:it has no base URL").
- gofmt -l and GOOS=linux / GOOS=windows go vet ./internal/provider are
clean.
- go test -tags nogui -timeout 45m ./... is ok except three tests that
have issues already:
- TestEveryRouteHasACommandOrIsNamed (#4826) is red on a clean
d24be3c25 too.
- TestKeepOffWaitsForTheSetting (#3687) is red on a clean d24be3c25 too.
- TestCodexPoolSaysTheClientsVersion (#4807) is red in the full package
run and passes 3 of 3 alone on d24be3c25.
- GUI add-sheet and add-button pass in Chromium and WebKit (12/12). No GUI
file changed: the add sheet draws presets from /api.
Not tried:
- a real LongCat key or a real request (none available).
- LongCat-2.5's window (1M), output cap (256K) and image input. These come
from models.dev, which so far lists only LongCat-2.0 and
LongCat-2.5-Preview, and LongCat's /models gives no facts. Until
models.dev adds LongCat-2.5, magpie doesn't know them for it.
- LongCat's thinking switch ({"type":"enabled"|"disabled"}).