Hey, I think this has been talked before - But is ...
# koog-agentic-framework
s
Hey, I think this has been talked before - But is there a way to use LiteLM-android models with koog? Maybe with custom prompt executors? I don't want to rewrite all my strategies and tool calls just because I'm switching to a local model. (Gemma 4)
My strategy in koog is somewhat a big graph and I need everythig there to work flawlessly but also while using gemma 4 on device. Is this possible? Koog ver : 0.6.2 Platform: Android
d
If that can inspire you, I've got a very (very very) rough draft for desktop here: https://github.com/ptitjes/konvo/compare/develop...p/experiment-litertml. Feel free to copy some code from this branch, it is ASLv2 licensed. But beware, the LiteRT-LM stack is pretty experimental and the Kotlin API is not yet fully mature at this point.
s
@Didier Villevalois This is really cool Thanks! I was just looking through the interfaces and LLMClient looked like a right place. The automatic tool call flag in LiteRM is also a life saver so that we can just manually execute tool calls and let koog handle it per our strategy graph.
👍 2
Yeah for some reason tool calls choke. (I have a subGraphWithTask) with Gemma 4.
Made some changes to tool calls and it still chokes with subGraph with task. @Didier Villevalois ContentPart.Text should contain just the arguments of the tool call Gemma 4 chokes if there are any special characters (I'll post more of these changes, not with my laptop right now)
d
I have not tried Gemma 4 yet. Only Gemma 3 and 3n. There are multiple bug reports for Gemma 4 on the LiteRT-LM repo so I decided to wait. I may try it next weekend.