Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
-- #6187: reasoning-token accounting is blind to reasoning_content / <think> models.
-- Some providers (e.g. stepfun step-3.7-flash) emit reasoning content in the
-- assistant message but report reasoning_tokens=0 in usage, so the usage-derived
-- tokens_reasoning column under-represents reasoning.
--
-- These two columns record reasoning PRESENCE/SOURCE and the raw CHARACTER count
-- of observed reasoning content. They are deliberately SEPARATE from the priced
-- tokens_reasoning column: reasoning_chars is a character count, NOT a token
-- count, and must never enter cost math.
-- reasoning_source: NULL | 'usage' | 'content' | 'think'
-- reasoning_chars : NULL when unknown, else raw char count of observed reasoning
ALTER TABLE call_logs ADD COLUMN reasoning_source TEXT DEFAULT NULL;
ALTER TABLE call_logs ADD COLUMN reasoning_chars INTEGER DEFAULT NULL;