1. 新的推理控制功能
✦ 新增 xhigh 推理强度级别
新的 xhigh 级别位于 high 和 max 之间,专为 编码和智能体任务设计,在能力与效率之间取得更好的平衡。
low ── medium ── high ── xhigh ★NEW ── max
✦ 默认隐藏思考内容
在流式响应中,思考过程默认不再显示。如需获取推理摘要,请在请求中显式传入 display 字段:
| display 取值 | Opus 4.7 | Opus 4.6 | 行为 |
|---|---|---|---|
| "omitted" | 默认 | 非默认 | 思考块内容为空 |
| "summarized" | 需手动设置 | 默认 | 返回思考摘要文本 |
"reasoning": {
"effort": "xhigh",
"display": "summarized"
}
图:Opus 4.7 新增 xhigh 级别——智能体编码性能对比(来源:Anthropic 官方)

2. Claude 原生 API 参考
Anthropic 原生 API 的 effort 取值与官方规范保持一致:
| effort 取值 | 支持的模型 | 说明 | 推荐使用场景 |
|---|---|---|---|
| low | 所有支持的模型 | 大幅节省 token,能力略有折衷 | 简单任务、高并发请求、子智能体 |
| medium | 所有支持的模型 | 均衡模式,适度节省 token | 通用智能体任务 |
| high | 所有支持的模型 | 默认值;高能力表现 | 复杂推理、编码、智能体任务 |
| xhigh(新增) | 仅限 Opus 4.7 | 介于 high 与 max 之间的扩展能力;擅长长周期任务 | 编码和智能体任务的推荐起点 |
| max | Opus 系列 | 最强能力 | 前沿研究问题 |
AIHubmix Claude 原生 API — Opus 4.7 示例
from anthropic import Anthropic
client = Anthropic(
api_key="<AIHUBMIX_API_KEY>",
base_url="https://aihubmix.com"
)
response = client.messages.create(
model="claude-opus-4-7",
max_tokens=16000,
thinking={"type": "adaptive"},
output_config={"effort": "xhigh"}, # Options: low / medium / high / xhigh / max
messages=[
{
"role": "user",
"content": "A snail is at the bottom of a 10-meter well. Each day it climbs 3 meters, but each night it slides back 2 meters. How many days does it take to reach the top?"
}
]
)
print(response.content[-1].text)
3. AIHubmix Chat 统一接口中的推理强度支持
AIHubMix Chat 统一接口与 OpenAI 规范保持一致,通过 reasoning.effort 控制推理强度。不同的 Claude 模型会自动映射到对应的 effort 级别:
面向 Claude 模型的reasoning_effort (推理强度控制)
| effort 取值 | Opus >=4.7(新增) | Opus 4.6 / 4.5 | Sonnet 4.6 |
|---|---|---|---|
| minimal | low | low | low |
| medium | medium | medium | medium |
| high | high | high | high |
| xhigh | xhigh | max | high |
| max | max | max | high |
注意: xhigh 仅在 Opus 4.7 上原生支持。其他 Opus 模型会自动回退到 max,Sonnet 系列则回退到 high。
Chat 统一接口 — Opus 4.7 示例
from openai import OpenAI
client = OpenAI(
base_url="https://aihubmix.com/v1",
api_key="<AIHUBMIX_API_KEY>",
)
completion = client.chat.completions.create(
model="claude-opus-4-7",
# max_tokens=10000, # Default is 4096; enable for longer outputs
messages=[
{
"role": "user",
"content": "A snail is at the bottom of a 10-meter well. Each day it climbs 3 meters, but each night it slides back 2 meters. How many days does it take to reach the top?"
}
],
extra_body={
"reasoning": {"effort": "xhigh"}
}
)
print(completion.choices[0].message.content)
4. 在 Chat 统一接口中控制思考内容
在 OpenAI 兼容接口中,reasoning 支持 display 字段,用于控制是否返回思考摘要。Claude Opus 4.7 默认不返回思考内容。请设置 "display": "summarized" 以启用该功能。
| 字段 | 取值 | 说明 |
|---|---|---|
display | (省略) | 不返回思考内容(默认) |
display | "summarized" | 返回思考摘要 |
Opus 4.7 — 思考摘要示例
from openai import OpenAI
client = OpenAI(
base_url="https://aihubmix.com/v1",
api_key="<AIHUBMIX_API_KEY>",
)
completion = client.chat.completions.create(
model="claude-opus-4-7",
messages=[
{
"role": "user",
"content": "A snail is at the bottom of a 10-meter well. Each day it climbs 3 meters, but each night it slides back 2 meters. How many days does it take to reach the top?"
}
],
extra_body={
"reasoning": {"effort": "xhigh", "display": "summarized"}
}
)
print(completion.choices[0].message.content)
更多详情请参阅 AIHubmix 文档或Anthropic 官方文档。
最后更新:2026-06-01



