Hi there,
When i configured attacker brain with z.ai coding subscription API key i am getting the shared error. When i checked my api key with curl command i am getting successful response from z.ai like below:
curl -sS 'https://api.z.ai/api/coding/paas/v4/chat/completions'
-H "Authorization: Bearer YOURAPIKEY"
-H 'Content-Type: application/json'
-d '{"model":"glm-5.2","messages":[{"role":"user","content":"Only say hello world"}],"max_tokens":64,"thinking":{"type":"disabled"}}'
{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hello world","role":"assistant"}}],"created":1784567414,"id":"2026072101101193c6a2969f3c4b65","model":"glm-5.2","object":"chat.completion","request_id":"2026072101101193c6a2969f3c4b65","usage":{"completion_tokens":3,"completion_tokens_details":{"reasoning_tokens":0},"prompt_tokens":10,"prompt_tokens_details":{"cached_tokens":0},"total_tokens":13}}
EDIT: I wrote GLMMM-5.2 on purpose and it replied as "unknown model". I think this means API key, base URL and model name is correct.
curl -sS 'https://api.z.ai/api/coding/paas/v4/chat/completions' -H "Authorization: Bearer YOURAPIKEY" -H 'Content-Type: application/json' -d '{"model":"GLMMM-5.2","messages":[{"role":"user","content":"Only say hello world"}],"max_tokens":64,"thinking":{"type":"disabled"}}'
{"error":{"code":"1211","message":"Unknown Model, please check the model code."}}
i checked from z.ai coding subscription API key documentation and base URL is https://api.z.ai/api/coding/paas/v4 and my attacker brain config is like below:
protocol = "openai"
base_url = "https://api.z.ai/api/coding/paas/v4"
api_key = "........."
model = "glm-5.2"

Hi there,
When i configured attacker brain with z.ai coding subscription API key i am getting the shared error. When i checked my api key with curl command i am getting successful response from z.ai like below:
curl -sS 'https://api.z.ai/api/coding/paas/v4/chat/completions'
-H "Authorization: Bearer YOURAPIKEY"
-H 'Content-Type: application/json'
-d '{"model":"glm-5.2","messages":[{"role":"user","content":"Only say hello world"}],"max_tokens":64,"thinking":{"type":"disabled"}}'
{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hello world","role":"assistant"}}],"created":1784567414,"id":"2026072101101193c6a2969f3c4b65","model":"glm-5.2","object":"chat.completion","request_id":"2026072101101193c6a2969f3c4b65","usage":{"completion_tokens":3,"completion_tokens_details":{"reasoning_tokens":0},"prompt_tokens":10,"prompt_tokens_details":{"cached_tokens":0},"total_tokens":13}}
EDIT: I wrote GLMMM-5.2 on purpose and it replied as "unknown model". I think this means API key, base URL and model name is correct.
curl -sS 'https://api.z.ai/api/coding/paas/v4/chat/completions' -H "Authorization: Bearer YOURAPIKEY" -H 'Content-Type: application/json' -d '{"model":"GLMMM-5.2","messages":[{"role":"user","content":"Only say hello world"}],"max_tokens":64,"thinking":{"type":"disabled"}}'
{"error":{"code":"1211","message":"Unknown Model, please check the model code."}}
i checked from z.ai coding subscription API key documentation and base URL is https://api.z.ai/api/coding/paas/v4 and my attacker brain config is like below:
protocol = "openai"
base_url = "https://api.z.ai/api/coding/paas/v4"
api_key = "........."
model = "glm-5.2"