@hasna/terminal 0.2.2 → 0.2.3
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/ai.js +4 -2
- package/dist/providers/cerebras.js +1 -1
- package/package.json +1 -1
- package/src/ai.ts +4 -2
- package/src/providers/cerebras.ts +1 -1
package/dist/ai.js
CHANGED
|
@@ -7,6 +7,8 @@ const COMPLEX_SIGNALS = [
|
|
|
7
7
|
/\b(all files?|recursively|bulk|batch)\b/i,
|
|
8
8
|
/\b(pipeline|chain|then|and then|after)\b/i,
|
|
9
9
|
/\b(if|when|unless|only if)\b/i,
|
|
10
|
+
/\b(go into|go to|navigate|cd into|enter)\b.*\b(and|then)\b/i, // multi-step navigation
|
|
11
|
+
/\b(inside|within|under)\b/i, // relative references need context awareness
|
|
10
12
|
/[|&;]{2}/, // pipes / && in NL (unusual = complex intent)
|
|
11
13
|
];
|
|
12
14
|
/** Model routing per provider */
|
|
@@ -20,10 +22,10 @@ function pickModel(nl) {
|
|
|
20
22
|
pick: isComplex ? "smart" : "fast",
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
|
-
// Cerebras —
|
|
25
|
+
// Cerebras — llama for simple, qwen for complex
|
|
24
26
|
return {
|
|
25
27
|
fast: "llama3.1-8b",
|
|
26
|
-
smart: "
|
|
28
|
+
smart: "qwen-3-235b-a22b-instruct-2507",
|
|
27
29
|
pick: isComplex ? "smart" : "fast",
|
|
28
30
|
};
|
|
29
31
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Cerebras provider — uses OpenAI-compatible API
|
|
2
2
|
// Default for open-source users. Fast inference on Llama models.
|
|
3
3
|
const CEREBRAS_BASE_URL = "https://api.cerebras.ai/v1";
|
|
4
|
-
const DEFAULT_MODEL = "
|
|
4
|
+
const DEFAULT_MODEL = "qwen-3-235b-a22b-instruct-2507";
|
|
5
5
|
export class CerebrasProvider {
|
|
6
6
|
name = "cerebras";
|
|
7
7
|
apiKey;
|
package/package.json
CHANGED
package/src/ai.ts
CHANGED
|
@@ -10,6 +10,8 @@ const COMPLEX_SIGNALS = [
|
|
|
10
10
|
/\b(all files?|recursively|bulk|batch)\b/i,
|
|
11
11
|
/\b(pipeline|chain|then|and then|after)\b/i,
|
|
12
12
|
/\b(if|when|unless|only if)\b/i,
|
|
13
|
+
/\b(go into|go to|navigate|cd into|enter)\b.*\b(and|then)\b/i, // multi-step navigation
|
|
14
|
+
/\b(inside|within|under)\b/i, // relative references need context awareness
|
|
13
15
|
/[|&;]{2}/, // pipes / && in NL (unusual = complex intent)
|
|
14
16
|
];
|
|
15
17
|
|
|
@@ -26,10 +28,10 @@ function pickModel(nl: string): { fast: string; smart: string; pick: "fast" | "s
|
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
// Cerebras —
|
|
31
|
+
// Cerebras — llama for simple, qwen for complex
|
|
30
32
|
return {
|
|
31
33
|
fast: "llama3.1-8b",
|
|
32
|
-
smart: "
|
|
34
|
+
smart: "qwen-3-235b-a22b-instruct-2507",
|
|
33
35
|
pick: isComplex ? "smart" : "fast",
|
|
34
36
|
};
|
|
35
37
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type { LLMProvider, ProviderOptions, StreamCallbacks } from "./base.js";
|
|
5
5
|
|
|
6
6
|
const CEREBRAS_BASE_URL = "https://api.cerebras.ai/v1";
|
|
7
|
-
const DEFAULT_MODEL = "
|
|
7
|
+
const DEFAULT_MODEL = "qwen-3-235b-a22b-instruct-2507";
|
|
8
8
|
|
|
9
9
|
export class CerebrasProvider implements LLMProvider {
|
|
10
10
|
readonly name = "cerebras";
|