Common Issues
Authentication Problems
401 Unauthorized Error
401 Unauthorized Error
API Key Not Found
API Key Not Found
Problem: Environment variable not being loaded.Solutions:
-
Check environment variable:
-
Load environment variables:
-
Python environment:
Configuration Issues
Wrong Base URL
Wrong Base URL
Problem: Using incorrect base URL causing connection failures.Correct base URL:Common mistakes:
Model Parameter Issues
Model Parameter Issues
Problem: Intelligent routing not working or model errors.Solutions:
-
Use empty string for intelligent routing:
-
TypeScript type issues:
SSL/TLS Certificate Errors
SSL/TLS Certificate Errors
Problem: Certificate validation errors in some environments.Solutions:
-
Update certificates:
-
Node.js certificate issues:
-
Python certificate issues:
Request/Response Issues
Empty or No Response
Empty or No Response
Problem: Getting empty responses or no content.Diagnostic steps:
-
Check request format:
-
Verify response handling:
-
Check for API errors:
Streaming Not Working
Streaming Not Working
Problem: Streaming responses not appearing or failing.Solutions:
-
Check streaming syntax:
-
Browser streaming with fetch:
-
Server-sent events setup:
Rate Limiting Errors
Rate Limiting Errors
Problem: Getting 429 errors (rate limit exceeded).Solutions:
-
Implement exponential backoff:
-
Check your rate limits:
- Free tier: 100 requests/minute, 10,000 tokens/minute
- Pro tier: 1,000 requests/minute, 100,000 tokens/minute
- Enterprise: Custom limits
-
Implement request queuing:
Integration-Specific Issues
LangChain Integration Problems
LangChain Integration Problems
Problem: LangChain not working with Adaptive.Solutions:
-
Correct LangChain setup:
-
Handle LangChain-specific errors:
Vercel AI SDK Issues
Vercel AI SDK Issues
Problem: Vercel AI SDK not connecting properly.Solutions:
-
Using OpenAI provider method:
-
TypeScript issues:
-
Environment variables in Next.js:
Performance Issues
Slow Response Times
Slow Response Times
Problem: Responses taking longer than expected.Diagnostic steps:
-
Check routing decisions:
-
Optimize with cost_bias:
-
Use provider constraints for speed:
High Latency
High Latency
Problem: Network latency issues.Solutions:
-
Check your network:
-
Implement timeout handling:
-
Use connection pooling:
Development Environment Issues
CORS Issues in Browser
CORS Issues in Browser
Problem: Cross-origin resource sharing errors.Solutions:
-
Never call API directly from browser:
-
Set up proxy in development:
-
Configure CORS for your backend:
TypeScript Compilation Errors
TypeScript Compilation Errors
Problem: TypeScript errors with Adaptive integration.Solutions:
-
Install correct types:
-
Type assertion for model parameter:
-
Create custom types if needed:
Module Import Errors
Module Import Errors
Problem: ES modules vs CommonJS issues.Solutions:
-
Use correct imports:
-
Package.json configuration:
-
Node.js version compatibility:
Getting Help
Debug Information to Collect
When reporting issues, please include:1
Environment Details
2
Request Details
3
Error Information
4
Network Diagnostics
Support Channels
Documentation
Check our comprehensive guides and API reference for solutions
GitHub Issues
Report bugs and request features on our GitHub repository
Discord Community
Get help from the community and Adaptive team members
Email Support
Contact support@adaptive.com for priority assistance
Best Practices for Debugging
1
Start with Simple Requests
Test basic functionality first
2
Enable Verbose Logging
Add detailed logging to understand what’s happening
3
Test with curl
Verify API access outside your application
4
Isolate the Problem
Systematically narrow down the issue:
- Test different messages
- Try different parameters
- Test in different environments
- Compare with working examples
Complete Error Handling Example
Here’s a production-ready error handling implementation:FAQ
Why am I not getting responses from certain providers?
Why am I not getting responses from certain providers?
Check your
model_router.models
configuration. Ensure the providers you want are included and your cost_bias
setting allows for the provider selection you expect.How do I know which provider was selected?
How do I know which provider was selected?
Check the
provider
field in the response:Can I force a specific model?
Can I force a specific model?
Use the
model_router.models
array with specific model names:Why are my costs higher than expected?
Why are my costs higher than expected?
Check your
cost_bias
setting. A higher value (closer to 1) prioritizes quality over cost. Set it to 0.0-0.3 for maximum cost savings.How do I disable semantic caching?
How do I disable semantic caching?
Set semantic cache to disabled in your request: