From 2954d9620bc546598d538820694930f1122f5d76 Mon Sep 17 00:00:00 2001 From: Juan Barbat Date: Thu, 6 Aug 2026 09:55:50 -0300 Subject: [PATCH] feat(pi): add NaN.Builders custom provider Closes #44 --- install.sh | 4 +++ pi/models.json | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 pi/models.json diff --git a/install.sh b/install.sh index dd55433..728b19a 100755 --- a/install.sh +++ b/install.sh @@ -217,6 +217,7 @@ PY check_symlink_target "$DOTFILES/herdr/config.toml" "$HOME/.config/herdr/config.toml" check_symlink_target "$DOTFILES/opencode/tui.json" "$HOME/.config/opencode/tui.json" check_symlink_target "$DOTFILES/opencode/themes" "$HOME/.config/opencode/themes" + check_symlink_target "$DOTFILES/pi/models.json" "$HOME/.pi/agent/models.json" check_symlink_target "$DOTFILES/tmux/tmux.conf" "$HOME/.tmux.conf" check_symlink_target "$DOTFILES/claude/statusline.sh" "$HOME/.claude/statusline.sh" check_symlink_target "$DOTFILES/claude/themes" "$HOME/.claude/themes" @@ -249,6 +250,7 @@ PY check_shell "$path" bash done check_json "$DOTFILES/karabiner/karabiner.json" + check_json "$DOTFILES/pi/models.json" for path in "$DOTFILES"/opencode/*.json "$DOTFILES"/opencode/**/*.json "$DOTFILES"/claude/themes/*.json; do check_json "$path" done @@ -438,6 +440,7 @@ backup_if_exists "$HOME/.config/ghostty/config" backup_if_exists "$HOME/.config/herdr/config.toml" backup_if_exists "$HOME/.config/opencode/tui.json" backup_if_exists "$HOME/.config/opencode/themes" +backup_if_exists "$HOME/.pi/agent/models.json" backup_if_exists "$HOME/.tmux.conf" backup_if_exists "$HOME/.claude/statusline.sh" backup_if_exists "$HOME/.claude/themes" @@ -467,6 +470,7 @@ create_symlink "$DOTFILES/ghostty/shaders" "$HOME/.config/ghostty/shader create_symlink "$DOTFILES/herdr/config.toml" "$HOME/.config/herdr/config.toml" create_symlink "$DOTFILES/opencode/tui.json" "$HOME/.config/opencode/tui.json" create_symlink "$DOTFILES/opencode/themes" "$HOME/.config/opencode/themes" +create_symlink "$DOTFILES/pi/models.json" "$HOME/.pi/agent/models.json" create_symlink "$DOTFILES/tmux/tmux.conf" "$HOME/.tmux.conf" run_or_plan "chmod +x $DOTFILES/claude/statusline.sh" chmod +x "$DOTFILES/claude/statusline.sh" run_or_plan "chmod +x cmux integration scripts" chmod +x "$DOTFILES/zsh/scripts/cmux-sidebar-refresh.sh" diff --git a/pi/models.json b/pi/models.json new file mode 100644 index 0000000..a670ee4 --- /dev/null +++ b/pi/models.json @@ -0,0 +1,67 @@ +{ + "providers": { + "nan": { + "baseUrl": "https://api.nan.builders/v1", + "api": "openai-completions", + "apiKey": "!cat \"$HOME/.config/opencode/secrets/nan-api-key\"", + "compat": { + "supportsDeveloperRole": true + }, + "models": [ + { + "id": "qwen3.6", + "name": "Qwen 3.6", + "reasoning": true, + "input": [ + "text", + "image" + ], + "contextWindow": 262144, + "maxTokens": 16384 + }, + { + "id": "glm5.2", + "name": "GLM 5.2", + "reasoning": true, + "input": [ + "text" + ], + "contextWindow": 500000, + "maxTokens": 16384 + }, + { + "id": "gemma4", + "name": "Gemma 4", + "reasoning": true, + "input": [ + "text", + "image" + ], + "contextWindow": 262144, + "maxTokens": 16384 + }, + { + "id": "deepseek-v4-flash", + "name": "DeepSeek V4 Flash", + "reasoning": true, + "input": [ + "text" + ], + "contextWindow": 1000000, + "maxTokens": 16384 + }, + { + "id": "mimo-v2.5", + "name": "Xiaomi MiMo V2.5", + "reasoning": true, + "input": [ + "text", + "image" + ], + "contextWindow": 1000000, + "maxTokens": 16384 + } + ] + } + } +}