MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _prepare_messages

Function _prepare_messages

openkb/agent/compiler.py:330–334  ·  view source on GitHub ↗

Drop cache_control markers when ``model`` would reject them.

(model: str, messages: list[dict])

Source from the content-addressed store, hash-verified

328
329
330def _prepare_messages(model: str, messages: list[dict]) -> list[dict]:
331 """Drop cache_control markers when ``model`` would reject them."""
332 if _accepts_cache_control(model):
333 return messages
334 return _strip_cache_control(messages)
335
336
337class _Spinner:

Callers 2

_llm_callFunction · 0.85
_llm_call_asyncFunction · 0.85

Calls 2

_accepts_cache_controlFunction · 0.85
_strip_cache_controlFunction · 0.85

Tested by

no test coverage detected