Update z.ai skill with correct BigModel API URL

- Update base_url to https://open.bigmodel.cn/api/paas/v4
- Mark API key as configured

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-14 19:29:28 +01:00
parent 4debcf00de
commit d04a7439a8

View File

@@ -11,14 +11,14 @@ Fallback AI provider with GLM (General Language Model) support. Use when synthet
## Configuration ## Configuration
```yaml ```yaml
provider: z.ai provider: z.ai (Zhipu AI / BigModel)
base_url: https://api.z.ai/v1 base_url: https://open.bigmodel.cn/api/paas/v4
api_key_env: Z_AI_API_KEY api_key_env: Z_AI_API_KEY
compatibility: openai compatibility: openai
rate_limit: 60 requests/minute rate_limit: 60 requests/minute
``` ```
**Note:** API key needs to be configured. Check z.ai dashboard for key generation. **API Key configured:** `Z_AI_API_KEY` in environment variables.
## Available Models ## Available Models
@@ -152,7 +152,7 @@ function shouldPreferGLM(task) {
```json ```json
{ {
"method": "POST", "method": "POST",
"url": "https://api.z.ai/v1/chat/completions", "url": "https://open.bigmodel.cn/api/paas/v4/chat/completions",
"headers": { "headers": {
"Authorization": "Bearer {{ $env.Z_AI_API_KEY }}", "Authorization": "Bearer {{ $env.Z_AI_API_KEY }}",
"Content-Type": "application/json" "Content-Type": "application/json"
@@ -182,7 +182,7 @@ async function callZAI(systemPrompt, userPrompt, options = {}) {
const response = await $http.request({ const response = await $http.request({
method: 'POST', method: 'POST',
url: 'https://api.z.ai/v1/chat/completions', url: 'https://open.bigmodel.cn/api/paas/v4/chat/completions',
headers: { headers: {
'Authorization': `Bearer ${$env.Z_AI_API_KEY}`, 'Authorization': `Bearer ${$env.Z_AI_API_KEY}`,
'Content-Type': 'application/json' 'Content-Type': 'application/json'
@@ -231,7 +231,7 @@ Z_AI_API_KEY=your_key_here
### 3. Test Connection ### 3. Test Connection
```bash ```bash
curl -X POST https://api.z.ai/v1/chat/completions \ curl -X POST https://open.bigmodel.cn/api/paas/v4/chat/completions \
-H "Authorization: Bearer $Z_AI_API_KEY" \ -H "Authorization: Bearer $Z_AI_API_KEY" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{