* longcat: align baseUrl with docs, fix cacheWrite pricing, add brand icon - Point baseUrl at the documented https://api.longcat.chat/openai/v1 path instead of the undocumented unversioned alias route. - Fix cacheWrite pricing to 0: the LongCat pricing page has no separate cache-write charge (matches deepseek/moonshot/zai catalog conventions). - Update the pricing page link to the current docs path. - Add the official LongCat brand icon (provenance recorded in ATTRIBUTION.md) and display-name mapping so the Control UI shows proper branding instead of the letter-badge fallback. - Migrate the persisted legacy default baseUrl via a plugin-owned doctor configRepair contract: onboarding persists models.providers.longcat.baseUrl and the runtime reads the stored value, so the contract rewrites exactly the former default to /openai/v1, preserves custom endpoints, and warns via a legacy-config rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(longcat): correct provider metadata * fix(longcat): migrate persisted stock pricing * style(longcat): format doctor repair * fix(longcat): preserve doctor migration after compat cleanup * fix(longcat): avoid map spread in doctor repair --------- Co-authored-by: yuzehui02 <yuzehui02@meituan.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
4.6 KiB
summary, title, read_when
| summary | title | read_when | ||
|---|---|---|---|---|
| LongCat API setup for LongCat-2.0 | LongCat |
|
LongCat provides a hosted API for LongCat-2.0, a reasoning model built for coding and agentic workloads. OpenClaw provides the official LongCat plugin for LongCat's OpenAI-compatible endpoint.
| Property | Value |
|---|---|
| Provider | longcat |
| Auth | LONGCAT_API_KEY |
| API | OpenAI-compatible Chat Completions |
| Base URL | https://api.longcat.chat/openai |
| Model | longcat/LongCat-2.0 |
| Context | 1,048,576 tokens |
| Max output | 131,072 tokens |
| Input | Text |
Install plugin
Install the official package, then restart Gateway:
openclaw plugins install @openclaw/longcat-provider
openclaw gateway restart
Getting started
Sign in to the [LongCat API Platform](https://longcat.chat/platform/) and create a key on the [API Keys](https://longcat.chat/platform/api_keys) page. ```bash openclaw onboard --auth-choice longcat-api-key ``` ```bash openclaw models list --provider longcat ```Onboarding adds the hosted catalog and selects longcat/LongCat-2.0 when no
primary model is already configured.
Non-interactive setup
openclaw onboard --non-interactive \
--mode local \
--auth-choice longcat-api-key \
--longcat-api-key "$LONGCAT_API_KEY"
Reasoning behavior
LongCat exposes binary thinking control. OpenClaw maps enabled thinking levels
to thinking: { type: "enabled" } and /think off to
thinking: { type: "disabled" }. LongCat does not currently document
reasoning_effort, so OpenClaw does not send it.
LongCat returns reasoning in reasoning_content. OpenClaw preserves that field
when replaying assistant tool-call turns so multi-turn agent sessions retain
the provider's expected message shape.
Pricing
The built-in catalog uses LongCat's pay-as-you-go list prices in USD per million tokens: $0.75 uncached input, $0.015 cached input, and $2.95 output. LongCat may offer temporary discounts; the pricing page and your billing records are authoritative.
Self-hosted LongCat-2.0
The longcat provider targets LongCat's hosted API. For the open weights on
Hugging Face, serve the
model through an OpenAI-compatible runtime and use OpenClaw's existing
vLLM or SGLang provider instead.
Keep the runtime's exact model identifier in the self-hosted provider catalog;
do not route a local deployment through longcat/LongCat-2.0.