neoagent 2.3.1-beta.96 → 2.3.1-beta.98
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
|
+
6f6cc24da974d5c068bae827d247b523
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"42d3d75a56efe1a2e9902f52dc8006099c45d9
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "225948545" /* 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("mp9yfnxo-8668be4").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("mp9yfnxo-8668be4").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,"mp9yfnxo-8668be4")){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("mp9yfnxo-8668be4").length===0||n.c){s=1
|
|
134185
134185
|
break}n.c=!0
|
|
134186
134186
|
n.D()
|
|
134187
134187
|
p=4
|
|
@@ -31,17 +31,23 @@ const STATIC_MODELS = [
|
|
|
31
31
|
purpose: 'coding'
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
id: 'gpt-5.
|
|
35
|
-
label: 'GPT-5.
|
|
34
|
+
id: 'gpt-5.5',
|
|
35
|
+
label: 'GPT-5.5 (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
|
},
|
|
45
|
+
{
|
|
46
|
+
id: 'gpt-5.4',
|
|
47
|
+
label: 'GPT-5.4 (Codex Fallback)',
|
|
48
|
+
provider: 'openai-codex',
|
|
49
|
+
purpose: 'general'
|
|
50
|
+
},
|
|
45
51
|
{
|
|
46
52
|
id: 'gpt-5-nano',
|
|
47
53
|
label: 'GPT-5 Nano (Fast / Subagents)',
|
|
@@ -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,14 @@ 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.5',
|
|
140
|
+
'gpt-5.4',
|
|
141
|
+
'gpt-5.4-mini',
|
|
129
142
|
];
|
|
130
143
|
this.reasoningModels = new Set([
|
|
131
|
-
'gpt-5.
|
|
132
|
-
'gpt-5.
|
|
133
|
-
'gpt-5.
|
|
134
|
-
'gpt-5.1-codex-max',
|
|
135
|
-
'gpt-5-codex',
|
|
144
|
+
'gpt-5.5',
|
|
145
|
+
'gpt-5.4',
|
|
146
|
+
'gpt-5.4-mini',
|
|
136
147
|
]);
|
|
137
148
|
this.client = new OpenAI({
|
|
138
149
|
apiKey: config.apiKey || process.env.OPENAI_CODEX_ACCESS_TOKEN,
|
|
@@ -231,10 +242,15 @@ class OpenAICodexProvider extends BaseProvider {
|
|
|
231
242
|
async chat(messages, tools = [], options = {}) {
|
|
232
243
|
const model = options.model || this.config.model || this.getDefaultModel();
|
|
233
244
|
const request = this._buildRequest(messages, tools, options, model);
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
245
|
+
let response;
|
|
246
|
+
try {
|
|
247
|
+
response = await this.client.responses.create({
|
|
248
|
+
model,
|
|
249
|
+
...request,
|
|
250
|
+
});
|
|
251
|
+
} catch (err) {
|
|
252
|
+
throw new Error(`OpenAI Codex request failed: ${formatOpenAIError(err)}`);
|
|
253
|
+
}
|
|
238
254
|
|
|
239
255
|
const toolCalls = extractToolCalls(response);
|
|
240
256
|
|
|
@@ -254,11 +270,16 @@ class OpenAICodexProvider extends BaseProvider {
|
|
|
254
270
|
async *stream(messages, tools = [], options = {}) {
|
|
255
271
|
const model = options.model || this.config.model || this.getDefaultModel();
|
|
256
272
|
const request = this._buildRequest(messages, tools, options, model);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
273
|
+
let stream;
|
|
274
|
+
try {
|
|
275
|
+
stream = await this.client.responses.create({
|
|
276
|
+
model,
|
|
277
|
+
...request,
|
|
278
|
+
stream: true,
|
|
279
|
+
});
|
|
280
|
+
} catch (err) {
|
|
281
|
+
throw new Error(`OpenAI Codex request failed: ${formatOpenAIError(err)}`);
|
|
282
|
+
}
|
|
262
283
|
|
|
263
284
|
let content = '';
|
|
264
285
|
let finalResponse = null;
|