neoagent 2.3.1-beta.96 → 2.3.1-beta.97
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e299764c07bc83e074bc914963bc6b6a
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"42d3d75a56efe1a2e9902f52dc8006099c45d9
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "818064985" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -129338,7 +129338,7 @@ r===$&&A.b()
|
|
|
129338
129338
|
o.push(A.ii(p,A.iY(!1,new A.a3(B.tM,A.dT(new A.cI(B.he,new A.a5V(r,p),p),p,p),p),!1,B.I,!0),p,p,0,0,0,p))}r=!1
|
|
129339
129339
|
if(!s.ay)if(!s.ch){r=s.e
|
|
129340
129340
|
r===$&&A.b()
|
|
129341
|
-
r=B.b.t("
|
|
129341
|
+
r=B.b.t("mp9vo0j5-aadf22e").length!==0&&r.b}if(r){r=s.d
|
|
129342
129342
|
r===$&&A.b()
|
|
129343
129343
|
r=r.ag&&!r.V?84:0
|
|
129344
129344
|
q=s.e
|
|
@@ -134146,7 +134146,7 @@ $S:236}
|
|
|
134146
134146
|
A.Ys.prototype={}
|
|
134147
134147
|
A.Rr.prototype={
|
|
134148
134148
|
mT(a){var s=this
|
|
134149
|
-
if(B.b.t("
|
|
134149
|
+
if(B.b.t("mp9vo0j5-aadf22e").length===0||s.a!=null)return
|
|
134150
134150
|
s.A5()
|
|
134151
134151
|
s.a=A.q1(B.PP,new A.b58(s))},
|
|
134152
134152
|
A5(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f
|
|
@@ -134164,7 +134164,7 @@ if(!t.f.b(k)){s=1
|
|
|
134164
134164
|
break}i=J.Z(k,"buildId")
|
|
134165
134165
|
h=i==null?null:B.b.t(J.r(i))
|
|
134166
134166
|
j=h==null?"":h
|
|
134167
|
-
if(J.bm(j)===0||J.d(j,"
|
|
134167
|
+
if(J.bm(j)===0||J.d(j,"mp9vo0j5-aadf22e")){s=1
|
|
134168
134168
|
break}n.b=!0
|
|
134169
134169
|
n.D()
|
|
134170
134170
|
p=2
|
|
@@ -134181,7 +134181,7 @@ case 2:return A.i(o.at(-1),r)}})
|
|
|
134181
134181
|
return A.k($async$A5,r)},
|
|
134182
134182
|
vb(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1
|
|
134183
134183
|
var $async$vb=A.h(function(a2,a3){if(a2===1){o.push(a3)
|
|
134184
|
-
s=p}for(;;)switch(s){case 0:if(B.b.t("
|
|
134184
|
+
s=p}for(;;)switch(s){case 0:if(B.b.t("mp9vo0j5-aadf22e").length===0||n.c){s=1
|
|
134185
134185
|
break}n.c=!0
|
|
134186
134186
|
n.D()
|
|
134187
134187
|
p=4
|
|
@@ -31,14 +31,14 @@ const STATIC_MODELS = [
|
|
|
31
31
|
purpose: 'coding'
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
id: 'gpt-5.
|
|
35
|
-
label: 'GPT-5.
|
|
34
|
+
id: 'gpt-5.4',
|
|
35
|
+
label: 'GPT-5.4 (Codex Default)',
|
|
36
36
|
provider: 'openai-codex',
|
|
37
37
|
purpose: 'general'
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
id: 'gpt-4
|
|
41
|
-
label: 'GPT-4
|
|
40
|
+
id: 'gpt-5.4-mini',
|
|
41
|
+
label: 'GPT-5.4 mini (Codex Fast)',
|
|
42
42
|
provider: 'openai-codex',
|
|
43
43
|
purpose: 'coding'
|
|
44
44
|
},
|
|
@@ -110,6 +110,18 @@ function extractToolCalls(response) {
|
|
|
110
110
|
return toolCalls.filter((toolCall) => toolCall.id && toolCall.function.name);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
function formatOpenAIError(err) {
|
|
114
|
+
if (!err || typeof err !== 'object') return 'Unknown OpenAI error';
|
|
115
|
+
const parts = [];
|
|
116
|
+
if (typeof err.status === 'number') parts.push(`HTTP ${err.status}`);
|
|
117
|
+
if (err.type) parts.push(`type=${err.type}`);
|
|
118
|
+
if (err.code) parts.push(`code=${err.code}`);
|
|
119
|
+
if (err.param) parts.push(`param=${err.param}`);
|
|
120
|
+
if (err.request_id) parts.push(`request_id=${err.request_id}`);
|
|
121
|
+
const message = err.message || 'Unknown OpenAI error';
|
|
122
|
+
return parts.length > 0 ? `${message} (${parts.join(', ')})` : message;
|
|
123
|
+
}
|
|
124
|
+
|
|
113
125
|
class OpenAICodexProvider extends BaseProvider {
|
|
114
126
|
constructor(config = {}) {
|
|
115
127
|
super(config);
|
|
@@ -124,15 +136,13 @@ class OpenAICodexProvider extends BaseProvider {
|
|
|
124
136
|
|
|
125
137
|
this.name = 'openai-codex';
|
|
126
138
|
this.models = [
|
|
127
|
-
'gpt-5.
|
|
128
|
-
'gpt-4
|
|
139
|
+
'gpt-5.4',
|
|
140
|
+
'gpt-5.4-mini',
|
|
129
141
|
];
|
|
130
142
|
this.reasoningModels = new Set([
|
|
131
|
-
'gpt-5.
|
|
132
|
-
'gpt-5.
|
|
133
|
-
'gpt-5.
|
|
134
|
-
'gpt-5.1-codex-max',
|
|
135
|
-
'gpt-5-codex',
|
|
143
|
+
'gpt-5.4',
|
|
144
|
+
'gpt-5.4-mini',
|
|
145
|
+
'gpt-5.4-nano',
|
|
136
146
|
]);
|
|
137
147
|
this.client = new OpenAI({
|
|
138
148
|
apiKey: config.apiKey || process.env.OPENAI_CODEX_ACCESS_TOKEN,
|
|
@@ -231,10 +241,15 @@ class OpenAICodexProvider extends BaseProvider {
|
|
|
231
241
|
async chat(messages, tools = [], options = {}) {
|
|
232
242
|
const model = options.model || this.config.model || this.getDefaultModel();
|
|
233
243
|
const request = this._buildRequest(messages, tools, options, model);
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
244
|
+
let response;
|
|
245
|
+
try {
|
|
246
|
+
response = await this.client.responses.create({
|
|
247
|
+
model,
|
|
248
|
+
...request,
|
|
249
|
+
});
|
|
250
|
+
} catch (err) {
|
|
251
|
+
throw new Error(`OpenAI Codex request failed: ${formatOpenAIError(err)}`);
|
|
252
|
+
}
|
|
238
253
|
|
|
239
254
|
const toolCalls = extractToolCalls(response);
|
|
240
255
|
|
|
@@ -254,11 +269,16 @@ class OpenAICodexProvider extends BaseProvider {
|
|
|
254
269
|
async *stream(messages, tools = [], options = {}) {
|
|
255
270
|
const model = options.model || this.config.model || this.getDefaultModel();
|
|
256
271
|
const request = this._buildRequest(messages, tools, options, model);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
272
|
+
let stream;
|
|
273
|
+
try {
|
|
274
|
+
stream = await this.client.responses.create({
|
|
275
|
+
model,
|
|
276
|
+
...request,
|
|
277
|
+
stream: true,
|
|
278
|
+
});
|
|
279
|
+
} catch (err) {
|
|
280
|
+
throw new Error(`OpenAI Codex request failed: ${formatOpenAIError(err)}`);
|
|
281
|
+
}
|
|
262
282
|
|
|
263
283
|
let content = '';
|
|
264
284
|
let finalResponse = null;
|