Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/ccs/agy.settings.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/agy",
"ANTHROPIC_AUTH_TOKEN": "__CLIPROXY_API_KEY__",
"ANTHROPIC_MODEL": "claude-opus-4-5-thinking",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-thinking",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-opus-4-5-thinking",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-5"
"ANTHROPIC_MODEL": "claude-opus-4.6-thinking",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4.6-thinking",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-opus-4.6-thinking",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4.5-20250929"
}
}
10 changes: 10 additions & 0 deletions config/ccs/agy.settings.tpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/agy",
"ANTHROPIC_AUTH_TOKEN": "__CLIPROXY_API_KEY__",
"ANTHROPIC_MODEL": "__CLAUDE_OPUS_THINKING__",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "__CLAUDE_OPUS_THINKING__",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "__CLAUDE_OPUS_THINKING__",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "__CLAUDE_SONNET__"
}
}
8 changes: 4 additions & 4 deletions config/ccs/codex.settings.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/codex",
"ANTHROPIC_AUTH_TOKEN": "__CLIPROXY_API_KEY__",
"ANTHROPIC_MODEL": "gpt-5.1-codex-max",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gpt-5.1-codex-max-high",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-5.1-codex-max",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-5.1-codex-mini-high"
"ANTHROPIC_MODEL": "gpt-5.3-codex",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gpt-5.3-codex",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-5.3-codex",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-5.3-codex"
}
}
10 changes: 10 additions & 0 deletions config/ccs/codex.settings.tpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/codex",
"ANTHROPIC_AUTH_TOKEN": "__CLIPROXY_API_KEY__",
"ANTHROPIC_MODEL": "__GPT_CODEX__",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "__GPT_CODEX__",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "__GPT_CODEX__",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "__GPT_CODEX__"
}
}
8 changes: 4 additions & 4 deletions config/ccs/gemini.settings.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/gemini",
"ANTHROPIC_AUTH_TOKEN": "__CLIPROXY_API_KEY__",
"ANTHROPIC_MODEL": "gemini-2.5-pro",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-2.5-pro",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gemini-2.5-pro",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-2.5-flash"
"ANTHROPIC_MODEL": "gemini-3-pro-preview",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-3-pro-preview",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gemini-3-pro-preview",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-3-flash-preview"
}
}
10 changes: 10 additions & 0 deletions config/ccs/gemini.settings.tpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/gemini",
"ANTHROPIC_AUTH_TOKEN": "__CLIPROXY_API_KEY__",
"ANTHROPIC_MODEL": "__GEMINI_PRO__",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "__GEMINI_PRO__",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "__GEMINI_PRO__",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "__GEMINI_FLASH__"
}
}
10 changes: 10 additions & 0 deletions config/ccs/glm.settings.tpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"ANTHROPIC_AUTH_TOKEN": "__ZAI_API_KEY__",
"ANTHROPIC_MODEL": "__GLM__",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "__GLM__",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "__GLM__",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "__GLM__"
}
}
6 changes: 6 additions & 0 deletions config/cliproxyapi/config.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ openai-compatibility:
# protocol: "codex" # restricts the rule to a specific protocol, options: openai, gemini, claude, codex
# params: # JSON path (gjson/sjson syntax) -> value
# "reasoning.effort": "high"

oauth-model-alias:
antigravity:
- name: "claude-opus-4-6-thinking"
alias: "claude-opus-4.6"
fork: true
117 changes: 117 additions & 0 deletions config/cliproxyapi/config.tpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Server port
port: 8317
# Management API settings
remote-management:
# Whether to allow remote (non-localhost) management access.
# When false, only localhost can access management endpoints (a key is still required).
allow-remote: true
# Management key. If a plaintext value is provided here, it will be hashed on startup.
# All management requests (even from localhost) require this key.
# Leave empty to disable the Management API entirely (404 for all /v0/management routes).
secret-key: "__CLIPROXY_MANAGEMENT_PASSWORD__"
# Disable the bundled management control panel asset download and HTTP route when true.
disable-control-panel: false
# Authentication directory (supports ~ for home directory). If you use Windows, please set the directory like this: `C:/cli-proxy-api/`
# Use objectstore/auths subdirectory to avoid duplicate scanning (root-level files are legacy)
auth-dir: "~/.cli-proxy-api/objectstore/auths"
# API keys for client authentication (optional - leave commented for open access)
# api-keys:
# - "__CLIPROXY_API_KEY__"

# Enable debug logging
debug: true
# When true, write application logs to rotating files instead of stdout
logging-to-file: true
# When false, disable in-memory usage statistics aggregation
usage-statistics-enabled: true
# Proxy URL. Supports socks5/http/https protocols. Example: socks5://user:pass@192.168.1.1:1080/
proxy-url: ""
# Number of times to retry a request. Retries will occur if the HTTP response code is 403, 408, 500, 502, 503, or 504.
request-retry: 3
# Routing strategy: "round-robin" (default) or "fill-first" (tries first matching provider)
routing:
strategy: "fill-first"
# Quota exceeded behavior
quota-exceeded:
switch-project: true # Whether to automatically switch to another project when a quota is exceeded
switch-preview-model: true # Whether to automatically switch to a preview model when a quota is exceeded
# When true, enable authentication for the WebSocket API (/v1/ws).
ws-auth: false
# AMP integration
ampcode:
upstream-url: "https://ampcode.com"
upstream-api-key: "__AMP_UPSTREAM_API_KEY__"
restrict-management-to-localhost: false
# Map non-prefixed model names to antigravity provider's gemini-prefixed models
model-mappings:
- from: "claude-opus-4-5-thinking"
to: "gemini-claude-opus-4-5-thinking"
- from: "claude-sonnet-4-5"
to: "gemini-claude-sonnet-4-5"
- from: "claude-sonnet-4-5-thinking"
to: "gemini-claude-sonnet-4-5-thinking"
# Gemini API keys (preferred)
# gemini-api-key:
# - api-key: "AIzaSy...01"
# base-url: "https://generativelanguage.googleapis.com"
# headers:
# X-Custom-Header: "custom-value"
# proxy-url: "socks5://proxy.example.com:1080"
# - api-key: "AIzaSy...02"

# Codex API keys
# codex-api-key:
# - api-key: "sk-atSM..."
# base-url: "https://www.example.com" # use the custom codex API endpoint
# headers:
# X-Custom-Header: "custom-value"
# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override

# Claude API keys
# claude-api-key:
# - api-key: "sk-atSM..." # use the official claude API key, no need to set the base url
# - api-key: "sk-atSM..."
# base-url: "https://www.example.com" # use the custom claude API endpoint
# headers:
# X-Custom-Header: "custom-value"
# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override
# models:
# - name: "claude-3-5-sonnet-20241022" # upstream model name
# alias: "claude-sonnet-latest" # client alias mapped to the upstream model

# OpenAI compatibility providers
openai-compatibility:
- name: "openrouter"
base-url: "https://openrouter.ai/api/v1"
api-key-entries:
- api-key: "__OPENROUTER_API_KEY__"
models:
- name: "@preset/glm-4-7"
alias: "glm-4.7"
- name: "z-ai"
base-url: "https://api.z.ai/api/coding/paas/v4"
api-key-entries:
- api-key: "__ZAI_API_KEY__"
models:
- name: "glm-4.7"
alias: "glm-4.7"

# payload: # Optional payload configuration
# default: # Default rules only set parameters when they are missing in the payload.
# - models:
# - name: "gemini-2.5-pro" # Supports wildcards (e.g., "gemini-*")
# protocol: "gemini" # restricts the rule to a specific protocol, options: openai, gemini, claude, codex
# params: # JSON path (gjson/sjson syntax) -> value
# "generationConfig.thinkingConfig.thinkingBudget": 32768
# override: # Override rules always set parameters, overwriting any existing values.
# - models:
# - name: "gpt-*" # Supports wildcards (e.g., "gpt-*")
# protocol: "codex" # restricts the rule to a specific protocol, options: openai, gemini, claude, codex
# params: # JSON path (gjson/sjson syntax) -> value
# "reasoning.effort": "high"

oauth-model-alias:
antigravity:
- name: "__CLAUDE_OPUS_THINKING_NONDOT__"
alias: "__CLAUDE_OPUS__"
fork: true
63 changes: 63 additions & 0 deletions config/codex/config.tpl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
notify = [
"bash",
"-lc",
"JSON=\"$1\"; LAST_MESSAGE=$(echo \"$JSON\" | jq -r '.\"last-assistant-message\" // \"Codex task completed\"'); osascript -e \"display notification \\\"$LAST_MESSAGE\\\" with title \\\"Codex\\\"\"",

@cubic-dev-ai cubic-dev-ai Bot Feb 14, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Escape the assistant message before inserting it into the osascript string to avoid malformed notifications or AppleScript injection when the message contains quotes/backslashes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At config/codex/config.tpl.toml, line 4:

<comment>Escape the assistant message before inserting it into the osascript string to avoid malformed notifications or AppleScript injection when the message contains quotes/backslashes.</comment>

<file context>
@@ -0,0 +1,63 @@
+notify = [
+  "bash",
+  "-lc",
+  "JSON=\"$1\"; LAST_MESSAGE=$(echo \"$JSON\" | jq -r '.\"last-assistant-message\" // \"Codex task completed\"'); osascript -e \"display notification \\\"$LAST_MESSAGE\\\" with title \\\"Codex\\\"\"",
+  "notify",
+]
</file context>
Fix with Cubic

"notify",
]

suppress_unstable_features_warning = true
web_search = "cached"
model = "__GPT_CODEX__"
model_reasoning_effort = "xhigh"

[features]
ghost_commit = false
undo = false
shell_tool = true
unified_exec = true
apply_patch_freeform = true
exec_policy = true
experimental_windows_sandbox = false
elevated_windows_sandbox = false
remote_compaction = true
remote_models = true
shell_snapshot = true
child_agents_md = true
powershell_utf8 = false
enable_request_compression = false
collab = true
apps = true
skills = true
steer = true
collaboration_modes = true
responses_websockets = false
personality = true

[model_providers.cliproxyapi]
name = "CLIProxyAPI"
base_url = "http://localhost:8317/v1"

[model_providers.lmstudio]
name = "LMStudio"
base_url = "http://127.0.0.1:1234/v1"

[model_providers.ollama]
name = "Ollama"
base_url = "http://127.0.0.1:11434/v1"

[model_providers.openrouter]
name = "OpenRouter"
base_url = "https://openrouter.ai/api/v1"
env_key = "OPENROUTER_API_KEY"

[profiles.gpt-oss-20b]
model = "gpt-oss:20b"
model_provider = "ollama"

[profiles.gpt-oss-120b]
model = "openai/gpt-oss-120b"
model_provider = "lmstudio"

[profiles.glm-4-7-flash]
model = "zai-org/glm-4.7-flash"
model_provider = "lmstudio"
17 changes: 17 additions & 0 deletions config/llm/extra-openai-models.tpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Custom OpenAI-compatible models for llm
- model_id: claude-sonnet
model_name: __CLAUDE_SONNET__
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
- model_id: claude-opus
model_name: __CLAUDE_OPUS__
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
- model_id: claude-haiku
model_name: __CLAUDE_HAIKU__
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
- model_id: glm
model_name: __GLM__
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
8 changes: 4 additions & 4 deletions config/llm/extra-openai-models.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Custom OpenAI-compatible models for llm
- model_id: claude-sonnet
model_name: claude-sonnet-4-5-20250929
model_name: claude-sonnet-4.5-20250929
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
- model_id: claude-opus
model_name: claude-opus-4-5-20251101
model_name: claude-opus-4.6
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
- model_id: claude-haiku
model_name: claude-haiku-4-5-20251001
model_name: claude-haiku-4.5-20251001
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
- model_id: glm-4.7
- model_id: glm
model_name: glm-4.7
api_base: http://localhost:8317/v1
api_key_name: cliproxyapi
Loading
Loading