{
  "path": "/tutorials/cline-claude-api",
  "reviewedAt": "2026-10-23",
  "version": "Cline CLI3.0.73 / Ollama0.40.9",
  "status": "partial-native-local-pass-gateway-interrupted",
  "sourceURLs": [
    "https://docs.cline.bot/cli/cli-reference",
    "https://docs.cline.bot/usage/cli-overview"
  ],
  "validationScope": "原生Cline CLI3.0.73：Anthropic provider真实拒绝自定义-b，OpenAI-compatible初次4826tokens超4096上下文；独立8192上下文别名修复后真实返回17+25=42、exit0。另一次apizt HTTPS网关调用在上游饱和通知后中断，未恢复输出，usage未知；不能冒称公网Claude通过。",
  "bodySteps": [
    "官方npm隔离安装cline3.0.73；完整安装后执行cline --version、cline --help、cline auth --help均exit0。",
    "以--config和--data-dir指定本次外部练习状态，不改用户~/.cline。",
    "运行auth帮助并实际检查协议边界。本版本cline auth -p anthropic -b http://127.0.0.1:11435直接报Base URL仅支持OpenAI和OpenAI-compatible；不要把VSCode扩展支持的设置照搬成CLI有效参数。",
    "本地openai auth使用自己的独立config/data、占位ollama Key、11435/v1和明确本地模型ID。第一次原生Cline任务实际请求4826tokens超过4096上下文；记录真实错误，再原生create独立8192上下文/256输出token别名重跑一次。 修复后原生CLI真实run_result finishReason=completed、17+25=42、input4667/output11、exit0。",
    "真正接Claude/apizt时另选准确协议和自己的有效Key，按同一最小任务复核，不能把本地路线当公网Claude调用成功。",
    "公网Key只置于私密隔离profile，命令行没有真实Key。单次gateway在途遇同批上游饱和通知被停止，未恢复有效result和usage；不重投，不把取消推断为零用量。"
  ],
  "files": [
    {
      "file": "Modelfile-context8192",
      "bytes": 99,
      "sha256": "3b20122e211d0c36c74c9fca278d5771d54eced5c442f09c3dff225ff60d8c43"
    },
    {
      "file": "README.md",
      "bytes": 786,
      "sha256": "62b6d18c19ede9571f7a4ecf0b075d20c203998f66c9f844d05a7334db319dcb"
    },
    {
      "file": "auth-anthropic-local-execution.json",
      "bytes": 684,
      "sha256": "92d51953b841292987d5fa62f0e52174612048c2fb46dfc8ce990ab66e15bf50"
    },
    {
      "file": "auth-help.txt",
      "bytes": 777,
      "sha256": "ec722c967dc61efb6035cd65a9703a54ac09164590ec0bb1be642c0652f1d5ec"
    },
    {
      "file": "auth-local-execution.json",
      "bytes": 668,
      "sha256": "4cd7a29fea41256c97cb53a8f3fe852d1ce9b44e9df06237776cee58a895396f"
    },
    {
      "file": "tokenba-execution.json",
      "bytes": 487,
      "sha256": "197cbec4147f521642a52e0d8e5d9e440b4610701a755846a441f1d84194ef63"
    },
    {
      "file": "run-anthropic-rejected.json",
      "bytes": 2678,
      "sha256": "a548c8d8197cad64f0615aee3e75818fe5420a7de51fa72f33f2afdeecf12815"
    },
    {
      "file": "run-context4096-rejected.json",
      "bytes": 2581,
      "sha256": "3ef6290b9aaa9208590aa5031e534e92bc42c92ff60c9de55b3c9a78a25847a2"
    },
    {
      "file": "run-execution.json",
      "bytes": 4326,
      "sha256": "1930b0ddf34ea428d176a6bbc5047d1467bbd970713ea40fafde1520424be3dd"
    },
    {
      "file": "run-final-result.json",
      "bytes": 541,
      "sha256": "d73124b6c517c77ea6ee1c218e371a8b01faa9bf20635a3065025a930c8237f8"
    },
    {
      "file": "version.txt",
      "bytes": 7,
      "sha256": "942a33503b6a87e2f85be82d79fc3ced6c59ebd1b901ba309db8d04da494ffc7"
    }
  ],
  "privateCredentialsPublished": false,
  "commands": [
    "cline --help",
    "cline auth --help"
  ],
  "observations": [
    "CLI3.0.73真实拒绝Anthropic provider的自定义-b BaseURL。",
    "首次本地请求4826tokens超4096上下文，独立8192上下文修复后原生run_result完成17+25=42，exit0。",
    "apizt HTTPS单次请求在上游饱和通知后中断，未恢复结果/usage，不重投。"
  ],
  "limits": [
    "CLI3.0.73参数与VSCode扩展设置不能混同，本地OpenAI-compatible不证明公网Claude调用。",
    "网关中断用量未知，不以取消认定零费用。"
  ],
  "tokenbaTestKeyUsed": true,
  "timeoutInferenceUsage": "本地路线；没有使用apizt测试Key。",
  "modelProvenance": "隔离Ollama0.40.9；模型为官方Qwen3:0.6b完整GGUF，经原生ollama create导入为tutorial-qwen3-proof，非完整OCI pull成功。权重SHA256 7f4030143c1c477224c5434f8272c662a8b042079a0a584f0a27a1684fe2e1fa，522640096字节；原生自动识别模板，capabilities tools/thinking/completion。",
  "gatewayAttemptScope": "仅当前测试Key的Gemini分组；model gemini-2.5-flash；BaseURL HTTPS api.apizt.com。仅认证到该HTTPS域名，未改全局配置，无重投。不能扩成全站/所有分组/所有模型不可用。"
}