forgot o4 mini
This commit is contained in:
@@ -150,7 +150,8 @@ export class OpenAIKeyProvider implements KeyProvider<OpenAIKey> {
|
||||
const isGpt5Model = /^gpt-5(-mini|-nano)?(-\d{4}-\d{2}-\d{2})?$/.test(model) || model === "gpt-5-chat-latest";
|
||||
const isO1Model = /^o1(-mini|-preview)?(-\d{4}-\d{2}-\d{2})?$/.test(model);
|
||||
const isO3Model = /^o3(-mini)?(-\d{4}-\d{2}-\d{2})?$/.test(model);
|
||||
const requiresVerifiedStreaming = (isGpt5Model || isO1Model || isO3Model) && streaming;
|
||||
const isO4MiniModel = /^o4-mini(-\d{4}-\d{2}-\d{2})?$/.test(model);
|
||||
const requiresVerifiedStreaming = (isGpt5Model || isO1Model || isO3Model || isO4MiniModel) && streaming;
|
||||
|
||||
// First, filter keys based on basic criteria
|
||||
let availableKeys = this.keys.filter(
|
||||
@@ -196,7 +197,7 @@ export class OpenAIKeyProvider implements KeyProvider<OpenAIKey> {
|
||||
}
|
||||
|
||||
// For streaming requests with models that require verified organizations
|
||||
// GPT-5, o1, and o3 models require verified organizations for streaming
|
||||
// GPT-5, o1, o3, and o4-mini models require verified organizations for streaming
|
||||
if (requiresVerifiedStreaming) {
|
||||
this.log.debug(
|
||||
{ model, keyCount: availableKeys.length, streaming },
|
||||
@@ -226,7 +227,7 @@ export class OpenAIKeyProvider implements KeyProvider<OpenAIKey> {
|
||||
if (availableKeys.length === 0) {
|
||||
if (requiresVerifiedStreaming) {
|
||||
throw new PaymentRequiredError(
|
||||
"No verified OpenAI keys available for streaming GPT-5, o1, or o3 models. Only verified organizations can stream these models. Please disable streaming or contact support to verify your organization."
|
||||
"No verified OpenAI keys available for streaming GPT-5, o1, o3, or o4-mini models. Only verified organizations can stream these models. Please disable streaming or contact support to verify your organization."
|
||||
);
|
||||
}
|
||||
throw new PaymentRequiredError(
|
||||
|
||||
Reference in New Issue
Block a user