Start Debugging

Tag: openai-sdk

5 posts

2026-09-28 llmai-agentsmcp
How to Measure an Agent's Fixed Token Overhead Before the First User Token
Every agent request pays for its system prompt, the provider's hidden tool-use preamble, and every tool schema before the user says anything. How to measure that fixed cost with differential count_tokens calls on the Anthropic API, the input_tokens endpoint on OpenAI, an MCP listTools probe, and /context in Claude Code, anchored to claude-opus-5-5, claude-sonnet-5, and @modelcontextprotocol/client 2.1.0.