feat(near-ai): default to GLM-4.7 model

This commit is contained in:
Firat Sertgoz 2026-01-26 02:28:49 +04:00
parent 6d7ee8ba6c
commit b4da1636ba
No known key found for this signature in database
GPG Key ID: D5001141982D0383
2 changed files with 20 additions and 24 deletions

View File

@ -71,7 +71,7 @@ clawdbot onboard --non-interactive \
### 3. Verify Setup ### 3. Verify Setup
```bash ```bash
clawdbot chat --model near-ai/deepseek-ai/DeepSeek-V3.1 "Hello, are you working?" clawdbot chat --model near-ai/zai-org/GLM-4.7 "Hello, are you working?"
``` ```
## Model Selection ## Model Selection
@ -79,8 +79,8 @@ clawdbot chat --model near-ai/deepseek-ai/DeepSeek-V3.1 "Hello, are you working?
After setup, you can use any available NEAR AI model: After setup, you can use any available NEAR AI model:
```bash ```bash
clawdbot models set near-ai/zai-org/GLM-4.7
clawdbot models set near-ai/deepseek-ai/DeepSeek-V3.1 clawdbot models set near-ai/deepseek-ai/DeepSeek-V3.1
clawdbot models set near-ai/meta-llama/Llama-3.3-70B-Instruct
``` ```
List all available models: List all available models:
@ -91,10 +91,13 @@ clawdbot models list | grep near-ai
## Available Models ## Available Models
| Model ID | Name | Features | | Model ID | Name | Context | Cost ($/M tokens) |
|----------|------|----------| |----------|------|---------|-------------------|
| `deepseek-ai/DeepSeek-V3.1` | DeepSeek V3.1 | Reasoning, 128k context | | `deepseek-ai/DeepSeek-V3.1` | DeepSeek V3.1 | 128K | $1.05 in / $3.10 out |
| `meta-llama/Llama-3.3-70B-Instruct` | Llama 3.3 70B | General, 131k context | | `openai/gpt-oss-120b` | GPT OSS 120B | 131K | $0.15 in / $0.55 out |
| `Qwen/Qwen3-30B-A3B-Instruct-2507` | Qwen3 30B | 262K | $0.15 in / $0.55 out |
| `zai-org/GLM-4.6` | GLM 4.6 | 200K | $0.85 in / $3.30 out |
| `zai-org/GLM-4.7` | GLM 4.7 (default) | 131K | $0.85 in / $3.30 out |
## Configure via `clawdbot configure` ## Configure via `clawdbot configure`
@ -105,14 +108,17 @@ clawdbot models list | grep near-ai
## Usage Examples ## Usage Examples
```bash ```bash
# Use default model # Use default model (GLM 4.7)
clawdbot chat --model near-ai/zai-org/GLM-4.7
# Use DeepSeek for reasoning tasks
clawdbot chat --model near-ai/deepseek-ai/DeepSeek-V3.1 clawdbot chat --model near-ai/deepseek-ai/DeepSeek-V3.1
# Use Llama # Use Qwen for long context (262K!)
clawdbot chat --model near-ai/meta-llama/Llama-3.3-70B-Instruct clawdbot chat --model near-ai/Qwen/Qwen3-30B-A3B-Instruct-2507
# Send a message # Send a message
clawdbot agent --message "Explain quantum computing" --model near-ai/deepseek-ai/DeepSeek-V3.1 clawdbot agent --message "Explain quantum computing" --model near-ai/zai-org/GLM-4.7
``` ```
## Troubleshooting ## Troubleshooting
@ -135,25 +141,15 @@ NEAR AI API is at `https://cloud-api.near.ai/v1`. Ensure your network allows HTT
```json5 ```json5
{ {
env: { NEARAI_API_KEY: "..." }, env: { NEARAI_API_KEY: "..." },
agents: { defaults: { model: { primary: "near-ai/deepseek-ai/DeepSeek-V3.1" } } }, agents: { defaults: { model: { primary: "near-ai/zai-org/GLM-4.7" } } },
models: { models: {
mode: "merge", mode: "merge",
providers: { providers: {
"near-ai": { "near-ai": {
baseUrl: "https://cloud-api.near.ai/v1", baseUrl: "https://cloud-api.near.ai/v1",
apiKey: "${NEARAI_API_KEY}", apiKey: "${NEARAI_API_KEY}",
api: "openai-completions", api: "openai-completions"
models: [ // Models are auto-discovered from the built-in catalog
{
id: "deepseek-ai/DeepSeek-V3.1",
name: "DeepSeek V3.1",
reasoning: true,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 128000,
maxTokens: 8192
}
]
} }
} }
} }

View File

@ -1,7 +1,7 @@
import type { ModelDefinitionConfig } from "../config/types.js"; import type { ModelDefinitionConfig } from "../config/types.js";
export const NEAR_AI_BASE_URL = "https://cloud-api.near.ai/v1"; export const NEAR_AI_BASE_URL = "https://cloud-api.near.ai/v1";
export const NEAR_AI_DEFAULT_MODEL_ID = "deepseek-ai/DeepSeek-V3.1"; export const NEAR_AI_DEFAULT_MODEL_ID = "zai-org/GLM-4.7";
export const NEAR_AI_DEFAULT_MODEL_REF = `near-ai/${NEAR_AI_DEFAULT_MODEL_ID}`; export const NEAR_AI_DEFAULT_MODEL_REF = `near-ai/${NEAR_AI_DEFAULT_MODEL_ID}`;
// NEAR AI uses credit-based pricing (per million tokens). // NEAR AI uses credit-based pricing (per million tokens).