Add comprehensive documentation for custom API endpoint configuration to address missing documentation reported in issue #567. Changes: - Create docs/custom-providers.md with detailed guide for custom: and anthropic-custom: formats - Add custom endpoint examples to README.md configuration section - Add note about daemon requirement for channels in Quick Start - Add reference link to custom providers guide Addresses: #567 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Custom Provider Configuration
ZeroClaw supports custom API endpoints for both OpenAI-compatible and Anthropic-compatible providers.
Provider Types
OpenAI-Compatible Endpoints (custom:)
For services that implement the OpenAI API format:
default_provider = "custom:https://your-api.com"
api_key = "your-api-key"
default_model = "your-model-name"
Anthropic-Compatible Endpoints (anthropic-custom:)
For services that implement the Anthropic API format:
default_provider = "anthropic-custom:https://your-api.com"
api_key = "your-api-key"
default_model = "your-model-name"
Configuration Methods
Config File
Edit ~/.zeroclaw/config.toml:
api_key = "your-api-key"
default_provider = "anthropic-custom:https://api.example.com"
default_model = "claude-sonnet-4"
Environment Variables
export ANTHROPIC_API_KEY="your-api-key"
zeroclaw agent
Testing Configuration
Verify your custom endpoint:
# Interactive mode
zeroclaw agent
# Single message test
zeroclaw agent -m "test message"
Troubleshooting
Authentication Errors
- Verify API key is correct
- Check endpoint URL format (must include
https://) - Ensure endpoint is accessible from your network
Model Not Found
- Confirm model name matches provider's available models
- Check provider documentation for exact model identifiers
Connection Issues
- Test endpoint accessibility:
curl -I https://your-api.com - Verify firewall/proxy settings
- Check provider status page
Examples
Local LLM Server
default_provider = "custom:http://localhost:8080"
default_model = "local-model"
Corporate Proxy
default_provider = "anthropic-custom:https://llm-proxy.corp.example.com"
api_key = "internal-token"
Cloud Provider Gateway
default_provider = "custom:https://gateway.cloud-provider.com/v1"
api_key = "gateway-api-key"
default_model = "gpt-4"