zen: fix unified endpoint for codex

This commit is contained in:
Frank
2025-10-29 15:06:35 -04:00
parent e5d89ca567
commit 972c0893dd
4 changed files with 5 additions and 2 deletions

View File

@@ -188,6 +188,7 @@ export function fromAnthropicRequest(body: any): CommonRequest {
})()
return {
model: body.model,
max_tokens: body.max_tokens,
temperature: body.temperature,
top_p: body.top_p,

View File

@@ -114,6 +114,7 @@ export function fromOaCompatibleRequest(body: any): CommonRequest {
}
return {
model: body.model,
max_tokens: body.max_tokens,
temperature: body.temperature,
top_p: body.top_p,

View File

@@ -177,6 +177,7 @@ export function fromOpenaiRequest(body: any): CommonRequest {
})()
return {
model: body.model,
max_tokens: body.max_output_tokens ?? body.max_tokens,
temperature: body.temperature,
top_p: body.top_p,
@@ -310,7 +311,7 @@ export function toOpenaiRequest(body: CommonRequest) {
metadata: (body as any).metadata,
store: (body as any).store,
user: (body as any).user,
text: { verbosity: "low" },
text: { verbosity: body.model === "gpt-5-codex" ? "medium" : "low" },
reasoning: { effort: "medium" },
}
}

View File

@@ -95,7 +95,7 @@ export interface CommonUsage {
}
export interface CommonRequest {
model?: string
model: string
max_tokens?: number
temperature?: number
top_p?: number