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 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 | No | Yes | Yes | No | Yes (`reasoning_effort` or zai `disable_reasoning`) | Non-streaming chat completions |
456
- | Groq | No | Yes | Yes | No | No | Non-streaming; shared chat-completions path |
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 when model emits tags in content |
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 | No | Yes | Yes | No | No | `tool_choice: "any"` = required |
461
- | Qwen Cloud | No | Yes | No | No | Yes (`enable_thinking` + `thinking_budget`) | Alibaba DashScope intl; hybrid models think by default — effort `none` sends explicit off |
462
- | Xiaomi | No | Yes | Yes | No | Auto | MiMo; shared chat-completions path, `reasoning_content` captured |
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 | No | Yes | Yes | No | No | Prices in the model list; text via the shared chat-completions path, separate image adapter |
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, non-streaming.
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, { provider: 'groq' }, {
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
@@ -26,6 +26,7 @@ export async function * mistral (envelope, deps = {}) {
26
26
  fetchOptions: { dispatcher: streamingDispatcher() }
27
27
  })
28
28
  yield * runChatCompletions(envelope, client, {
29
+ stream: true,
29
30
  provider: 'mistral',
30
31
  toolChoiceFlavor: 'mistral'
31
32
  }, {
@@ -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({ apiKey: envelope.auth.key, baseURL: BASE_URL })
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,
@@ -27,6 +27,7 @@ export async function * qwen (envelope, deps = {}) {
27
27
  fetchOptions: { dispatcher: streamingDispatcher() }
28
28
  })
29
29
  yield * runChatCompletions(envelope, client, {
30
+ stream: true,
30
31
  provider: 'qwen',
31
32
  reasoningField: 'qwen'
32
33
  }, {
@@ -26,6 +26,7 @@ export async function * xiaomi (envelope, deps = {}) {
26
26
  fetchOptions: { dispatcher: streamingDispatcher() }
27
27
  })
28
28
  yield * runChatCompletions(envelope, client, {
29
+ stream: true,
29
30
  provider: 'xiaomi'
30
31
  }, {
31
32
  signal: deps.signal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mohdel",
3
- "version": "1.0.3",
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.3"
138
+ "mohdel-thin-gate-linux-x64-gnu": "1.1.0"
139
139
  },
140
140
  "dependencies": {
141
141
  "@anthropic-ai/sdk": "^0.125.0",