Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
07609d50b7
commit
4dcbff0c06
1 changed files with 3 additions and 0 deletions
|
|
@ -357,11 +357,14 @@ function createClient(
|
|||
Object.assign(headers, optionsHeaders);
|
||||
}
|
||||
|
||||
const isZai = model.provider === "zai" || model.baseUrl.includes("api.z.ai");
|
||||
|
||||
return new OpenAI({
|
||||
apiKey,
|
||||
baseURL: model.baseUrl,
|
||||
dangerouslyAllowBrowser: true,
|
||||
defaultHeaders: headers,
|
||||
...(isZai && { timeout: 100_000, maxRetries: 4 }),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue