Documentation
¶
Overview ¶
Package llmclient provides decorators that apply session-level policy to any gollem.LLMClient, independent of which provider built it.
Policy lives here rather than on a concrete client type (or on a routing type such as the CLI's composite client) because Warren constructs LLM clients in more than one place: the main LLM configuration and the webfetch tool each build their own. Tying a policy to one construction site silently skips the others, so the policy is expressed as a wrapper applied wherever a client is born.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPromptCache ¶
WithPromptCache returns a client that enables provider prompt caching on every session it creates. When enabled is false the client is returned unchanged, so callers never pay for a wrapper that does nothing.
Only Claude acts on the option: it marks the stable prefix (system prompt and tool definitions) and the conversation tail with ephemeral cache_control so repeated prefixes are served from Claude's prompt cache. Gemini and OpenAI cache automatically and ignore it, so wrapping a non-Claude client is harmless but pointless.
Types ¶
This section is empty.