Anthropic API
2 articles
-
Anthropic APILangChain JS 0.3 Can Cost Sonnet 4.6 Its Watermark
Anthropic's 3 November release note added Sonnet 4.6, Opus 4.7 and Mythos 5 to its text watermark, and the doc warns that on Sonnet 4.6 a request setting temperature, top_p or top_k to a non-default value might not carry the mark, including values a framework sets for you. Capturing request bodies from 17 client setups against a local stub: current Anthropic SDKs, LangChain (Python and JS), LiteLLM, Pydantic AI, DSPy, Instructor, the Vercel AI SDK, Claude Code and the Agent SDK send none. LangChain JS 0.3.x sends temperature 1, top_p -1 and top_k -1 on every Sonnet 4.6 call (19.5% of last week's downloads), DSPy before 3.0.4 sends 0.0, and LlamaIndex 0.12.3 crashes on a fresh install and sends 0.1 once the Anthropic SDK is pinned below 1.0. Claude Code sends temperature 1 only with thinking off.
-
Claude CodeClaude Code Sends 838 Bytes Where It Sent 193,000
Anthropic opened message threads on the Messages API as a public beta on 2 November 2026. Claude Code 2.1.319 already uses them by default on a claude.ai login against api.anthropic.com, with no changelog mention. Through a local logging proxy, a three-request Haiku 5.5 turn sent 185-198 KB per request stateless (about 575 KB total) and 189,090 then 839 and 838 bytes with threads (create, then continue with previous_message_id, no tools, a 111-byte billing-tag system block). Cached input tokens read were the same either way (72-74K), and at that context size median time to first byte was 1.12 s threaded vs 0.96 s stateless over eight requests each. The gate is first-party API only: off on Bedrock/Vertex/Foundry, behind any non-Anthropic ANTHROPIC_BASE_URL, and for ZDR and HIPAA orgs. Undocumented CLAUDE_CODE_TETHER_LIVE=0/1 switches it; CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 also does but dropped deferred tool loading and produced a ~1.11M-token request on a machine with many MCP servers. Claude Code tracks the 5-minute lifetime itself: after 315 s idle it sent a full create (194,828 bytes, 11 messages) with no 404.