mohdel 0.108.2 → 0.110.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/js/factory/bridge.js +5 -3
- package/package.json +10 -10
- package/src/lib/providers.js +8 -8
package/js/factory/bridge.js
CHANGED
|
@@ -278,8 +278,10 @@ function configToAuth (configuration) {
|
|
|
278
278
|
* strings and pre-shaped arrays pass through untouched.
|
|
279
279
|
*
|
|
280
280
|
* Role mapping:
|
|
281
|
-
* - factory `tool_result` → envelope `tool` (carrying
|
|
282
|
-
* `content`, and optional `name` from `toolName`).
|
|
281
|
+
* - factory `tool_result` or `tool` → envelope `tool` (carrying
|
|
282
|
+
* `toolCallId`, `content`, and optional `name` from `toolName`).
|
|
283
|
+
* Spore emits the canonical `tool` role directly; the gate path
|
|
284
|
+
* (mohdel-gate-client) preserves it, so the factory path must too.
|
|
283
285
|
* - `assistant.toolCalls` carries through as-is onto the envelope
|
|
284
286
|
* Message so adapters can emit the provider-native tool_use.
|
|
285
287
|
*
|
|
@@ -299,7 +301,7 @@ function toEnvelopePrompt (prompt) {
|
|
|
299
301
|
})
|
|
300
302
|
}
|
|
301
303
|
for (const m of prompt.messages) {
|
|
302
|
-
if (m.role === 'tool_result') {
|
|
304
|
+
if (m.role === 'tool_result' || m.role === 'tool') {
|
|
303
305
|
const msg = {
|
|
304
306
|
role: 'tool',
|
|
305
307
|
content: m.content ?? ''
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mohdel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Christophe Le Bars",
|
|
@@ -83,20 +83,20 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
|
-
"@clack/prompts": "^1.
|
|
86
|
+
"@clack/prompts": "^1.5.1",
|
|
87
87
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.218.0",
|
|
88
88
|
"@opentelemetry/sdk-node": "^0.218.0",
|
|
89
89
|
"chalk": "^5.4.0",
|
|
90
|
-
"mohdel-thin-gate-linux-x64-gnu": "0.
|
|
90
|
+
"mohdel-thin-gate-linux-x64-gnu": "0.110.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@anthropic-ai/sdk": "^0.
|
|
93
|
+
"@anthropic-ai/sdk": "^0.102.0",
|
|
94
94
|
"@cerebras/cerebras_cloud_sdk": "^1.61.1",
|
|
95
|
-
"@google/genai": "^2.
|
|
95
|
+
"@google/genai": "^2.8.0",
|
|
96
96
|
"@opentelemetry/api": "^1.9.1",
|
|
97
97
|
"env-paths": "^4.0.0",
|
|
98
|
-
"groq-sdk": "^1.2.
|
|
99
|
-
"openai": "^6.
|
|
98
|
+
"groq-sdk": "^1.2.1",
|
|
99
|
+
"openai": "^6.42.0",
|
|
100
100
|
"undici": "^7.24.5"
|
|
101
101
|
},
|
|
102
102
|
"lint-staged": {
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"gpt-tokenizer": "^3.4.0",
|
|
107
|
-
"lint-staged": "^17.0.
|
|
108
|
-
"release-it": "^20.0
|
|
107
|
+
"lint-staged": "^17.0.7",
|
|
108
|
+
"release-it": "^20.2.0",
|
|
109
109
|
"standard": "^17.1.2",
|
|
110
|
-
"vitest": "^4.1.
|
|
110
|
+
"vitest": "^4.1.8"
|
|
111
111
|
}
|
|
112
112
|
}
|
package/src/lib/providers.js
CHANGED
|
@@ -24,6 +24,14 @@ const providers = {
|
|
|
24
24
|
contextSemantics: 'shared',
|
|
25
25
|
outputCapStrategy: 'accept'
|
|
26
26
|
},
|
|
27
|
+
fireworks: {
|
|
28
|
+
sdk: 'fireworks',
|
|
29
|
+
apiKeyEnv: 'FIREWORKS_API_SK',
|
|
30
|
+
createConfiguration: apiKey => ({ apiKey, baseURL: 'https://api.fireworks.ai/inference/v1' }),
|
|
31
|
+
creators: ['meta', 'alibaba'],
|
|
32
|
+
contextSemantics: 'shared',
|
|
33
|
+
outputCapStrategy: 'accept'
|
|
34
|
+
},
|
|
27
35
|
gemini: {
|
|
28
36
|
sdk: 'gemini',
|
|
29
37
|
apiKeyEnv: 'GEMINI_API_SK',
|
|
@@ -45,14 +53,6 @@ const providers = {
|
|
|
45
53
|
createConfiguration: apiKey => ({ baseURL: 'https://api.mistral.ai/v1', apiKey }),
|
|
46
54
|
creators: ['mistral']
|
|
47
55
|
},
|
|
48
|
-
fireworks: {
|
|
49
|
-
sdk: 'fireworks',
|
|
50
|
-
apiKeyEnv: 'FIREWORKS_API_SK',
|
|
51
|
-
createConfiguration: apiKey => ({ apiKey, baseURL: 'https://api.fireworks.ai/inference/v1' }),
|
|
52
|
-
creators: ['meta', 'alibaba'],
|
|
53
|
-
contextSemantics: 'shared',
|
|
54
|
-
outputCapStrategy: 'accept'
|
|
55
|
-
},
|
|
56
56
|
novita: {
|
|
57
57
|
sdk: 'openai',
|
|
58
58
|
api: 'chatCompletions',
|