claude-codex-proxy 1.0.5-beta.16 → 1.0.5-beta.17
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 +1 -1
- package/src/direct-api.js +2 -5
package/package.json
CHANGED
package/src/direct-api.js
CHANGED
|
@@ -14,7 +14,6 @@ const require = createRequire(import.meta.url);
|
|
|
14
14
|
const packageJson = require('../package.json');
|
|
15
15
|
const API_URL = 'https://chatgpt.com/backend-api/codex/responses';
|
|
16
16
|
const APP_VERSION = packageJson.version;
|
|
17
|
-
const UPSTREAM_REQUEST_TIMEOUT_MS = 120000;
|
|
18
17
|
|
|
19
18
|
function createAnthropicUsage(upstreamUsage = {}) {
|
|
20
19
|
const usage = {
|
|
@@ -129,8 +128,7 @@ async function createResponsesAPIStreamResponse(anthropicRequest, accessToken, a
|
|
|
129
128
|
const response = await fetch(API_URL, {
|
|
130
129
|
method: 'POST',
|
|
131
130
|
headers: buildOpencodeHeaders(accessToken, accountId, context),
|
|
132
|
-
body: JSON.stringify(request)
|
|
133
|
-
signal: AbortSignal.timeout(UPSTREAM_REQUEST_TIMEOUT_MS)
|
|
131
|
+
body: JSON.stringify(request)
|
|
134
132
|
});
|
|
135
133
|
|
|
136
134
|
if (response.ok) return response;
|
|
@@ -197,8 +195,7 @@ export async function sendMessage(anthropicRequest, accessToken, accountId, cont
|
|
|
197
195
|
const response = await fetch(API_URL, {
|
|
198
196
|
method: 'POST',
|
|
199
197
|
headers: buildOpencodeHeaders(accessToken, accountId, context),
|
|
200
|
-
body: JSON.stringify(request)
|
|
201
|
-
signal: AbortSignal.timeout(UPSTREAM_REQUEST_TIMEOUT_MS)
|
|
198
|
+
body: JSON.stringify(request)
|
|
202
199
|
});
|
|
203
200
|
|
|
204
201
|
if (!response.ok) {
|