claude-codex-proxy 1.0.5-beta.8 → 1.0.5-beta.9
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
|
@@ -58,17 +58,26 @@ export async function handleSetProxyMode(req, res, { port }) {
|
|
|
58
58
|
try {
|
|
59
59
|
const proxyUrl = getProxyConfigBaseUrl(req, port);
|
|
60
60
|
const apiKeyPlaceholder = '<client-api-key>';
|
|
61
|
+
const clearEnvironmentVariables = [
|
|
62
|
+
'ANTHROPIC_DEFAULT_HAIKU_MODEL',
|
|
63
|
+
'ANTHROPIC_DEFAULT_OPUS_MODEL',
|
|
64
|
+
'ANTHROPIC_DEFAULT_SONNET_MODEL',
|
|
65
|
+
'ANTHROPIC_MODEL'
|
|
66
|
+
];
|
|
67
|
+
const configureCommands = [
|
|
68
|
+
`cc config set env.ANTHROPIC_BASE_URL ${proxyUrl}`,
|
|
69
|
+
`cc config set env.ANTHROPIC_AUTH_TOKEN ${apiKeyPlaceholder}`,
|
|
70
|
+
`cc config set env.ANTHROPIC_API_KEY ${apiKeyPlaceholder}`,
|
|
71
|
+
'cc config set env.CLAUDE_CODE_AUTO_COMPACT_WINDOW 258000'
|
|
72
|
+
];
|
|
73
|
+
const clearCommands = clearEnvironmentVariables.map(variable => `cc config unset env.${variable}`);
|
|
61
74
|
const commands = {
|
|
62
|
-
bash:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`cc config set env.ANTHROPIC_BASE_URL ${proxyUrl}`,
|
|
69
|
-
`cc config set env.ANTHROPIC_API_KEY ${apiKeyPlaceholder}`,
|
|
70
|
-
'cc config set env.CLAUDE_CODE_AUTO_COMPACT_WINDOW 258000'
|
|
71
|
-
]
|
|
75
|
+
bash: configureCommands,
|
|
76
|
+
powershell: configureCommands,
|
|
77
|
+
clear: {
|
|
78
|
+
bash: clearCommands,
|
|
79
|
+
powershell: clearCommands
|
|
80
|
+
}
|
|
72
81
|
};
|
|
73
82
|
|
|
74
83
|
res.json({
|