Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 27cbb7aaaf |
@@ -7,7 +7,7 @@ import { RequestPreprocessor } from "../index";
|
||||
const CLAUDE_MAX_CONTEXT = config.maxContextTokensAnthropic;
|
||||
const OPENAI_MAX_CONTEXT = config.maxContextTokensOpenAI;
|
||||
// todo: make configurable
|
||||
const GOOGLE_AI_MAX_CONTEXT = 2048000;
|
||||
const GOOGLE_AI_MAX_CONTEXT = 1024000;
|
||||
const MISTRAL_AI_MAX_CONTENT = 131072;
|
||||
|
||||
/**
|
||||
@@ -68,12 +68,6 @@ export const validateContextSize: RequestPreprocessor = async (req) => {
|
||||
modelMax = 131072;
|
||||
} else if (model.match(/^gpt-4(-\d{4})?-vision(-preview)?$/)) {
|
||||
modelMax = 131072;
|
||||
} else if (model.match(/^o1(-\d{4}-\d{2}-\d{2})?$/)) {
|
||||
modelMax = 200000;
|
||||
} else if (model.match(/^o1-mini(-\d{4}-\d{2}-\d{2})?$/)) {
|
||||
modelMax = 128000;
|
||||
} else if (model.match(/^o1-preview(-\d{4}-\d{2}-\d{2})?$/)) {
|
||||
modelMax = 128000;
|
||||
} else if (model.match(/gpt-3.5-turbo/)) {
|
||||
modelMax = 16384;
|
||||
} else if (model.match(/gpt-4-32k/)) {
|
||||
|
||||
@@ -25,7 +25,7 @@ export const OpenAIV1ChatCompletionSchema = z
|
||||
content: z.union([z.string(), OpenAIV1ChatContentArraySchema]),
|
||||
name: z.string().optional(),
|
||||
tool_calls: z.array(z.any()).optional(),
|
||||
function_call: z.array(z.any()).optional(),
|
||||
function_call: z.any().optional(),
|
||||
tool_call_id: z.string().optional(),
|
||||
}),
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user