zen: new inference
This commit is contained in:
@@ -210,7 +210,10 @@ export async function handler(
|
||||
)
|
||||
logger.debug("REQUEST URL: " + reqUrl)
|
||||
logger.debug("REQUEST: " + reqBody.substring(0, 300) + "...")
|
||||
const res = await fetchWith429Retry(reqUrl, {
|
||||
const isNewInference = providerInfo.id.startsWith("console.") || providerInfo.id.startsWith("console-go.")
|
||||
const res = await fetchWith429Retry(
|
||||
reqUrl,
|
||||
{
|
||||
method: "POST",
|
||||
headers: (() => {
|
||||
const headers = new Headers(input.request.headers)
|
||||
@@ -240,9 +243,11 @@ export async function handler(
|
||||
// Propagate caller disconnects to the upstream provider request so
|
||||
// abandoned Console requests do not leave orphaned inference work open.
|
||||
signal: input.request.signal,
|
||||
})
|
||||
},
|
||||
{ count: isNewInference ? MAX_429_RETRIES : 0 },
|
||||
)
|
||||
|
||||
if (providerInfo.id.startsWith("console.") || providerInfo.id.startsWith("console-go.")) {
|
||||
if (isNewInference) {
|
||||
const resEndpointId = res.headers.get("x-opencode-endpoint-id")
|
||||
const resEndpointModelId = res.headers.get("x-opencode-upstream-model-id")
|
||||
if (resEndpointId && resEndpointModelId)
|
||||
|
||||
Reference in New Issue
Block a user