본문으로 건너뛰기
모든 클라이언트
Minimalist Terminal Agent · Anthropic Wire1M Context · ZDR

Pi

Anthropic Messages 포맷을 사용하는 터미널 에이전트.

기본 URL
https://api.bf16.ai
프로토콜
anthropic-messages

대상 사용자
Pi에서 1M 컨텍스트 모델을 연결해 쓰고 싶은 사용자.

아키텍처 및 bf16.ai 연동 구조

Pi Coding Agent (~/.pi/agent/models.json) speaking Anthropic Messages directly to https://api.bf16.ai
Pi connects to https://api.bf16.ai over api: "anthropic-messages" using !printenv BF16_API_KEY so plaintext credentials never sit in models.json.

Pi is a hackable, minimalist terminal coding agent used standalone and as the embedded agent runtime inside platforms like Rakazo and OpenBot. Pi supports custom providers via `~/.pi/agent/models.json` with `!printenv BF16_API_KEY` command evaluation.

Pointing Pi at `https://api.bf16.ai` (no `/v1`) with `api: "anthropic-messages"` preserves streaming thinking blocks, signed tool-continuation turns, and full `1,048,576`-token context windows.

명령어에는 $BF16_API_KEY가 표시됩니다. 로그인하면 내 실제 키가 자동으로 채워집니다.

원커맨드 빠른 설정

One-Command Pi `~/.pi/agent/models.json` Setup

Backs up ~/.pi/agent/models.json if present, merges `providers.bf16` with 1M-context uncensored models, and verifies connectivity.

export BF16_API_KEY="sk-bf16-v1-..."
mkdir -p ~/.pi/agent
node -e '
const fs = require("fs"), os = require("os"), path = require("path");
const file = path.join(os.homedir(), ".pi/agent/models.json");
const incoming = JSON.parse("{\n  \"providers\": {\n    \"bf16\": {\n      \"name\": \"bf16.ai\",\n      \"baseUrl\": \"https://api.bf16.ai\",\n      \"api\": \"anthropic-messages\",\n      \"apiKey\": \"!printenv BF16_API_KEY\",\n      \"models\": [\n        { \"id\": \"zai-org/glm-5.3-uncensored\", \"name\": \"Uncensored GLM-5.3\", \"reasoning\": true, \"contextWindow\": 1048576 },\n        { \"id\": \"zai-org/glm-5.3-flash-uncensored\", \"name\": \"Uncensored GLM-5.3 Flash Vision\", \"reasoning\": true, \"input\": [\"text\", \"image\"], \"contextWindow\": 1048576 },\n        { \"id\": \"deepseek/deepseek-v4.1-flash-uncensored\", \"name\": \"Uncensored DeepSeek V4.1 Flash\", \"reasoning\": true, \"input\": [\"text\", \"image\"], \"contextWindow\": 1048576 },\n        { \"id\": \"deepseek/deepseek-v4.1-flash-uncensored-fast\", \"name\": \"Uncensored DeepSeek V4.1 Flash Fast\", \"reasoning\": true, \"input\": [\"text\", \"image\"], \"contextWindow\": 1048576 },\n        { \"id\": \"bf16/deepseek-v4.1-flash-1017-exl3-2.5bpw\", \"name\": \"DeepSeek V4.1 Flash 1017 EXL3 2.5bpw (bf16)\", \"reasoning\": true, \"input\": [\"text\", \"image\"], \"contextWindow\": 524288 },\n        { \"id\": \"moonshotai/kimi-k3.1-pro-uncensored\", \"name\": \"Uncensored Kimi K3.1 Pro\", \"reasoning\": true, \"input\": [\"text\", \"image\"], \"contextWindow\": 1048576 }\n      ]\n    }\n  }\n}");
let current = { providers: {} };
if (fs.existsSync(file)) {
  fs.copyFileSync(file, file + ".bak");
  try { current = JSON.parse(fs.readFileSync(file, "utf8")); } catch {}
}
current.providers = Object.assign({}, current.providers || {}, incoming.providers);
fs.writeFileSync(file, JSON.stringify(current, null, 2) + "\n");
console.log("Updated " + file);
' && curl -fsS "https://api.bf16.ai/v1/models" -H "Authorization: Bearer $BF16_API_KEY" >/dev/null && echo "Ready! Run: pi --model bf16/zai-org/glm-5.3-uncensored"
  1. 1

    API 키 내보내기

    Pi는 실행 시 BF16_API_KEY 환경변수를 읽습니다.

    export BF16_API_KEY=sk-bf16-v1-...
  2. 2

    프로바이더 추가

    ~/.pi/agent/models.json
    {
      "providers": {
        "bf16": {
          "name": "bf16.ai",
          "baseUrl": "https://api.bf16.ai",
          "api": "anthropic-messages",
          "apiKey": "!printenv BF16_API_KEY",
          "models": [
            { "id": "zai-org/glm-5.3-uncensored", "name": "Uncensored GLM-5.3", "reasoning": true, "contextWindow": 1048576 },
            { "id": "zai-org/glm-5.3-flash-uncensored", "name": "Uncensored GLM-5.3 Flash Vision", "reasoning": true, "input": ["text", "image"], "contextWindow": 1048576 },
            { "id": "deepseek/deepseek-v4.1-flash-uncensored", "name": "Uncensored DeepSeek V4.1 Flash", "reasoning": true, "input": ["text", "image"], "contextWindow": 1048576 },
            { "id": "deepseek/deepseek-v4.1-flash-uncensored-fast", "name": "Uncensored DeepSeek V4.1 Flash Fast", "reasoning": true, "input": ["text", "image"], "contextWindow": 1048576 },
            { "id": "bf16/deepseek-v4.1-flash-1017-exl3-2.5bpw", "name": "DeepSeek V4.1 Flash 1017 EXL3 2.5bpw (bf16)", "reasoning": true, "input": ["text", "image"], "contextWindow": 524288 },
            { "id": "moonshotai/kimi-k3.1-pro-uncensored", "name": "Uncensored Kimi K3.1 Pro", "reasoning": true, "input": ["text", "image"], "contextWindow": 1048576 }
          ]
        }
      }
    }
  3. 3

    실행하기

    pi --model bf16/zai-org/glm-5.3-uncensored
Pi Coding Agent — ~/.pi/agent/models.json
설정 필드 인스펙터
providers.bf16 · api: "anthropic-messages"

핵심 설정값 대조표

baseUrl
https://api.bf16.ai

No /v1 suffix for anthropic-messages.

apiKey
!printenv BF16_API_KEY

Evaluates your shell environment variable dynamically.

contextWindow
1048576
Switch models anytime inside Pi with /model or launch directly via pi --model bf16/zai-org/glm-5.3-uncensored.

역할별 권장 모델 구성

복잡한 설계는 플래그십 모델로, 병렬 서브에이전트와 스크린샷은 Flash 모델로 분리하세요.

역할모델 ID권장 사유USD / 1M 토큰
Deep Coding & Refactoringzai-org/glm-5.3-uncensoredCleanest Anthropic-protocol tool assembly and multi-file code editing.$1.35 in / $0.25 cached / $4.20 out
Fast Multimodal & Vision Turnsdeepseek/deepseek-v4.1-flash-uncensoredAccepts `input: ["text", "image"]` screenshots with rapid streaming.$0.26 in / $0.045 cached / $1.00 out

제대로 작동하는지 확인하는 방법

  • 시작 시 Pi가 bf16 프로바이더를 표시합니다.
  • 콘솔 로그에 요청이 나타납니다.
  • curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"

운영 가드레일 및 예산 격리

  • Use `!printenv BF16_API_KEY` in models.json so dotfile backups never contain raw API secrets.

자주 발생하는 오류

증상
모든 호출에서 404 오류가 납니다.
원인
baseUrl에 /v1이 포함되어 있습니다(Anthropic 포맷에는 불필요).
해결
https://api.bf16.ai 주소를 사용하세요.

아직 설치하지 않으셨나요?

npm install -g @mariozechner/pi-coding-agent
공식 문서