Elffuss BraidHub

kikocis/continue public

main · 7.0 KiBRawPermalink
1---
2title: "Tetrate Agent Router Service"
3sidebarTitle: "Tetrate Agent Router Service"
4slug: ../tetrate-agent-router-service
5---
6The **Tetrate Agent Router Service** provides a unified Gateway for accessing various AI models with fast inference capabilities.
7
8This gateway acts as an intelligent router that can distribute requests across multiple model providers, offering enterprise-grade reliability and performance optimization.
9
10<Tip>
11Want to get started quickly? Sign up for the [Tetrate Agent Router Service](https://router.tetrate.ai/) to get an API key, then use [Tetrate on Continue Hub](https://hub.continue.dev/tetrate) to get started fast.
12</Tip>
13
14## Setup
15
16<Steps>
17<Step title="Sign in or sign up">
18Visit the [Agent Router Service portal](https://router.tetrate.ai/) and create an account to get your API key
19<img src="../assets/tetrate-sign-in.png" alt="Tetrate sign in page" style={{width: '250px', maxWidth: '100%'}} />
20</Step>
21
22<Step title="Get your API key">
23Go to the [API keys page](https://router.tetrate.ai/api-keys) to get your key
24<img src="../assets/tetrate-get-api-key.png" alt="Tetrate get API key" style={{width: '250px', maxWidth: '100%'}} />
25</Step>
26
27<Step title="Configure Continue">
28- Choose a configuration method below.
29- If you use the Continue VS Code extension, install version `>=1.2.3`.
30</Step>
31
32</Steps>
33
34
35### Quickstart with Continue Hub
36
37Fastest way: use preconfigured models from Tetrate on Continue Hub
38
39<Steps>
40<Step title="Browse models">
41Open [Tetrate on Continue Hub](https://hub.continue.dev/tetrate) and pick a model (e.g., [Claude Sonnet 4](https://hub.continue.dev/tetrate/claude-sonnet-4))
42</Step>
43
44<Step title="Use or remix">
45Click "Use Model", or "Remix" to change the model ID if needed
46</Step>
47
48<Step title="Add your API key">
49Add your API key to Continue. See [adding secrets in Continue Hub](/hub/secrets/secret-types) and [managing local secrets in the FAQ](/faqs#managing-local-secrets-and-environment-variables)
50<Tip>
51Add it as a Continue Hub secret named `TETRATE_API_KEY` to reuse across projects.
52</Tip>
53</Step>
54</Steps>
55
56![Remix a model from Tetrate on Continue Hub](../assets/tetrate-remix.png)
57
58<Info>
59If a model is missing, remix a similar one and set the `model` field to the target ID.
60</Info>
61
62### Configuration Methods
63
64<CardGroup cols={1}>
65 <Card title="In Local Agent Configuration" icon="folder" vertical>
66 Use a Tetrate model block from the Hub or define it directly in your local agent configuration.
67 </Card>
68 <Card title="Continue Hub" icon="cloud" vertical>
69 Use a Tetrate model block from the Hub or define your own on the Hub.
70 </Card>
71 <Card title="Using Local Model Blocks" icon="file-lines" vertical>
72 Create a local model block for reuse across agents without publishing it to the Hub.
73 </Card>
74</CardGroup>
75
76
77### Configuration Examples
78<Info>
79**Click a tab** to see an example.
80</Info>
81<Tabs>
82<Tab title="In Local Agent Configuration">
83
84**When to use**: Simple local setups (like using the VS Code extension) when you don't need shared or published blocks.
85
86Use a Tetrate model block from the Hub in your local agent configuration:
87
88```yaml title="~/.continue/config.yaml"
89name: Local Agent
90version: 1.0.0
91schema: v1
92models:
93 - uses: tetrate/claude-sonnet-4
94 with:
95 TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }}
96context:
97 - provider: code
98 - provider: docs
99 - provider: diff
100 - provider: terminal
101 - provider: problems
102 - provider: folder
103 - provider: codebase
104```
105
106Or define the model directly:
107
108```yaml title="~/.continue/config.yaml"
109name: Local Agent
110version: 1.0.0
111schema: v1
112models:
113 - name: Claude Sonnet 4
114 provider: tars
115 model: claude-4-sonnet-20250514
116 apiKey: ${{ secrets.TETRATE_API_KEY }}
117 roles:
118 - chat
119 - edit
120 - apply
121 capabilities:
122 - tool_use
123context:
124 - provider: code
125 - provider: docs
126 - provider: diff
127 - provider: terminal
128 - provider: problems
129 - provider: folder
130 - provider: codebase
131```
132</Tab>
133<Tab title="Continue Hub">
134**When to use**: Share configurations across teams or contribute to the community.
135
136**The Model Block:**
137
138```yaml title="tetrate/claude-sonnet-4"
139name: Claude Sonnet 4
140version: 1.0.14
141schema: v1
142models:
143 - name: Claude Sonnet 4 - Tetrate
144 provider: tars
145 model: claude-4-sonnet-20250514
146 apiKey: ${{ inputs.TETRATE_API_KEY }}
147 roles:
148 - chat
149 - edit
150 - apply
151 capabilities:
152 - tool_use
153```
154View the model block `tetrate/claude-sonnet-4` on the [Continue Hub](https://hub.continue.dev/tetrate/claude-sonnet-4).
155
156**Reference it in your Agent configuration:**
157
158```yaml title="my-agent"
159name: My Agent
160version: 1.0.0
161schema: v1
162models:
163 - uses: tetrate/claude-sonnet-4
164 with:
165 TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }}
166context:
167 - uses: continuedev/diff-context
168 - uses: continuedev/terminal-context
169 - uses: continuedev/file-context
170```
171<Tip>
172To customize, see the [model block creation guide](/hub/blocks/create-a-block).
173</Tip>
174
175</Tab>
176
177<Tab title="Using Local Model Blocks">
178**When to use**: Reuse configurations across agents and keep them local or in GitHub (not on Continue Hub).
179
180**The Local Model Block:**
181<Info>
182Name the file `my-claude-4-model.yaml` so you can reference it in the Agent.
183</Info>
184
185```yaml title="~/.continue/models/my-claude-4-model.yaml"
186name: Claude Sonnet 4
187version: 1.0.1
188schema: v1
189models:
190 - name: Claude Sonnet 4
191 provider: tars
192 model: claude-4-sonnet-20250514
193 apiKey: ${{ inputs.TETRATE_API_KEY }}
194 roles:
195 - chat
196 - edit
197 - apply
198 capabilities:
199 - tool_use
200```
201Reference it as `my-claude-4-model` in your Agent configuration:
202
203```yaml title="~/.continue/agents/simple-agent.yaml"
204name: Simple Agent
205version: 1.0.0
206schema: v1
207models:
208 - uses: my-claude-4-model
209 with:
210 TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }}
211context:
212 - uses: continuedev/diff-context
213 - uses: continuedev/terminal-context
214 - uses: continuedev/file-context
215```
216
217<Tip>
218Learn more about [model blocks](/reference#models) and [local blocks](/reference#local-blocks).
219</Tip>
220
221</Tab>
222</Tabs>
223
224---
225
226## Troubleshooting Common Issues
227
228<CardGroup cols={2}>
229 <Card title="Invalid API key" icon="key" vertical>
230 Verify your API key is active and has no extra spaces.
231 </Card>
232 <Card title="Model not found" icon="ban" href="https://router.tetrate.ai/models" vertical>
233 Confirm the model ID matches the Tetrate catalog.
234 </Card>
235 <Card title="Slow responses" icon="code" vertical>
236 Check your network or try a less-loaded model. Contact Tetrate support if issues persist.
237 </Card>
238 <Card title="Configuration not loading" icon="file-lines" vertical>
239 Validate YAML syntax and review error messages in Continue. If using Hub, ensure the block is published.
240 </Card>
241</CardGroup>
242
243---
244
245## Join the Community
246Connect with Tetrate and other builders for help and discussion.
247
248<CardGroup cols={1}>
249 <Card title="Join the Tetrate Community" icon="slack" href="https://join.slack.com/t/tetrate-agent-router/shared_invite/zt-399tv7hjm-6YMXztGywTOQrMIolvEBNg">
250Get answers, insights, and best practices for secure, scalable infrastructure
251 </Card>
252</CardGroup>