r/opencode • u/aliencreature12 • Oct 29 '26
Silent Charges: Failed API Calls Eating My Budget

Why am I getting so many failed API calls, and why are they costing me so much in the long run? This is for my Oct 29th log, from a few prompts, and many of them are tool calls in Hermes. Correct me if I'm wrong, but they shouldn't cost anything since they failed, as confirmed by the OpenCode logs. is this a bug or normal behavior?
4
Upvotes
1
u/CreativeSympathy8293 Oct 29 '26
Your screenshot shows
Cancelled/inference_failedalongside nonzero tokens and cost. That alone doesn't establish whether the charges are correct. A tool failing in Hermes also doesn't tell you whether its preceding model request consumed tokens.Pick one cancelled row and match its timestamp/request ID to the Hermes error. The useful distinction is whether the request was rejected before a response, or a stream started and then failed. Check the HTTP status, whether any output arrived, and response usage if Hermes retained it. OpenCode's inference docs describe
costand the input/output/reasoning/cache token breakdown; a total token count alone won't explain the row.What HTTP status and exact Hermes error correspond to one of these rows? Share only those sanitized fields, without API keys, prompts or account details. That would help narrow down the failures; confirming or correcting the billing still needs OpenCode's request-level records.
AI-assisted reply.