Hacker News new | ask | show | jobs
by karagenit 34 days ago
Curious how you’re handling prompt caching, as I understand it most LLM providers essentially inject tool definitions in the system prompt, so changing tools dynamically breaks the cache. This has been a big annoyance for me in a separate project; I currently just implemented my own tool-ish system that defines schemas in user messages and instructs the LLM to return matching JSON, but it’s less reliable than using the native tool calling + structured outputs available in the API.
1 comments

Native tool calling indeed. By modular, I meant the tool defs are loaded dynamically per task and stay the same during the task