Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
English
简体中文English
Prompts and workflows

LongCat Flash Thinking · configuration

LongCat-Flash-Thinking-2601: Official Chat Template, Tool Calling, and Reasoning-History Configuration

Configure the LongCat-Flash-Thinking-2601 chat template with an explicit reasoning-history field, run one research question with a retrieval tool, and check the trace separately from the answer.

Source not verifiedA service using the model tokenizer; tool schema, retrieval result, and trace logs must be capturable.

Prerequisites and inputs

  • Research question
  • Reasoning history or an explicit empty history
  • Tool JSON schema
  • Retrieval result
  • Trace acceptance rules

Complete templates

Reasoning-history tool turn

Tabbit editorial adaptation; not the original source prompt
Task: {{RESEARCH_QUESTION}}
Tool schema: {{REASONING_HISTORY}}
Tool return: {{RETRIEVAL_TOOL_SCHEMA}}
Acceptance: {{TRACE_STOP_RULE}}

Replace before running: {{RESEARCH_QUESTION}}, {{REASONING_HISTORY}}, {{RETRIEVAL_TOOL_SCHEMA}}, {{TRACE_STOP_RULE}}

Prerequisites

A service using the model tokenizer; tool schema, retrieval result, and trace logs must be capturable.

Task-specific steps

  1. Prepare Research question and pin the remaining inputs in the run log.

  2. Send one real request using the public format described by “LongCat-Flash-Thinking-2601: Official Chat Template, Tool Calling, and Reasoning-History Configuration”; save request, events, and return.

  3. Judge it against the acceptance rules; a model claim is not proof that a tool ran.

Task result

Produce a reproducible trace aligning input, arguments, tool return, and final answer.

Output and acceptance

Check response status, format, critical fields, and task result; retain raw errors.

Failure correction

Reduce to one tool, one turn, and the smallest schema before restoring fields; for service errors check endpoint, permission, model name, and timeout.

Source and boundary

Editorial adaptation of public guidance from Hugging Face, limited to this task and not a guarantee for another backend.

Read the source research notes

One-sentence takeaway

When calling LongCat-Flash-Thinking-2601 locally with Transformers, use the repository's apply_chat_template, explicitly enable thinking, and pass tools as needed instead of hand-writing special tokens.

Use cases

  • Suitable tasks: Local Transformers inference, multi-turn deep reasoning, tool calling, and tool-result injection.

  • Unsuitable tasks: Applying this directly to a third-party API that does not implement this template; the model card does not provide field mappings for general-purpose service providers.

  • Applicable model version: meituan-longcat/LongCat-Flash-Thinking-2601.

  • Applicable client, Agent, or API: Hugging Face Transformers; the model card also mentions SGLang/vLLM, but the code on this page is a local tokenizer/model invocation example.

  • Recommended inference tier and parameters: The official example uses enable_thinking=True, add_generation_prompt=True, and max_new_tokens=32768; no fixed temperature is publicly disclosed, and the high-temperature recommendation for Heavy Thinking applies only to multi-trajectory exploration.

Ready-to-use content

The key invocation structure from the model card is retained below; replace model and tokenizer with locally loaded objects. Tool declarations and message fields must retain the OpenAI-style tools, tool_calls, and reasoning_content structure.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "meituan-longcat/LongCat-Flash-Thinking-2601"
tokenizer = AutoTokenizer.from_pretrained(model_name)
# model = AutoModelForCausalLM.from_pretrained(model_name, ...)

tools = [{
    "type": "function",
    "function": {
        "name": "func_add",
        "description": "Calculate the sum of two numbers",
        "parameters": {
            "type": "object",
            "properties": {
                "x1": {"type": "number", "description": "The first addend"},
                "x2": {"type": "number", "description": "The second addend"}
            },
            "required": ["x1", "x2"]
        }
    }
}]

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Please tell me what is 125679 + 234519?"},
    {
        "role": "assistant",
        "reasoning_content": "This calculation requires precision; I will use the func_add tool.",
        "tool_calls": [{
            "type": "function",
            "function": {
                "name": "func_add",
                "arguments": {"x1": 125679, "x2": 234519}
            }
        }]
    },
    {"role": "tool", "name": "func_add", "content": '{"ans": 360198}'}
]

text = tokenizer.apply_chat_template(
    messages,
    tools=tools,
    tokenize=False,
    enable_thinking=True,
    add_generation_prompt=True,
    save_history_reasoning_content=False
)

model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(**model_inputs, max_new_tokens=32768)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
print(tokenizer.decode(output_ids, skip_special_tokens=True).strip("\n"))

Test/workflow steps

  1. Register the tool schema and pass the tool list to apply_chat_template.

  2. Send the user task; when the model returns reasoning_content and tool_calls, execute the real tool using the call arguments.

  3. Append the tool result as a role=tool message, then call the template and model again.

  4. By default, use save_history_reasoning_content=False to discard historical reasoning and save context; switch it to True when historical reasoning must be retained, and monitor context length separately.

Original evidence and data

  • The model card directly provides tokenizer.apply_chat_template(messages, tools=tools, tokenize=False, enable_thinking=True, add_generation_prompt=True, save_history_reasoning_content=False).

  • The official tool example uses func_add, the tool result is {"ans": 360198}, and the example sets the generation limit to max_new_tokens=32768.

  • The model card states that tool declarations appear at the beginning of the conversation; the default interleaved thinking mode retains the final answer and tool trajectory while discarding earlier reasoning.

Applicability boundaries

  • This is the local template for the 2601 weights, not the request format of every hosted API; an API gateway may rewrite reasoning_content or tool fields.

  • A model with 560B total parameters has demanding VRAM, parallelism, and quantization requirements; the code snippet on this page does not promise that it can run on consumer hardware.

  • max_new_tokens=32768 is the official example value, not the optimal value for every task; long reasoning substantially increases cost and latency.

  • The model card does not disclose fixed temperature, top-p, or Heavy Thinking trajectory counts, so no universal parameter set can be inferred from this example.

Source excerpt or observation (short quote for compliance only)

The page explicitly makes retaining reasoning history optional: disable save_history_reasoning_content to save tokens, and enable it when a complete review is needed.

Source and dates

Hugging Face · Source date: Not disclosed · Edited: 2026-09-20

Read the original source
Variable checklist

Still to replace: 4

{{RESEARCH_QUESTION}}{{REASONING_HISTORY}}{{RETRIEVAL_TOOL_SCHEMA}}{{TRACE_STOP_RULE}}

Related prompts

LongCat-Flash-Thinking-2601: Official SGLang/vLLM Deployment and MTP Configuration

Related reviews

LongCat-Flash-Thinking-2601: Heavy Thinking, Environmental Noise, and Agent BenchmarksLongCat-Flash-Thinking-2601: Initial Reading and Deployment Observations from the LocalLLaMA CommunityLongCat-Flash-Thinking: API Alias Upgrade, Automatic Routing, and Service-Retirement Boundaries

LongCat Flash Thinking

Use LongCat Flash Thinking in Tabbit

Run this guide in the environment listed above. Downloading does not transfer the template or establish model availability for your account.