Troubleshooting
Start by checking whether the request reached JoyToken, then decide whether the issue is authentication, policy, wallet, routing, provider, or client parsing.
Quick Checklist
Status Codes
Error Shape
Model call errors keep the OpenAI-compatible style:
Error response
The model list endpoint /api/v1/models uses the front-gateway response shape:
Models error
Log Correlation
Server-side requests should always include a readable request ID:
Traceable request
Then check in this order:
api-gatewaylogs: whether the request arrived and whether key source is Bearer orX-API-Key.- API key validation:
valid,status,api_key_id,tier. - Policy: IP, tier, fixed model, blacklist.
- Routing: whether
selected_modelwas returned. - Wallet: whether balance precheck and freeze succeeded.
- Provider: actual
X-DAOE-Used-ModelandX-DAOE-Used-Provider. - Usage / Billing: whether usage was recorded and freeze was settled.
Common Issues
Minimal Reproduction
Start with the smallest request to rule out SDK and business-code issues:
Minimal request
If the minimal request works, add back tier, tools, streaming, long context, and fixed model one at a time.