Api
- Anthropic Messages API truncates tools array
Anthropic Messages API truncates tools array Today a Claude 3 call with tool definitions started ignoring the last tool in the list. No errors, just missing. Payload contained eight tool specs. Each one about 5 k‑char JSON. The docs mention a 64 k request cap; combined tools plus prompt was ~66 k.
- OpenRouter API response missing text in JSON payload
OpenRouter API response missing ’text’ in JSON payload Testing OpenRouter with gpt‑4 turbo. Request looked fine but the completion field came back empty: { "id":"chatcmpl-xxxx", "choices":[ {"index":0,"logprobs":null,"finish_reason":"stop"} ], "model":"gpt-4-turbo-preview", "usage":{...} } No choices[0].message.content. cURL request: curl https://openrouter.ai/api/v1/chat/completions -H "Authorization: Bearer $OPENROUTER_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-4-turbo-preview","messages":[{"role":"user","content":"hi"}]}' Turns out OpenRouter now requires the header HTTP-Referer (your site) and X-Title (app name) for non‑localhost keys.
- Gemini Pro API throws 403 in Postman with valid key
Gemini Pro API throws 403 in Postman with valid key Tried hitting the Gemini Pro v1/models/gemini-pro:generateContent endpoint in Postman. Headers set: POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=AIzaSy... Content-Type: application/json Response: { "error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED" } } Key freshly created, billing enabled, Generative Language API enabled.
- OpenAI API returns 429 despite backoff
OpenAI API returns 429 despite backoff Yesterday I was trying to run a batch job through the completions endpoint using text-davinci-003. Got this back immediately: { "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" } } No Retry-After header. First request failed. Slowing down didn’t help.