@kernel.chat/kbot 3.99.17 → 3.99.18

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.
Files changed (2) hide show
  1. package/dist/auth.js +12 -0
  2. package/package.json +1 -1
package/dist/auth.js CHANGED
@@ -891,6 +891,18 @@ export function classifyComplexity(message) {
891
891
  export function routeModelForTask(provider, message) {
892
892
  const complexity = classifyComplexity(message);
893
893
  const p = PROVIDERS[provider];
894
+ // For Ollama, honor the user's configured local_model / fast_model before
895
+ // falling back to the hardcoded provider defaults. Otherwise smart routing
896
+ // silently picks a different model than `kbot doctor` reports.
897
+ if (provider === 'ollama') {
898
+ const cfg = loadConfigRaw();
899
+ if ((complexity === 'trivial' || complexity === 'simple') && cfg.fast_model) {
900
+ return { model: cfg.fast_model, reason: `${complexity} task → user's fast_model` };
901
+ }
902
+ if (cfg.local_model) {
903
+ return { model: cfg.local_model, reason: `${complexity} task → user's local_model` };
904
+ }
905
+ }
894
906
  switch (complexity) {
895
907
  case 'trivial':
896
908
  case 'simple':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernel.chat/kbot",
3
- "version": "3.99.17",
3
+ "version": "3.99.18",
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": {