Files
CLIProxyAPI/config.example.yaml
Luis Pater 9102ff031d
Some checks failed
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
Refactor API handlers to implement retry mechanism with configurable limits and improved error handling
- Introduced retry counter with a configurable ` RequestRetry ` limit in all handlers.
- Enhanced error handling with specific HTTP status codes for switching clients.
- Standardized response forwarding for non-retriable errors.
- Improved logging for quota and client switch scenarios.
2025-08-25 23:43:49 +08:00

32 lines
730 B
YAML

# Server configuration
port: 8317
auth-dir: "~/.cli-proxy-api"
debug: true
proxy-url: ""
# Request retry times, if the response http code is 403, 408, 500, 502, 503, 504, it will retry
request-retry: 3
# Quota exceeded behavior
quota-exceeded:
switch-project: true
switch-preview-model: true
# API keys for client authentication
api-keys:
- "12345"
- "23456"
# Generative language API keys
generative-language-api-key:
- "AIzaSy...01"
- "AIzaSy...02"
- "AIzaSy...03"
- "AIzaSy...04"
# Claude API keys
claude-api-key:
- api-key: "sk-atSM..." # use the official claude API key, no need to set the base url
- api-key: "sk-atSM..."
base-url: "https://www.example.com" # use the custom claude API endpoint