@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.
Files changed (53) hide show
  1. package/.docs/models/gateways/neon.md +6 -6
  2. package/.docs/models/gateways/netlify.md +6 -6
  3. package/.docs/models/gateways/openrouter.md +6 -6
  4. package/.docs/models/gateways/vercel.md +7 -7
  5. package/.docs/models/index.md +97 -96
  6. package/.docs/models/providers/alibaba-cn.md +25 -23
  7. package/.docs/models/providers/alibaba-token-plan-cn.md +24 -24
  8. package/.docs/models/providers/alibaba-token-plan.md +25 -23
  9. package/.docs/models/providers/alibaba.md +25 -23
  10. package/.docs/models/providers/ambient.md +26 -24
  11. package/.docs/models/providers/baseten.md +25 -23
  12. package/.docs/models/providers/chutes.md +25 -23
  13. package/.docs/models/providers/cortecs.md +133 -85
  14. package/.docs/models/providers/crof.md +25 -23
  15. package/.docs/models/providers/crossmodel.md +25 -23
  16. package/.docs/models/providers/deepinfra.md +24 -22
  17. package/.docs/models/providers/digitalocean.md +25 -23
  18. package/.docs/models/providers/empiriolabs.md +25 -23
  19. package/.docs/models/providers/fireworks-ai.md +24 -24
  20. package/.docs/models/providers/greenpt.md +25 -23
  21. package/.docs/models/providers/groq.md +25 -23
  22. package/.docs/models/providers/huggingface.md +25 -23
  23. package/.docs/models/providers/hyper.md +31 -29
  24. package/.docs/models/providers/impossibl.md +25 -23
  25. package/.docs/models/providers/infomaniak.md +24 -24
  26. package/.docs/models/providers/kilo.md +26 -24
  27. package/.docs/models/providers/llmgateway.md +26 -24
  28. package/.docs/models/providers/minimax.md +23 -25
  29. package/.docs/models/providers/mistral.md +25 -23
  30. package/.docs/models/providers/modal.md +25 -23
  31. package/.docs/models/providers/modelis.md +25 -23
  32. package/.docs/models/providers/nano-gpt.md +26 -24
  33. package/.docs/models/providers/neuralwatt.md +25 -23
  34. package/.docs/models/providers/ofox.md +25 -23
  35. package/.docs/models/providers/ollama-cloud.md +25 -23
  36. package/.docs/models/providers/openai.md +26 -28
  37. package/.docs/models/providers/opencode-go.md +25 -23
  38. package/.docs/models/providers/opencode.md +25 -23
  39. package/.docs/models/providers/perplexity-agent.md +24 -24
  40. package/.docs/models/providers/pioneer.md +25 -23
  41. package/.docs/models/providers/requesty.md +25 -23
  42. package/.docs/models/providers/routing-run.md +25 -23
  43. package/.docs/models/providers/scx.md +25 -23
  44. package/.docs/models/providers/tensorx.md +25 -23
  45. package/.docs/models/providers/togetherai.md +24 -22
  46. package/.docs/models/providers/umans-ai-coding-plan.md +24 -24
  47. package/.docs/models/providers/umans-ai.md +25 -23
  48. package/.docs/models/providers/wandb.md +25 -23
  49. package/.docs/models/providers/xai.md +28 -26
  50. package/.docs/models/providers/zai-coding-plan.md +25 -23
  51. package/.docs/models/providers/zhipuai-coding-plan.md +25 -23
  52. package/CHANGELOG.md +7 -0
  53. package/package.json +6 -6
@@ -11,22 +11,22 @@ EMPIRIOLABS_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'empiriolabs/deepseek-v4-flash',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "empiriolabs/deepseek-v4-flash"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -83,28 +83,30 @@ for await (const chunk of stream) {
83
83
 
84
84
  ```typescript
85
85
  const agent = new Agent({
86
- id: 'custom-agent',
87
- name: 'custom-agent',
86
+ id: "custom-agent",
87
+ name: "custom-agent",
88
88
  model: {
89
- url: 'https://api.empiriolabs.ai/v1',
90
- id: 'empiriolabs/deepseek-v4-flash',
89
+ url: "https://api.empiriolabs.ai/v1",
90
+ id: "empiriolabs/deepseek-v4-flash",
91
91
  apiKey: process.env.EMPIRIOLABS_API_KEY,
92
92
  headers: {
93
- 'X-Custom-Header': 'value',
94
- },
95
- },
96
- })
93
+ "X-Custom-Header": "value"
94
+ }
95
+ }
96
+ });
97
97
  ```
98
98
 
99
99
  ### Dynamic model selection
100
100
 
101
101
  ```typescript
102
102
  const agent = new Agent({
103
- id: 'dynamic-agent',
104
- name: 'Dynamic Agent',
103
+ id: "dynamic-agent",
104
+ name: "Dynamic Agent",
105
105
  model: ({ requestContext }) => {
106
- const useAdvanced = requestContext.task === 'complex'
107
- return useAdvanced ? 'empiriolabs/step-3-7-flash' : 'empiriolabs/deepseek-v4-flash'
108
- },
109
- })
106
+ const useAdvanced = requestContext.task === "complex";
107
+ return useAdvanced
108
+ ? "empiriolabs/step-3-7-flash"
109
+ : "empiriolabs/deepseek-v4-flash";
110
+ }
111
+ });
110
112
  ```
@@ -11,22 +11,22 @@ FIREWORKS_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'fireworks-ai/accounts/fireworks/models/deepseek-v4-flash',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "fireworks-ai/accounts/fireworks/models/deepseek-v4-flash"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -60,30 +60,30 @@ for await (const chunk of stream) {
60
60
 
61
61
  ```typescript
62
62
  const agent = new Agent({
63
- id: 'custom-agent',
64
- name: 'custom-agent',
63
+ id: "custom-agent",
64
+ name: "custom-agent",
65
65
  model: {
66
- url: 'https://api.fireworks.ai/inference/v1/',
67
- id: 'fireworks-ai/accounts/fireworks/models/deepseek-v4-flash',
66
+ url: "https://api.fireworks.ai/inference/v1/",
67
+ id: "fireworks-ai/accounts/fireworks/models/deepseek-v4-flash",
68
68
  apiKey: process.env.FIREWORKS_API_KEY,
69
69
  headers: {
70
- 'X-Custom-Header': 'value',
71
- },
72
- },
73
- })
70
+ "X-Custom-Header": "value"
71
+ }
72
+ }
73
+ });
74
74
  ```
75
75
 
76
76
  ### Dynamic model selection
77
77
 
78
78
  ```typescript
79
79
  const agent = new Agent({
80
- id: 'dynamic-agent',
81
- name: 'Dynamic Agent',
80
+ id: "dynamic-agent",
81
+ name: "Dynamic Agent",
82
82
  model: ({ requestContext }) => {
83
- const useAdvanced = requestContext.task === 'complex'
83
+ const useAdvanced = requestContext.task === "complex";
84
84
  return useAdvanced
85
- ? 'fireworks-ai/accounts/fireworks/routers/kimi-k3-fast'
86
- : 'fireworks-ai/accounts/fireworks/models/deepseek-v4-flash'
87
- },
88
- })
85
+ ? "fireworks-ai/accounts/fireworks/routers/kimi-k3-fast"
86
+ : "fireworks-ai/accounts/fireworks/models/deepseek-v4-flash";
87
+ }
88
+ });
89
89
  ```
@@ -11,22 +11,22 @@ GREENPT_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'greenpt/deepseek-v4-flash-0731',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "greenpt/deepseek-v4-flash-0731"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -78,28 +78,30 @@ for await (const chunk of stream) {
78
78
 
79
79
  ```typescript
80
80
  const agent = new Agent({
81
- id: 'custom-agent',
82
- name: 'custom-agent',
81
+ id: "custom-agent",
82
+ name: "custom-agent",
83
83
  model: {
84
- url: 'https://api.greenpt.ai/v1',
85
- id: 'greenpt/deepseek-v4-flash-0731',
84
+ url: "https://api.greenpt.ai/v1",
85
+ id: "greenpt/deepseek-v4-flash-0731",
86
86
  apiKey: process.env.GREENPT_API_KEY,
87
87
  headers: {
88
- 'X-Custom-Header': 'value',
89
- },
90
- },
91
- })
88
+ "X-Custom-Header": "value"
89
+ }
90
+ }
91
+ });
92
92
  ```
93
93
 
94
94
  ### Dynamic model selection
95
95
 
96
96
  ```typescript
97
97
  const agent = new Agent({
98
- id: 'dynamic-agent',
99
- name: 'Dynamic Agent',
98
+ id: "dynamic-agent",
99
+ name: "Dynamic Agent",
100
100
  model: ({ requestContext }) => {
101
- const useAdvanced = requestContext.task === 'complex'
102
- return useAdvanced ? 'greenpt/voxtral-small-24b-2507' : 'greenpt/deepseek-v4-flash-0731'
103
- },
104
- })
101
+ const useAdvanced = requestContext.task === "complex";
102
+ return useAdvanced
103
+ ? "greenpt/voxtral-small-24b-2507"
104
+ : "greenpt/deepseek-v4-flash-0731";
105
+ }
106
+ });
105
107
  ```
@@ -11,22 +11,22 @@ GROQ_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'groq/allam-2-7b',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "groq/allam-2-7b"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -56,30 +56,32 @@ for await (const chunk of stream) {
56
56
 
57
57
  ```typescript
58
58
  const agent = new Agent({
59
- id: 'custom-agent',
60
- name: 'custom-agent',
59
+ id: "custom-agent",
60
+ name: "custom-agent",
61
61
  model: {
62
- url: 'https://api.groq.com/openai/v1',
63
- id: 'groq/allam-2-7b',
62
+ url: "https://api.groq.com/openai/v1",
63
+ id: "groq/allam-2-7b",
64
64
  apiKey: process.env.GROQ_API_KEY,
65
65
  headers: {
66
- 'X-Custom-Header': 'value',
67
- },
68
- },
69
- })
66
+ "X-Custom-Header": "value"
67
+ }
68
+ }
69
+ });
70
70
  ```
71
71
 
72
72
  ### Dynamic model selection
73
73
 
74
74
  ```typescript
75
75
  const agent = new Agent({
76
- id: 'dynamic-agent',
77
- name: 'Dynamic Agent',
76
+ id: "dynamic-agent",
77
+ name: "Dynamic Agent",
78
78
  model: ({ requestContext }) => {
79
- const useAdvanced = requestContext.task === 'complex'
80
- return useAdvanced ? 'groq/whisper-large-v3-turbo' : 'groq/allam-2-7b'
81
- },
82
- })
79
+ const useAdvanced = requestContext.task === "complex";
80
+ return useAdvanced
81
+ ? "groq/whisper-large-v3-turbo"
82
+ : "groq/allam-2-7b";
83
+ }
84
+ });
83
85
  ```
84
86
 
85
87
  ## Direct provider installation
@@ -11,22 +11,22 @@ HF_TOKEN=your-api-token
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'huggingface/MiniMaxAI/MiniMax-M2',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "huggingface/MiniMaxAI/MiniMax-M2"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -100,28 +100,30 @@ for await (const chunk of stream) {
100
100
 
101
101
  ```typescript
102
102
  const agent = new Agent({
103
- id: 'custom-agent',
104
- name: 'custom-agent',
103
+ id: "custom-agent",
104
+ name: "custom-agent",
105
105
  model: {
106
- url: 'https://router.huggingface.co/v1',
107
- id: 'huggingface/MiniMaxAI/MiniMax-M2',
106
+ url: "https://router.huggingface.co/v1",
107
+ id: "huggingface/MiniMaxAI/MiniMax-M2",
108
108
  apiKey: process.env.HF_TOKEN,
109
109
  headers: {
110
- 'X-Custom-Header': 'value',
111
- },
112
- },
113
- })
110
+ "X-Custom-Header": "value"
111
+ }
112
+ }
113
+ });
114
114
  ```
115
115
 
116
116
  ### Dynamic model selection
117
117
 
118
118
  ```typescript
119
119
  const agent = new Agent({
120
- id: 'dynamic-agent',
121
- name: 'Dynamic Agent',
120
+ id: "dynamic-agent",
121
+ name: "Dynamic Agent",
122
122
  model: ({ requestContext }) => {
123
- const useAdvanced = requestContext.task === 'complex'
124
- return useAdvanced ? 'huggingface/zai-org/GLM-5.2' : 'huggingface/MiniMaxAI/MiniMax-M2'
125
- },
126
- })
123
+ const useAdvanced = requestContext.task === "complex";
124
+ return useAdvanced
125
+ ? "huggingface/zai-org/GLM-5.2"
126
+ : "huggingface/MiniMaxAI/MiniMax-M2";
127
+ }
128
+ });
127
129
  ```
@@ -11,22 +11,22 @@ HYPER_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'hyper/deepseek-v4-flash',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "hyper/deepseek-v4-flash"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -39,18 +39,18 @@ for await (const chunk of stream) {
39
39
  | `hyper/deepseek-v4-flash` | 1.0M | | | | | | $0.20 | $0.40 |
40
40
  | `hyper/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.15 | $0.30 |
41
41
  | `hyper/deepseek-v4-pro` | 1.0M | | | | | | $2 | $5 |
42
- | `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.13 | $0.42 |
43
- | `hyper/glm-5` | 203K | | | | | | $0.85 | $3 |
42
+ | `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.12 | $0.40 |
43
+ | `hyper/glm-5` | 203K | | | | | | $0.82 | $3 |
44
44
  | `hyper/glm-5.1` | 203K | | | | | | $2 | $5 |
45
45
  | `hyper/glm-5.2` | 1.0M | | | | | | $1 | $4 |
46
- | `hyper/gpt-oss-120b` | 131K | | | | | | $0.19 | $0.70 |
47
- | `hyper/kimi-k2.5` | 262K | | | | | | $0.54 | $3 |
46
+ | `hyper/gpt-oss-120b` | 131K | | | | | | $0.17 | $0.63 |
47
+ | `hyper/kimi-k2.5` | 262K | | | | | | $0.56 | $3 |
48
48
  | `hyper/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
49
49
  | `hyper/kimi-k2.7-code` | 256K | | | | | | $0.95 | $4 |
50
50
  | `hyper/kimi-k3` | 1.0M | | | | | | $3 | $16 |
51
- | `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.51 | $1 |
51
+ | `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.61 | $1 |
52
52
  | `hyper/llama-4-maverick-17b-128e-instruct-fp8` | 430K | | | | | | $0.28 | $0.93 |
53
- | `hyper/minimax-m2.7` | 262K | | | | | | $0.42 | $2 |
53
+ | `hyper/minimax-m2.7` | 262K | | | | | | $0.44 | $2 |
54
54
  | `hyper/minimax-m3` | 512K | | | | | | $0.33 | $1 |
55
55
  | `hyper/qwen3-coder-480b-a35b-instruct-int4-mixed-ar` | 106K | | | | | | $0.57 | $2 |
56
56
  | `hyper/qwen3-next-80b-a3b-instruct` | 262K | | | | | | $0.12 | $1 |
@@ -68,28 +68,30 @@ for await (const chunk of stream) {
68
68
 
69
69
  ```typescript
70
70
  const agent = new Agent({
71
- id: 'custom-agent',
72
- name: 'custom-agent',
71
+ id: "custom-agent",
72
+ name: "custom-agent",
73
73
  model: {
74
- url: 'https://hyper.charm.land/v1',
75
- id: 'hyper/deepseek-v4-flash',
74
+ url: "https://hyper.charm.land/v1",
75
+ id: "hyper/deepseek-v4-flash",
76
76
  apiKey: process.env.HYPER_API_KEY,
77
77
  headers: {
78
- 'X-Custom-Header': 'value',
79
- },
80
- },
81
- })
78
+ "X-Custom-Header": "value"
79
+ }
80
+ }
81
+ });
82
82
  ```
83
83
 
84
84
  ### Dynamic model selection
85
85
 
86
86
  ```typescript
87
87
  const agent = new Agent({
88
- id: 'dynamic-agent',
89
- name: 'Dynamic Agent',
88
+ id: "dynamic-agent",
89
+ name: "Dynamic Agent",
90
90
  model: ({ requestContext }) => {
91
- const useAdvanced = requestContext.task === 'complex'
92
- return useAdvanced ? 'hyper/qwen3.8-max' : 'hyper/deepseek-v4-flash'
93
- },
94
- })
91
+ const useAdvanced = requestContext.task === "complex";
92
+ return useAdvanced
93
+ ? "hyper/qwen3.8-max"
94
+ : "hyper/deepseek-v4-flash";
95
+ }
96
+ });
95
97
  ```
@@ -11,22 +11,22 @@ IMPOSSIBL_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'impossibl/anthropic/claude-fable-5',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "impossibl/anthropic/claude-fable-5"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
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
 
@@ -119,28 +119,30 @@ for await (const chunk of stream) {
119
119
 
120
120
  ```typescript
121
121
  const agent = new Agent({
122
- id: 'custom-agent',
123
- name: 'custom-agent',
122
+ id: "custom-agent",
123
+ name: "custom-agent",
124
124
  model: {
125
- url: 'https://api.impossibl.com/v1',
126
- id: 'impossibl/anthropic/claude-fable-5',
125
+ url: "https://api.impossibl.com/v1",
126
+ id: "impossibl/anthropic/claude-fable-5",
127
127
  apiKey: process.env.IMPOSSIBL_API_KEY,
128
128
  headers: {
129
- 'X-Custom-Header': 'value',
130
- },
131
- },
132
- })
129
+ "X-Custom-Header": "value"
130
+ }
131
+ }
132
+ });
133
133
  ```
134
134
 
135
135
  ### Dynamic model selection
136
136
 
137
137
  ```typescript
138
138
  const agent = new Agent({
139
- id: 'dynamic-agent',
140
- name: 'Dynamic Agent',
139
+ id: "dynamic-agent",
140
+ name: "Dynamic Agent",
141
141
  model: ({ requestContext }) => {
142
- const useAdvanced = requestContext.task === 'complex'
143
- return useAdvanced ? 'impossibl/zai/glm-5.2' : 'impossibl/anthropic/claude-fable-5'
144
- },
145
- })
142
+ const useAdvanced = requestContext.task === "complex";
143
+ return useAdvanced
144
+ ? "impossibl/zai/glm-5.2"
145
+ : "impossibl/anthropic/claude-fable-5";
146
+ }
147
+ });
146
148
  ```
@@ -12,22 +12,22 @@ INFOMANIAK_API_KEY=your-api-key
12
12
  ```
13
13
 
14
14
  ```typescript
15
- import { Agent } from '@mastra/core/agent'
15
+ import { Agent } from "@mastra/core/agent";
16
16
 
17
17
  const agent = new Agent({
18
- id: 'my-agent',
19
- name: 'My Agent',
20
- instructions: 'You are a helpful assistant',
21
- model: 'infomaniak/Qwen/Qwen3.5-122B-A10B-FP8',
22
- })
18
+ id: "my-agent",
19
+ name: "My Agent",
20
+ instructions: "You are a helpful assistant",
21
+ model: "infomaniak/Qwen/Qwen3.5-122B-A10B-FP8"
22
+ });
23
23
 
24
24
  // Generate a response
25
- const response = await agent.generate('Hello!')
25
+ const response = await agent.generate("Hello!");
26
26
 
27
27
  // Stream a response
28
- const stream = await agent.stream('Tell me a story')
28
+ const stream = await agent.stream("Tell me a story");
29
29
  for await (const chunk of stream) {
30
- console.log(chunk)
30
+ console.log(chunk);
31
31
  }
32
32
  ```
33
33
 
@@ -54,30 +54,30 @@ for await (const chunk of stream) {
54
54
 
55
55
  ```typescript
56
56
  const agent = new Agent({
57
- id: 'custom-agent',
58
- name: 'custom-agent',
57
+ id: "custom-agent",
58
+ name: "custom-agent",
59
59
  model: {
60
- url: 'https://api.infomaniak.com/2/ai/${INFOMANIAK_PRODUCT_ID}/openai/v1',
61
- id: 'infomaniak/Qwen/Qwen3.5-122B-A10B-FP8',
60
+ url: "https://api.infomaniak.com/2/ai/${INFOMANIAK_PRODUCT_ID}/openai/v1",
61
+ id: "infomaniak/Qwen/Qwen3.5-122B-A10B-FP8",
62
62
  apiKey: process.env.INFOMANIAK_API_KEY,
63
63
  headers: {
64
- 'X-Custom-Header': 'value',
65
- },
66
- },
67
- })
64
+ "X-Custom-Header": "value"
65
+ }
66
+ }
67
+ });
68
68
  ```
69
69
 
70
70
  ### Dynamic model selection
71
71
 
72
72
  ```typescript
73
73
  const agent = new Agent({
74
- id: 'dynamic-agent',
75
- name: 'Dynamic Agent',
74
+ id: "dynamic-agent",
75
+ name: "Dynamic Agent",
76
76
  model: ({ requestContext }) => {
77
- const useAdvanced = requestContext.task === 'complex'
77
+ const useAdvanced = requestContext.task === "complex";
78
78
  return useAdvanced
79
- ? 'infomaniak/swiss-ai/Apertus-v1.5-70B'
80
- : 'infomaniak/Qwen/Qwen3.5-122B-A10B-FP8'
81
- },
82
- })
79
+ ? "infomaniak/swiss-ai/Apertus-v1.5-70B"
80
+ : "infomaniak/Qwen/Qwen3.5-122B-A10B-FP8";
81
+ }
82
+ });
83
83
  ```