Tools Howto 01
input_tokens means three different things. Your cost function knows one of them.
Anthropic's input_tokens excludes cached tokens, OpenAI's includes them. Port a cost function between the two and a $0.082 request bills $0.378. Fields, traps, code.