Skip to content

Commit ec3828d

Browse files
authored
Merge pull request #1 from rishiraj-tf/truefoundry-integration
Add TrueFoundry AI Gateway integration documentation
2 parents e3b193c + 739200c commit ec3828d

File tree

6 files changed

+195
-0
lines changed

6 files changed

+195
-0
lines changed

docs/providers/truefoundry.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
# TrueFoundry
2+
3+
TrueFoundry's AI Gateway provides enterprise-grade access to multiple AI models through a unified, secure, and cost-optimized interface. By connecting Roo Code to TrueFoundry's AI Gateway, you can leverage advanced AI capabilities for code generation, debugging, and development tasks while benefiting from enterprise features including security, compliance, cost management, and access control.
4+
5+
**Get Started:** [Create Account](https://www.truefoundry.com/ai-gateway) | [Documentation](https://docs.truefoundry.com/)
6+
7+
## Why TrueFoundry?
8+
9+
- **Multi-Model Access**: Connect to OpenAI, Anthropic, Google, and other providers through a single endpoint
10+
- **Enterprise Security**: Built-in access control, rate limiting, and security guardrails
11+
- **Cost Optimization**: Advanced cost tracking, budget limiting, and usage analytics
12+
- **High Availability**: Load balancing and fallback mechanisms for reliable service
13+
- **Observability**: Comprehensive logging, monitoring, and analytics
14+
15+
## Prerequisites
16+
17+
Before integrating Roo Code with TrueFoundry, ensure you have:
18+
19+
1. **TrueFoundry Account**: A TrueFoundry account with at least one model provider configured
20+
2. **Personal Access Token**: Generate a token by following the [TrueFoundry token generation guide](https://docs.truefoundry.com/gateway/roo-code)
21+
3. **Roo Code Extension**: Install Roo Code from the VS Code Marketplace
22+
23+
![Install Roo Code from VS Code Marketplace](/img/truefoundry/roo-code-marketplace-install.png)
24+
25+
## Integration Guide
26+
27+
### Step 1: Get TrueFoundry Gateway Configuration
28+
29+
1. **Navigate to AI Gateway Playground**: Go to your TrueFoundry AI Gateway playground
30+
2. **Access Unified Code Snippet**: Use the unified code snippet feature
31+
3. **Copy Configuration Details**: Note down:
32+
- Base URL (e.g., `https://your-control-plane.truefoundry.cloud/api/llm`)
33+
- Model name (use exactly as shown in the snippet)
34+
- Your authentication token
35+
36+
![Get Base URL and Model Name from TrueFoundry Gateway](/img/truefoundry/unified-code-tfy.png)
37+
38+
### Step 2: Configure Roo Code
39+
40+
1. **Open Roo Code Settings**:
41+
- Click the Roo Code icon (🦘) in VS Code's Activity Bar
42+
- Navigate to settings or configuration
43+
44+
2. **Add Custom Provider**:
45+
- Select "Custom" or "OpenAI Compatible" from the provider dropdown
46+
- Configure the following settings:
47+
48+
```json
49+
{
50+
"baseUrl": "https://your-control-plane.truefoundry.cloud/api/llm",
51+
"apiKey": "your-truefoundry-token",
52+
"model": "openai-main/gpt-4o"
53+
}
54+
```
55+
56+
![TrueFoundry Configuration in Roo Code](/img/truefoundry/roo-code-truefoundry-config.png)
57+
58+
3. **Save Configuration**: Apply your settings and test the connection
59+
60+
### Step 3: Test Your Integration
61+
62+
1. **Verify Connection**: Open a code file and ask Roo Code a question
63+
2. **Check Response Quality**: Ensure responses are generated successfully
64+
3. **Monitor Usage**: Use TrueFoundry's dashboard to track your API usage
65+
66+
![Testing Roo Code with TrueFoundry](/img/truefoundry/roo-code-test-integration.png)
67+
68+
## Recommended Models
69+
70+
Choose models based on your specific use cases:
71+
72+
### **Code Generation & Complex Tasks**
73+
- **`openai-main/gpt-4o`**: Best for complex code generation and reasoning tasks
74+
- **`anthropic-main/claude-4-sonnet`**: Excellent for code understanding and following instructions
75+
76+
77+
:::tip Model Names
78+
Always use the exact model name as shown in your TrueFoundry Gateway unified code snippet to ensure proper routing.
79+
:::
80+
81+
## Advanced Configuration
82+
83+
### Multiple Model Profiles
84+
85+
Configure different profiles for various development scenarios:
86+
87+
```json
88+
{
89+
"roocode.apiProfiles": [
90+
{
91+
"name": "TrueFoundry GPT-4",
92+
"baseUrl": "https://your-control-plane.truefoundry.cloud/api/llm",
93+
"apiKey": "your-truefoundry-token",
94+
"model": "openai-main/gpt-4o",
95+
"description": "High-quality code generation and complex reasoning"
96+
},
97+
{
98+
"name": "TrueFoundry Claude",
99+
"baseUrl": "https://your-control-plane.truefoundry.cloud/api/llm",
100+
"apiKey": "your-truefoundry-token",
101+
"model": "anthropic-main/claude-3-5-sonnet",
102+
"description": "Excellent for code understanding and refactoring"
103+
},
104+
{
105+
"name": "TrueFoundry Fast",
106+
"baseUrl": "https://your-control-plane.truefoundry.cloud/api/llm",
107+
"apiKey": "your-truefoundry-token",
108+
"model": "openai-main/gpt-3.5-turbo",
109+
"description": "Quick responses for simple tasks"
110+
}
111+
]
112+
}
113+
```
114+
115+
### Custom Instructions for Enterprise Development
116+
117+
Enhance Roo Code's performance with TrueFoundry by setting custom instructions tailored for enterprise development:
118+
119+
```
120+
You are an expert software developer working with enterprise-grade code.
121+
122+
Prioritize:
123+
- Security best practices and vulnerability prevention
124+
- Performance optimization and scalability
125+
- Clean, maintainable, and well-documented code
126+
- Comprehensive error handling and logging
127+
- Code review standards and team consistency
128+
129+
When suggesting code changes, always consider:
130+
- Enterprise coding standards and guidelines
131+
- Testing requirements (unit, integration, e2e)
132+
- Deployment and CI/CD implications
133+
- Documentation and knowledge sharing
134+
- Security and compliance requirements
135+
```
136+
137+
## Enterprise Features
138+
139+
### Cost Management
140+
141+
TrueFoundry provides advanced cost tracking and budgeting:
142+
143+
- **Usage Analytics**: Monitor API calls, tokens, and costs per project
144+
- **Budget Limits**: Set spending limits to control costs
145+
- **Cost Attribution**: Track usage by team, project, or user
146+
147+
### Security & Compliance
148+
149+
- **Access Control**: Role-based permissions and user management
150+
- **Data Privacy**: Ensure your code and data remain secure
151+
- **Audit Logs**: Comprehensive logging for compliance requirements
152+
- **Content Filtering**: Built-in guardrails and content moderation
153+
154+
### High Availability
155+
156+
- **Load Balancing**: Automatic distribution across multiple model endpoints
157+
- **Fallback Support**: Automatic failover to backup models
158+
- **Rate Limiting**: Intelligent request throttling and queue management
159+
160+
## Troubleshooting
161+
162+
### Common Issues
163+
164+
**Connection Errors**
165+
- Verify your base URL and API key are correct
166+
- Check that your TrueFoundry account has active model providers
167+
- Ensure your token has the necessary permissions
168+
169+
**Model Not Found**
170+
- Use the exact model name from TrueFoundry's unified code snippet
171+
- Verify the model is available in your TrueFoundry configuration
172+
- Check if the model provider is properly configured
173+
174+
**Rate Limiting**
175+
- Monitor your usage in TrueFoundry's dashboard
176+
- Adjust your rate limits if needed
177+
- Consider upgrading your plan for higher limits
178+
179+
### Getting Help
180+
181+
- **TrueFoundry Documentation**: [https://docs.truefoundry.com/](https://docs.truefoundry.com/)
182+
- **TrueFoundry Support**: Contact through their support channels
183+
- **Roo Code Community**: Join our community for integration help
184+
185+
## Next Steps
186+
187+
Once integrated with TrueFoundry:
188+
189+
1. **Explore Advanced Features**: Leverage TrueFoundry's enterprise capabilities
190+
2. **Optimize Your Workflow**: Configure multiple profiles for different tasks
191+
3. **Monitor Usage**: Use TrueFoundry's analytics to optimize costs and performance
192+
4. **Scale Your Team**: Set up access controls and usage policies for your organization
193+
194+
All your Roo Code requests will now be routed through TrueFoundry's AI Gateway, providing you with enterprise-grade AI capabilities while maintaining security, cost control, and high availability.

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ const sidebars: SidebarsConfig = {
169169
'providers/openai-compatible',
170170
'providers/openrouter',
171171
'providers/requesty',
172+
'providers/truefoundry',
172173
'providers/unbound',
173174
'providers/vertex',
174175
'providers/vscode-lm',
1.46 MB
Loading
697 KB
Loading
127 KB
Loading
408 KB
Loading

0 commit comments

Comments
 (0)