Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ QIANFAN_API_KEY=your-qianfan-key-here # qianfan.baidubce.com (Ba
# the base URL 404s at call time.
CLOUDFLARE_AI_GATEWAY_API_KEY=your-cloudflare-ai-gateway-key-here
# CLOUDFLARE_AI_GATEWAY_API_BASE=https://gateway.ai.cloudflare.com/v1/<account>/<gateway>/compat
# AbliteratedLLM — OpenAI-compatible base https://api.abliteratedllm.dev/v1.
# HIGH=glm-5.3-cyber-abliterated, MID/LOW=glm-5.3-flash-abliterated.
# Models: abliteratedllm.dev/docs/models. Use only against systems you are
# authorized to test.
ABLITERATEDLLM_API_KEY=your-abliteratedllm-key-here
CHEAPER_INFERENCE_API_KEY=your-cheaper-inference-key-here # cheaperinference.com (keys start ci_live_)

# --- Generic OpenAI-compatible gateway (opt-in, DEFAULT OFF) ---
Expand Down
2 changes: 2 additions & 0 deletions CHAGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Keep proposed and unmerged changes out of released sections.

## [Unreleased]

- Proposed, unreleased ([#1208](https://github.com/BitterSecurity/Decepticon/pull/1208)): add AbliteratedLLM as `abliteratedllm_api`, an OpenAI-compatible gateway (`https://api.abliteratedllm.dev/v1`, `ABLITERATEDLLM_API_KEY`) for authorized security testing. HIGH resolves to `abliteratedllm/glm-5.3-cyber-abliterated`; MID and LOW share `abliteratedllm/glm-5.3-flash-abliterated`, with a HIGH-to-Flash in-gateway fallback. Both static routes carry the published per-token input/output/cache-read rates instead of $0 placeholders, so budget caps remain measurable. Covers the dynamic gateway table, generated LiteLLM/CLI catalogs, factory detection and labels, `.env.example`, the setup guide and focused regressions for routing, tier resolution, pricing, fallback shape and budget admission.

- Live-capture qualification ([#1206](https://github.com/BitterSecurity/Decepticon/pull/1206)) for [#1198](https://github.com/BitterSecurity/Decepticon/pull/1198), unreleased: the public README-only Codex session is actually recorded with one completed turn and zero pending turns. Preserve local-only checkpoint policy, generated hook bytes, trust records and the canonical OSS checkout. No runtime/package/release change; process exit and commit checkpoint creation are not claimed. [Evidence](docs/operations/entire-public-live-capture-20261118.json).

- Integration review for [#1198](https://github.com/BitterSecurity/Decepticon/pull/1198), unreleased: preserve latest-main history and the Axum instruction while integrating the official local development configuration. All 11 proposed files, seven hook shell commands and JSON/TOML settings are reviewed; automatic checkpoint pushing and telemetry remain disabled, Brain no-egress remains configured, and generated hooks are unchanged. Actual CLI still reports seven project hooks awaiting interactive approval; live public-repository capture is not qualified. No application runtime, release or trust-hash change. [Review and limitations](docs/operations/entire-native-development-20261115.md#integration-review-2026-11-17).
Expand Down
6 changes: 6 additions & 0 deletions clients/cli/src/commands/configuredModelRoutes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// Generated by model-catalog/generate.py; contains env names, never secrets.
export const CONFIGURED_MODEL_ROUTES: Record<string, readonly string[]> = {
"abliteratedllm/glm-5.3-cyber-abliterated": [
"ABLITERATEDLLM_API_KEY"
],
"abliteratedllm/glm-5.3-flash-abliterated": [
"ABLITERATEDLLM_API_KEY"
],
"anthropic/claude-fable-5-1": [
"ANTHROPIC_API_KEY"
],
Expand Down
4 changes: 4 additions & 0 deletions clients/cli/src/commands/currentProdModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ export const CURRENT_PROD_MODELS: Record<string, string[]> = {
"cheaperinference/gpt-5.4",
"cheaperinference/gpt-5.4-mini"
],
"Shared catalog / abliteratedllm": [
"abliteratedllm/glm-5.3-cyber-abliterated",
"abliteratedllm/glm-5.3-flash-abliterated"
],
"Shared catalog / openrouter": [
"openrouter/openai/gpt-5.6-sol",
"openrouter/openai/gpt-5.6-terra",
Expand Down
4 changes: 4 additions & 0 deletions clients/cli/src/commands/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ const SUPPORTED_MODELS: Record<string, string[]> = {
"cfgateway/anthropic/claude-sonnet-4-6",
"cfgateway/anthropic/claude-haiku-4-5",
],
"AbliteratedLLM": [
"abliteratedllm/glm-5.3-cyber-abliterated",
"abliteratedllm/glm-5.3-flash-abliterated",
],
// Local
"Ollama (local)": ["ollama_chat/qwen3-coder:30b"],
"Ollama Cloud": ["ollama_chat/<your OLLAMA_CLOUD_MODEL>"],
Expand Down
31 changes: 31 additions & 0 deletions config/litellm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,35 @@ model_list:
model_info:
input_cost_per_token: 0
output_cost_per_token: 0
- model_name: abliteratedllm/glm-5.3-cyber-abliterated
litellm_params:
model: openai/glm-5.3-cyber-abliterated
api_base: https://api.abliteratedllm.dev/v1
api_key: os.environ/ABLITERATEDLLM_API_KEY
model_info:
input_cost_per_token: 9.0e-07
output_cost_per_token: 1.8e-06
cache_read_input_token_cost: 1.35e-07
max_input_tokens: 1048576
max_output_tokens: 131072
supports_reasoning: true
supports_function_calling: true
pricing_source: https://api.abliteratedllm.dev/v1/models
pricing_checked_at: '2026-11-19'
- model_name: abliteratedllm/glm-5.3-flash-abliterated
litellm_params:
model: openai/glm-5.3-flash-abliterated
api_base: https://api.abliteratedllm.dev/v1
api_key: os.environ/ABLITERATEDLLM_API_KEY
model_info:
input_cost_per_token: 9.77e-08
output_cost_per_token: 3.421e-07
cache_read_input_token_cost: 9.8e-09
max_input_tokens: 1048576
max_output_tokens: 131072
supports_reasoning: true
pricing_source: https://api.abliteratedllm.dev/v1/models
pricing_checked_at: '2026-11-19'
- model_name: openai/gpt-6.1-terra
litellm_params:
model: openai/gpt-6.1-terra
Expand Down Expand Up @@ -1059,6 +1088,8 @@ router_settings:
- cfgateway/anthropic/claude-sonnet-4-6
- cfgateway/anthropic/claude-sonnet-4-6:
- cfgateway/anthropic/claude-haiku-4-5
- abliteratedllm/glm-5.3-cyber-abliterated:
- abliteratedllm/glm-5.3-flash-abliterated
routing_strategy: simple-shuffle
num_retries: 5
timeout: 300
Expand Down
6 changes: 6 additions & 0 deletions config/litellm_dynamic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ def current_model_routes(env: Mapping[str, str] | None = None) -> list[dict[str,
# Cheaper Inference (api.cheaperinference.com). One key gives access to
# models from several labs; fixed OpenAI-compatible endpoint.
"cheaperinference": ("https://api.cheaperinference.com/v1", "CHEAPER_INFERENCE_API_KEY"),
# AbliteratedLLM (api.abliteratedllm.dev). GLM-5.3 builds with the
# refusal direction removed, intended for authorized security testing.
# Per-token prices are published on the provider's rate card and
# mirrored in model-catalog/catalog.json, so these routes stay out of
# middleware/budget.py's _SPEND_UNTRACKED_METHODS.
"abliteratedllm": ("https://api.abliteratedllm.dev/v1", "ABLITERATEDLLM_API_KEY"),
# Generic opt-in OpenAI-compatible gateway. BOTH api_base and api_key
# come from the environment — no vendor URL is hardcoded. Unset env
# vars leave this gateway disabled (DEFAULT OFF). Operators point
Expand Down
9 changes: 9 additions & 0 deletions docs/setup-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,17 @@ default fallback chain; pick a specific route at runtime with `/model`
| Baidu Qianfan (ERNIE) | `QIANFAN_API_KEY` | [console.bce.baidu.com/qianfan](https://console.bce.baidu.com/qianfan) |
| Cloudflare AI Gateway | `CLOUDFLARE_AI_GATEWAY_API_KEY` + `CLOUDFLARE_AI_GATEWAY_API_BASE` | [dash.cloudflare.com](https://dash.cloudflare.com) |
| Cheaper Inference | `CHEAPER_INFERENCE_API_KEY` | [cheaperinference.com](https://cheaperinference.com) |
| AbliteratedLLM | `ABLITERATEDLLM_API_KEY` | [abliteratedllm.dev](https://abliteratedllm.dev) |
| Generic OpenAI-compatible gateway (opt-in) | `OPENAI_COMPAT_GATEWAY_API_KEY` + `OPENAI_COMPAT_GATEWAY_API_BASE` + `OPENAI_COMPAT_GATEWAY_MODEL` | any OpenAI-compatible `/v1` endpoint |

AbliteratedLLM serves GLM-5.3 weights edited to remove refusals, for
authorized security testing. HIGH uses
`abliteratedllm/glm-5.3-cyber-abliterated`; MID and LOW share
`abliteratedllm/glm-5.3-flash-abliterated`. Both routes use the provider's
published per-token prices
([models](https://abliteratedllm.dev/docs/models)), not $0 placeholders, so
`DECEPTICON_BUDGET__*` caps stay measurable for them.

> Cloudflare's base URL is per-account — set it to your gateway's
> OpenAI-compat `…/compat` path. Qianfan model ids drift; override per
> role with `DECEPTICON_MODEL_<ROLE>` if a default 404s.
Expand Down
35 changes: 35 additions & 0 deletions model-catalog/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -3387,6 +3387,41 @@
"output_cost_per_token": 0
}
},
{
"id": "abliteratedllm/glm-5.3-cyber-abliterated",
"params": {
"model": "openai/glm-5.3-cyber-abliterated",
"api_base": "https://api.abliteratedllm.dev/v1"
},
"info": {
"input_cost_per_token": 9e-07,
"output_cost_per_token": 1.8e-06,
"cache_read_input_token_cost": 1.35e-07,
"max_input_tokens": 1048576,
"max_output_tokens": 131072,
"supports_reasoning": true,
"supports_function_calling": true,
"pricing_source": "https://api.abliteratedllm.dev/v1/models",
"pricing_checked_at": "2026-11-19"
}
},
{
"id": "abliteratedllm/glm-5.3-flash-abliterated",
"params": {
"model": "openai/glm-5.3-flash-abliterated",
"api_base": "https://api.abliteratedllm.dev/v1"
},
"info": {
"input_cost_per_token": 9.77e-08,
"output_cost_per_token": 3.421e-07,
"cache_read_input_token_cost": 9.8e-09,
"max_input_tokens": 1048576,
"max_output_tokens": 131072,
"supports_reasoning": true,
"pricing_source": "https://api.abliteratedllm.dev/v1/models",
"pricing_checked_at": "2026-11-19"
}
},
{
"id": "openrouter/openai/gpt-5.6-sol",
"params": {
Expand Down
16 changes: 16 additions & 0 deletions model-catalog/overlay.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
},
"cheaperinference": {
"api_key": "os.environ/CHEAPER_INFERENCE_API_KEY"
},
"abliteratedllm": {
"api_key": "os.environ/ABLITERATEDLLM_API_KEY"
}
},
"exclude": [
Expand Down Expand Up @@ -638,6 +641,14 @@
{
"id": "cheaperinference/gpt-5.4-mini",
"patch": {}
},
{
"id": "abliteratedllm/glm-5.3-cyber-abliterated",
"patch": {}
},
{
"id": "abliteratedllm/glm-5.3-flash-abliterated",
"patch": {}
}
],
"settings": {
Expand Down Expand Up @@ -861,6 +872,11 @@
"cfgateway/anthropic/claude-sonnet-4-6": [
"cfgateway/anthropic/claude-haiku-4-5"
]
},
{
"abliteratedllm/glm-5.3-cyber-abliterated": [
"abliteratedllm/glm-5.3-flash-abliterated"
]
}
],
"routing_strategy": "simple-shuffle",
Expand Down
12 changes: 12 additions & 0 deletions packages/decepticon-core/decepticon_core/types/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
qianfan_api qianfan/ernie-4.5-turbo-128k qianfan/ernie-4.5-turbo-32k qianfan/ernie-speed-pro-128k
cloudflare_gw cfgateway/anthropic/…opus cfgateway/anthropic/…sonnet cfgateway/anthropic/…haiku
cheaper_inf cheaperinference/…sonnet-5 cheaperinference/gpt-5.4 cheaperinference/gpt-5.4-mini
abliteratedllm abliteratedllm/glm-5.3-cyber abliteratedllm/glm-5.3-flash abliteratedllm/glm-5.3-flash
openai_compat_gw compat/<OPENAI_COMPAT_GATEWAY_MODEL_*> (env-driven; DEFAULT OFF)

Code-heavy override
Expand Down Expand Up @@ -167,6 +168,7 @@ class AuthMethod(StrEnum):
QIANFAN_API = "qianfan_api" # Baidu Qianfan (ERNIE) v2 OpenAI-compatible
CLOUDFLARE_GATEWAY_API = "cloudflare_gateway_api" # Cloudflare AI Gateway
CHEAPER_INFERENCE_API = "cheaper_inference_api" # Cheaper Inference (cheaperinference.com)
ABLITERATEDLLM_API = "abliteratedllm_api" # AbliteratedLLM (abliteratedllm.dev)
# Generic opt-in OpenAI-compatible gateway (env-driven base URL + key + model).
# DEFAULT OFF — no vendor endpoint is hardcoded. See #989.
OPENAI_COMPAT_GATEWAY_API = "openai_compat_gateway_api"
Expand Down Expand Up @@ -531,6 +533,16 @@ class AuthMethod(StrEnum):
Tier.MID: "cheaperinference/gpt-5.4",
Tier.LOW: "cheaperinference/gpt-5.4-mini",
},
AuthMethod.ABLITERATEDLLM_API: {
# AbliteratedLLM serves GLM-5.3 weights edited to remove refusals, for
# authorized security testing. HIGH uses the full-size cyber build; MID
# and LOW share Flash because it fits both tool-heavy execution and
# high-throughput roles, and the catalog has no cheaper third model.
# Per-token rates live in model-catalog/catalog.json, not duplicated here.
Tier.HIGH: "abliteratedllm/glm-5.3-cyber-abliterated",
Tier.MID: "abliteratedllm/glm-5.3-flash-abliterated",
Tier.LOW: "abliteratedllm/glm-5.3-flash-abliterated",
},
}


Expand Down
6 changes: 6 additions & 0 deletions packages/decepticon/decepticon/llm/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ async def call_with_timeout(coro: Awaitable[Any], timeout: float) -> Any:
AuthMethod.QIANFAN_API,
AuthMethod.CLOUDFLARE_GATEWAY_API,
AuthMethod.CHEAPER_INFERENCE_API,
AuthMethod.ABLITERATEDLLM_API,
AuthMethod.OPENAI_COMPAT_GATEWAY_API,
AuthMethod.OLLAMA_LOCAL,
AuthMethod.OLLAMA_CLOUD,
Expand Down Expand Up @@ -376,6 +377,10 @@ async def call_with_timeout(coro: Awaitable[Any], timeout: float) -> Any:
AuthMethod.QIANFAN_API: "QIANFAN_API_KEY",
AuthMethod.CLOUDFLARE_GATEWAY_API: "CLOUDFLARE_AI_GATEWAY_API_KEY",
AuthMethod.CHEAPER_INFERENCE_API: "CHEAPER_INFERENCE_API_KEY",
# AbliteratedLLM's base URL is fixed (https://api.abliteratedllm.dev/v1).
# No key-prefix hint: the provider's key format is not pinned here, so the
# generic non-placeholder / minimum-length checks apply.
AuthMethod.ABLITERATEDLLM_API: "ABLITERATEDLLM_API_KEY",
}

_OAUTH_METHOD_ENV: dict[AuthMethod, str] = {
Expand Down Expand Up @@ -867,6 +872,7 @@ def _resolve_credentials() -> Credentials:
AuthMethod.QIANFAN_API: "Baidu Qianfan (ERNIE) — API key",
AuthMethod.CLOUDFLARE_GATEWAY_API: "Cloudflare AI Gateway — API key + base URL",
AuthMethod.CHEAPER_INFERENCE_API: "Cheaper Inference — API key",
AuthMethod.ABLITERATEDLLM_API: "AbliteratedLLM — API key",
AuthMethod.OPENAI_COMPAT_GATEWAY_API: "OpenAI-compatible gateway — base URL + key (opt-in)",
AuthMethod.COPILOT_OAUTH: "GitHub Copilot — Pro subscription",
AuthMethod.GROK_OAUTH: "xAI SuperGrok — X Premium+",
Expand Down
13 changes: 13 additions & 0 deletions packages/decepticon/tests/unit/cli/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ def test_gateway_key_activates_method(clean_env):
assert AuthMethod.OPENCODE_API in inv.resolved_chain


def test_abliteratedllm_key_activates_method(clean_env):
# ABLITERATEDLLM_API_KEY is detected like any other gateway key: no
# key-prefix hint is pinned for this provider, so the generic
# non-placeholder / minimum-length checks apply.
clean_env.setenv("ABLITERATEDLLM_API_KEY", "abliterated-" + "a" * 32)
inv = factory.auth_inventory()
abliteratedllm = next(s for s in inv.statuses if s.method == AuthMethod.ABLITERATEDLLM_API)
assert abliteratedllm.configured
assert abliteratedllm.active
assert abliteratedllm.kind == "api"
assert AuthMethod.ABLITERATEDLLM_API in inv.resolved_chain


def test_placeholder_key_is_not_configured(clean_env):
clean_env.setenv("ANTHROPIC_API_KEY", "your-anthropic-key-here")
inv = factory.auth_inventory()
Expand Down
Loading