1. 疑难问题
AiXor文档
  • 操作指南
  • 常见问题
  • 当前订阅套餐模型倍率
  • OpenClaw接入教程
  • OpenClaw一键脚本接入教程
  • Claude Code 安装接入教程
  • Codex安装接入教程
  • VScode安装Claudecode教程
  • Chatbox接入教程
  • Cherry studio接入教程
  • gpt-image-2使用教程
  • OpenAi接口
    • 文本生成
      POST
    • 文本生成 - 上下文阅读
      POST
    • 图片理解
      POST
    • 图片生成(gpt-image-1/sora_image/flux-kontext-pro)
      POST
    • 图片编辑 - edits
      POST
    • 图片编辑 - 网页版
      POST
    • 函数调用 - tools
      POST
    • v1/Responses - 通用
      POST
    • 内容补全接口
      POST
    • 创建内容审核
      POST
    • PDF文件分析
      POST
    • 深度研究 - Deep-research
      POST
    • 联网搜索 - Web search
      POST
    • response_format
      POST
  • Authropic Claude接口
    • OpenAi兼容接口
      • 文本生成
      • 文本生成 - 强制返回思考 Copy
      • 函数调用
      • 图片理解
      • 联网搜索 - Web search
    • 文本生成
    • 图片理解
    • 文本生成 - 强制返回思考
    • 函数调用
    • 联网搜索 - Web search
    • 文本生成 - 思考配置
    • PDF传输
  • Google Gemini接口
  • 疑难问题
    • Codex
    • Claude Code
    • OpenClaw
    • API
  1. 疑难问题

Claude Code

This token has no access to model claude-xxx#

Please run /login API Error: 403 f"error":f"code":"", "message":"This token has no access to model claude-sonnet-4-6 (request id: 20260407xxxxxxxxxxxxx)", "type": "new_api_error"}}
解决方案:
如果你是使用的GPT模型,网上找下教程,看下如何把GPT模型映射代理成Claude模型,才能在Claude code使用GPT模型,现成的工具有CCSwitch,安装后选择添加claude供应商,然后设置url、key,在高级选项里面设置你要映射的模型即可。如果是使用的claude模型,检查令牌分组是否正确。

401 无效的令牌#

401 {"error":{"code":"","message":"无效的令牌 (request id: 20260xxxxxx48339k4HmiMwG)","type":"new_api_error"}}
!!Auth conflict: Both a token (ANTHROPIC_AUTH_TOKEN) and an API key (/login managed key) are set. This may lead to unexpected behavior. Trying to use ANTHROPIC_AUTH_TOKEN? claude /logout Trying to use /login managed key? Unset the ANTHROPIC_AUTH_TOKEN environment variable.
解决方案:
在确保所有配置都配置正确的前提下,有可能是你之前登录过官方的账号,导致官方账号与现有我们的key出现冲突,执行/logout退出登录重新打开即可。

401 Your API key hasexpired#

401 {"type":"error","error":{"type":"expired_api_key_error",''message": "Your API key hasexpired.}
解决方案:
在确保所有配置都配置正确的前提下,有可能是你之前登录过官方的账号,导致官方账号与现有我们的key出现冲突,执行/logout退出登录重新打开即可。如/logout无效,删除/.claude/settings.json这个文件或者/.claude/credentials.json文件

Vscode Claude code报错:提示需要登录账号或者API Key#

在配置好setting.json之前不要打开claude code插件,配置好了再打开。现在先卸载了在配置,在打开就不会提示需要登录了。

400 Invalid signature in thinking block#

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.7.content.0: Invalid signature in thinking block"},"request_id":"req_xxxxxxx"}
原因:
会话历史文件中保存了损坏的 thinking 块签名,重新发送时服务端校验失败。
解決方案:
脚本一键运行解决(windows使用ps1,linux/mac使用sh):https://pan.quark.cn/s/869d029c031a
以下为手动解决办法:
1.
退出 Claude Code
2.
找到对话历史文件

macOS / Linux#

ls -la ~/.claude/projects/

Windows#

dir %USERPROFILE%\.claude\projects\
在对应项目目录下找到最新/最大的 .jsonl 文件。
3. 备份并修复文件(将路径替换为实际文件路径)
import json

filepath = "/path/to/your/session.jsonl"

with open(filepath, 'r') as f:
    lines = f.readlines()

with open(filepath, 'w') as f:
    for line in lines:
        if not line.strip():
            continue
        data = json.loads(line)
        if 'message' in data and 'content' in data['message']:
            if isinstance(data['message']['content'], list):
                data['message']['content'] = [
                    c for c in data['message']['content']
                    if c.get('type') not in ('thinking', 'redacted_thinking')
                ]
        f.write(json.dumps(data) + '\n')
4.
重启 Claude Code,执行 /resume 恢复之前的对话记录即可继续。
参考来源:https://github.com/anthropics/claude-code/issues/10199#issuecomment-3600387852
修改于 2026-04-26 14:23:15
上一页
Codex
下一页
OpenClaw
Built with