Summary:
Yes, they use the Anthropic Messages API. The provider in packages/kosong/src/kosong/contrib/chat_provider/anthropic.py uses:
AsyncAnthropic client
self._client.messages.create() endpoint
Yes, they implement prompt caching. They use CacheControlEphemeralParam(type="ephemeral") in three places:
-
System prompt (lines 119-126):
-
Last content block of the last message (lines 143-148):
-
Last tool in the tools list (lines 158-159):
They also track cache performance via cache_read_input_tokens and cache_creation_input_tokens in the TokenUsage returned from the stream (lines 251-255).