## system info {"endpoints":["POST /v1/chat/completions","POST /v1/completions","GET /v1/models"]} ## install node 22 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash . "$HOME/.nvm/nvm.sh" nvm install 22 node -v ## install claude code npm install -g @anthropic-ai/claude-code ## ~/.claude/settings.json { "env": { "ANTHROPIC_AUTH_TOKEN": "sk-***", "ANTHROPIC_BASE_URL": "https://api2.8l23.com", "ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-3-pro-preview", "ANTHROPIC_DEFAULT_SONNET_MODEL": "gemini-3-flash-preview", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-2.5-flash-lite", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1 }, "permissions": { "allow": [], "deny": [] } } ## ~/.bashrc OR ~/.profile export ANTHROPIC_BASE_URL=https://api2.8l23.com export ANTHROPIC_AUTH_TOKEN=sk-*** export ANTHROPIC_DEFAULT_OPUS_MODEL=gemini-3-pro-preview export ANTHROPIC_DEFAULT_SONNET_MODEL=gemini-3-flash-preview export ANTHROPIC_DEFAULT_HAIKU_MODEL=gemini-2.5-flash-lite ## enproxy ~/.bashrc OR ~/.profile alias enproxy='export http_proxy=http://127.0.0.1:10808 && export https_proxy=http://127.0.0.1:10808' alias disproxy='unset http_proxy && unset https_proxy' export no_proxy="localhost,127.0.0.1,::1,0.0.0.0" # opencode npm i -g opencode-ai apt install unzip curl -fsSL bun.sh/install | bash source ~/.bashrc bunx oh-my-opencode install ## ~/config/opencode/opencode.json { "$schema": "https://opencode.ai/config.json", "provider": { "8123": { "npm": "@ai-sdk/google", "name": "8123", "options": { "baseURL": "https://api.8l23.com/v1beta", "apiKey": "sk-***" }, "models": { "gemini-3-flash-preview": { "name": "gemini-3-flash-preview", "attachment": true, "limit": { "context": 1048576, "output": 65536 }, "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] } }, "gemini-3-pro-preview": { "name": "gemini-3-pro-preview", "thinking": true, "attachment": true, "limit": { "context": 1048576, "output": 65535 }, "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] } }, "gemini-claude-opus-4-5-thinking": { "name": "gemini-claude-opus-4-5-thinking", "thinking": true, "attachment": true, "limit": { "context": 1048576, "output": 65535 }, "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] } }, "gemini-claude-sonnet-4-5-thinking": { "name": "gemini-claude-sonnet-4-5-thinking", "thinking": true, "attachment": true, "limit": { "context": 1048576, "output": 65535 }, "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] } }, "glm4.7": { "name": "glm4.7" } } } }, "plugin": [ "oh-my-opencode" ] } ## ~/config/opencode/oh-my-opencode.json { "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json", "google_auth": false, "agents": { "Sisyphus": { "model": "8123/gemini-claude-opus-4-5-thinking", "extra_instructions": "最小化、不影响现有功能,谨慎修改。" }, "Planner-Sisyphus": { "model": "8123/gemini-3-flash-preview", "extra_instructions": "只做计划,禁止任何文件编辑、代码写入、tool call 涉及修改的操作,禁止使用bash写文件。" }, "librarian": { "model": "8123/gemini-3-flash-preview" }, "explore": { "model": "8123/gemini-3-flash-preview" }, "oracle": { "model": "8123/gemini-claude-opus-4-5-thinking" }, "frontend-ui-ux-engineer": { "model": "8123/gemini-3-pro-preview" }, "document-writer": { "model": "8123/gemini-3-flash-preview" }, "multimodal-looker": { "model": "8123/gemini-3-flash-preview" } } } ## oh-my-opencode use tmux ### install tmux apt install tmux ### ~/config/opencode/oh-my-opencode.json { "tmux": { "enabled": true, "layout": "main-vertical", "main_pane_size": 60, "main_pane_min_width": 120, "agent_pane_min_width": 40 } } ### ~/.bashrc oc() { local base_name=$(basename "$PWD") local path_hash=$(echo "$PWD" | md5sum | cut -c1-4) local session_name="${base_name}-${path_hash}" # Find available port local port=4096 while [ $port -lt 5096 ]; do if ! lsof -i :$port >/dev/null 2>&1; then break fi port=$((port + 1)) done export OPENCODE_PORT=$port if [ -n "$TMUX" ]; then opencode --port $port "$@" else local oc_cmd="OPENCODE_PORT=$port opencode --port $port $*; exec $SHELL" if tmux has-session -t "$session_name" 2>/dev/null; then tmux new-window -t "$session_name" -c "$PWD" "$oc_cmd" tmux attach-session -t "$session_name" else tmux new-session -s "$session_name" -c "$PWD" "$oc_cmd" fi fi } ## models ### Claude gemini-claude-sonnet-4-5-thinking gemini-claude-opus-4-5-thinking gemini-claude-sonnet-4-5 ### Gemini gemini-2.5-pro gemini-2.5-flash gemini-3-pro-preview gemini-3-flash-preview gemini-2.5-flash-lite gemini-2.5-computer-use-preview-10-2025 gemini-3-pro-image-previe ### GPT gpt-oss-120b-medium ### Nvidia NIM glm4.7 minimax-m2.1 deepseek-v3.1 deepseek-r1 ### cerebras glm-4.6 glm-4.7