> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 意图分类与模式

> Theo 如何为每个请求确定最佳执行模式。

当你发送 `mode: "auto"`（默认值）时，Theo 会对你的提示词进行分类，以确定最优的执行模式。你也可以显式设置模式，从而完全跳过分类过程。

## 可用模式

|| Mode | Description | Engine |
||------|-------------|--------|
|| `auto` | Theo 自动分类 | 依分类结果而定 |
|| `fast` | 快速响应，简单任务 | `theo-1-flash` |
|| `think` | 深度推理，复杂分析 | `theo-1-reason` |
|| `code` | 代码生成与工程实现 | `theo-1-code` |
|| `image` | 图像生成 | `theo-1-create` |
|| `video` | 视频生成（异步） | `theo-1-motion` |
|| `research` | 带引用的网络研究（异步） | `theo-1-research` |
|| `roast` | 幽默、不加过滤的回应 | `theo-1-edge` |
|| `genui` | 生成式 UI 组件 | `theo-1-genui` |

## 分类流程

### 分类如何工作

Theo 使用多层级的分类系统。明显的信号会被即时捕获：

* `"Draw me a logo"` → `image`
* `"Write a React component"` → `code`
* `"Research the latest AI news"` → `research`

含义模糊的提示词会被更深入地分析。分类器会返回：

```json theme={null}
{ "mode": "think", "confidence": 0.92, "reasoning": "Complex analytical question requiring deep reasoning" }
```

### 显式覆盖

直接传入 `mode` 即可跳过分类：

```typescript theme={null}
const res = await theo.complete({
  prompt: "Write a REST API for user management",
  mode: "code",  // Skips classification entirely
});
```

## 响应中的模式选择

每个响应都会同时包含请求的模式和最终解析出的模式：

```json theme={null}
{
  "mode": "auto",
  "resolved_mode": "code",
  "model": { "id": "theo-1-reason", "label": "Theo Reason" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.