@mastra/mcp-docs-server 1.2.14-alpha.4 → 1.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/models/gateways/neon.md +6 -6
- package/.docs/models/gateways/netlify.md +6 -6
- package/.docs/models/gateways/openrouter.md +6 -6
- package/.docs/models/gateways/vercel.md +7 -7
- package/.docs/models/index.md +97 -96
- package/.docs/models/providers/alibaba-cn.md +25 -23
- package/.docs/models/providers/alibaba-token-plan-cn.md +24 -24
- package/.docs/models/providers/alibaba-token-plan.md +25 -23
- package/.docs/models/providers/alibaba.md +25 -23
- package/.docs/models/providers/ambient.md +26 -24
- package/.docs/models/providers/baseten.md +25 -23
- package/.docs/models/providers/chutes.md +25 -23
- package/.docs/models/providers/cortecs.md +133 -85
- package/.docs/models/providers/crof.md +25 -23
- package/.docs/models/providers/crossmodel.md +25 -23
- package/.docs/models/providers/deepinfra.md +24 -22
- package/.docs/models/providers/digitalocean.md +25 -23
- package/.docs/models/providers/empiriolabs.md +25 -23
- package/.docs/models/providers/fireworks-ai.md +24 -24
- package/.docs/models/providers/greenpt.md +25 -23
- package/.docs/models/providers/groq.md +25 -23
- package/.docs/models/providers/huggingface.md +25 -23
- package/.docs/models/providers/hyper.md +31 -29
- package/.docs/models/providers/impossibl.md +25 -23
- package/.docs/models/providers/infomaniak.md +24 -24
- package/.docs/models/providers/kilo.md +26 -24
- package/.docs/models/providers/llmgateway.md +26 -24
- package/.docs/models/providers/minimax.md +23 -25
- package/.docs/models/providers/mistral.md +25 -23
- package/.docs/models/providers/modal.md +25 -23
- package/.docs/models/providers/modelis.md +25 -23
- package/.docs/models/providers/nano-gpt.md +26 -24
- package/.docs/models/providers/neuralwatt.md +25 -23
- package/.docs/models/providers/ofox.md +25 -23
- package/.docs/models/providers/ollama-cloud.md +25 -23
- package/.docs/models/providers/openai.md +26 -28
- package/.docs/models/providers/opencode-go.md +25 -23
- package/.docs/models/providers/opencode.md +25 -23
- package/.docs/models/providers/perplexity-agent.md +24 -24
- package/.docs/models/providers/pioneer.md +25 -23
- package/.docs/models/providers/requesty.md +25 -23
- package/.docs/models/providers/routing-run.md +25 -23
- package/.docs/models/providers/scx.md +25 -23
- package/.docs/models/providers/tensorx.md +25 -23
- package/.docs/models/providers/togetherai.md +24 -22
- package/.docs/models/providers/umans-ai-coding-plan.md +24 -24
- package/.docs/models/providers/umans-ai.md +25 -23
- package/.docs/models/providers/wandb.md +25 -23
- package/.docs/models/providers/xai.md +28 -26
- package/.docs/models/providers/zai-coding-plan.md +25 -23
- package/.docs/models/providers/zhipuai-coding-plan.md +25 -23
- package/CHANGELOG.md +7 -0
- package/package.json +6 -6
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Cortecs
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 105 Cortecs models through Mastra's model router. Authentication is handled automatically using the `CORTECS_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Cortecs documentation](https://cortecs.ai).
|
|
8
8
|
|
|
@@ -11,22 +11,22 @@ CORTECS_API_KEY=your-api-key
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Agent } from
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
15
|
|
|
16
16
|
const agent = new Agent({
|
|
17
|
-
id:
|
|
18
|
-
name:
|
|
19
|
-
instructions:
|
|
20
|
-
model:
|
|
21
|
-
})
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "cortecs/apertus-70b"
|
|
21
|
+
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
24
|
-
const response = await agent.generate(
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
25
|
|
|
26
26
|
// Stream a response
|
|
27
|
-
const stream = await agent.stream(
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
28
|
for await (const chunk of stream) {
|
|
29
|
-
console.log(chunk)
|
|
29
|
+
console.log(chunk);
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -34,67 +34,113 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `cortecs/
|
|
40
|
-
| `cortecs/claude-4-
|
|
41
|
-
| `cortecs/claude-
|
|
42
|
-
| `cortecs/claude-
|
|
43
|
-
| `cortecs/claude-
|
|
44
|
-
| `cortecs/claude-opus4-
|
|
45
|
-
| `cortecs/claude-opus4-
|
|
46
|
-
| `cortecs/claude-
|
|
47
|
-
| `cortecs/
|
|
48
|
-
| `cortecs/
|
|
49
|
-
| `cortecs/
|
|
50
|
-
| `cortecs/
|
|
51
|
-
| `cortecs/
|
|
52
|
-
| `cortecs/deepseek-
|
|
53
|
-
| `cortecs/deepseek-
|
|
54
|
-
| `cortecs/
|
|
55
|
-
| `cortecs/
|
|
56
|
-
| `cortecs/
|
|
57
|
-
| `cortecs/
|
|
58
|
-
| `cortecs/
|
|
59
|
-
| `cortecs/
|
|
60
|
-
| `cortecs/
|
|
61
|
-
| `cortecs/
|
|
62
|
-
| `cortecs/
|
|
63
|
-
| `cortecs/
|
|
64
|
-
| `cortecs/
|
|
65
|
-
| `cortecs/
|
|
66
|
-
| `cortecs/
|
|
67
|
-
| `cortecs/
|
|
68
|
-
| `cortecs/
|
|
69
|
-
| `cortecs/
|
|
70
|
-
| `cortecs/
|
|
71
|
-
| `cortecs/
|
|
72
|
-
| `cortecs/
|
|
73
|
-
| `cortecs/
|
|
74
|
-
| `cortecs/
|
|
75
|
-
| `cortecs/
|
|
76
|
-
| `cortecs/
|
|
77
|
-
| `cortecs/
|
|
78
|
-
| `cortecs/
|
|
79
|
-
| `cortecs/
|
|
80
|
-
| `cortecs/
|
|
81
|
-
| `cortecs/
|
|
82
|
-
| `cortecs/
|
|
83
|
-
| `cortecs/
|
|
84
|
-
| `cortecs/
|
|
85
|
-
| `cortecs/
|
|
86
|
-
| `cortecs/
|
|
87
|
-
| `cortecs/
|
|
88
|
-
| `cortecs/
|
|
89
|
-
| `cortecs/
|
|
90
|
-
| `cortecs/
|
|
91
|
-
| `cortecs/
|
|
92
|
-
| `cortecs/
|
|
93
|
-
| `cortecs/
|
|
94
|
-
| `cortecs/
|
|
95
|
-
| `cortecs/
|
|
96
|
-
| `cortecs/
|
|
97
|
-
| `cortecs/
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `cortecs/apertus-70b` | 66K | | | | | | $1 | $2 |
|
|
40
|
+
| `cortecs/claude-4-5-sonnet` | 200K | | | | | | $3 | $15 |
|
|
41
|
+
| `cortecs/claude-4-6-sonnet` | 1.0M | | | | | | $3 | $16 |
|
|
42
|
+
| `cortecs/claude-haiku-4-5` | 200K | | | | | | $1.00 | $5 |
|
|
43
|
+
| `cortecs/claude-opus-5` | 1.0M | | | | | | $6 | $27 |
|
|
44
|
+
| `cortecs/claude-opus4-5` | 200K | | | | | | $5 | $27 |
|
|
45
|
+
| `cortecs/claude-opus4-6` | 1.0M | | | | | | $5 | $27 |
|
|
46
|
+
| `cortecs/claude-opus4-7` | 1.0M | | | | | | $5 | $27 |
|
|
47
|
+
| `cortecs/claude-opus4-8` | 1.0M | | | | | | $5 | $27 |
|
|
48
|
+
| `cortecs/claude-sonnet-4` | 200K | | | | | | $3 | $14 |
|
|
49
|
+
| `cortecs/claude-sonnet-5` | 1.0M | | | | | | $2 | $11 |
|
|
50
|
+
| `cortecs/codestral-2508` | 256K | | | | | | $0.33 | $1 |
|
|
51
|
+
| `cortecs/cosmos3-super-reasoner` | 256K | | | | | | $0.10 | $0.30 |
|
|
52
|
+
| `cortecs/deepseek-r1-0528` | 164K | | | | | | $0.65 | $3 |
|
|
53
|
+
| `cortecs/deepseek-v3.2` | 164K | | | | | | $0.30 | $0.49 |
|
|
54
|
+
| `cortecs/deepseek-v4-flash` | 1.0M | | | | | | $0.15 | $0.30 |
|
|
55
|
+
| `cortecs/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.25 | $0.30 |
|
|
56
|
+
| `cortecs/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
57
|
+
| `cortecs/devstral-2512` | 262K | | | | | | $0.45 | $2 |
|
|
58
|
+
| `cortecs/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $2 |
|
|
59
|
+
| `cortecs/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
60
|
+
| `cortecs/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.27 | $2 |
|
|
61
|
+
| `cortecs/gemini-3.5-flash` | 1.0M | | | | | | $1 | $9 |
|
|
62
|
+
| `cortecs/gemma-3-27b-it` | 131K | | | | | | $0.10 | $0.30 |
|
|
63
|
+
| `cortecs/gemma-4-26b-a4b-it` | 262K | | | | | | $0.11 | $0.56 |
|
|
64
|
+
| `cortecs/gemma-4-31b-it` | 262K | | | | | | $0.22 | $0.39 |
|
|
65
|
+
| `cortecs/glm-4.7` | 203K | | | | | | $0.78 | $3 |
|
|
66
|
+
| `cortecs/glm-4.7-flash` | 203K | | | | | | $0.08 | $0.48 |
|
|
67
|
+
| `cortecs/glm-5` | 203K | | | | | | $0.99 | $3 |
|
|
68
|
+
| `cortecs/glm-5-turbo` | 203K | | | | | | $1 | $4 |
|
|
69
|
+
| `cortecs/glm-5.1` | 203K | | | | | | $1 | $4 |
|
|
70
|
+
| `cortecs/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
71
|
+
| `cortecs/glm-5v-turbo` | 203K | | | | | | $1 | $4 |
|
|
72
|
+
| `cortecs/gpt-4.1` | 1.0M | | | | | | $2 | $9 |
|
|
73
|
+
| `cortecs/gpt-4.1-mini` | 1.0M | | | | | | $0.43 | $2 |
|
|
74
|
+
| `cortecs/gpt-4.1-nano` | 1.0M | | | | | | $0.11 | $0.43 |
|
|
75
|
+
| `cortecs/gpt-4o` | 128K | | | | | | $3 | $11 |
|
|
76
|
+
| `cortecs/gpt-4o-mini` | 128K | | | | | | $0.16 | $0.64 |
|
|
77
|
+
| `cortecs/gpt-5` | 400K | | | | | | $1 | $11 |
|
|
78
|
+
| `cortecs/gpt-5-mini` | 400K | | | | | | $0.28 | $2 |
|
|
79
|
+
| `cortecs/gpt-5-nano` | 400K | | | | | | $0.06 | $0.44 |
|
|
80
|
+
| `cortecs/gpt-5.1` | 400K | | | | | | $1 | $11 |
|
|
81
|
+
| `cortecs/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
|
|
82
|
+
| `cortecs/gpt-5.6-luna` | 1.1M | | | | | | $1 | $7 |
|
|
83
|
+
| `cortecs/gpt-5.6-sol` | 1.1M | | | | | | $6 | $33 |
|
|
84
|
+
| `cortecs/gpt-5.6-terra` | 1.1M | | | | | | $3 | $16 |
|
|
85
|
+
| `cortecs/gpt-oss-120b` | 131K | | | | | | $0.09 | $0.45 |
|
|
86
|
+
| `cortecs/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.17 |
|
|
87
|
+
| `cortecs/gpt-oss-safeguard-120b` | 128K | | | | | | $0.18 | $0.70 |
|
|
88
|
+
| `cortecs/hermes-4-405b` | 128K | | | | | | $1.00 | $3 |
|
|
89
|
+
| `cortecs/hermes-4-70b` | 128K | | | | | | $0.13 | $0.40 |
|
|
90
|
+
| `cortecs/holo2-30b-a3b` | 22K | | | | | | $0.33 | $0.78 |
|
|
91
|
+
| `cortecs/kimi-k2.5` | 262K | | | | | | $0.49 | $3 |
|
|
92
|
+
| `cortecs/kimi-k2.6` | 262K | | | | | | $0.77 | $3 |
|
|
93
|
+
| `cortecs/kimi-k2.7-code` | 262K | | | | | | $0.75 | $4 |
|
|
94
|
+
| `cortecs/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
95
|
+
| `cortecs/llama-3.1-405b-instruct` | 128K | | | | | | $2 | $2 |
|
|
96
|
+
| `cortecs/llama-3.1-8b-instruct` | 128K | | | | | | $0.17 | $0.17 |
|
|
97
|
+
| `cortecs/llama-3.1-nemotron-ultra-253b-v1` | 128K | | | | | | $0.60 | $2 |
|
|
98
|
+
| `cortecs/llama-3.3-70b-instruct` | 131K | | | | | | $0.13 | $0.40 |
|
|
99
|
+
| `cortecs/minicpm-v-4.5` | 32K | | | | | | $0.65 | $1 |
|
|
100
|
+
| `cortecs/minimax-m2` | 400K | | | | | | $0.35 | $1 |
|
|
101
|
+
| `cortecs/minimax-m2.1` | 196K | | | | | | $0.36 | $1 |
|
|
102
|
+
| `cortecs/minimax-m2.5` | 197K | | | | | | $0.30 | $1 |
|
|
103
|
+
| `cortecs/minimax-m2.7` | 197K | | | | | | $0.67 | $3 |
|
|
104
|
+
| `cortecs/minimax-m3` | 1.0M | | | | | | $0.40 | $2 |
|
|
105
|
+
| `cortecs/ministral-14b-2512` | 256K | | | | | | $0.22 | $0.22 |
|
|
106
|
+
| `cortecs/ministral-3b-2512` | 256K | | | | | | $0.11 | $0.11 |
|
|
107
|
+
| `cortecs/ministral-8b-2512` | 256K | | | | | | $0.17 | $0.17 |
|
|
108
|
+
| `cortecs/mistral-7b-instruct-v0.2` | 32K | | | | | | $0.16 | $0.22 |
|
|
109
|
+
| `cortecs/mistral-7b-instruct-v0.3` | 127K | | | | | | $0.11 | $0.11 |
|
|
110
|
+
| `cortecs/mistral-large-2402` | 32K | | | | | | $4 | $13 |
|
|
111
|
+
| `cortecs/mistral-large-2512` | 256K | | | | | | $0.56 | $2 |
|
|
112
|
+
| `cortecs/mistral-medium-2508` | 128K | | | | | | $0.45 | $2 |
|
|
113
|
+
| `cortecs/mistral-medium-3.5` | 256K | | | | | | $2 | $6 |
|
|
114
|
+
| `cortecs/mistral-nemo-instruct-2407` | 128K | | | | | | $0.14 | $0.14 |
|
|
115
|
+
| `cortecs/mistral-small-2503` | 128K | | | | | | $0.11 | $0.33 |
|
|
116
|
+
| `cortecs/mistral-small-2603` | 262K | | | | | | $0.14 | $0.57 |
|
|
117
|
+
| `cortecs/mistral-small-3.2-24b-instruct-2506` | 131K | | | | | | $0.10 | $0.31 |
|
|
118
|
+
| `cortecs/mixtral-8x7B-instruct-v0.1` | 32K | | | | | | $0.49 | $0.76 |
|
|
119
|
+
| `cortecs/nemotron-nano-v2-12b` | 128K | | | | | | $0.24 | $0.71 |
|
|
120
|
+
| `cortecs/nova-2-lite` | 1.0M | | | | | | $0.37 | $3 |
|
|
121
|
+
| `cortecs/nova-lite-v1` | 300K | | | | | | $0.07 | $0.28 |
|
|
122
|
+
| `cortecs/nova-micro-v1` | 128K | | | | | | $0.04 | $0.16 |
|
|
123
|
+
| `cortecs/nova-pro-v1` | 300K | | | | | | $0.92 | $4 |
|
|
124
|
+
| `cortecs/nvidia-nemotron-3-nano-30b-a3b` | 256K | | | | | | $0.06 | $0.24 |
|
|
125
|
+
| `cortecs/nvidia-nemotron-3-nano-omni` | 300K | | | | | | $0.06 | $0.24 |
|
|
126
|
+
| `cortecs/pixtral-12b-2409` | 128K | | | | | | $0.22 | $0.22 |
|
|
127
|
+
| `cortecs/pixtral-large-2502` | 128K | | | | | | $2 | $6 |
|
|
128
|
+
| `cortecs/qwen2.5-vl-72b-instruct` | 32K | | | | | | $0.25 | $0.75 |
|
|
129
|
+
| `cortecs/qwen3-235b-a22b-instruct-2507` | 262K | | | | | | $0.07 | $0.46 |
|
|
130
|
+
| `cortecs/qwen3-30b-a3b-instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
|
|
131
|
+
| `cortecs/qwen3-32b` | 40K | | | | | | $0.10 | $0.30 |
|
|
132
|
+
| `cortecs/qwen3-coder-30b-a3b-instruct` | 262K | | | | | | $0.07 | $0.24 |
|
|
133
|
+
| `cortecs/qwen3-coder-next` | 256K | | | | | | $0.17 | $0.89 |
|
|
134
|
+
| `cortecs/qwen3-next-80b-a3b-thinking` | 128K | | | | | | $0.15 | $1 |
|
|
135
|
+
| `cortecs/qwen3-vl-235b-a22b` | 256K | | | | | | $0.62 | $3 |
|
|
136
|
+
| `cortecs/qwen3.5-122b-a10b` | 262K | | | | | | $0.49 | $3 |
|
|
137
|
+
| `cortecs/qwen3.5-397b-a17b` | 262K | | | | | | $0.67 | $4 |
|
|
138
|
+
| `cortecs/qwen3.5-9b` | 262K | | | | | | $0.11 | $0.17 |
|
|
139
|
+
| `cortecs/qwen3.6-27b` | 262K | | | | | | $0.45 | $3 |
|
|
140
|
+
| `cortecs/qwen3.6-35b-a3b` | 262K | | | | | | $0.17 | $0.56 |
|
|
141
|
+
| `cortecs/qwen3guard-gen-0.6b` | 32K | | | | | | — | — |
|
|
142
|
+
| `cortecs/qwen3guard-gen-8b` | 32K | | | | | | — | — |
|
|
143
|
+
| `cortecs/voxtral-small-2507` | 32K | | | | | | $0.11 | $0.33 |
|
|
98
144
|
|
|
99
145
|
## Advanced configuration
|
|
100
146
|
|
|
@@ -102,28 +148,30 @@ for await (const chunk of stream) {
|
|
|
102
148
|
|
|
103
149
|
```typescript
|
|
104
150
|
const agent = new Agent({
|
|
105
|
-
id:
|
|
106
|
-
name:
|
|
151
|
+
id: "custom-agent",
|
|
152
|
+
name: "custom-agent",
|
|
107
153
|
model: {
|
|
108
|
-
url:
|
|
109
|
-
id:
|
|
154
|
+
url: "https://api.cortecs.ai/v1",
|
|
155
|
+
id: "cortecs/apertus-70b",
|
|
110
156
|
apiKey: process.env.CORTECS_API_KEY,
|
|
111
157
|
headers: {
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
})
|
|
158
|
+
"X-Custom-Header": "value"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
116
162
|
```
|
|
117
163
|
|
|
118
164
|
### Dynamic model selection
|
|
119
165
|
|
|
120
166
|
```typescript
|
|
121
167
|
const agent = new Agent({
|
|
122
|
-
id:
|
|
123
|
-
name:
|
|
168
|
+
id: "dynamic-agent",
|
|
169
|
+
name: "Dynamic Agent",
|
|
124
170
|
model: ({ requestContext }) => {
|
|
125
|
-
const useAdvanced = requestContext.task ===
|
|
126
|
-
return useAdvanced
|
|
127
|
-
|
|
128
|
-
|
|
171
|
+
const useAdvanced = requestContext.task === "complex";
|
|
172
|
+
return useAdvanced
|
|
173
|
+
? "cortecs/voxtral-small-2507"
|
|
174
|
+
: "cortecs/apertus-70b";
|
|
175
|
+
}
|
|
176
|
+
});
|
|
129
177
|
```
|
|
@@ -11,22 +11,22 @@ CROF_API_KEY=your-api-key
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Agent } from
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
15
|
|
|
16
16
|
const agent = new Agent({
|
|
17
|
-
id:
|
|
18
|
-
name:
|
|
19
|
-
instructions:
|
|
20
|
-
model:
|
|
21
|
-
})
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "crof/deepseek-v3.2"
|
|
21
|
+
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
24
|
-
const response = await agent.generate(
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
25
|
|
|
26
26
|
// Stream a response
|
|
27
|
-
const stream = await agent.stream(
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
28
|
for await (const chunk of stream) {
|
|
29
|
-
console.log(chunk)
|
|
29
|
+
console.log(chunk);
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -69,28 +69,30 @@ for await (const chunk of stream) {
|
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
71
|
const agent = new Agent({
|
|
72
|
-
id:
|
|
73
|
-
name:
|
|
72
|
+
id: "custom-agent",
|
|
73
|
+
name: "custom-agent",
|
|
74
74
|
model: {
|
|
75
|
-
url:
|
|
76
|
-
id:
|
|
75
|
+
url: "https://crof.ai/v1",
|
|
76
|
+
id: "crof/deepseek-v3.2",
|
|
77
77
|
apiKey: process.env.CROF_API_KEY,
|
|
78
78
|
headers: {
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
})
|
|
79
|
+
"X-Custom-Header": "value"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
### Dynamic model selection
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
88
|
const agent = new Agent({
|
|
89
|
-
id:
|
|
90
|
-
name:
|
|
89
|
+
id: "dynamic-agent",
|
|
90
|
+
name: "Dynamic Agent",
|
|
91
91
|
model: ({ requestContext }) => {
|
|
92
|
-
const useAdvanced = requestContext.task ===
|
|
93
|
-
return useAdvanced
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
const useAdvanced = requestContext.task === "complex";
|
|
93
|
+
return useAdvanced
|
|
94
|
+
? "crof/qwen3.6-27b"
|
|
95
|
+
: "crof/deepseek-v3.2";
|
|
96
|
+
}
|
|
97
|
+
});
|
|
96
98
|
```
|
|
@@ -11,22 +11,22 @@ CROSSMODEL_API_KEY=your-api-key
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Agent } from
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
15
|
|
|
16
16
|
const agent = new Agent({
|
|
17
|
-
id:
|
|
18
|
-
name:
|
|
19
|
-
instructions:
|
|
20
|
-
model:
|
|
21
|
-
})
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "crossmodel/anthropic/claude-fable-5"
|
|
21
|
+
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
24
|
-
const response = await agent.generate(
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
25
|
|
|
26
26
|
// Stream a response
|
|
27
|
-
const stream = await agent.stream(
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
28
|
for await (const chunk of stream) {
|
|
29
|
-
console.log(chunk)
|
|
29
|
+
console.log(chunk);
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -93,28 +93,30 @@ for await (const chunk of stream) {
|
|
|
93
93
|
|
|
94
94
|
```typescript
|
|
95
95
|
const agent = new Agent({
|
|
96
|
-
id:
|
|
97
|
-
name:
|
|
96
|
+
id: "custom-agent",
|
|
97
|
+
name: "custom-agent",
|
|
98
98
|
model: {
|
|
99
|
-
url:
|
|
100
|
-
id:
|
|
99
|
+
url: "https://api.crossmodel.ai/v1",
|
|
100
|
+
id: "crossmodel/anthropic/claude-fable-5",
|
|
101
101
|
apiKey: process.env.CROSSMODEL_API_KEY,
|
|
102
102
|
headers: {
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
})
|
|
103
|
+
"X-Custom-Header": "value"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
### Dynamic model selection
|
|
110
110
|
|
|
111
111
|
```typescript
|
|
112
112
|
const agent = new Agent({
|
|
113
|
-
id:
|
|
114
|
-
name:
|
|
113
|
+
id: "dynamic-agent",
|
|
114
|
+
name: "Dynamic Agent",
|
|
115
115
|
model: ({ requestContext }) => {
|
|
116
|
-
const useAdvanced = requestContext.task ===
|
|
117
|
-
return useAdvanced
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
const useAdvanced = requestContext.task === "complex";
|
|
117
|
+
return useAdvanced
|
|
118
|
+
? "crossmodel/z-ai/glm-5.2"
|
|
119
|
+
: "crossmodel/anthropic/claude-fable-5";
|
|
120
|
+
}
|
|
121
|
+
});
|
|
120
122
|
```
|
|
@@ -11,22 +11,22 @@ DEEPINFRA_API_KEY=your-api-key
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Agent } from
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
15
|
|
|
16
16
|
const agent = new Agent({
|
|
17
|
-
id:
|
|
18
|
-
name:
|
|
19
|
-
instructions:
|
|
20
|
-
model:
|
|
21
|
-
})
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "deepinfra/MiniMaxAI/MiniMax-M2.5"
|
|
21
|
+
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
24
|
-
const response = await agent.generate(
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
25
|
|
|
26
26
|
// Stream a response
|
|
27
|
-
const stream = await agent.stream(
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
28
|
for await (const chunk of stream) {
|
|
29
|
-
console.log(chunk)
|
|
29
|
+
console.log(chunk);
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -86,29 +86,31 @@ for await (const chunk of stream) {
|
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
88
|
const agent = new Agent({
|
|
89
|
-
id:
|
|
90
|
-
name:
|
|
89
|
+
id: "custom-agent",
|
|
90
|
+
name: "custom-agent",
|
|
91
91
|
model: {
|
|
92
|
-
id:
|
|
92
|
+
id: "deepinfra/MiniMaxAI/MiniMax-M2.5",
|
|
93
93
|
apiKey: process.env.DEEPINFRA_API_KEY,
|
|
94
94
|
headers: {
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
})
|
|
95
|
+
"X-Custom-Header": "value"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
### Dynamic model selection
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
104
|
const agent = new Agent({
|
|
105
|
-
id:
|
|
106
|
-
name:
|
|
105
|
+
id: "dynamic-agent",
|
|
106
|
+
name: "Dynamic Agent",
|
|
107
107
|
model: ({ requestContext }) => {
|
|
108
|
-
const useAdvanced = requestContext.task ===
|
|
109
|
-
return useAdvanced
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
const useAdvanced = requestContext.task === "complex";
|
|
109
|
+
return useAdvanced
|
|
110
|
+
? "deepinfra/zai-org/GLM-5.2"
|
|
111
|
+
: "deepinfra/MiniMaxAI/MiniMax-M2.5";
|
|
112
|
+
}
|
|
113
|
+
});
|
|
112
114
|
```
|
|
113
115
|
|
|
114
116
|
## Direct provider installation
|
|
@@ -11,22 +11,22 @@ DIGITALOCEAN_ACCESS_TOKEN=your-api-token
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Agent } from
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
15
|
|
|
16
16
|
const agent = new Agent({
|
|
17
|
-
id:
|
|
18
|
-
name:
|
|
19
|
-
instructions:
|
|
20
|
-
model:
|
|
21
|
-
})
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "digitalocean/alibaba-qwen3-32b"
|
|
21
|
+
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
24
|
-
const response = await agent.generate(
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
25
|
|
|
26
26
|
// Stream a response
|
|
27
|
-
const stream = await agent.stream(
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
28
|
for await (const chunk of stream) {
|
|
29
|
-
console.log(chunk)
|
|
29
|
+
console.log(chunk);
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -127,28 +127,30 @@ for await (const chunk of stream) {
|
|
|
127
127
|
|
|
128
128
|
```typescript
|
|
129
129
|
const agent = new Agent({
|
|
130
|
-
id:
|
|
131
|
-
name:
|
|
130
|
+
id: "custom-agent",
|
|
131
|
+
name: "custom-agent",
|
|
132
132
|
model: {
|
|
133
|
-
url:
|
|
134
|
-
id:
|
|
133
|
+
url: "https://inference.do-ai.run/v1",
|
|
134
|
+
id: "digitalocean/alibaba-qwen3-32b",
|
|
135
135
|
apiKey: process.env.DIGITALOCEAN_ACCESS_TOKEN,
|
|
136
136
|
headers: {
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
})
|
|
137
|
+
"X-Custom-Header": "value"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
### Dynamic model selection
|
|
144
144
|
|
|
145
145
|
```typescript
|
|
146
146
|
const agent = new Agent({
|
|
147
|
-
id:
|
|
148
|
-
name:
|
|
147
|
+
id: "dynamic-agent",
|
|
148
|
+
name: "Dynamic Agent",
|
|
149
149
|
model: ({ requestContext }) => {
|
|
150
|
-
const useAdvanced = requestContext.task ===
|
|
151
|
-
return useAdvanced
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
const useAdvanced = requestContext.task === "complex";
|
|
151
|
+
return useAdvanced
|
|
152
|
+
? "digitalocean/wan2-2-t2v-a14b"
|
|
153
|
+
: "digitalocean/alibaba-qwen3-32b";
|
|
154
|
+
}
|
|
155
|
+
});
|
|
154
156
|
```
|