retry capacity-style upstream errors
This commit is contained in:
@@ -221,6 +221,8 @@ async function run() {
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
reasoning_equals: [1024],
|
||||
retryable_status_codes: [429, 503, 529],
|
||||
retryable_error_messages: ["Selected model is at capacity. Please try a different model."],
|
||||
endpoints: ["/responses", "/v1/responses"],
|
||||
non_stream_status_code: 503,
|
||||
log_match: false,
|
||||
@@ -237,6 +239,10 @@ async function run() {
|
||||
JSON.stringify(updatedGatewayConfig.reasoning_equals) === JSON.stringify([1024]),
|
||||
"Saved config file did not persist reasoning_equals",
|
||||
);
|
||||
assert(
|
||||
JSON.stringify(updatedGatewayConfig.retryable_status_codes) === JSON.stringify([429, 503, 529]),
|
||||
"Saved config file did not persist retryable_status_codes",
|
||||
);
|
||||
|
||||
const incrementalLogsResponse = await fetch(
|
||||
`http://127.0.0.1:${gatewayPort}/__codex_retry_gateway/api/logs?since_seq=${logsPayload.latest_seq}`,
|
||||
|
||||
Reference in New Issue
Block a user