mohdel 1.0.3 → 1.1.0
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/README.md +7 -7
- package/js/session/adapters/cerebras.js +1 -0
- package/js/session/adapters/groq.js +5 -2
- package/js/session/adapters/mistral.js +1 -0
- package/js/session/adapters/novita.js +8 -2
- package/js/session/adapters/qwen.js +1 -0
- package/js/session/adapters/xiaomi.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -452,17 +452,17 @@ What each provider supports through mohdel's unified interface:
|
|
|
452
452
|
| Anthropic | Yes | Yes | Yes | No | Yes (adaptive / budget) | `identifier` → `metadata.user_id` |
|
|
453
453
|
| OpenAI | Yes | Yes | Yes | No | Yes (o-series) | GPT-5 verbosity via `outputStyle` |
|
|
454
454
|
| Gemini | Yes | Yes | Yes | Yes | Yes (`thinkingLevel` / `thinkingBudget`) | Auto-uploads large videos; content-hashed cache |
|
|
455
|
-
| Cerebras |
|
|
456
|
-
| Groq |
|
|
455
|
+
| Cerebras | Yes | Yes | Yes | No | Yes (`reasoning_effort` or zai `disable_reasoning`) | Shared chat-completions path |
|
|
456
|
+
| Groq | Yes | Yes | Yes | No | No | Shared chat-completions path |
|
|
457
457
|
| xAI | Yes | Yes | Yes | No | Auto | OpenAI Responses API over `api.x.ai/v1` |
|
|
458
|
-
| DeepSeek | No | Yes | Yes | No | No | DSML tool-call fallback
|
|
458
|
+
| DeepSeek | No | Yes | Yes | No | No | Non-streaming: the DSML tool-call fallback is only parsed off a complete response |
|
|
459
459
|
| Fireworks | Yes | Yes | Yes | No | Yes (`reasoning_effort`) | OpenAI SDK + `baseURL`; model id auto-prefixed |
|
|
460
|
-
| Mistral |
|
|
461
|
-
| Qwen Cloud |
|
|
462
|
-
| Xiaomi |
|
|
460
|
+
| Mistral | Yes | Yes | Yes | No | No | `tool_choice: "any"` = required |
|
|
461
|
+
| Qwen Cloud | Yes | Yes | No | No | Yes (`enable_thinking` + `thinking_budget`) | Alibaba DashScope intl; hybrid models think by default — effort `none` sends explicit off |
|
|
462
|
+
| Xiaomi | Yes | Yes | Yes | No | Auto | MiMo; shared chat-completions path, `reasoning_content` captured |
|
|
463
463
|
| OpenRouter | Yes | Yes | Yes | No | Varies | Meta-provider; `providerOptions.openrouter` for routing prefs |
|
|
464
464
|
| Local | Yes | Yes | Yes | No | No | Any OpenAI-compatible server; endpoint is the catalog entry's `baseURL` |
|
|
465
|
-
| Novita |
|
|
465
|
+
| Novita | Yes | Yes | Yes | No | Yes (`reasoning_content`) | Prices in the model list; text via the shared chat-completions path, separate image adapter |
|
|
466
466
|
|
|
467
467
|
Adapter capability ≠ model capability — whether a given model accepts images, tools, or thinking effort depends on the model spec in `curated.json`. The adapter passes through what the envelope supplies; the provider rejects unsupported combos.
|
|
468
468
|
|
|
@@ -17,6 +17,7 @@ import { runChatCompletions } from './_chat_completions.js'
|
|
|
17
17
|
export async function * cerebras (envelope, deps = {}) {
|
|
18
18
|
const client = deps.client ?? new Cerebras({ apiKey: envelope.auth.key })
|
|
19
19
|
yield * runChatCompletions(envelope, client, {
|
|
20
|
+
stream: true,
|
|
20
21
|
provider: 'cerebras',
|
|
21
22
|
toolChoiceFlavor: 'cerebras',
|
|
22
23
|
reasoningField: 'cerebras_zai'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Groq adapter — OpenAI-compatible chat completions
|
|
2
|
+
* Groq adapter — OpenAI-compatible chat completions.
|
|
3
3
|
*
|
|
4
4
|
* @module session/adapters/groq
|
|
5
5
|
*/
|
|
@@ -19,7 +19,10 @@ export async function * groq (envelope, deps = {}) {
|
|
|
19
19
|
apiKey: envelope.auth.key,
|
|
20
20
|
fetchOptions: { dispatcher: streamingDispatcher() }
|
|
21
21
|
})
|
|
22
|
-
yield * runChatCompletions(envelope, client, {
|
|
22
|
+
yield * runChatCompletions(envelope, client, {
|
|
23
|
+
provider: 'groq',
|
|
24
|
+
stream: true
|
|
25
|
+
}, {
|
|
23
26
|
signal: deps.signal,
|
|
24
27
|
log: deps.log,
|
|
25
28
|
span: deps.span
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import OpenAI from 'openai'
|
|
10
10
|
|
|
11
11
|
import { runChatCompletions } from './_chat_completions.js'
|
|
12
|
+
import { streamingDispatcher } from './_dispatcher.js'
|
|
12
13
|
|
|
13
14
|
const BASE_URL = 'https://api.novita.ai/openai'
|
|
14
15
|
|
|
@@ -18,9 +19,14 @@ const BASE_URL = 'https://api.novita.ai/openai'
|
|
|
18
19
|
* @returns {AsyncGenerator<import('#core/events.js').Event>}
|
|
19
20
|
*/
|
|
20
21
|
export async function * novita (envelope, deps = {}) {
|
|
21
|
-
const client = deps.client ?? new OpenAI({
|
|
22
|
+
const client = deps.client ?? new OpenAI({
|
|
23
|
+
apiKey: envelope.auth.key,
|
|
24
|
+
baseURL: BASE_URL,
|
|
25
|
+
fetchOptions: { dispatcher: streamingDispatcher() }
|
|
26
|
+
})
|
|
22
27
|
yield * runChatCompletions(envelope, client, {
|
|
23
|
-
provider: 'novita'
|
|
28
|
+
provider: 'novita',
|
|
29
|
+
stream: true
|
|
24
30
|
}, {
|
|
25
31
|
signal: deps.signal,
|
|
26
32
|
log: deps.log,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mohdel",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Christophe Le Bars",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
|
|
136
136
|
"@opentelemetry/sdk-node": "^0.222.0",
|
|
137
137
|
"chalk": "^6.0.0",
|
|
138
|
-
"mohdel-thin-gate-linux-x64-gnu": "1.0
|
|
138
|
+
"mohdel-thin-gate-linux-x64-gnu": "1.1.0"
|
|
139
139
|
},
|
|
140
140
|
"dependencies": {
|
|
141
141
|
"@anthropic-ai/sdk": "^0.125.0",
|