Add CLIProxyAPI models and update naming for clarity - #463
Conversation
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughA new remote AI provider named "shunkakinoki" is added to the opencode.jsonc configuration file, using the openai-compatible SDK with connection parameters and seven mapped models including Gemini 3.0 Pro, GPT-5.1 variants, Claude Opus/Haiku, and GLM models. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the system's AI model capabilities by integrating a new remote CLIProxyAPI configuration. This integration allows access to a broader range of advanced AI models, improving the overall functionality and flexibility of the system. The changes also focus on clarity by explicitly naming the source of these new models, ensuring better understanding and management of the available resources. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Mesa DescriptionTL;DRIntroduced remote CLIProxyAPI models and configuration, and updated model names to include 'shunkakinoki' for clarity. What changed?File-level changes are not available. Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'shunkakinoki' provider for a remote CLIProxyAPI, including its configuration and a list of supported models. The changes are well-structured and follow the existing format of the configuration file. I have two suggestions to improve clarity and prevent potential configuration conflicts. First, I recommend using a more specific environment variable for the API key to avoid conflicts with the local proxy configuration. Second, I suggest simplifying the model names for better conciseness.
| "name": "CLIProxyAPI (remote)", | ||
| "options": { | ||
| "baseURL": "https://cliproxy.shunkakinoki.com/v1", | ||
| "apiKey": "{env:CLIPROXY_API_KEY}" |
There was a problem hiding this comment.
The environment variable CLIPROXY_API_KEY appears to be generic. If the local cliproxyapi service is also configured to use an API key from this same environment variable, it could lead to conflicts. To avoid ambiguity and potential misconfiguration, consider using a more specific environment variable for the remote shunkakinoki provider, such as SHUNKAKINOKI_API_KEY.
"apiKey": "{env:SHUNKAKINOKI_API_KEY}"
| }, | ||
| "models": { | ||
| "gemini-3-pro-preview": { | ||
| "name": "Gemini 3.0 Pro (via shunkakinoki's CLIProxy)" |
There was a problem hiding this comment.
The suffix (via shunkakinoki's CLIProxy) is a bit verbose and redundant, as the provider is already identified as shunkakinoki. For conciseness and consistency with other providers like z-ai (which uses (via Z-AI)), consider simplifying the suffix to (via shunkakinoki). Please apply this simplification to all models under this new provider.
"name": "Gemini 3.0 Pro (via shunkakinoki)"
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
config/opencode/opencode.jsonc
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx,json,jsonc,md}
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Use Biome for code formatting as configured in biome.json
Files:
config/opencode/opencode.jsonc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: nix-linux
- GitHub Check: nix-nixos
- GitHub Check: lua-hammerspoon
- GitHub Check: nix-darwin
- GitHub Check: lua-neovim
- GitHub Check: lua-neovim-test
- GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
- GitHub Check: shell-lint
- GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
- GitHub Check: shell-test
- GitHub Check: e2e-run (MacOS, macos-latest)
- GitHub Check: e2e-run (NixOS, ubuntu-latest)
- GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
🔇 Additional comments (1)
config/opencode/opencode.jsonc (1)
20-53: Well-structured provider configuration with good security practices.The new remote provider configuration follows the established patterns and implements security best practices:
- API key properly secured via environment variable reference
- Clear naming distinction between remote and local providers
- Consistent model mapping structure
- Valid JSON/JSONC syntax
The configuration integrates cleanly with the existing setup and aligns with the PR objectives to add remote CLIProxyAPI support with improved naming clarity.
| "shunkakinoki": { | ||
| "npm": "@ai-sdk/openai-compatible", | ||
| "name": "CLIProxyAPI (remote)", | ||
| "options": { | ||
| "baseURL": "https://cliproxy.shunkakinoki.com/v1", | ||
| "apiKey": "{env:CLIPROXY_API_KEY}" | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Test endpoint accessibility
echo "=== Testing endpoint accessibility ==="
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" https://cliproxy.shunkakinoki.com/v1 2>&1 || echo "Connection failed"
echo ""
echo "=== Checking endpoint headers ==="
curl -s -I https://cliproxy.shunkakinoki.com/v1 2>&1 | head -10 || echo "Could not retrieve headers"Repository: shunkakinoki/dotfiles
Length of output: 723
🏁 Script executed:
# Search for CLIPROXY_API_KEY documentation in codebase
echo "=== Searching for CLIPROXY_API_KEY references ==="
rg "CLIPROXY_API_KEY" --max-count 20
echo ""
echo "=== Searching for environment variable documentation ==="
rg -i "cliproxy|environment" --type md --max-count 30 | head -50Repository: shunkakinoki/dotfiles
Length of output: 5090
🏁 Script executed:
# Check file existence and format
echo "=== Checking opencode.jsonc file ==="
test -f config/opencode/opencode.jsonc && echo "File exists" || echo "File not found"
echo ""
echo "=== Checking biome.json for configuration ==="
test -f biome.json && echo "biome.json exists" || echo "biome.json not found"
echo ""
echo "=== Reading relevant lines from opencode.jsonc ==="
sed -n '15,60p' config/opencode/opencode.jsoncRepository: shunkakinoki/dotfiles
Length of output: 1411
🏁 Script executed:
# Validate JSON structure
echo "=== Validating JSON structure ==="
jq empty config/opencode/opencode.jsonc && echo "Valid JSON/JSONC" || echo "Invalid JSON/JSONC"Repository: shunkakinoki/dotfiles
Length of output: 192
🏁 Script executed:
# Read the beginning of the file to find the parse error at line 13
echo "=== Lines 1-30 of opencode.jsonc ==="
sed -n '1,30p' config/opencode/opencode.jsonc | cat -nRepository: shunkakinoki/dotfiles
Length of output: 1167
🏁 Script executed:
# Check biome configuration and format
echo "=== Checking biome.json ==="
test -f biome.json && cat biome.json | head -50 || echo "No biome.json"
echo ""
echo "=== Check if biome formatter is available ==="
which biome || echo "biome not found"Repository: shunkakinoki/dotfiles
Length of output: 1305
🏁 Script executed:
# Check what the exact error is by trying to parse with python
echo "=== Detailed JSON validation ==="
python3 << 'EOF'
import json
import re
try:
with open('config/opencode/opencode.jsonc', 'r') as f:
content = f.read()
# Try to strip comments for validation
content_stripped = re.sub(r'//.*?$', '', content, flags=re.MULTILINE)
json.loads(content_stripped)
print("Valid JSON (after comment removal)")
except json.JSONDecodeError as e:
print(f"JSON Error: {e}")
print(f"Line {e.lineno}, Column {e.colno}: {e.msg}")
# Show the problematic line
lines = content.split('\n')
if e.lineno <= len(lines):
print(f"\nProblematic line {e.lineno}: {lines[e.lineno-1]}")
EOFRepository: shunkakinoki/dotfiles
Length of output: 282
🏁 Script executed:
# Check file encoding
echo "=== File encoding check ==="
file config/opencode/opencode.jsonc
echo ""
echo "=== Check for hidden/control characters ==="
od -c config/opencode/opencode.jsonc | head -100
echo ""
echo "=== Check hex around line 2 ==="
head -2 config/opencode/opencode.jsonc | od -A x -t x1z
echo ""
echo "=== Check line 13 specifically ==="
sed -n '13p' config/opencode/opencode.jsonc | od -cRepository: shunkakinoki/dotfiles
Length of output: 393
🏁 Script executed:
# Also check if CLIPROXY_API_KEY is documented anywhere
echo "=== Searching for CLIPROXY_API_KEY documentation ==="
rg -i "cliproxy_api_key" --type md
echo ""
echo "=== Check if there are env variable docs elsewhere ==="
find . -name "*env*" -o -name "*variable*" -o -name "README*" | grep -i cliproxyRepository: shunkakinoki/dotfiles
Length of output: 219
🏁 Script executed:
# Try to read the entire file and check its structure more carefully
echo "=== Full line count ==="
wc -l config/opencode/opencode.jsonc
echo ""
echo "=== Try parsing with python more carefully ==="
python3 << 'EOF'
import json
with open('config/opencode/opencode.jsonc', 'r') as f:
lines = f.readlines()
print(f"Total lines: {len(lines)}")
print(f"Line 13: {repr(lines[12])}")
print(f"Line 2: {repr(lines[1])}")
# Check for BOM
if lines[0].startswith('\ufeff'):
print("WARNING: File has BOM (Byte Order Mark)")
# Try to load stripping comments
import re
content = ''.join(lines)
# Remove line comments
content_no_comments = re.sub(r'//.*?$', '', content, flags=re.MULTILINE)
try:
data = json.loads(content_no_comments)
print("File parses correctly after comment removal")
except Exception as e:
print(f"Still fails after comment removal: {e}")
# Show first 500 chars of content
print("\nFirst 500 chars of content:")
print(repr(content[:500]))
EOFRepository: shunkakinoki/dotfiles
Length of output: 996
🏁 Script executed:
# Check biome.json fully for JSON/JSONC handling
echo "=== Full biome.json JSON section ==="
cat biome.json | grep -A 10 '"json"'Repository: shunkakinoki/dotfiles
Length of output: 259
🏁 Script executed:
# Look for any documentation about environment variables in general
echo "=== General environment variable documentation ==="
rg -i "environment variable" --type md | head -20
echo ""
echo "=== Check if there's a .env.example or docs ==="
find . -name ".env*" -o -name "*environment*" | head -10Repository: shunkakinoki/dotfiles
Length of output: 811
🏁 Script executed:
# Check .env.example for CLIPROXY_API_KEY
echo "=== Checking .env.example ==="
cat .env.example | grep -i cliproxy
echo ""
echo "=== Check home-manager/services/cliproxyapi/README.md Environment Variables section ==="
sed -n '/## Environment Variables/,/^##/p' home-manager/services/cliproxyapi/README.md | head -50Repository: shunkakinoki/dotfiles
Length of output: 686
Fix file formatting and document the CLIPROXY_API_KEY environment variable.
The configuration at lines 20-26 is structurally sound, but the file has two issues:
-
File formatting violation: The file uses tabs for indentation, but
biome.jsonspecifiesindentStyle: "space"withindentWidth: 2. Reformat the entire file with spaces. -
Missing documentation:
CLIPROXY_API_KEYis referenced in the configuration but is not documented in.env.exampleorhome-manager/services/cliproxyapi/README.md. Add this to the Environment Variables section and.env.example.
Note: The endpoint returns HTTP 404, which is expected behavior for API proxies at the root path and does not indicate a misconfiguration.
🤖 Prompt for AI Agents
In config/opencode/opencode.jsonc around lines 20-26, replace tab indentation
with spaces to comply with biome.json (indentStyle: "space", indentWidth: 2) and
reformat the entire file consistently with 2-space indentation (ensure JSONC
stays valid after reformatting); additionally add documentation for
CLIPROXY_API_KEY by updating .env.example to include a commented
CLIPROXY_API_KEY entry and by adding a short entry under the "Environment
Variables" section in home-manager/services/cliproxyapi/README.md describing
that CLIPROXY_API_KEY is the API key used for
https://cliproxy.shunkakinoki.com/v1 and how to set it (e.g.,
CLIPROXY_API_KEY=your_key), keeping wording concise.
| "models": { | ||
| "gemini-3-pro-preview": { | ||
| "name": "Gemini 3.0 Pro (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "gpt-5.1": { | ||
| "name": "GPT-5.1 (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "gpt-5.1-codex": { | ||
| "name": "GPT-5.1 Codex (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "gpt-5.1-codex-max": { | ||
| "name": "GPT-5.1 Codex Max (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "claude-opus-4-5-20251101": { | ||
| "name": "Claude Opus 4.5 (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "claude-haiku-4-5-20251001": { | ||
| "name": "Claude Haiku 4.5 (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "z-ai/glm-4.6": { | ||
| "name": "GLM-4.6 (via shunkakinoki's CLIProxy)" | ||
| }, | ||
| "z-ai/glm-4.7": { | ||
| "name": "GLM-4.7 (via shunkakinoki's CLIProxy)" | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
gemini-3-pro-preview Google model December 2025
💡 Result:
Short answer: Google announced Gemini 3 Pro (preview) in November 2025 and has begun preview rollouts across products (Gemini app, Search AI Mode, Vertex AI, NotebookLM, Vertex/agent platforms). The preview includes a Pro-tier model and a higher‑capability "Deep Think" mode; preview artifacts in Vertex AI indicate multi‑level context windows up to ~1M tokens. [1][2][3][4]
Sources
- Google blog post announcing Gemini 3 (Nov 18, 2025). [1]
- Vertex AI / developer logs reporting "gemini-3-pro-preview" and million‑token context levels. [2]
- Coverage of product rollouts (Search, Gemini app, NotebookLM, Vertex AI). [3]
- Gemini Drops / December notes about Gemini 3 Flash and related updates. [4]
🌐 Web query:
gpt-5.1 OpenAI model 2025
💡 Result:
GPT-5.1 — summary (November 2025)
- What it is: OpenAI’s incremental upgrade to GPT‑5 (released Nov 12–13, 2025), offered as two primary variants (GPT‑5.1 Instant and GPT‑5.1 Thinking) that trade off latency and adaptive reasoning. [1][2][3]
- Key features: faster/simple-task responses via adaptive/no‑reasoning modes, improved conversational “warmth” and personality presets, better coding/agent capabilities, extended prompt caching, and two new developer tools (apply_patch and shell). [1][2]
- Availability: rolled out in ChatGPT first (paid tiers then wider), and released on the API as gpt-5.1-chat-latest (Instant) and gpt-5.1 (Thinking). OpenAI kept GPT‑5 available in Legacy for a transition period. [2][3]
- Notes/coverage: widely reported by tech press; OpenAI publishes benchmarks and developer docs for GPT‑5.1. [4][5]
Sources: OpenAI developer & product pages and help docs, plus press coverage. [1][2][3][4][5]
🌐 Web query:
claude-opus-4-5-20251101 Claude model Anthropic
💡 Result:
Claude Opus 4.5 is Anthropic’s November 2025 Opus-series model (release date Nov 24, 2025) — model identifier claude-opus-4-5-20251101. It’s positioned as their most capable model for coding, agentic workflows and “computer use,” offers very large context (≈200k tokens), improved reasoning/vision/math, an effort/tuning parameter for latency vs. quality, and is available via the Claude apps, Claude API and major cloud partners (Bedrock/Vertex/Azure). Pricing and developer details are published by Anthropic. [1][2]
Sources:
- Anthropic product page (Claude Opus 4.5). [1]
- Coverage / announcement (MacRumors). [2]
🌐 Web query:
CLIProxy shunkakinoki supported models
💡 Result:
I can't find a clear match for "CLIProxy shunkakinoki" — can you share a link or tell me which repository/project you mean (GitHub URL or README)?
🏁 Script executed:
# Check if the JSONC file follows Biome formatting
# First, let's look at the file structure and check if there's a biome.json
fd -type f -name "biome.json"Repository: shunkakinoki/dotfiles
Length of output: 235
🌐 Web query:
claude-haiku-4-5-20251001 Anthropic model
💡 Result:
"claude-haiku-4-5-20251001" is Anthropic's Claude Haiku 4.5 model — a lightweight, high-speed Haiku-series variant released mid‑October 2025 (public launch date Oct 15, 2025). It’s positioned as a cost‑efficient, low‑latency model with near‑Sonnet‑4 performance for coding, tool/computer use, agents, and high‑volume/real‑time use. Variant identifier used in partner catalogs is claud e‑haiku‑4‑5@20251001; published context length and quota details appear in cloud partner docs (context up to 200k tokens in Vertex AI listings). Available via Claude.ai, the Claude Developer Platform and in partner clouds (Google Vertex AI, Amazon Bedrock, Microsoft Foundry). [1][2][3][4]
Sources:
- Anthropic Claude Haiku 4.5 announcement. [1]
- Anthropic / Claude release notes (Oct 15–16, 2025). [2]
- Google Cloud Vertex AI partner model page for “claude‑haiku‑4‑5@20251001” (specs, regions, quotas). [3]
- TechCrunch coverage of the Haiku 4.5 launch. [4]
🌐 Web query:
GPT-5.1 Codex gpt-5.1-codex-max OpenAI
💡 Result:
Here’s a concise summary of GPT-5.1‑Codex‑Max (gpt-5.1-codex-max):
- What it is: OpenAI’s most capable coding/agent model, optimized for long-horizon, agentic software engineering tasks (PRs, code review, refactors, long-running agent loops). [1][2]
- Key specs: 400,000‑token context window, 128,000 max output tokens, reasoning-token support; trained for multi-window “compaction” to handle project‑scale work. [1][2]
- Pricing (docs): text token pricing examples show ~ $1.25 per 1M input tokens (cached $0.125) and $10.00 per 1M output tokens (verify current pricing on OpenAI billing). [1]
- Availability: Available inside Codex (CLI, IDE extension, cloud, code review); API access planned/rolling out per OpenAI product notes. OpenAI announced GPT‑5.1‑Codex‑Max in November 2025. [2]
- Intended use & cautions: Recommended for agentic coding in Codex-like environments; produces logs, cites tool calls/tests, and should be used with human review. [2]
- Additional reporting/coverage: tech press and outlets covered the GPT‑5.1 family and Codex releases. [3]
Sources:
[1] OpenAI Platform docs — GPT‑5.1‑Codex‑Max model page.
[2] OpenAI product announcement — “Building more with GPT‑5.1‑Codex‑Max” (Nov 19, 2025).
[3] Press coverage (e.g., The Verge / TechRadar) on GPT‑5.1 and Codex releases.
Want direct links or the exact API model name and example prompt code?
🌐 Web query:
z-ai/glm-4.6 GLM-4.6 model 2025
💡 Result:
Short summary — GLM-4.6 (z-ai/glm-4.6)
- What it is: Z.ai’s GLM-4.6 is a 2025 flagship open-model in the GLM family focused on improved coding, reasoning and agent/tool use. [1][2]
- Release date: announced Sep 30, 2025. [1][2]
- Key improvements: much larger long-context ability (~200K tokens), stronger coding benchmark and real‑world code generation, improved reasoning and native support for tool use (better agent/agentic workflows). [1][4]
- Availability: API access on Z.ai (and via OpenRouter), model weights published (Hugging Face / ModelScope) and deployable with frameworks like vLLM; a multimodal vision variant (GLM-4.6V) was also released later in 2025. [1][2][3]
- Follow-up: Z.ai released GLM-4.7 on Dec 22, 2025 as the next iteration building on GLM-4.6. [2][3]
Sources:
[1] Z.ai blog: "GLM-4.6" (announcement).
[2] Z.ai developer release notes (models overview; GLM-4.6 entry).
[3] PR / news coverage of GLM-4.7 and GLM-4.6V.
[4] model info listings (LLMBase / Hugging Face metadata).
🏁 Script executed:
# Correct the biome.json search
find . -name "biome.json" -o -name "biome.jsonc" 2>/dev/null | head -20Repository: shunkakinoki/dotfiles
Length of output: 77
🏁 Script executed:
# Check the actual file and its formatting
cat -n config/opencode/opencode.jsonc | head -60Repository: shunkakinoki/dotfiles
Length of output: 2153
🏁 Script executed:
# Check Biome configuration for formatting rules
cat biome.jsonRepository: shunkakinoki/dotfiles
Length of output: 1295
Fix indentation: use 2 spaces instead of tabs to comply with Biome formatting rules.
The JSONC file uses tab indentation, but Biome is configured with indentWidth: 2 and indentStyle: "space". All model identifiers (gemini-3-pro-preview, gpt-5.1 variants, claude-opus-4-5-20251101, claude-haiku-4-5-20251001, GLM models) are valid, real model IDs from their respective providers as of December 2025 and do not require verification.
🤖 Prompt for AI Agents
In config/opencode/opencode.jsonc around lines 27 to 52 the object block under
"models" is indented with tabs; replace all tab characters with two space
characters per indentation level so the file uses spaces and an indent width of
2 to comply with Biome formatting; ensure nested properties (each model key and
its "name" entry) are consistently indented by two spaces and save the file.
Introduce remote CLIProxyAPI models and configuration for improved functionality. Update model names to include 'shunkakinoki' for better clarity and identification.
Summary by cubic
Adds a remote CLIProxyAPI provider (shunkakinoki) and registers Gemini, GPT-5.1, Claude 4.5, and GLM models. Updates model display names to show they run via shunkakinoki’s CLIProxy.
New Features
Migration
Written for commit 454501f. Summary will update automatically on new commits.