>>103570552
There's almost nothing to update, anon. Just restart the proxy and it'll work if the keys have o1. For reasoning factor and new developer (new system) role:
diff --git a/src/shared/api-schemas/anthropic.ts b/src/shared/api-schemas/anthropic.ts
index bce5730..dfb2e72 100644
--- a/src/shared/api-schemas/anthropic.ts
+++ b/src/shared/api-schemas/anthropic.ts
@@ -84,3 +84,3 @@ function openAIMessagesToClaudeTextPrompt(messages: OpenAIChatMessage[]) {
role = "Assistant";
- } else if (role === "system") {
+ } else if (role === "system" || role === "developer") {
role = "System";
@@ -367,3 +367,3 @@ function openAIMessagesToClaudeChatPrompt(messages: OpenAIChatMessage[]): {
// a character in the chat.
- const name = msg.role === "system" ? "System" : msg.name?.trim();
+ const name = (msg.role === "system" || msg.role === "developer") ? "System" : msg.name?.trim();
const content = convertOpenAIContent(msg.content);
@@ -397,4 +397,4 @@ function isSystemOpenAIRole(
role: OpenAIChatMessage["role"]
-): role is "system" | "function" | "tool" {
- return ["system", "function", "tool"].includes(role);
+): role is "developer" | "system" | "function" | "tool" {
+ return ["developer", "system", "function", "tool"].includes(role);
}
diff --git a/src/shared/api-schemas/openai.ts b/src/shared/api-schemas/openai.ts
index d4be629..714dec5 100644
--- a/src/shared/api-schemas/openai.ts
+++ b/src/shared/api-schemas/openai.ts
@@ -23,3 +23,3 @@ export const OpenAIV1ChatCompletionSchema = z
z.object({
- role: z.enum(["system", "user", "assistant", "tool", "function"]),
+ role: z.enum(["developer", "system", "user", "assistant", "tool", "function"]),
content: z.union([z.string(), OpenAIV1ChatContentArraySchema]),
@@ -80,2 +80,3 @@ export const OpenAIV1ChatCompletionSchema = z
response_format: z.any(),
+ reasoning_effort: z.enum(["low", "medium", "high"]).optional(),
})