@auroraflow/code 0.0.22 → 0.0.23
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,6 +1,9 @@
|
|
|
1
1
|
export const AURORA_SIDECAR_PORT = 17878;
|
|
2
2
|
export const AURORA_LOCALHOST = "127.0.0.1";
|
|
3
3
|
|
|
4
|
+
const CODEX_CLIENT_LOCAL_CONTEXT_WINDOW = 272000;
|
|
5
|
+
const CODEX_CLIENT_LOCAL_AUTO_COMPACT_LIMIT = 200000;
|
|
6
|
+
|
|
4
7
|
export function trimSlash(value) {
|
|
5
8
|
return String(value).replace(/\/+$/, "");
|
|
6
9
|
}
|
|
@@ -124,8 +127,8 @@ export function codexModelRuntimeLimits(model) {
|
|
|
124
127
|
throw new Error(`Codex model metadata is missing auto_compact_token_limit for ${model?.slug ?? model?.alias ?? model?.id ?? "unknown model"}`);
|
|
125
128
|
}
|
|
126
129
|
return {
|
|
127
|
-
contextWindow,
|
|
128
|
-
autoCompactTokenLimit: publishedCompactLimit
|
|
130
|
+
contextWindow: Math.min(contextWindow, CODEX_CLIENT_LOCAL_CONTEXT_WINDOW),
|
|
131
|
+
autoCompactTokenLimit: Math.min(publishedCompactLimit, CODEX_CLIENT_LOCAL_AUTO_COMPACT_LIMIT)
|
|
129
132
|
};
|
|
130
133
|
}
|
|
131
134
|
|
|
@@ -179,9 +179,9 @@ test("keeps hosted web search for supported selected models", () => {
|
|
|
179
179
|
assert.deepEqual(rewritten.tools, [{ type: "web_search" }]);
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
-
test("
|
|
182
|
+
test("keeps small models below the Codex local validation window", () => {
|
|
183
183
|
const limits = codexModelRuntimeLimits({
|
|
184
|
-
slug: "
|
|
184
|
+
slug: "deepseek/deepseek-v4-flash",
|
|
185
185
|
context_window: 128000,
|
|
186
186
|
auto_compact_token_limit: 96000
|
|
187
187
|
});
|
|
@@ -190,6 +190,24 @@ test("uses published Codex compaction limit", () => {
|
|
|
190
190
|
assert.equal(limits.autoCompactTokenLimit, 96000);
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
+
test("caps large model config to Codex local validation window", () => {
|
|
194
|
+
const model = toCodexModelInfo({
|
|
195
|
+
alias: "deepseek/deepseek-v4-flash",
|
|
196
|
+
context_window_tokens: 1050000,
|
|
197
|
+
auto_compact_token_limit: 780000,
|
|
198
|
+
supports_tools: true,
|
|
199
|
+
supports_images: true,
|
|
200
|
+
supports_thinking: true,
|
|
201
|
+
supports_web_search: true
|
|
202
|
+
});
|
|
203
|
+
const limits = codexModelRuntimeLimits(model);
|
|
204
|
+
|
|
205
|
+
assert.equal(model.context_window, 1050000);
|
|
206
|
+
assert.equal(model.auto_compact_token_limit, 780000);
|
|
207
|
+
assert.equal(limits.contextWindow, 272000);
|
|
208
|
+
assert.equal(limits.autoCompactTokenLimit, 200000);
|
|
209
|
+
});
|
|
210
|
+
|
|
193
211
|
test("rejects Codex model metadata without a context window", () => {
|
|
194
212
|
assert.throws(
|
|
195
213
|
() => codexModelRuntimeLimits({ slug: "cx/missing" }),
|