scalemax 0.1.8 → 0.1.10
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/dist/configure/codex.js +2 -2
- package/dist/utils/fs.js +6 -1
- package/package.json +1 -1
package/dist/configure/codex.js
CHANGED
|
@@ -8,9 +8,9 @@ import { commandExists } from '../utils/exec.js';
|
|
|
8
8
|
const id = 'codex';
|
|
9
9
|
const name = 'Codex';
|
|
10
10
|
const provider = 'scalemax';
|
|
11
|
-
const model = '
|
|
11
|
+
const model = 'gpt-5.5';
|
|
12
12
|
function codexConfig(baseUrl) {
|
|
13
|
-
return `# ${GENERATED_HEADER}\nmodel = "${model}"\nmodel_provider = "${provider}"\
|
|
13
|
+
return `# ${GENERATED_HEADER}\nmodel = "${model}"\nmodel_provider = "${provider}"\n# Recommended ScaleMax Codex models: gpt-5.5, gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex, fable-5, fable-5-ultra.\n# Provider-internal gpt-5.3-codex-spark is routed behind the public gpt-5.3-codex Codex slug.\n\n[model_providers.${provider}]\nname = "ScaleMax"\nbase_url = "${baseUrl}"\nwire_api = "responses"\nrequires_openai_auth = true\n`;
|
|
14
14
|
}
|
|
15
15
|
function codexAuth(apiKey) {
|
|
16
16
|
return JSON.stringify({ auth_mode: 'apikey', OPENAI_API_KEY: apiKey }, null, 2) + '\n';
|
package/dist/utils/fs.js
CHANGED
|
@@ -10,7 +10,12 @@ export async function atomicWrite(file, content, mode = 0o600) {
|
|
|
10
10
|
await fs.chmod(file, mode).catch(() => undefined);
|
|
11
11
|
}
|
|
12
12
|
export function backupNameFor(file) {
|
|
13
|
-
|
|
13
|
+
const withoutDrive = file.replace(/^[A-Za-z]:[\\/]?/, '').replace(/^[\\/]+/, '');
|
|
14
|
+
const safe = withoutDrive
|
|
15
|
+
.replace(/[<>:"\/\\|?*\x00-\x1F]+/g, '__')
|
|
16
|
+
.replace(/[. ]+$/g, '_')
|
|
17
|
+
.replace(/^\.+$/, '_');
|
|
18
|
+
return safe || 'config';
|
|
14
19
|
}
|
|
15
20
|
export async function backupFile(file, home) {
|
|
16
21
|
if (!(await fs.pathExists(file)))
|