branch: externals/llm commit 5cd44b15f208d47a03e58bc82013bdb57d54aabb Author: Andrew Hyatt <ahy...@gmail.com> Commit: GitHub <nore...@github.com>
Add Qwen3, Gemma3 and fix broken missing model warning (#193) This will fix part of https://github.com/ahyatt/ekg/issues/203 --- NEWS.org | 2 ++ llm-models.el | 12 +++++++++++- llm-provider-utils.el | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/NEWS.org b/NEWS.org index 3cdbd24dd9..8c3bab3431 100644 --- a/NEWS.org +++ b/NEWS.org @@ -1,5 +1,7 @@ * Version 0.26.0 - Call tools with =nil= when called with false JSON values +- Add Qwen 3 and Gemma 3 to model list. +- Fix broken model error message * Version 0.25.0 - Add =llm-ollama-authed= provider, which is like Ollama but takes a key. - Set Gemini 2.5 Pro to be the default Gemini model diff --git a/llm-models.el b/llm-models.el index be81782bf5..2aea2880d5 100644 --- a/llm-models.el +++ b/llm-models.el @@ -235,6 +235,11 @@ REGEX is a regular expression that can be used to identify the model, uniquely ( :capabilities '(generation free-software) ;; Apache license :context-length 8192 :regex "gemma-?2") + (make-llm-model + :name "Gemma 3" :symbol 'gemma-3 + :capabilities '(generation free-software) ;; Apache license + :context-length 128000 + :regex "gemma-?3") (make-llm-model :name "deepseek-r1" :symbol 'deepseek-r1 :capabilities '(generation free-software) ;; MIT license @@ -289,7 +294,12 @@ REGEX is a regular expression that can be used to identify the model, uniquely ( :name "Qwen 2.5" :symbol 'qwen-2.5 :capabilities '(generation tool-use) ;; Apache license for some variations only :context-length 128000 - :regex "qwen-2\\.5") + :regex "qwen-?2\\.5") + (make-llm-model + :name "Qwen 3" :symbol 'qwen-3 + :capabilities '(generation tool-use) ;; Apache license for some variations only + :context-length 32000 + :regex "qwen-?3") (make-llm-model :name "Nemotron Mini" :symbol 'nemotron-mini :capabilities '(generation tool-use) diff --git a/llm-provider-utils.el b/llm-provider-utils.el index 1936744f2c..c2035d58cd 100644 --- a/llm-provider-utils.el +++ b/llm-provider-utils.el @@ -550,9 +550,9 @@ conversation history will follow." (defun llm-provider-utils-model-token-limit (model &optional default) "Return the token limit for MODEL. If MODEL cannot be found, warn and return DEFAULT, which by default is 4096." - (let ((model (llm-models-match model))) - (if model - (llm-model-context-length model) + (let ((matched-model (llm-models-match model))) + (if matched-model + (llm-model-context-length matched-model) (warn "No model predefined for model %s, using restrictive defaults" model) (or default 4096))))