@kernel.chat/kbot 3.99.17 → 3.99.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.js +20 -1
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -881,7 +881,14 @@ export function classifyComplexity(message) {
|
|
|
881
881
|
return 'complex';
|
|
882
882
|
}
|
|
883
883
|
// Moderate: code generation, file modifications, research
|
|
884
|
-
if (/\b(create|write|add|implement|update|modify|change|fix|search|research|find|analyze|generate|test)\b/i.test(lower)) {
|
|
884
|
+
if (/\b(create|write|add|implement|update|modify|change|fix|search|research|find|analyze|generate|test|read|look|check|show|tell|describe|audit|inspect)\b/i.test(lower)) {
|
|
885
|
+
return 'moderate';
|
|
886
|
+
}
|
|
887
|
+
// Any reference to a file path or directory requires tool use, which needs
|
|
888
|
+
// the default (larger) model. The fast model is for stateless chitchat only.
|
|
889
|
+
if (/\b[\w./-]+\.(ts|tsx|js|jsx|json|md|py|rs|go|toml|yaml|yml|sh|html|css|sql)\b/i.test(lower)
|
|
890
|
+
|| /(?:\.\/|src\/|packages\/|tools\/|supabase\/|\.kbot\/|\.claude\/|~\/|\/users\/)/i.test(lower)
|
|
891
|
+
|| /\b(file|directory|folder|path|repo|codebase|package\.json|readme)\b/i.test(lower)) {
|
|
885
892
|
return 'moderate';
|
|
886
893
|
}
|
|
887
894
|
// Simple: questions, lookups, short tasks
|
|
@@ -891,6 +898,18 @@ export function classifyComplexity(message) {
|
|
|
891
898
|
export function routeModelForTask(provider, message) {
|
|
892
899
|
const complexity = classifyComplexity(message);
|
|
893
900
|
const p = PROVIDERS[provider];
|
|
901
|
+
// For Ollama, honor the user's configured local_model / fast_model before
|
|
902
|
+
// falling back to the hardcoded provider defaults. Otherwise smart routing
|
|
903
|
+
// silently picks a different model than `kbot doctor` reports.
|
|
904
|
+
if (provider === 'ollama') {
|
|
905
|
+
const cfg = loadConfigRaw();
|
|
906
|
+
if ((complexity === 'trivial' || complexity === 'simple') && cfg.fast_model) {
|
|
907
|
+
return { model: cfg.fast_model, reason: `${complexity} task → user's fast_model` };
|
|
908
|
+
}
|
|
909
|
+
if (cfg.local_model) {
|
|
910
|
+
return { model: cfg.local_model, reason: `${complexity} task → user's local_model` };
|
|
911
|
+
}
|
|
912
|
+
}
|
|
894
913
|
switch (complexity) {
|
|
895
914
|
case 'trivial':
|
|
896
915
|
case 'simple':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernel.chat/kbot",
|
|
3
|
-
"version": "3.99.
|
|
3
|
+
"version": "3.99.19",
|
|
4
4
|
"description": "Open-source terminal AI agent. 787+ tools, 35 agents, 20 providers. Dreams, learns, watches your system. Controls your phone. Fully local, fully sovereign. MIT.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|