본문으로 건너뛰기
Skillpedia
에이전트48k · #5441

pi-custom-model

하는 일

이 도구는 Pi가 기본으로 포함되지 않은 커스텀 언어 모델을 사용하도록 돕습니다. 더 빠르거나 저렴한 모델 같은 특별한 모델 단축 이름이 올바르게 작동하도록 합니다.

사용하는 경우

  • ✓‘:nitro’처럼 특정 모델의 단축 이름(더 빠른 버전)을 쓸 때.
  • ✓평소 쓰던 모델이 Pi에서 작동하지 않게 되었을 때.
  • ✓Pi가 항상 정확한 모델 버전을 쓰도록 하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/pi-custom-model/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/pi-custom-model/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“「openrouter/mistralai/mistral-7b-instruct:nitro」 모델을 기본 모델로 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

커스텀 모델의 정확한 이름을 Pi 설정 파일에 추가합니다. 그러면 Pi가 요청했을 때 그 특정 모델을 찾아 사용하는 방법을 배웁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Pi custom / variant model

When to Use

Pi's saved default only loads if the exact provider/id exists in its model registry. Pi ships a static bundled list per provider — so OpenRouter routing-shortcut variants (:nitro = sort by throughput, :floor = cheapest, :exacto = quality tool-use) and any brand-new slug are NOT in it. When the default doesn't resolve, Pi silently falls through to its built-in per-provider default (for openrouter that's moonshotai/kimi-k2.6) — looking like Pi "reset" your model. Fix = register the slug as a custom model so find(provider, id) matches.

Files (global)

  • ~/.pi/agent/settings.json — defaultProvider, defaultModel, defaultThinkingLevel
  • ~/.pi/agent/models.json — custom models, keyed by provider
  • ~/.pi/agent/auth.json — provider credentials (check the provider key exists)

Steps

  1. Confirm the slug is real before adding it (e.g. check the OpenRouter model/variant exists). A typo'd id also silently falls back.
  2. Confirm auth. The provider must have a key in auth.json (or an env var like OPENROUTER_API_KEY). No auth → the model is registered but unavailable → still falls back.
  3. Add the model to models.json under providers.<provider>.models. For a built-in provider (openrouter, anthropic, etc.) you only supply metadata — api, baseUrl, and auth are inherited from the bundled defaults. Example:
    {
      "providers": {
        "openrouter": {
          "models": [
            {
              "id": "z-ai/glm-5.2:nitro",
              "name": "Z.ai: GLM 5.2 (nitro)",
              "reasoning": true,
              "thinkingLevelMap": { "xhigh": "xhigh" },
              "input": ["text"],
              "cost": { "input": 0.95, "output": 3, "cacheRead": 0.18, "cacheWrite": 0 },
              "contextWindow": 1048576,
              "maxTokens": 32768,
              "compat": { "supportsDeveloperRole": false, "thinkingFormat": "openrouter" }
            }
          ]
        }
      }
    }
    
    Copy cost/contextWindow/compat from the base model (the variant shares them) — find the bundled entry in <pi-pkg>/node_modules/@earendil-works/pi-ai/dist/providers/<provider>.models.js. Don't hardcode generic 128k/16k if the real model is bigger.
  4. Set the default in settings.json: defaultProvider + defaultModel = the exact id. Leave defaultThinkingLevel as the user has it.
  5. Verify: pi --list-models | grep <id> shows it, and JSON parses. Optionally smoke-test: pi --provider <p> --model "<id>" "which model are you?".

Quirks

  • Exact match only. find() is exact provider+id — no fuzzy/colon-stripping for the saved default path. The slug in settings.json and models.json must be byte-identical.
  • Silent fallback. Pi prints no error when the default doesn't resolve; it just shows a different model in the footer. That's the tell.
  • Don't edit settings.json alone. Setting defaultModel to an unregistered slug does nothing — models.json is the actual fix.
  • enabledModels (optional) pins the model picker so Ctrl+P cycling can't drift back: "enabledModels": ["<provider>/<id>:<thinking>"].
  • Project override. A repo's .pi/settings.json overrides global. If a default reverts only inside one project, check that file first.
  • Restart Pi fully — the registry loads at startup.

Example

User request:

Register custom Pi Agent model slugs so saved OpenRouter variants resolve correctly.

Limitations

  • Adapted from davidondrej/skills; verify local paths, tools, credentials, and agent features before acting.
  • For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
자주 묻는 질문

이 도구를 쓰지 않으면 어떻게 되나요?

Pi가 기대한 것과 다른 모델을 쓰거나, 덜 효율적인 기본 모델을 쓰면서도 그 사실을 알려 주지 않을 수 있습니다.

‘:nitro’ 같은 ‘변형’이란 무엇인가요?

특정 목적에 최적화된 메인 모델의 특별 버전입니다. 예를 들어 속도(nitro), 비용(floor), 품질(exact)에 맞춘 것입니다.

컴퓨터의 파일을 편집해야 하나요?

네, 모델을 등록하려면 내 컴퓨터의 특정 Pi 설정 파일을 편집해야 합니다.

상세 정보

작성자의 원본 설명

Register custom Pi Agent model slugs so saved OpenRouter variants resolve correctly.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5441
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬