feat: add --jinja flag for tool/function calling support#162
Merged
Conversation
1a23e02 to
e0e3a4c
Compare
Add Jinja2 template rendering support to enable tool/function calling with llama.cpp's OpenAI-compatible API. Without --jinja, tool calls fail with 500 errors. This is required for models like Qwen3-32B and Mistral Small 3.2 when using tools. Changes: - Add Jinja *bool field to InferenceServiceSpec CRD - Add appendJinjaArgs helper in controller - Add Jinja support to Metal Agent executor and config - Add --jinja CLI flag to deploy command - Add sample manifest entry and controller tests Closes #126 Signed-off-by: Christopher Maher <chris@mahercode.io>
e0e3a4c to
b8b6852
Compare
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jinja(*bool) field toInferenceServiceSpecCRD, enabling Jinja2 chat template rendering via llama.cpp's--jinjaflag500 tools param requires --jinja flag)llmkube deploy --jinja)Changes
Jinja *boolfield onInferenceServiceSpecwith auto-generated deepcopy and CRD manifestappendJinjaArgs()helper, called inconstructDeployment()Jinjafield inExecutorConfig, read from CRD inensureProcess()--jinjaflag ondeploycommand with display output and builderflashAttentionpatternjinja: trueTest plan
make generatepassesmake manifestspassesmake testpasses (all existing + 3 new jinja tests)make buildcompiles successfullyllmkube deploy <model> --jinjashows "Jinja: enabled"jinja: trueproduces--jinjain container argsCloses #126